From 663c0110523b3c4d85b917c9957ffd34ece68cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E7=AC=91=E7=9D=80=E9=9D=A2=E5=AF=B9=E6=98=8E?= =?UTF-8?q?=E5=A4=A9?= <752558143@qq.com> Date: Sat, 27 Jul 2024 17:36:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=B7=A5=E9=97=AE=E9=A2=98=E6=94=B9?= =?UTF-8?q?=E6=88=90=E4=B8=80=E6=AC=A1=E6=80=A7=E6=8A=A5=E5=B7=A5=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/busi/MesWorkOrderService.java | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java index a663ee7..c23f7b9 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java @@ -804,16 +804,20 @@ public class MesWorkOrderService implements IMesWorkOrderService { DdlPreparedPack.getInPack(centerList, "workCenterCode", ddlPackBean); }*/ DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()}, new String[]{"modifyDatetime"}, ddlPackBean); - List mesProductionRecordList = productionRecordRao.findByHqlTopWhere(ddlPackBean, 1000); + + String numStr = configService.getCfgValue(organizeCode, "MES_PCN_REPORT_NUM"); + int num = StringUtils.isEmpty(numStr) ? 50 : Integer.valueOf(numStr); + + List mesProductionRecordList = productionRecordRao.findByHqlTopWhere(ddlPackBean, num); List recordList = new ArrayList<>(); // 根据零件号分组 - if(!CollectionUtils.isEmpty(mesProductionRecordList)) { + /*if(!CollectionUtils.isEmpty(mesProductionRecordList)) { Map> map = mesProductionRecordList.stream().collect(Collectors.groupingBy(MesProductionRecord::getPartNo)); map.forEach((k, v) -> { recordList.add(v.get(0)); }); - } - + }*/ + recordList.addAll(mesProductionRecordList); return recordList; } @@ -832,10 +836,10 @@ public class MesWorkOrderService implements IMesWorkOrderService { DdlPreparedPack.getNotInPack(centerList, "workCenterCode", ddlPackBean); } DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()}, new String[]{"modifyDatetime"}, ddlPackBean); - List mesProductionRecordList = productionRecordRao.findByHqlTopWhere(ddlPackBean, 10); + List mesProductionRecordList = productionRecordRao.findByHqlTopWhere(ddlPackBean, 50); List recordList = new ArrayList<>(); // 根据零件号分组 - if(!CollectionUtils.isEmpty(mesProductionRecordList)) { + /*if(!CollectionUtils.isEmpty(mesProductionRecordList)) { Map> map = mesProductionRecordList.stream().collect(Collectors.groupingBy(MesProductionRecord::getPartNo)); map.forEach((k, v) -> { DdlPackBean packBean = DdlPackBean.getDdlPackBean(); @@ -846,7 +850,9 @@ public class MesWorkOrderService implements IMesWorkOrderService { recordList.add(v.get(0)); } }); - } + }*/ + recordList.addAll(mesProductionRecordList); + return recordList; }