|
|
|
@ -96,14 +96,14 @@ public class MesAssemblyMatchSortStepService extends BaseStepService {
|
|
|
|
|
|
|
|
|
|
//验证当前是否属于装配件跳过码
|
|
|
|
|
Boolean isSkip = checkIsSkip(productionProcessContext, equipVariableCollectContextList);
|
|
|
|
|
//验证当前是否属于装配件整体跳过码
|
|
|
|
|
Boolean isAllSkip = checkIsAllSkip(productionProcessContext, equipVariableCollectContextList, prodRuleContextList, stepResult);
|
|
|
|
|
//验证当前是否属于装配件整腔跳过码
|
|
|
|
|
Boolean isCavitySkip = checkIsCavitySkip(productionProcessContext, equipVariableCollectContextList, prodRuleContextList, stepResult);
|
|
|
|
|
|
|
|
|
|
//处理待验证的装配件条码 [扫描模式匹配成功返回true, 否则返回flase, 非扫描模式需要验证是否全部匹配完成]
|
|
|
|
|
Boolean result = isAllSkip ? true : doHandleMatchAssembly(reqBean, stepResult, prodRuleContextList, equipVariableCollectContextList, isSkip);
|
|
|
|
|
Boolean result = isCavitySkip ? true : doHandleMatchAssembly(reqBean, stepResult, prodRuleContextList, equipVariableCollectContextList, isSkip);
|
|
|
|
|
|
|
|
|
|
//验证是否存在待绑定数据
|
|
|
|
|
hasUnBindAssembly = isAllSkip ? true : hasUnBindAssembly(prodRuleContextList);
|
|
|
|
|
hasUnBindAssembly = isCavitySkip ? true : hasUnBindAssembly(prodRuleContextList);
|
|
|
|
|
|
|
|
|
|
//搜集装配件条码
|
|
|
|
|
String suffix = MesPcnExtConstWords.EMPTY;
|
|
|
|
@ -112,7 +112,7 @@ public class MesAssemblyMatchSortStepService extends BaseStepService {
|
|
|
|
|
if (result || !hasUnBindAssembly) {
|
|
|
|
|
productionDispatchContextStepService.dispatchProdRuleDataContext(reqBean, prodRuleContextList);
|
|
|
|
|
assemblyShowNosortStepService.showProductionAssembly(reqBean, resultBean, productionProcessContext.getWorkCenter(), cellEquipContext, prodRuleContextList);
|
|
|
|
|
suffix = (isSkip || isAllSkip) ? stepResult.getMsg() : String.format("装配件条码%s匹配成功!", assemblySn);
|
|
|
|
|
suffix = (isSkip || isCavitySkip) ? stepResult.getMsg() : String.format("装配件条码%s匹配成功!", assemblySn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//验证是否存在待绑定数据
|
|
|
|
@ -171,11 +171,11 @@ public class MesAssemblyMatchSortStepService extends BaseStepService {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//验证当前是否属于装配件整体跳过码
|
|
|
|
|
private Boolean checkIsAllSkip(MesProductionProcessContext productionProcessContext, List<MesEquipVariableCollectContext> equipVariableCollectContextList, List<MesProdRuleContext> prodRuleContextList, StepResult stepResult) {
|
|
|
|
|
//验证当前是否属于装配件整腔跳过码
|
|
|
|
|
private Boolean checkIsCavitySkip(MesProductionProcessContext productionProcessContext, List<MesEquipVariableCollectContext> equipVariableCollectContextList, List<MesProdRuleContext> prodRuleContextList, StepResult stepResult) {
|
|
|
|
|
if (equipVariableCollectContextList.size() > 1) return false;
|
|
|
|
|
if (equipVariableCollectContextList.get(0).getMessageSource().compareTo(MesExtEnumUtil.CELL_MESSAGE_SOURCE.SCAN.getValue()) != 0) return false;
|
|
|
|
|
if (!equipVariableCollectContextList.get(0).getEquipVariableValue().equals(productionProcessContext.getAssemblyAllSkipCode())) return false;
|
|
|
|
|
if (!equipVariableCollectContextList.get(0).getEquipVariableValue().equals(productionProcessContext.getAssemblyCavitySkipCode())) return false;
|
|
|
|
|
|
|
|
|
|
//TODO
|
|
|
|
|
return true;
|
|
|
|
|