排序装配件显示列表 增加显示规则逻辑

uat-temp-nht-2504040000-lx
王杰 4 months ago
parent 1594454f9d
commit c04b47f955

@ -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(); MesAssemblyShowContext assemblyShowContext = new MesAssemblyShowContext();
BeanUtils.copyProperties(productionAssemblyContext, assemblyShowContext); BeanUtils.copyProperties(productionAssemblyContext, assemblyShowContext);
overrideAssemblyPartName(productionAssemblyContext, assemblyShowContext);
if (isNeedShowMatchRule) assemblyShowContext.setMatchTypeName(showMatchRule(assemblyShowContext)); if (isNeedShowMatchRule) assemblyShowContext.setMatchTypeName(showMatchRule(assemblyShowContext));
assemblyShowContext.setAssemblyStatusName(MesExtEnumUtil.ASSEMBLY_STATUS.valueOfDescription(assemblyShowContext.getAssemblyStatus())); assemblyShowContext.setAssemblyStatusName(MesExtEnumUtil.ASSEMBLY_STATUS.valueOfDescription(assemblyShowContext.getAssemblyStatus()));
if (MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue() != assemblyShowContext.getAssemblyStatus()) if (MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue() != assemblyShowContext.getAssemblyStatus())
@ -301,6 +302,15 @@ public class MesAssemblyShowSortStepService extends BaseStepService {
return assemblyShowContext; 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) { private String showMatchRule(MesAssemblyShowContext assemblyShowContext) {
if (!MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.checkIsNeedShowMatchRule(assemblyShowContext.getMatchType())) return MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType()); 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() + "】"; return MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType()) + "【" + assemblyShowContext.getMatchRule() + "】";

@ -78,4 +78,8 @@ public class MesAssemblyShowContext implements Serializable {
return this; return this;
} }
public MesAssemblyShowContext assemblyPartName(String assemblyPartName) {
this.assemblyPartName = assemblyPartName;
return this;
}
} }

Loading…
Cancel
Save