|
|
|
@ -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<MesLineProcess> mesList = mesLineProcessService.selectMesLineProcessByBelongTo(id);
|
|
|
|
|
List<String> processList = mesList.stream().map(MesLineProcess::getProcessName).collect(Collectors.toList());
|
|
|
|
|
List<BigDecimal> 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<String> processList = mesLine.getProcessList();
|
|
|
|
|
List<BigDecimal> 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);
|
|
|
|
|