diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortStepService.java index e8dc42e..cc277cb 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortStepService.java @@ -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() + "】"; diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesAssemblyShowContext.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesAssemblyShowContext.java index 0187f30..915e488 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesAssemblyShowContext.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/context/MesAssemblyShowContext.java @@ -78,4 +78,8 @@ public class MesAssemblyShowContext implements Serializable { return this; } + public MesAssemblyShowContext assemblyPartName(String assemblyPartName) { + this.assemblyPartName = assemblyPartName; + return this; + } }