diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesInspectionReport.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesInspectionReport.java index 9cad0db8d..ab7ff52d8 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesInspectionReport.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesInspectionReport.java @@ -84,7 +84,16 @@ public class MesInspectionReport extends BaseEntity { private String clearLine; //班组 private String team; + //班次 + private String shiftId; + public String getShiftId() { + return shiftId; + } + + public void setShiftId(String shiftId) { + this.shiftId = shiftId; + } public void setId(String id) { this.id = id; } public String getId() { return id; } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesInspectionReportServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesInspectionReportServiceImpl.java index ac4dc4b9c..80692ef1c 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesInspectionReportServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesInspectionReportServiceImpl.java @@ -33,7 +33,7 @@ public class MesInspectionReportServiceImpl implements IMesInspectionReportServi public List selectSelfMutualInspectionList(MesInspectionReport mesInspectionReport) { //mesInspectionReport.setReportName("ConversionReport"); List list = mesInspectionReportMapper.selectSelfMutualInspectionList(mesInspectionReport); - //1.查询左侧边 列 存入 + //1.查询左侧边列存入 String param = ""; if(mesInspectionReport.getReportName().equals("ConversionReport")){ param = "self_mutual_inspection"; @@ -57,7 +57,6 @@ public class MesInspectionReportServiceImpl implements IMesInspectionReportServi dto.setProjectName(project.getProjectName());//项目名 dto.setProjectCode(project.getProjectCode());//项目编码 dynamicTime.put("开始-结束",dto); - if(CollectionUtils.isEmpty(timeArray)){ dynamicTime.put("", new MesInspectionReport()); dynamicTime.put(" ", new MesInspectionReport()); diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesInspectionReportMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesInspectionReportMapper.xml index 59f86cccd..f850f1891 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesInspectionReportMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesInspectionReportMapper.xml @@ -32,10 +32,10 @@ - + @@ -127,14 +142,23 @@ mts.create_by from mes_table_self mts where 1=1 - - and report_name = #{reportName} - and line_code = #{lineCode} - and CONVERT(date, mts.check_date) = CONVERT(date,#{checkDate}) - - - and id = #{id} - + + + and report_name = CONCAT(#{reportName}, (SELECT Shift_Desc FROM base_shifts_t WHERE Shift_Id = #{shiftId})) + and line_code = #{lineCode} + and CONVERT(date, mts.check_date) = CONVERT(date,#{checkDate}) + + + AND mts.report_name = #{reportName} + and line_code = #{lineCode} + and CONVERT(date, mts.check_date) = CONVERT(date,#{checkDate}) + + + and id = #{id} + + + + and del_flag = '0' @@ -149,23 +173,31 @@ select mts.id, pow.workorder_id, - mts.product_name, - mts.product_code + pow.product_name, + pow.product_code from mes_table_self mts - left join pro_order_workorder pow on mts.product_code = pow.product_code + left join pro_order_workorder pow on mts.line_code = pow.workorder_name + LEFT JOIN base_shifts_t bst ON pow.shift_id = bst.Shift_Id where DATEDIFF(DAY, mts.check_date, #{checkDate}) = 0 and DATEDIFF(DAY, pow.product_date, #{checkDate}) = 0 and mts.del_flag = '0' - and mts.product_code is not null AND mts.product_code!= '' and pow.del_flag = '0' - and mts.report_name = #{reportName} + and pow.parent_order = '0' + + + AND mts.report_name = CONCAT(#{reportName}, bst.Shift_Desc) + + + AND mts.report_name = #{reportName} + + and mts.line_code = #{lineCode} and pow.workorder_name = #{lineCode} group by mts.id, pow.workorder_id, - mts.product_name, - mts.product_code + pow.product_name, + pow.product_code