|
|
|
@ -288,9 +288,10 @@ public class MesAssemblyShowSortStepService extends BaseStepService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//封装装配件信息
|
|
|
|
|
private MesAssemblyShowContext assemblyShowContext(MesProductionAssemblyContext productionAssemblyContext, Boolean isNeedShowMatchRule, String topRowInfo) {
|
|
|
|
|
private MesAssemblyShowContext assemblyShowContext(MesProductionAssemblySortContext productionAssemblyContext, Boolean isNeedShowMatchRule, String topRowInfo) {
|
|
|
|
|
MesAssemblyShowContext assemblyShowContext = new MesAssemblyShowContext();
|
|
|
|
|
BeanUtils.copyProperties(productionAssemblyContext, assemblyShowContext);
|
|
|
|
|
overrideAssemblyPartName(productionAssemblyContext, assemblyShowContext);
|
|
|
|
|
if (isNeedShowMatchRule) assemblyShowContext.setMatchTypeName(showMatchRule(assemblyShowContext));
|
|
|
|
|
assemblyShowContext.setAssemblyStatusName(MesExtEnumUtil.ASSEMBLY_STATUS.valueOfDescription(assemblyShowContext.getAssemblyStatus()));
|
|
|
|
|
if (MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue() != assemblyShowContext.getAssemblyStatus())
|
|
|
|
@ -301,6 +302,15 @@ public class MesAssemblyShowSortStepService extends BaseStepService {
|
|
|
|
|
return assemblyShowContext;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//显示规则
|
|
|
|
|
private MesAssemblyShowContext overrideAssemblyPartName(MesProductionAssemblySortContext productionAssemblyContext, MesAssemblyShowContext assemblyShowContext) {
|
|
|
|
|
if (StringUtils.isEmpty(productionAssemblyContext.getDisplayRule())) return assemblyShowContext;
|
|
|
|
|
if (productionAssemblyContext.getDisplayRule().compareTo(MesExtEnumUtil.DISPLAY_RULE.DISPLAY_RULE_10.getValue()) == 0) return assemblyShowContext;
|
|
|
|
|
if (productionAssemblyContext.getDisplayRule().compareTo(MesExtEnumUtil.DISPLAY_RULE.DISPLAY_RULE_20.getValue()) == 0) return assemblyShowContext.assemblyPartName(productionAssemblyContext.getActionName());
|
|
|
|
|
if (StringUtils.isEmpty(productionAssemblyContext.getActionName())) return assemblyShowContext;
|
|
|
|
|
return assemblyShowContext.assemblyPartName(assemblyShowContext.getAssemblyPartName() + MesPcnExtConstWords.SQUARE_BRACKETS_L + productionAssemblyContext.getActionName() + MesPcnExtConstWords.SQUARE_BRACKETS_R);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String showMatchRule(MesAssemblyShowContext assemblyShowContext) {
|
|
|
|
|
if (!MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.checkIsNeedShowMatchRule(assemblyShowContext.getMatchType())) return MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType());
|
|
|
|
|
return MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType()) + "【" + assemblyShowContext.getMatchRule() + "】";
|
|
|
|
|