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; }