diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesLine.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesLine.java index 498fc898..488dcb72 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesLine.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesLine.java @@ -83,6 +83,8 @@ public class MesLine extends BaseEntity { private List processList; + private List qualityList; + public void setId(String id) { this.id = id; } @@ -179,6 +181,14 @@ public class MesLine extends BaseEntity { this.processList = processList; } + public List getQualityList() { + return qualityList; + } + + public void setQualityList(List qualityList) { + this.qualityList = qualityList; + } + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesLineServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesLineServiceImpl.java index 862e8220..7cf125e8 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesLineServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesLineServiceImpl.java @@ -1,5 +1,6 @@ package com.op.mes.service.impl; +import java.math.BigDecimal; import java.util.List; import java.util.stream.Collectors; @@ -48,10 +49,12 @@ public class MesLineServiceImpl implements IMesLineService { //查询时回显线体工艺数据 List mesList = mesLineProcessService.selectMesLineProcessByBelongTo(id); List processList = mesList.stream().map(MesLineProcess::getProcessName).collect(Collectors.toList()); + List qualityList = mesList.stream().map(MesLineProcess::getQuality).collect(Collectors.toList()); MesLine mesLine = mesLineMapper.selectMesLineById(id); //设置线体数据 if (!CollectionUtils.isEmpty(processList)) { mesLine.setProcessList(processList); + mesLine.setQualityList(qualityList); } return mesLine; } @@ -101,6 +104,7 @@ public class MesLineServiceImpl implements IMesLineService { mesLine.setUpdateTime(DateUtils.getNowDate()); mesLine.setUpdateBy(SecurityUtils.getUsername()); List processList = mesLine.getProcessList(); + List qualityList = mesLine.getQualityList(); int flag = 0; if (!CollectionUtils.isEmpty(processList)) { //删除旧的工艺项 @@ -114,10 +118,11 @@ public class MesLineServiceImpl implements IMesLineService { String key = "#header.poolName"; String factoryCode = request.getHeader(key.substring(8)).replace("ds_", ""); - for (String processName : processList ) { + for (int i = 0; i < processList.size(); i++) { MesLineProcess mesLineProcess = new MesLineProcess(); mesLineProcess.setBelongTo(belongTo); - mesLineProcess.setProcessName(processName); + mesLineProcess.setProcessName(processList.get(i)); + mesLineProcess.setQuality(qualityList.get(i)); mesLineProcess.setLineCode(lineCode); mesLineProcess.setLineName(lineName); mesLineProcess.setFactoryCode(factoryCode);