From 21a01669d2dc37f211223ebb0863f1d43f54fe75 Mon Sep 17 00:00:00 2001 From: shaoyong Date: Tue, 7 May 2024 15:12:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=9E=8B=E6=9C=BA=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/op/mes/domain/MesMachineReport.java | 9 +++++++++ .../op/mes/service/impl/MesReportWorkServiceImpl.java | 2 ++ .../main/resources/mapper/mes/MesReportWorkMapper.xml | 3 +++ 3 files changed, 14 insertions(+) diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesMachineReport.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesMachineReport.java index 462be6c6..f8d993ac 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesMachineReport.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesMachineReport.java @@ -20,6 +20,7 @@ public class MesMachineReport extends BaseEntity { private String productDateStart; //查询开始时间 private String productDateEnd; //查询结束时间 private String pduCode; //数据唯一键 + private String shiftId; //班次 private List productNames; //产品名称列表 @@ -94,4 +95,12 @@ public class MesMachineReport extends BaseEntity { public void setPduCode(String pduCode) { this.pduCode = pduCode; } + + public String getShiftId() { + return shiftId; + } + + public void setShiftId(String shiftId) { + this.shiftId = shiftId; + } } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java index ed119994..55b906f5 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java @@ -622,6 +622,8 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService { } private List getDateInterval(String start, String end) { + start = start.substring(0,10); + end = end.substring(0,10); DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd"); List dateList = Lists.newArrayList(); diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml index aac387f7..b9b62aa9 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml @@ -766,6 +766,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) mt LEFT JOIN pro_order_workorder pow ON pow.workorder_id = mt.OrderCode WHERE pow.order_code IS NOT NULL + + and pow.shift_id = #{shiftId} + and pow.product_code like concat('%', #{productCode}, '%')