diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowNosortStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowNosortStepService.java index 575b040..b660cc8 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowNosortStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowNosortStepService.java @@ -291,8 +291,6 @@ public class MesAssemblyShowNosortStepService extends BaseStepService { reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), reqBean.getProcessCode(), productionProcessContext.getCraftCode()) .copy(filterList.get(0)).productSn(productionPsInContext.getProductSn()).foreignKey(productionPsInContext.foreignKey(foreignKey += 1).getForeignKey()); - if (!StringUtils.isEmpty(productionPsInContext.getWorkOrderNo())) prodRuleContext.workOrderNo(productionPsInContext.getWorkOrderNo()); - prodRuleContext = prodRuleCfgExtService.getProdRuleNosortContext(prodRuleContext); prodRuleContextList.add(prodRuleContext); @@ -398,7 +396,6 @@ public class MesAssemblyShowNosortStepService extends BaseStepService { copy(innerfilterList.get(0)).productSn(productSn.getProductSn())).foreignKey(productionPartContext.getForeignKey()); if (!StringUtils.isEmpty(productionPartContext.getWorkOrderNo())) prodRuleContext.workOrderNo(productionPartContext.getWorkOrderNo()); - else if (!StringUtils.isEmpty(productSn.getWorkOrderNo())) prodRuleContext.workOrderNo(productSn.getWorkOrderNo()); prodRuleContextList.add(prodRuleContext); @@ -468,7 +465,7 @@ public class MesAssemblyShowNosortStepService extends BaseStepService { if (null == prodRuleContext || StringUtils.isEmpty(prodRuleContext.getAssemblyDataJson())) continue; //封装匹配当前设备的装配件信息 - List assemblyShowContextList = getAssemblyShowContextList(prodRuleContext.getAssemblyDataContext(workCenter), isNeedShowMatchRule, topRowInfo); + List assemblyShowContextList = getAssemblyShowContextList(prodRuleContext, workCenter, isNeedShowMatchRule, topRowInfo); if (CollectionUtils.isEmpty(assemblyShowContextList)) continue; //装配件清单列表标题 @@ -506,13 +503,16 @@ public class MesAssemblyShowNosortStepService extends BaseStepService { } //封装匹配当前设备的装配件信息 - private List getAssemblyShowContextList(List productionAssemblyContextList, Boolean isNeedShowMatchRule, String topRowInfo) { + private List getAssemblyShowContextList(MesProdRuleContext prodRuleContext, MesWorkCenter workCenter, Boolean isNeedShowMatchRule, String topRowInfo) { + List productionAssemblyContextList = prodRuleContext.getAssemblyDataContext(workCenter); if (CollectionUtils.isEmpty(productionAssemblyContextList)) return null; List assemblyShowContextList = new ArrayList<>(); for (MesProductionAssemblyContext item : productionAssemblyContextList) { //不显示且不扫描/仅目视的不显示出来 if (null == item || MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.checkIsNoShow(item.getMatchType())) continue; - assemblyShowContextList.add(assemblyShowContext(item, isNeedShowMatchRule, topRowInfo)); + MesAssemblyShowContext assemblyShowContext = assemblyShowContext(item, isNeedShowMatchRule, topRowInfo); + assemblyShowContext.setWorkOrderNo(prodRuleContext.getWorkOrderNo()); + assemblyShowContextList.add(assemblyShowContext); } assemblyShowContextList = assemblyShowContextList.stream().filter(o -> null != o).sorted(Comparator.comparing(MesAssemblyShowContext::getRouteSeq)).collect(Collectors.toList());