From 0afffbf8f96a841432166f53f9295bf9032152e0 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 21 Apr 2025 16:24:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=BE=99=E5=85=B4?= =?UTF-8?q?=E5=8F=91=E8=BF=90=E7=9C=8B=E6=9D=BF=E7=94=9F=E4=BA=A7JPH?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apiservice/serviceimpl/busi/MesShippingKanbanCfgServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7e699dc..7189b10 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 @@ -1121,7 +1121,7 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer // Use a single query to fetch counts grouped by work center code List productionCounts = entityManager.createQuery( - "SELECT new map(pr.workCenterCode as workCenterCode, COUNT(pr) as totalCount) " + + "SELECT new map(pr.workCenterCode as workCenterCode, COUNT(DISTINCT(pr.productSn)) 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 " + From abee8487ecd4d6cb9d554b4b8447bbc9e79a3214 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 21 Apr 2025 22:22:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E8=BF=90?= =?UTF-8?q?=E5=8D=95=E6=89=93=E5=8D=B0=E7=94=9F=E4=BA=A7=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E5=8F=96=E5=80=BC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../strategy/ChengDuVolvoShippingPrintStrategyService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/sortshipping/strategy/ChengDuVolvoShippingPrintStrategyService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/sortshipping/strategy/ChengDuVolvoShippingPrintStrategyService.java index 40d48a3..c48e243 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/sortshipping/strategy/ChengDuVolvoShippingPrintStrategyService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/sortshipping/strategy/ChengDuVolvoShippingPrintStrategyService.java @@ -118,10 +118,14 @@ public class ChengDuVolvoShippingPrintStrategyService extends SortShippingDispat return null; } + String productionDate = ""; List rackIdList = new ArrayList<>(); for (MesCimVolvoJisRackIdDetail rackIdDetail : rackIdDetails) { if (rackIdDetail.getJisRackIdFid() != null && !rackIdList.contains(rackIdDetail.getJisRackIdFid())) { rackIdList.add(rackIdDetail.getJisRackIdFid()); + if (StringUtils.isEmpty(productionDate)) { + productionDate = rackIdDetail.getProductionDate(); + } } } DdlPackBean rackPackBean = DdlPackBean.getDdlPackBean(organizeCode); @@ -183,7 +187,7 @@ public class ChengDuVolvoShippingPrintStrategyService extends SortShippingDispat model.setPackageId(rackId.getJisRackId()); model.setPackageBarCode(rackId.getJisRackId()); model.setProcess("LDJIS"); - model.setDate("P" + TimeTool.getDateTimeShort().substring(2)); + model.setDate("P" + (StringUtils.isEmpty(productionDate) ? "" : productionDate.substring(2, 8))); return model; }