展示组件

tags/yfai-pcn-ext-v1.0
微笑着面对明天 11 months ago
parent 27335597ad
commit 06557113e6

@ -85,7 +85,16 @@ public class MesAssemblyShowNosortStepService extends BaseStepService {
doHandleProdRuleData(reqBean, resultBean, stepResult, workCenter, cellEquipContext, prodRuleContextList, productionPartContextList, productionPsInContextList);
//保存上下文产品加工规则信息集合
if (prodRuleContextList.size() != initSize) productionDispatchContextStepService.saveProdRuleDataContext(reqBean, prodRuleContextList);
if (prodRuleContextList.size() != initSize) {
productionDispatchContextStepService.saveProdRuleDataContext(reqBean, prodRuleContextList);
if (!CollectionUtils.isEmpty(productionPartContextList)) {
productionDispatchContextStepService.saveProductionPartContext(reqBean, productionPartContextList);
}
if (!CollectionUtils.isEmpty(productionPsInContextList)) {
productionDispatchContextStepService.saveProductionPsInContext(reqBean, productionPsInContextList);
}
}
//显示装配件信息
showProductionAssembly(reqBean, resultBean, workCenter, cellEquipContext, prodRuleContextList, productionPartContextList);
@ -213,9 +222,7 @@ public class MesAssemblyShowNosortStepService extends BaseStepService {
//获取匹配产出零件的所有加工规则
List<MesProdRuleNosortCfg> outPartNoProdRuleList = !CollectionUtils.isEmpty(prodRuleNosortCfgMap) ? prodRuleNosortCfgMap.get(productionPartContext.getPartNo()) : null;
MesProdRuleNosortCfg filter = null;
Optional<MesProductionPsInContext> optional = productionPsInContextList.stream().filter(o -> (null != o && StringUtils.isEmpty(o.getForeignKey()))).findFirst();
if (null == optional || !optional.isPresent()) break;
@ -267,9 +274,8 @@ public class MesAssemblyShowNosortStepService extends BaseStepService {
//显示装配件信息
private Boolean showProductionAssembly(StationRequestBean reqBean, StationResultBean resultBean, MesWorkCenter workCenter, MesCellEquipContext cellEquipContext, List<MesProdRuleContext> prodRuleContextList, List<MesProductionPartContext> productionPartContextList) {
Map<Integer, MesProductionPartContext> productionPartMap = productionPartContextList.stream().filter(o -> null != o).collect(Collectors.toMap(MesProductionPartContext::getForeignKey, o -> o));
Map<Integer, MesProductionPartContext> productionPartMap = productionPartContextList.stream().filter(o -> null != o && o.getForeignKey() != null).collect(Collectors.toMap(MesProductionPartContext::getForeignKey, o -> o));
List<AttrBean> attrBeanList = null;
for (MesProdRuleContext prodRuleContext : prodRuleContextList) {
@ -282,7 +288,7 @@ public class MesAssemblyShowNosortStepService extends BaseStepService {
if (CollectionUtils.isEmpty(assemblyShowContextList)) continue;
//装配件清单列表标题
if (CollectionUtils.isEmpty(attrBeanList)) attrBeanList = dataAttrList(workOrderNo);
List<AttrBean> attrBeanList = dataAttrList(workOrderNo);
//封装多表格
resultBean.addStationResultBeans(new StationResultBean().dataType(MesPcnEnumUtil.STATION_DATA_TYPE.TABLE.getValue()).dataAttrList(attrBeanList).resultList(assemblyShowContextList));
@ -321,9 +327,10 @@ public class MesAssemblyShowNosortStepService extends BaseStepService {
if (!StringUtils.isEmpty(workOrderNo)) assemblyShowContext.setWorkOrderNo(workOrderNo);
assemblyShowContext.setPartNo(prodRuleContext.getOutPartNo());
if (StringUtils.isEmpty(assemblyShowContext.getRouteSeq())) assemblyShowContext.setRouteSeq(MesPcnExtConstWords.ZERO);
if (StringUtils.isEmpty(assemblyShowContext.getAssemblyStatus())) assemblyShowContext.setAssemblyStatus(MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue());
if (MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue() == assemblyShowContext.getAssemblyStatus() && (MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.MATCH_TYPE_50.getValue() == assemblyShowContext.getMatchType() ||
MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.MATCH_TYPE_60.getValue() == assemblyShowContext.getMatchType())) assemblyShowContext.setAssemblyStatus(MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_10.getValue());
assemblyShowContext.setAssemblyStatusName(MesExtEnumUtil.ASSEMBLY_STATUS.valueOfDescription(o.getAssemblyStatus()));
assemblyShowContext.setAssemblyStatusName(MesExtEnumUtil.ASSEMBLY_STATUS.valueOfDescription(assemblyShowContext.getAssemblyStatus()));
if (MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue() != assemblyShowContext.getAssemblyStatus())
assemblyShowContext.setColor(StringUtils.isEmpty(assemblyShowContext.getShowColor()) ? MesExtEnumUtil.COLOR.GREEN.getValue() : assemblyShowContext.getShowColor());
return assemblyShowContext;

@ -46,4 +46,13 @@ public class MesAssemblyShowContext implements Serializable {
@ApiParam("装配零件状态")
private String assemblyStatusName;
@ApiParam("序号")
private Integer index;
public MesAssemblyShowContext index(Integer index){
this.index = index;
return this;
}
}

Loading…
Cancel
Save