代码调整
This commit is contained in:
@@ -38,16 +38,6 @@
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-web</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
|
||||
@@ -1649,7 +1649,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
private String saveTerminalInfo(List<OracleTerminalExcel> oracleTerminalExcels, List<OverLimitExcel> overLimitExcels) {
|
||||
List<OracleTerminalExcel.OracleTerminalExcelMsg> oracleTerminalExcelMsg = new ArrayList<>();
|
||||
//任意集合数据为空,不处理
|
||||
if (CollectionUtil.isNotEmpty(oracleTerminalExcels) && CollectionUtil.isNotEmpty(overLimitExcels)) {
|
||||
if (CollectionUtil.isNotEmpty(oracleTerminalExcels)) {
|
||||
Line temp;
|
||||
List<String> pids = new ArrayList<>();
|
||||
for (OracleTerminalExcel oracleTerminalExcel : oracleTerminalExcels) {
|
||||
@@ -1865,15 +1865,15 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
}
|
||||
}
|
||||
//获取该监测点的限值数据
|
||||
List<OverLimitExcel> overLimitList = overLimitExcels.stream()
|
||||
.filter(overLimitExcel -> overLimitExcel.getId().equals(oracleTerminalExcel.getId()))
|
||||
.collect(Collectors.toList());
|
||||
if (CollectionUtil.isEmpty(overLimitList)) {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "没有找到该监测点的限值数据"));
|
||||
//删除刚刚新增装置信息
|
||||
this.baseMapper.deleteById(temp.getId());
|
||||
continue;
|
||||
}
|
||||
// List<OverLimitExcel> overLimitList = overLimitExcels.stream()
|
||||
// .filter(overLimitExcel -> overLimitExcel.getId().equals(oracleTerminalExcel.getId()))
|
||||
// .collect(Collectors.toList());
|
||||
// if (CollectionUtil.isEmpty(overLimitList)) {
|
||||
// oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "没有找到该监测点的限值数据"));
|
||||
// //删除刚刚新增装置信息
|
||||
// this.baseMapper.deleteById(temp.getId());
|
||||
// continue;
|
||||
// }
|
||||
lineDetail.setNum(oracleTerminalExcel.getLineNum());
|
||||
//干扰源类型
|
||||
DictData loadTypeDicData = dicDataFeignClient.getDicDataByName(oracleTerminalExcel.getLoadType()).getData();
|
||||
@@ -1910,15 +1910,16 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
lineBak.setLineId(oracleTerminalExcel.getId());
|
||||
lineBakService.removeById(oracleTerminalExcel.getId());
|
||||
lineBakService.save(lineBak);
|
||||
OverLimitExcel overLimitExcel = overLimitList.get(0);
|
||||
Overlimit overlimit = new Overlimit();
|
||||
BeanUtils.copyProperties(overLimitExcel, overlimit);
|
||||
overlimit.setId(temp.getId());
|
||||
overlimitMapper.insert(overlimit);
|
||||
// OverLimitExcel overLimitExcel = overLimitList.get(0);
|
||||
// Overlimit overlimit = new Overlimit();
|
||||
// BeanUtils.copyProperties(overLimitExcel, overlimit);
|
||||
// overlimit.setId(temp.getId());
|
||||
// overlimitMapper.insert(overlimit);
|
||||
}
|
||||
}
|
||||
}
|
||||
//错误信息不为空,则以excel的形式输出到前台
|
||||
this.updatePqOverLimit();
|
||||
if (CollectionUtil.isNotEmpty(oracleTerminalExcelMsg)) {
|
||||
ExcelUtil.exportExcel("失败列表.xlsx", OracleTerminalExcel.OracleTerminalExcelMsg.class, oracleTerminalExcelMsg);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user