From c44d0cdcdf498792deee9cd055ff30e1871d01b2 Mon Sep 17 00:00:00 2001 From: "xiangwei.zhang" <752558143@qq.com> Date: Tue, 22 Apr 2025 20:21:05 +0800 Subject: [PATCH] =?UTF-8?q?46317=20=20PCN=EF=BC=9A=E5=8F=91=E8=BF=90?= =?UTF-8?q?=E7=9C=8B=E6=9D=BF=E6=9C=80=E8=BF=91=E5=8F=91=E8=BF=90VIN?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E5=8F=B7=E3=80=81=E5=BD=93=E5=A4=A9=E6=95=B4?= =?UTF-8?q?=E8=BD=A6=E6=95=B0=E3=80=81=E7=94=9F=E4=BA=A7JPH=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/busi/MesShippingKanbanCfgServiceImpl.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesShippingKanbanCfgServiceImpl.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesShippingKanbanCfgServiceImpl.java index 1e8edfa..2bac349 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesShippingKanbanCfgServiceImpl.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesShippingKanbanCfgServiceImpl.java @@ -789,8 +789,8 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer } catch (NoResultException e) { } String strCustInfoSeq = custInfoSeq != null ? Long.toString(custInfoSeq) : ""; - if (strCustInfoSeq.length() >= 6) { - values.add(strCustInfoSeq.substring(strCustInfoSeq.length() - 6)); + if (strCustInfoSeq.length() >= 5) { + values.add(strCustInfoSeq.substring(strCustInfoSeq.length() - 5)); } else { values.add(strCustInfoSeq); } @@ -824,8 +824,8 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer if (StringUtils.isEmpty(strCustInfoSeq)) { strCustInfoSeq = "0"; } - if (strCustInfoSeq.length() >= 6) { - values.add(strCustInfoSeq.substring(strCustInfoSeq.length() - 6)); + if (strCustInfoSeq.length() >= 5) { + values.add(strCustInfoSeq.substring(strCustInfoSeq.length() - 5)); } else { values.add(strCustInfoSeq); } @@ -1082,8 +1082,8 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer .setParameter("organizeCode", cfg.getOrganizeCode()) .setParameter("isValid", CommonEnumUtil.VALID) .setParameter("isDeleted", CommonEnumUtil.FALSE) - .setParameter("startDateTime", DateUtil.formatDate(nowTime)) - .setParameter("endDateTime", DateUtil.formatDate(prevHourTime)) + .setParameter("startDateTime", DateUtil.formatDate(prevHourTime)) + .setParameter("endDateTime", DateUtil.formatDate(nowTime)) .setParameter("overPoint", cfg.getOnlinePoint()) .getSingleResult(); @@ -1124,11 +1124,12 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer "SELECT new map(pr.workCenterCode as workCenterCode, COUNT(pr) as totalCount) " + "FROM " + MesProductionRecord.class.getName() + " pr " + "WHERE pr.organizeCode = :organizeCode AND pr.isDeleted = :isDeleted AND pr.isValid = :isValid " + - "AND pr.createDatetime BETWEEN :startDateTime AND :endDateTime " + + "AND pr.reportType = :reportType AND pr.createDatetime BETWEEN :startDateTime AND :endDateTime " + "GROUP BY pr.workCenterCode", Map.class) .setParameter("organizeCode", cfg.getOrganizeCode()) .setParameter("isValid", CommonEnumUtil.VALID) .setParameter("isDeleted", CommonEnumUtil.FALSE) + .setParameter("reportType", MesExtEnumUtil.MES_REPORT_TYPE.REPORT.getValue()) .setParameter("startDateTime", DateUtil.formatDate(prevHourTime)) .setParameter("endDateTime", DateUtil.formatDate(nowTime)) .getResultList();