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 a6c6317..eaabab6 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(DISTINCT(pr.productSn)) 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.reportType = :reportType AND pr.createDatetime BETWEEN :startDateTime AND :endDateTime " +