代码提交

This commit is contained in:
wr
2023-06-20 14:15:25 +08:00
parent e007c94976
commit 55dbe9e74e

View File

@@ -194,7 +194,8 @@ public class PowerDistributionareaServiceImpl extends ReplenishMybatisServiceImp
//初始化集合
List<PowerDistributionarea> info = new ArrayList<>();
List<String> orgID = new ArrayList<>();
String token = null;
List<String> opeID = new ArrayList<>();
String token = LoginToken();
//1.获取数据台账信息
//获取数据中台数据
@@ -289,8 +290,7 @@ public class PowerDistributionareaServiceImpl extends ReplenishMybatisServiceImp
continue;
}
if (StrUtil.isBlank(area.getOperationName())) {
orgID.add(area.getOperationId());
continue;
opeID.add(area.getOperationId());
}
//判断传入的电压等级,台区区域,使用性质是否为空
if(StrUtil.hasBlank(pwopTransformerPSR.getVOLTAGELEVEL_ID(),
@@ -299,12 +299,6 @@ public class PowerDistributionareaServiceImpl extends ReplenishMybatisServiceImp
){
continue;
}
if(StrUtil.hasBlank(pwopTransformerPSR.getVOLTAGELEVEL_ID(),
pwopTransformerPSR.getREGION_TYPE(),
pwopTransformerPSR.getUse_nature())
){
continue;
}
//todo 要做处理(处理)
area.setVoltageLevel(getAlgoDescribe(pwopTransformerPSR.getVOLTAGELEVEL_ID(), devVoltage));
//todo 要做处理(处理)
@@ -340,16 +334,20 @@ public class PowerDistributionareaServiceImpl extends ReplenishMybatisServiceImp
}
}
}
log.info(Thread.currentThread().getName() + "4.数据添加 info" + info + "结束----");
if (CollUtil.isNotEmpty(info)) {
log.info(Thread.currentThread().getName() + "4.数据添加 info" + info + "结束----");
LambdaQueryWrapper<PowerDistributionarea> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(PowerDistributionarea::getInputStatus, 1);
this.remove(lambdaQueryWrapper);
this.insertBatchBySlice(info, 1000);
}
if (CollUtil.isNotEmpty(orgID)) {
log.info(Thread.currentThread().getName() + "5.数据添加 orgID" + orgID + "结束----");
return message + "数据存在未知部门:" + String.join(",", orgID);
if (CollUtil.isNotEmpty(orgID)||CollUtil.isNotEmpty(opeID)) {
List<String> orgDept = orgID.stream().distinct().collect(Collectors.toList());
List<String> opeDept = opeID.stream().distinct().collect(Collectors.toList());
log.info(Thread.currentThread().getName() + "5.数据添加 orgID" + orgDept + "结束----");
return message + "1.数据存在未知部门:" + String.join(",", orgDept)+System.getProperty("line.separator")+
"2.数据存在未知运维单位部门:" + String.join(",", opeDept);
}
} catch (Exception e) {
log.error(Thread.currentThread().getName() + "链接" + e + "失败");