|
|
|
@ -69,12 +69,6 @@ public class MesAssemblyMatchSortStepService extends BaseStepService {
|
|
|
|
|
List<MesProdRuleContext> prodRuleContextList = productionDispatchContextStepService.getProdRuleDataContext(reqBean);
|
|
|
|
|
if (CollectionUtils.isEmpty(prodRuleContextList)) stepExpSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(), "当前不存在非排序加工规则数据,请重置工序!");
|
|
|
|
|
|
|
|
|
|
//获取上下文产出零件数据信息集合
|
|
|
|
|
List<MesProductionPartContext> productionPartContextList = productionDispatchContextStepService.getProductionPartContext(reqBean);
|
|
|
|
|
|
|
|
|
|
//获取上下文进料零件条码信息集合
|
|
|
|
|
List<MesProductionPsInContext> productionPsInContextList = productionDispatchContextStepService.getProductionPsInContext(reqBean);
|
|
|
|
|
|
|
|
|
|
//判断是否存在装配件清单
|
|
|
|
|
if (!checkIsNeedScanAssembly(prodRuleContextList)) return stepSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(), stepResult, "当前加工规则未配置装配件扫描项,当前无需匹配装配件条码!");
|
|
|
|
|
|
|
|
|
@ -105,6 +99,12 @@ public class MesAssemblyMatchSortStepService extends BaseStepService {
|
|
|
|
|
String assemblySn = equipVariableCollectContextList.stream().filter(o -> null != o).map(MesEquipVariableCollectContext::getEquipVariableValue).collect(Collectors.toList()).toString();
|
|
|
|
|
//匹配成功 【result=true 代表单次扫描匹配成功; hasUnBindAssembly=false 代表浑腔模式全部匹配成功】
|
|
|
|
|
if (result || !hasUnBindAssembly) {
|
|
|
|
|
//获取上下文产出零件条码信息集合
|
|
|
|
|
List<MesProductionPsOutContext> productionPsOutContextList = productionDispatchContextStepService.getProductionPsOutContext(reqBean);
|
|
|
|
|
//获取上下文工位扫描监控信息
|
|
|
|
|
MesScanMonitorContext scanMonitorContext = productionProcessContextStepService.dispatchScanMonitorContext(reqBean, true);
|
|
|
|
|
//无需扫描的需要先写库, 使用isSaveDb=1 进行标记
|
|
|
|
|
prodRuleContextList = ((MesAssemblySaveSortStepService) SpringContextsUtil.getBean("mesAssemblySaveSortStepService")).saveSortProductionAssembly(reqBean, prodRuleContextList, productionPsOutContextList, scanMonitorContext);
|
|
|
|
|
productionDispatchContextStepService.dispatchProdRuleDataContext(reqBean, prodRuleContextList);
|
|
|
|
|
((MesAssemblyShowSortStepService) SpringContextsUtil.getBean("mesAssemblyShowSortStepService")).showProductionAssembly(reqBean, resultBean, productionProcessContext.getWorkCenter(), prodRuleContextList, true, true);
|
|
|
|
|
suffix = (isSkip || isCavitySkip) ? stepResult.getMsg() : String.format("装配件条码%s匹配成功!", assemblySn);
|
|
|
|
|