修复一: 非排序第一个工位选了工单 order01,扫了主条码 sn001,产成是P1,不汇报;第二个工位不选工单, 扫描了上一个工位的主条码sn001,产成是P2,汇报, ---> 会导致 直接汇报到 order01上; 修复二:非排序选了工单显示装配件列表工单号一列没有值

master yfai-pcn-ext-v2.4
王杰 5 months ago
parent 4b1ef6b91c
commit b775ab0fa1

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

Loading…
Cancel
Save