|
|
@ -85,7 +85,16 @@ public class MesAssemblyShowNosortStepService extends BaseStepService {
|
|
|
|
doHandleProdRuleData(reqBean, resultBean, stepResult, workCenter, cellEquipContext, prodRuleContextList, productionPartContextList, productionPsInContextList);
|
|
|
|
doHandleProdRuleData(reqBean, resultBean, stepResult, workCenter, cellEquipContext, prodRuleContextList, productionPartContextList, productionPsInContextList);
|
|
|
|
|
|
|
|
|
|
|
|
//保存上下文产品加工规则信息集合
|
|
|
|
//保存上下文产品加工规则信息集合
|
|
|
|
if (prodRuleContextList.size() != initSize) productionDispatchContextStepService.saveProdRuleDataContext(reqBean, prodRuleContextList);
|
|
|
|
if (prodRuleContextList.size() != initSize) {
|
|
|
|
|
|
|
|
productionDispatchContextStepService.saveProdRuleDataContext(reqBean, prodRuleContextList);
|
|
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(productionPartContextList)) {
|
|
|
|
|
|
|
|
productionDispatchContextStepService.saveProductionPartContext(reqBean, productionPartContextList);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(productionPsInContextList)) {
|
|
|
|
|
|
|
|
productionDispatchContextStepService.saveProductionPsInContext(reqBean, productionPsInContextList);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//显示装配件信息
|
|
|
|
//显示装配件信息
|
|
|
|
showProductionAssembly(reqBean, resultBean, workCenter, cellEquipContext, prodRuleContextList, productionPartContextList);
|
|
|
|
showProductionAssembly(reqBean, resultBean, workCenter, cellEquipContext, prodRuleContextList, productionPartContextList);
|
|
|
@ -213,9 +222,7 @@ public class MesAssemblyShowNosortStepService extends BaseStepService {
|
|
|
|
|
|
|
|
|
|
|
|
//获取匹配产出零件的所有加工规则
|
|
|
|
//获取匹配产出零件的所有加工规则
|
|
|
|
List<MesProdRuleNosortCfg> outPartNoProdRuleList = !CollectionUtils.isEmpty(prodRuleNosortCfgMap) ? prodRuleNosortCfgMap.get(productionPartContext.getPartNo()) : null;
|
|
|
|
List<MesProdRuleNosortCfg> outPartNoProdRuleList = !CollectionUtils.isEmpty(prodRuleNosortCfgMap) ? prodRuleNosortCfgMap.get(productionPartContext.getPartNo()) : null;
|
|
|
|
|
|
|
|
|
|
|
|
MesProdRuleNosortCfg filter = null;
|
|
|
|
MesProdRuleNosortCfg filter = null;
|
|
|
|
|
|
|
|
|
|
|
|
Optional<MesProductionPsInContext> optional = productionPsInContextList.stream().filter(o -> (null != o && StringUtils.isEmpty(o.getForeignKey()))).findFirst();
|
|
|
|
Optional<MesProductionPsInContext> optional = productionPsInContextList.stream().filter(o -> (null != o && StringUtils.isEmpty(o.getForeignKey()))).findFirst();
|
|
|
|
if (null == optional || !optional.isPresent()) break;
|
|
|
|
if (null == optional || !optional.isPresent()) break;
|
|
|
|
|
|
|
|
|
|
|
@ -267,9 +274,8 @@ public class MesAssemblyShowNosortStepService extends BaseStepService {
|
|
|
|
//显示装配件信息
|
|
|
|
//显示装配件信息
|
|
|
|
private Boolean showProductionAssembly(StationRequestBean reqBean, StationResultBean resultBean, MesWorkCenter workCenter, MesCellEquipContext cellEquipContext, List<MesProdRuleContext> prodRuleContextList, List<MesProductionPartContext> productionPartContextList) {
|
|
|
|
private Boolean showProductionAssembly(StationRequestBean reqBean, StationResultBean resultBean, MesWorkCenter workCenter, MesCellEquipContext cellEquipContext, List<MesProdRuleContext> prodRuleContextList, List<MesProductionPartContext> productionPartContextList) {
|
|
|
|
|
|
|
|
|
|
|
|
Map<Integer, MesProductionPartContext> productionPartMap = productionPartContextList.stream().filter(o -> null != o).collect(Collectors.toMap(MesProductionPartContext::getForeignKey, o -> o));
|
|
|
|
Map<Integer, MesProductionPartContext> productionPartMap = productionPartContextList.stream().filter(o -> null != o && o.getForeignKey() != null).collect(Collectors.toMap(MesProductionPartContext::getForeignKey, o -> o));
|
|
|
|
|
|
|
|
|
|
|
|
List<AttrBean> attrBeanList = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (MesProdRuleContext prodRuleContext : prodRuleContextList) {
|
|
|
|
for (MesProdRuleContext prodRuleContext : prodRuleContextList) {
|
|
|
|
|
|
|
|
|
|
|
@ -282,7 +288,7 @@ public class MesAssemblyShowNosortStepService extends BaseStepService {
|
|
|
|
if (CollectionUtils.isEmpty(assemblyShowContextList)) continue;
|
|
|
|
if (CollectionUtils.isEmpty(assemblyShowContextList)) continue;
|
|
|
|
|
|
|
|
|
|
|
|
//装配件清单列表标题
|
|
|
|
//装配件清单列表标题
|
|
|
|
if (CollectionUtils.isEmpty(attrBeanList)) attrBeanList = dataAttrList(workOrderNo);
|
|
|
|
List<AttrBean> attrBeanList = dataAttrList(workOrderNo);
|
|
|
|
|
|
|
|
|
|
|
|
//封装多表格
|
|
|
|
//封装多表格
|
|
|
|
resultBean.addStationResultBeans(new StationResultBean().dataType(MesPcnEnumUtil.STATION_DATA_TYPE.TABLE.getValue()).dataAttrList(attrBeanList).resultList(assemblyShowContextList));
|
|
|
|
resultBean.addStationResultBeans(new StationResultBean().dataType(MesPcnEnumUtil.STATION_DATA_TYPE.TABLE.getValue()).dataAttrList(attrBeanList).resultList(assemblyShowContextList));
|
|
|
@ -321,9 +327,10 @@ public class MesAssemblyShowNosortStepService extends BaseStepService {
|
|
|
|
if (!StringUtils.isEmpty(workOrderNo)) assemblyShowContext.setWorkOrderNo(workOrderNo);
|
|
|
|
if (!StringUtils.isEmpty(workOrderNo)) assemblyShowContext.setWorkOrderNo(workOrderNo);
|
|
|
|
assemblyShowContext.setPartNo(prodRuleContext.getOutPartNo());
|
|
|
|
assemblyShowContext.setPartNo(prodRuleContext.getOutPartNo());
|
|
|
|
if (StringUtils.isEmpty(assemblyShowContext.getRouteSeq())) assemblyShowContext.setRouteSeq(MesPcnExtConstWords.ZERO);
|
|
|
|
if (StringUtils.isEmpty(assemblyShowContext.getRouteSeq())) assemblyShowContext.setRouteSeq(MesPcnExtConstWords.ZERO);
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(assemblyShowContext.getAssemblyStatus())) assemblyShowContext.setAssemblyStatus(MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue());
|
|
|
|
if (MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue() == assemblyShowContext.getAssemblyStatus() && (MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.MATCH_TYPE_50.getValue() == assemblyShowContext.getMatchType() ||
|
|
|
|
if (MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue() == assemblyShowContext.getAssemblyStatus() && (MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.MATCH_TYPE_50.getValue() == assemblyShowContext.getMatchType() ||
|
|
|
|
MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.MATCH_TYPE_60.getValue() == assemblyShowContext.getMatchType())) assemblyShowContext.setAssemblyStatus(MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_10.getValue());
|
|
|
|
MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.MATCH_TYPE_60.getValue() == assemblyShowContext.getMatchType())) assemblyShowContext.setAssemblyStatus(MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_10.getValue());
|
|
|
|
assemblyShowContext.setAssemblyStatusName(MesExtEnumUtil.ASSEMBLY_STATUS.valueOfDescription(o.getAssemblyStatus()));
|
|
|
|
assemblyShowContext.setAssemblyStatusName(MesExtEnumUtil.ASSEMBLY_STATUS.valueOfDescription(assemblyShowContext.getAssemblyStatus()));
|
|
|
|
if (MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue() != assemblyShowContext.getAssemblyStatus())
|
|
|
|
if (MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue() != assemblyShowContext.getAssemblyStatus())
|
|
|
|
assemblyShowContext.setColor(StringUtils.isEmpty(assemblyShowContext.getShowColor()) ? MesExtEnumUtil.COLOR.GREEN.getValue() : assemblyShowContext.getShowColor());
|
|
|
|
assemblyShowContext.setColor(StringUtils.isEmpty(assemblyShowContext.getShowColor()) ? MesExtEnumUtil.COLOR.GREEN.getValue() : assemblyShowContext.getShowColor());
|
|
|
|
return assemblyShowContext;
|
|
|
|
return assemblyShowContext;
|
|
|
|