报工问题改成一次性报工多个

tags/yfai-pcn-ext-v1.0
微笑着面对明天 10 months ago
parent f043086f1b
commit 663c011052

@ -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<MesProductionRecord> mesProductionRecordList = productionRecordRao.findByHqlTopWhere(ddlPackBean, 1000);
String numStr = configService.getCfgValue(organizeCode, "MES_PCN_REPORT_NUM");
int num = StringUtils.isEmpty(numStr) ? 50 : Integer.valueOf(numStr);
List<MesProductionRecord> mesProductionRecordList = productionRecordRao.findByHqlTopWhere(ddlPackBean, num);
List<MesProductionRecord> recordList = new ArrayList<>();
// 根据零件号分组
if(!CollectionUtils.isEmpty(mesProductionRecordList)) {
/*if(!CollectionUtils.isEmpty(mesProductionRecordList)) {
Map<String, List<MesProductionRecord>> 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<MesProductionRecord> mesProductionRecordList = productionRecordRao.findByHqlTopWhere(ddlPackBean, 10);
List<MesProductionRecord> mesProductionRecordList = productionRecordRao.findByHqlTopWhere(ddlPackBean, 50);
List<MesProductionRecord> recordList = new ArrayList<>();
// 根据零件号分组
if(!CollectionUtils.isEmpty(mesProductionRecordList)) {
/*if(!CollectionUtils.isEmpty(mesProductionRecordList)) {
Map<String, List<MesProductionRecord>> 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;
}

Loading…
Cancel
Save