|
|
|
@ -82,7 +82,7 @@ public class MesAssemblyShowSortStepService extends BaseStepService {
|
|
|
|
|
Integer initSize = prodRuleContextList.size();
|
|
|
|
|
|
|
|
|
|
//封装排序加工规则
|
|
|
|
|
doHandleProdRuleData(reqBean, resultBean, stepResult, workCenter, productionProcessContext, cellEquipContext, prodRuleContextList, productionPartContextList, productionPsInContextList);
|
|
|
|
|
doHandleProdRuleData(reqBean, resultBean, productionProcessContext, prodRuleContextList, productionPartContextList, productionPsInContextList);
|
|
|
|
|
|
|
|
|
|
if (prodRuleContextList.size() != initSize) {
|
|
|
|
|
//保存上下文产品加工规则信息集合
|
|
|
|
@ -91,9 +91,7 @@ public class MesAssemblyShowSortStepService extends BaseStepService {
|
|
|
|
|
if (!CollectionUtils.isEmpty(productionPartContextList)) productionDispatchContextStepService.dispatchProductionPartContext(reqBean, productionPartContextList);
|
|
|
|
|
//保存进料主条码数据
|
|
|
|
|
if (!CollectionUtils.isEmpty(productionPsInContextList)) productionDispatchContextStepService.dispatchProductionPsInContext(reqBean, productionPsInContextList);
|
|
|
|
|
} else resultBean.checkRepeat();
|
|
|
|
|
|
|
|
|
|
if (!stepResult.isCompleted()) return stepResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//显示装配件信息
|
|
|
|
|
if (!showProductionAssembly(reqBean, resultBean, workCenter, cellEquipContext, prodRuleContextList))
|
|
|
|
@ -104,7 +102,7 @@ public class MesAssemblyShowSortStepService extends BaseStepService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//查询排序线加工规则装配件数据信息
|
|
|
|
|
private void doHandleProdRuleData(StationRequestBean reqBean, StationResultBean resultBean, StepResult stepResult, MesWorkCenter workCenter, MesProductionProcessContext productionProcessContext, MesCellEquipContext cellEquipContext,
|
|
|
|
|
private void doHandleProdRuleData(StationRequestBean reqBean, StationResultBean resultBean, MesProductionProcessContext productionProcessContext,
|
|
|
|
|
List<MesProdRuleContext> prodRuleContextList, List<MesProductionPartContext> productionPartContextList, List<MesProductionPsInContext> productionPsInContextList) {
|
|
|
|
|
|
|
|
|
|
//上下文中不存在进料主条码数据信息
|
|
|
|
@ -142,7 +140,7 @@ public class MesAssemblyShowSortStepService extends BaseStepService {
|
|
|
|
|
if (CollectionUtils.isEmpty(assemblyShowContextList)) continue;
|
|
|
|
|
|
|
|
|
|
//装配件清单列表标题
|
|
|
|
|
if (CollectionUtils.isEmpty(attrBeanList)) attrBeanList = dataAttrList();
|
|
|
|
|
if (CollectionUtils.isEmpty(attrBeanList)) attrBeanList = dataAttrList(prodRuleContextList);
|
|
|
|
|
|
|
|
|
|
//封装多表格
|
|
|
|
|
resultBean.addStationResultBeans(new StationResultBean().dataType(MesPcnEnumUtil.STATION_DATA_TYPE.TABLE.getValue()).dataAttrList(attrBeanList).resultList(assemblyShowContextList));
|
|
|
|
@ -186,6 +184,7 @@ public class MesAssemblyShowSortStepService extends BaseStepService {
|
|
|
|
|
private MesAssemblyShowContext assemblyShowContext(MesProductionAssemblyContext o) {
|
|
|
|
|
MesAssemblyShowContext assemblyShowContext = new MesAssemblyShowContext();
|
|
|
|
|
BeanUtils.copyProperties(o, assemblyShowContext);
|
|
|
|
|
assemblyShowContext.setMatchTypeName(MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType()));
|
|
|
|
|
assemblyShowContext.setAssemblyStatusName(MesExtEnumUtil.ASSEMBLY_STATUS.valueOfDescription(o.getAssemblyStatus()));
|
|
|
|
|
if (MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue() != assemblyShowContext.getAssemblyStatus())
|
|
|
|
|
assemblyShowContext.setColor(StringUtils.isEmpty(assemblyShowContext.getShowColor()) ? MesExtEnumUtil.COLOR.GREEN.getValue() : assemblyShowContext.getShowColor());
|
|
|
|
@ -193,10 +192,11 @@ public class MesAssemblyShowSortStepService extends BaseStepService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//装配件清单列表标题
|
|
|
|
|
private List<AttrBean> dataAttrList() {
|
|
|
|
|
private List<AttrBean> dataAttrList(List<MesProdRuleContext> prodRuleContextList) {
|
|
|
|
|
List<AttrBean> attrBeanList = new ArrayList<>();
|
|
|
|
|
PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.INDEX, "序号");
|
|
|
|
|
PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.WORK_ORDER_NO, "生产工单编号");
|
|
|
|
|
PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.MATCH_TYPE_NAME, "装配方式");
|
|
|
|
|
if (prodRuleContextList.size() > 1) PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.WORK_ORDER_NO, "生产工单编号");
|
|
|
|
|
PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.PART_NO, "零件编码");
|
|
|
|
|
PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_PART_NO, "原料编码");
|
|
|
|
|
PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_PART_NAME, "原料名称");
|
|
|
|
|