From 20cf1b58a632bb02bb9b75e96c105d7a2519b6bc Mon Sep 17 00:00:00 2001 From: Yangwl <1726150332@qq.com> Date: Fri, 25 Apr 2025 17:22:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E8=BD=AC=E6=8D=A2/=E5=AE=8C?= =?UTF-8?q?=E4=BA=A7=E6=B8=85=E7=BA=BF=E7=82=B9=E6=A3=80=E8=A1=A8=E7=AD=89?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../op/mes/domain/MesInspectionReport.java | 9 +++ .../impl/MesInspectionReportServiceImpl.java | 3 +- .../mapper/mes/MesInspectionReportMapper.xml | 70 ++++++++++++++----- 3 files changed, 61 insertions(+), 21 deletions(-) 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