46319 PCN:装配件时效性规则需要支持大小写

uat-temp-wj-chongqingdaqu-prod-temp-46319
王杰 3 months ago
parent 952cbdbae0
commit 713fab421f

@ -92,11 +92,17 @@ public class MesTimeEfficientCfgMatchService implements IMesTimeEfficientCfgMatc
List<Object> filterList; List<Object> filterList;
//时效性规则 零件号不为空或者为空 过滤数据 //时效性规则 零件号不为空或者为空 过滤数据
if (!StringUtils.isEmpty(timeliness.getPartNo()) && !StringUtils.isEmpty(timeliness.getCraftCode())) if (!StringUtils.isEmpty(timeliness.getPartNo()) && !StringUtils.isEmpty(timeliness.getCraftCode()))
filterList = productionRecordList.stream().filter(o -> o.getPartNo().equals(timeliness.getPartNo()) && o.getCraftCode().equals(timeliness.getCraftCode())).sorted(Comparator.comparing(MesProductionRecord::getCreateDatetime).reversed()).collect(Collectors.toList()); filterList = productionRecordList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getPartNo()) && !StringUtils.isEmpty(o.getCraftCode()) && !StringUtils.isEmpty(o.getCreateDatetime())
&& o.getPartNo().toUpperCase().equals(timeliness.getPartNo().toUpperCase()) && o.getCraftCode().toUpperCase().equals(timeliness.getCraftCode().toUpperCase())))
.sorted(Comparator.comparing(MesProductionRecord::getCreateDatetime).reversed()).collect(Collectors.toList());
else if (!StringUtils.isEmpty(timeliness.getCraftCode())) else if (!StringUtils.isEmpty(timeliness.getCraftCode()))
filterList = productionRecordList.stream().filter(item -> item.getCraftCode().equals(timeliness.getCraftCode())).sorted(Comparator.comparing(MesProductionRecord::getCreateDatetime).reversed()).collect(Collectors.toList()); filterList = productionRecordList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getCraftCode()) && !StringUtils.isEmpty(o.getCreateDatetime())
&& o.getCraftCode().toUpperCase().equals(timeliness.getCraftCode().toUpperCase())))
.sorted(Comparator.comparing(MesProductionRecord::getCreateDatetime).reversed()).collect(Collectors.toList());
else else
filterList = produceSnList.stream().filter(item -> item.getPartNo().equals(timeliness.getPartNo())).sorted(Comparator.comparing(MesProduceSn::getCreateDatetime).reversed()).collect(Collectors.toList()); filterList = produceSnList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getPartNo()) && !StringUtils.isEmpty(o.getCreateDatetime())
&& o.getPartNo().toUpperCase().equals(timeliness.getPartNo().toUpperCase())))
.sorted(Comparator.comparing(MesProduceSn::getCreateDatetime).reversed()).collect(Collectors.toList());
if (CollectionUtils.isEmpty(filterList)) return backResultMap(resultMap, String.format("零件条码[%s]时效性零件号[%s]工艺[%s]验证失败,未查询到%s!", if (CollectionUtils.isEmpty(filterList)) return backResultMap(resultMap, String.format("零件条码[%s]时效性零件号[%s]工艺[%s]验证失败,未查询到%s!",
productSn, timeliness.getPartNo(), !StringUtils.isEmpty(timeliness.getCraftCode()) ? timeliness.getCraftCode() : MesPcnExtConstWords.EMPTY, !StringUtils.isEmpty(timeliness.getCraftCode()) ? "加工记录信息" : "零件条码信息")); productSn, timeliness.getPartNo(), !StringUtils.isEmpty(timeliness.getCraftCode()) ? timeliness.getCraftCode() : MesPcnExtConstWords.EMPTY, !StringUtils.isEmpty(timeliness.getCraftCode()) ? "加工记录信息" : "零件条码信息"));

Loading…
Cancel
Save