|
|
|
@ -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<MesAssemblyShowContext> assemblyShowContextList = getAssemblyShowContextList(prodRuleContext.getAssemblyDataContext(workCenter), isNeedShowMatchRule, topRowInfo);
|
|
|
|
|
List<MesAssemblyShowContext> assemblyShowContextList = getAssemblyShowContextList(prodRuleContext, workCenter, isNeedShowMatchRule, topRowInfo);
|
|
|
|
|
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;
|
|
|
|
|
List<MesAssemblyShowContext> 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());
|
|
|
|
|