From c04b47f9555e0228248068b3db057187fb7e4c66 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Thu, 3 Apr 2025 21:29:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E8=A3=85=E9=85=8D=E4=BB=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=88=97=E8=A1=A8=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=A7=84=E5=88=99=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/step/MesAssemblyShowSortStepService.java | 12 +++++++++++- .../ext/mes/pcn/pojo/context/MesAssemblyShowContext.java | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) 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; + } }