| | |
| | | [ApiExplorerSettings(GroupName = "统计报表")] |
| | | [ApiController] |
| | | [Route("api/[controller]")] |
| | | //[ChannelActionFilter] |
| | | [ChannelActionFilter] |
| | | public class ReportManagerController : Controller |
| | | { |
| | | //定义全局信息返回变量 |
| | |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[班组工资报表记录查询] |
| | | /// <summary> |
| | | /// 班组工资报表记录查询 |
| | | /// </summary> |
| | | /// <param name="compute">计算方式(逐道/末道)</param> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partspec">规格型号</param> |
| | | /// <param name="stepname">工序名称</param> |
| | | /// <param name="groupcode">生产班组</param> |
| | | /// <param name="username">操作人员</param> |
| | | /// <param name="operdate">操作时间</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "GroupSalaryReportSearch")] |
| | | [HttpGet] |
| | | public JsonResult GroupSalaryReportSearch(int page, int rows, string prop, string order, string compute, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string username = null, string operdate = null) |
| | | { |
| | | string operopendate = ""; //报工开始时间 |
| | | string operclosedate = ""; //报工结束时间 |
| | | if (operdate != "" && operdate != null) |
| | | { |
| | | operopendate = operdate.Split('~')[0].ToString(); |
| | | operclosedate = operdate.Split('~')[1].ToString(); |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = ReportManagerBLL.GroupSalaryReportSearch(compute, wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[班组工资报表记录查看报工人员] |
| | | /// <summary> |
| | | /// 班组工资报表记录查看报工人员 |
| | | /// </summary> |
| | | /// <param name="id">报工记录主表id</param> |
| | | /// <returns></returns> |
| | | [Route(template: "GroupSalaryReportSearchUser")] |
| | | [HttpGet] |
| | | public JsonResult GroupSalaryReportSearchUser(string id) |
| | | { |
| | | mes = ReportManagerBLL.GroupSalaryReportSearchUser(id); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[班组工资报表记录导出] |
| | | /// <summary> |
| | | /// 班组工资报表记录查询 |
| | | /// </summary> |
| | | /// <param name="compute">计算方式(逐道/末道)</param> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partspec">规格型号</param> |
| | | /// <param name="stepname">工序名称</param> |
| | | /// <param name="groupcode">生产班组</param> |
| | | /// <param name="username">操作人员</param> |
| | | /// <param name="operdate">操作时间</param> |
| | | /// <returns></returns> |
| | | [Route(template: "GroupSalaryReportExcelSearch")] |
| | | [HttpGet] |
| | | public JsonResult GroupSalaryReportExcelSearch(string compute, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string username = null, string operdate = null) |
| | | { |
| | | string operopendate = ""; //报工开始时间 |
| | | string operclosedate = ""; //报工结束时间 |
| | | if (operdate != "" && operdate != null) |
| | | { |
| | | operopendate = operdate.Split('~')[0].ToString(); |
| | | operclosedate = operdate.Split('~')[1].ToString(); |
| | | } |
| | | mes = ReportManagerBLL.GroupSalaryReportExcelSearch(compute, wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[人员工资明细报表] |
| | | /// <summary> |
| | | /// 人员工资明细报表 |
| | | /// </summary> |
| | | /// <param name="compute">计算方式(逐道/末道)</param> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partspec">规格型号</param> |
| | | /// <param name="stepcode">工序编号</param> |
| | | /// <param name="stepname">工序名称</param> |
| | | /// <param name="reportname">报工人员</param> |
| | | /// <param name="reportdate">报工时间</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "PeopleSalaryReportSearch")] |
| | | [HttpGet] |
| | | public JsonResult PeopleSalaryReportSearch(int page, int rows, string prop, string order, string compute, string wocode = null, string partcode = null, string partname = null, string partspec = null,string stepcode=null, string stepname = null, string reportname = null, string reportdate = null) |
| | | { |
| | | string reportopendate = ""; //报工开始时间 |
| | | string reportclosedate = ""; //报工结束时间 |
| | | if (reportdate != "" && reportdate != null) |
| | | { |
| | | reportopendate = reportdate.Split('~')[0].ToString(); |
| | | reportclosedate = reportdate.Split('~')[1].ToString(); |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = ReportManagerBLL.PeopleSalaryReportSearch(compute, wocode, partcode, partname, partspec, stepcode, stepname, reportname, reportopendate, reportclosedate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[人员工资明细报表导出] |
| | | /// <summary> |
| | | /// 人员工资明细报表导出 |
| | | /// </summary> |
| | | /// <param name="compute">计算方式(逐道/末道)</param> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partspec">规格型号</param> |
| | | /// <param name="stepcode">工序编号</param> |
| | | /// <param name="stepname">工序名称</param> |
| | | /// <param name="reportname">报工人员</param> |
| | | /// <param name="reportdate">报工时间</param> |
| | | /// <returns></returns> |
| | | [Route(template: "PeopleSalaryReportExcelSearch")] |
| | | [HttpGet] |
| | | public JsonResult PeopleSalaryReportExcelSearch(string compute, string wocode = null, string partcode = null, string partname = null, string partspec = null,string stepcode=null, string stepname = null, string reportname = null, string reportdate = null) |
| | | { |
| | | string reportopendate = ""; //报工开始时间 |
| | | string reportclosedate = ""; //报工结束时间 |
| | | if (reportdate != "" && reportdate != null) |
| | | { |
| | | reportopendate = reportdate.Split('~')[0].ToString(); |
| | | reportclosedate = reportdate.Split('~')[1].ToString(); |
| | | } |
| | | mes = ReportManagerBLL.PeopleSalaryReportExcelSearch(compute, wocode, partcode, partname, partspec,stepcode,stepname, reportname, reportopendate, reportclosedate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[委外报表记录查询] |
| | | /// <summary> |
| | | /// 委外报表记录查询 |
| | | /// </summary> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partspec">规格型号</param> |
| | | /// <param name="stepname">工序名称</param> |
| | | /// <param name="suppername">供方名称</param> |
| | | /// <param name="type">操作类型</param> |
| | | /// <param name="receivdate">收料时间</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "OutSourceReportSearch")] |
| | | [HttpGet] |
| | | public JsonResult OutSourceReportSearch(int page, int rows, string prop, string order, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string suppername = null, string type = null, string receivdate = null) |
| | | { |
| | | string receivopendate = ""; //收料开始时间 |
| | | string receivclosedate = ""; //收料结束时间 |
| | | if (receivdate != "" && receivdate != null) |
| | | { |
| | | receivopendate = receivdate.Split('~')[0].ToString(); |
| | | receivclosedate = receivdate.Split('~')[1].ToString(); |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = ReportManagerBLL.OutSourceReportSearch(wocode, partcode, partname, partspec, stepname, suppername, type, receivopendate, receivclosedate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[委外报表记录导出] |
| | | /// <summary> |
| | | /// 委外报表记录导出 |
| | | /// </summary> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partspec">规格型号</param> |
| | | /// <param name="stepname">工序名称</param> |
| | | /// <param name="suppername">供方名称</param> |
| | | /// <param name="type">操作类型</param> |
| | | /// <param name="receivdate">收料时间</param> |
| | | /// <returns></returns> |
| | | [Route(template: "OutSourceReportExcelSearch")] |
| | | [HttpGet] |
| | | public JsonResult OutSourceReportExcelSearch(string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string suppername = null, string type = null, string receivdate = null) |
| | | { |
| | | string receivopendate = ""; //收料开始时间 |
| | | string receivclosedate = ""; //收料结束时间 |
| | | if (receivdate != "" && receivdate != null) |
| | | { |
| | | receivopendate = receivdate.Split('~')[0].ToString(); |
| | | receivclosedate = receivdate.Split('~')[1].ToString(); |
| | | } |
| | | mes = ReportManagerBLL.OutSourceReportExcelSearch(wocode, partcode, partname, partspec, stepname, suppername, type, receivopendate, receivclosedate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[不良明细报表] |
| | | /// <summary> |
| | | /// 不良明细报表 |
| | | /// </summary> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partspec">规格型号</param> |
| | | /// <param name="stepname">工序名称</param> |
| | | /// <param name="defectcode">缺陷代码</param> |
| | | /// <param name="defectname">缺陷名称</param> |
| | | /// <param name="reportname">报工人员</param> |
| | | /// <param name="reportdate">报工时间</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DefectDetailsReportSearch")] |
| | | [HttpGet] |
| | | public JsonResult DefectDetailsReportSearch(int page, int rows, string prop, string order, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string defectcode = null, string defectname = null, string reportname = null, string reportdate = null) |
| | | { |
| | | string reportopendate = ""; //报工开始时间 |
| | | string reportclosedate = ""; //报工结束时间 |
| | | if (reportdate != "" && reportdate != null) |
| | | { |
| | | reportopendate = reportdate.Split('~')[0].ToString(); |
| | | reportclosedate = reportdate.Split('~')[1].ToString(); |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = ReportManagerBLL.DefectDetailsReportSearch(wocode, partcode, partname, partspec, stepname, defectcode, defectname, reportname, reportopendate, reportclosedate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[不良明细报表导出] |
| | | /// <summary> |
| | | /// 不良明细报表导出 |
| | | /// </summary> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partspec">规格型号</param> |
| | | /// <param name="stepname">工序名称</param> |
| | | /// <param name="defectcode">缺陷代码</param> |
| | | /// <param name="defectname">缺陷名称</param> |
| | | /// <param name="reportname">报工人员</param> |
| | | /// <param name="reportdate">报工时间</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DefectDetailsReportExcelSearch")] |
| | | [HttpGet] |
| | | public JsonResult DefectDetailsReportExcelSearch(string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string defectcode = null, string defectname = null, string reportname = null, string reportdate = null) |
| | | { |
| | | string reportopendate = ""; //报工开始时间 |
| | | string reportclosedate = ""; //报工结束时间 |
| | | if (reportdate != "" && reportdate != null) |
| | | { |
| | | reportopendate = reportdate.Split('~')[0].ToString(); |
| | | reportclosedate = reportdate.Split('~')[1].ToString(); |
| | | } |
| | | mes = ReportManagerBLL.DefectDetailsReportExcelSearch(wocode, partcode, partname, partspec, stepname, defectcode, defectname, reportname, reportopendate, reportclosedate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[维修明细报表] |
| | | /// <summary> |
| | | /// 维修明细报表 |
| | | /// </summary> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partspec">规格型号</param> |
| | | /// <param name="stepname">工序名称</param> |
| | | /// <param name="style">操作类型</param> |
| | | /// <param name="defectname">缺陷名称</param> |
| | | /// <param name="repairname">维修人员</param> |
| | | /// <param name="repairdate">维修时间</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MaintenanceDetailsReportSearch")] |
| | | [HttpGet] |
| | | public JsonResult MaintenanceDetailsReportSearch(int page, int rows, string prop, string order, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string style = null, string defectname = null, string repairname = null, string repairdate = null) |
| | | { |
| | | string repairopendate = ""; //维修开始时间 |
| | | string repairclosedate = ""; //维修结束时间 |
| | | if (repairdate != "" && repairdate != null) |
| | | { |
| | | repairopendate = repairdate.Split('~')[0].ToString(); |
| | | repairclosedate = repairdate.Split('~')[1].ToString(); |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = ReportManagerBLL.MaintenanceDetailsReportSearch(wocode, partcode, partname, partspec, stepname, style, defectname, repairname, repairopendate, repairclosedate, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[维修明细报表导出] |
| | | /// <summary> |
| | | /// 维修明细报表导出 |
| | | /// </summary> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partspec">规格型号</param> |
| | | /// <param name="stepname">工序名称</param> |
| | | /// <param name="style">操作类型</param> |
| | | /// <param name="defectname">缺陷名称</param> |
| | | /// <param name="repairname">维修人员</param> |
| | | /// <param name="repairdate">维修时间</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MaintenanceDetailsReportExcelSearch")] |
| | | [HttpGet] |
| | | public JsonResult MaintenanceDetailsReportExcelSearch(string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string style = null, string defectname = null, string repairname = null, string repairdate = null) |
| | | { |
| | | string repairopendate = ""; //维修开始时间 |
| | | string repairclosedate = ""; //维修结束时间 |
| | | if (repairdate != "" && repairdate != null) |
| | | { |
| | | repairopendate = repairdate.Split('~')[0].ToString(); |
| | | repairclosedate = repairdate.Split('~')[1].ToString(); |
| | | } |
| | | mes = ReportManagerBLL.MaintenanceDetailsReportExcelSearch(wocode, partcode, partname, partspec, stepname, style, defectname, repairname, repairopendate, repairclosedate); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | } |
| | | } |