1.暂降次数微调
2.报表接口调整
This commit is contained in:
@@ -39,7 +39,7 @@ public class MonitorSendController extends BaseController {
|
|||||||
@ApiOperation("国网上送接口")
|
@ApiOperation("国网上送接口")
|
||||||
@ApiImplicitParam(name = "param",value = "请求体",required = true)
|
@ApiImplicitParam(name = "param",value = "请求体",required = true)
|
||||||
public HttpResult<String> windSend(@RequestBody @Validated MonitorParam.Info param){
|
public HttpResult<String> windSend(@RequestBody @Validated MonitorParam.Info param){
|
||||||
String methodDescribe = getMethodDescribe("sendType");
|
String methodDescribe = getMethodDescribe("windSend");
|
||||||
String s = monitorSendService.sendType(param);
|
String s = monitorSendService.sendType(param);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1334,6 +1334,12 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
|
|
||||||
for (OracleTerminalExcel oracleTerminalExcel : oracleTerminalExcelList) {
|
for (OracleTerminalExcel oracleTerminalExcel : oracleTerminalExcelList) {
|
||||||
//单位
|
//单位
|
||||||
|
if(oracleTerminalExcel.getGdName().equals("省检修")){
|
||||||
|
oracleTerminalExcel.setGdName("国网河北超高压公司本部");
|
||||||
|
}else {
|
||||||
|
oracleTerminalExcel.setGdName("国网"+oracleTerminalExcel.getGdName()+"本部");
|
||||||
|
}
|
||||||
|
|
||||||
if (!mapDept.containsKey(oracleTerminalExcel.getGdName())) {
|
if (!mapDept.containsKey(oracleTerminalExcel.getGdName())) {
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "单位名称不存在,请确认单位名称是否正确"));
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "单位名称不存在,请确认单位名称是否正确"));
|
||||||
continue;
|
continue;
|
||||||
@@ -1524,141 +1530,173 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
LambdaQueryWrapper<Monitor> monitorLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<Monitor> monitorLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
monitorLambdaQueryWrapper.eq(Monitor::getLineId, lineId)
|
monitorLambdaQueryWrapper.eq(Monitor::getLineId, lineId)
|
||||||
.eq(Monitor::getName, oracleTerminalExcel.getLineName());
|
.eq(Monitor::getName, oracleTerminalExcel.getLineName());
|
||||||
Monitor monitor = monitorMapper.selectOne(monitorLambdaQueryWrapper);
|
List<Monitor> monitorList = monitorMapper.selectList(monitorLambdaQueryWrapper);
|
||||||
|
|
||||||
|
if(CollUtil.isNotEmpty(monitorList)) {
|
||||||
|
|
||||||
|
for (Monitor monitor : monitorList) {
|
||||||
|
|
||||||
|
//当前电站下面没有监测点,可以新增
|
||||||
|
Monitor monitorPO = new Monitor();
|
||||||
|
|
||||||
|
String monitorId = "04";
|
||||||
|
String one = "";
|
||||||
|
if (deptDTO.getName().contains("石家庄")) {
|
||||||
|
one = "01";
|
||||||
|
} else if (deptDTO.getName().contains("邯郸")) {
|
||||||
|
one = "02";
|
||||||
|
} else if (deptDTO.getName().contains("保定")) {
|
||||||
|
one = "03";
|
||||||
|
} else if (deptDTO.getName().contains("沧州")) {
|
||||||
|
one = "04";
|
||||||
|
} else if (deptDTO.getName().contains("邢台")) {
|
||||||
|
one = "05";
|
||||||
|
} else if (deptDTO.getName().contains("衡水")) {
|
||||||
|
one = "06";
|
||||||
|
} else if (deptDTO.getName().contains("超高压")) {
|
||||||
|
one = "07";
|
||||||
|
} else {
|
||||||
|
one = "3.14159";
|
||||||
|
}
|
||||||
|
|
||||||
|
String last = String.format("M%05d", oracleTerminalExcel.getId());
|
||||||
|
|
||||||
|
monitorPO.setMonitorId(monitorId + one + last);
|
||||||
|
|
||||||
|
|
||||||
//当前电站下面没有监测点,可以新增
|
monitorPO.setName(oracleTerminalExcel.getLineName());
|
||||||
Monitor monitorPO = new Monitor();
|
monitorPO.setPowerrName(stationName);
|
||||||
|
monitorPO.setPowerrId(stationId);
|
||||||
|
monitorPO.setOperationName(deptDTO.getName());
|
||||||
|
monitorPO.setOperationId(deptDTO.getCode());
|
||||||
|
monitorPO.setOrgName(deptDTO.getName());
|
||||||
|
monitorPO.setOrgId(deptDTO.getCode());
|
||||||
|
monitorPO.setLineName(lineName);
|
||||||
|
monitorPO.setLineId(lineId);
|
||||||
|
monitorPO.setVoltageLevel(genScale);
|
||||||
|
monitorPO.setIsUploadHead(0);
|
||||||
|
monitorPO.setMonitorOverlimitStatus(0);
|
||||||
|
monitorPO.setMonitorOverlimitStatus(0);
|
||||||
|
|
||||||
String monitorId = "04";
|
String monitorState = null;
|
||||||
String one ="";
|
switch (oracleTerminalExcel.getRunFlag()) {
|
||||||
if(deptDTO.getName().contains("石家庄")){
|
case 0:
|
||||||
one= "01";
|
monitorState = DicDataEnum.RUN.getName();
|
||||||
}else if(deptDTO.getName().contains("邯郸")){
|
break;
|
||||||
one= "02";
|
case 1:
|
||||||
}else if(deptDTO.getName().contains("保定")){
|
monitorState = DicDataEnum.DEBUGGING.getName();
|
||||||
one= "03";
|
break;
|
||||||
}else if(deptDTO.getName().contains("沧州")){
|
case 2:
|
||||||
one= "04";
|
monitorState = DicDataEnum.DECOMMISSIONING.getName();
|
||||||
}else if(deptDTO.getName().contains("邢台")){
|
break;
|
||||||
one= "05";
|
default:
|
||||||
}else if(deptDTO.getName().contains("衡水")){
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测点状态不存在,请确认后重试"));
|
||||||
one= "06";
|
break;
|
||||||
}else if(deptDTO.getName().contains("超高压")){
|
|
||||||
one= "07";
|
|
||||||
}else {
|
|
||||||
one= "3.14159";
|
|
||||||
}
|
|
||||||
|
|
||||||
String last = String.format("M%05d",oracleTerminalExcel.getId());
|
}
|
||||||
|
if (monitorStateDicMap.containsKey(monitorState)) {
|
||||||
|
monitorPO.setMonitorState(monitorStateDicMap.get(monitorState).getId());
|
||||||
|
} else {
|
||||||
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测点运行状态不存在,请确认后重试"));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
monitorPO.setMonitorId(monitorId+one+last);
|
monitorPO.setMonitorType(monitorType.getId());
|
||||||
|
monitorPO.setStandShortCapacity(oracleTerminalExcel.getStandardCapacity());
|
||||||
|
monitorPO.setMinShortCircuitCapacity(oracleTerminalExcel.getShortCapacity());
|
||||||
|
monitorPO.setUserAgreementCapacity(oracleTerminalExcel.getDealCapacity());
|
||||||
|
monitorPO.setPowerSupplyEqCapacity(oracleTerminalExcel.getDevCapacity());
|
||||||
|
DictData scale = dicDataFeignClient.getDicDataById(monitorPO.getVoltageLevel()).getData();
|
||||||
|
Overlimit overlimitTem = new Overlimit();
|
||||||
|
COverlimitUtil.voltageDeviation(overlimitTem, Float.parseFloat(scale.getValue()));
|
||||||
|
monitorPO.setVoltageDeviationLowerLimit(overlimitTem.getUvoltageDev());
|
||||||
|
monitorPO.setVoltageDeviationUpperLimit(overlimitTem.getVoltageDev());
|
||||||
|
monitorPO.setPotentialTransFormerType(potentialDic.getId());
|
||||||
|
monitorPO.setNeutralGroundingMode(neutralDic.getId());
|
||||||
|
monitorPO.setStatisticalInterval(oracleTerminalExcel.getTimeInterval());
|
||||||
|
monitorPO.setTerminalId(devId);
|
||||||
|
monitorPO.setIsSpecialSupplyElectricity(0);
|
||||||
|
|
||||||
|
monitorPO.setMonitorObjectName(oracleTerminalExcel.getObjName());
|
||||||
|
|
||||||
|
|
||||||
monitorPO.setName(oracleTerminalExcel.getLineName());
|
if (oracleTerminalExcel.getLoadType().equals("电加热负荷") ||oracleTerminalExcel.getLoadType().equals("轧机") || oracleTerminalExcel.getLoadType().equals("其他非线性负荷")) {
|
||||||
monitorPO.setPowerrName(stationName);
|
if (objTypeDicMap.containsKey("冶炼负荷")) {
|
||||||
monitorPO.setPowerrId(stationId);
|
String objTypeId = objTypeDicMap.get("冶炼负荷").getId();
|
||||||
monitorPO.setOperationName(deptDTO.getName());
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
monitorPO.setOperationId(deptDTO.getCode());
|
} else {
|
||||||
monitorPO.setOrgName(deptDTO.getName());
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "冶炼负荷字典监测标签不存在,请确认后重试"));
|
||||||
monitorPO.setOrgId(deptDTO.getCode());
|
continue;
|
||||||
monitorPO.setLineName(lineName);
|
}
|
||||||
monitorPO.setLineId(lineId);
|
} else if (oracleTerminalExcel.getLoadType().equals("商业/市政/民用/电子通讯负荷")) {
|
||||||
monitorPO.setVoltageLevel(genScale);
|
if (objTypeDicMap.containsKey("城市商业")) {
|
||||||
monitorPO.setIsUploadHead(0);
|
String objTypeId = objTypeDicMap.get("城市商业").getId();
|
||||||
monitorPO.setMonitorOverlimitStatus(0);
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
monitorPO.setMonitorOverlimitStatus(0);
|
} else {
|
||||||
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "城市商业字典监测标签不存在,请确认后重试"));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
String monitorState = null;
|
} else if (oracleTerminalExcel.getLoadType().equals("半导体制造") || oracleTerminalExcel.getLoadType().equals("精密加工")) {
|
||||||
switch (oracleTerminalExcel.getRunFlag()) {
|
if (objTypeDicMap.containsKey("敏感用户")) {
|
||||||
case 0:
|
String objTypeId = objTypeDicMap.get("敏感用户").getId();
|
||||||
monitorState = DicDataEnum.RUN.getName();
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
break;
|
} else {
|
||||||
case 1:
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "敏感用户字典监测标签不存在,请确认后重试"));
|
||||||
monitorState = DicDataEnum.DEBUGGING.getName();
|
continue;
|
||||||
break;
|
}
|
||||||
case 2:
|
|
||||||
monitorState = DicDataEnum.DECOMMISSIONING.getName();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测点状态不存在,请确认后重试"));
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
} else if (oracleTerminalExcel.getLoadType().equals("二类变电站") || oracleTerminalExcel.getLoadType().equals("三类变电站") || oracleTerminalExcel.getLoadType().equals("四类变电站")) {
|
||||||
if (monitorStateDicMap.containsKey(monitorState)) {
|
if (objTypeDicMap.containsKey("主变高压侧")) {
|
||||||
monitorPO.setMonitorState(monitorStateDicMap.get(monitorState).getId());
|
String objTypeId = objTypeDicMap.get("主变高压侧").getId();
|
||||||
} else {
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测点运行状态不存在,请确认后重试"));
|
} else {
|
||||||
continue;
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
|
}else if(oracleTerminalExcel.getLoadType().equals("跨省计量关口")){
|
||||||
|
if (objTypeDicMap.containsKey("跨省联络线")) {
|
||||||
|
String objTypeId = objTypeDicMap.get("跨省联络线").getId();
|
||||||
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
|
} else {
|
||||||
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "跨省联络线字典监测标签不存在,请确认后重试"));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
monitorPO.setMonitorType(monitorType.getId());
|
}else if(oracleTerminalExcel.getLoadType().equals("光伏电站")){
|
||||||
monitorPO.setStandShortCapacity(oracleTerminalExcel.getStandardCapacity());
|
if (objTypeDicMap.containsKey("光伏电站")) {
|
||||||
monitorPO.setMinShortCircuitCapacity(oracleTerminalExcel.getShortCapacity());
|
String objTypeId = objTypeDicMap.get("光伏电站").getId();
|
||||||
monitorPO.setUserAgreementCapacity(oracleTerminalExcel.getDealCapacity());
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
monitorPO.setPowerSupplyEqCapacity(oracleTerminalExcel.getDevCapacity());
|
} else {
|
||||||
DictData scale = dicDataFeignClient.getDicDataById(monitorPO.getVoltageLevel()).getData();
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "光伏电站字典监测标签不存在,请确认后重试"));
|
||||||
Overlimit overlimitTem = new Overlimit();
|
continue;
|
||||||
COverlimitUtil.voltageDeviation(overlimitTem, Float.parseFloat(scale.getValue()));
|
}
|
||||||
monitorPO.setVoltageDeviationLowerLimit(overlimitTem.getUvoltageDev());
|
|
||||||
monitorPO.setVoltageDeviationUpperLimit(overlimitTem.getVoltageDev());
|
|
||||||
monitorPO.setPotentialTransFormerType(potentialDic.getId());
|
|
||||||
monitorPO.setNeutralGroundingMode(neutralDic.getId());
|
|
||||||
monitorPO.setStatisticalInterval(oracleTerminalExcel.getTimeInterval());
|
|
||||||
monitorPO.setTerminalId(devId);
|
|
||||||
monitorPO.setIsSpecialSupplyElectricity(0);
|
|
||||||
|
|
||||||
monitorPO.setMonitorObjectName(oracleTerminalExcel.getObjName());
|
} else {
|
||||||
|
if (objTypeDicMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
||||||
|
String objTypeId = objTypeDicMap.get(oracleTerminalExcel.getLoadType()).getId();
|
||||||
|
monitorPO.setMonitorTag(objTypeId);
|
||||||
|
} else {
|
||||||
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//监测点对象类型
|
||||||
|
|
||||||
if(oracleTerminalExcel.getLoadType().equals("电加热负荷") || oracleTerminalExcel.getLoadType().equals("商业/市政/民用/电子通讯负荷") ||oracleTerminalExcel.getLoadType().equals("其他非线性负荷")){
|
if (objTypeMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
||||||
if (objTypeDicMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
String objTypeId = objTypeMap.get(oracleTerminalExcel.getLoadType()).getId();
|
||||||
String objTypeId = objTypeDicMap.get("冶炼负荷").getId();
|
monitorPO.setObjType(objTypeId);
|
||||||
monitorPO.setMonitorTag(objTypeId);
|
}else if(oracleTerminalExcel.getLoadType().equals("电加热负荷")){
|
||||||
}else {
|
String objTypeId = objTypeMap.get("电加热负荷(含电弧炉、中频炉、电热炉、单/多晶硅生产设备)").getId();
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
monitorPO.setObjType(objTypeId);
|
||||||
continue;
|
} else {
|
||||||
}
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, oracleTerminalExcel.getLoadType() + "字典监测点对象类型不存在,请确认后重试"));
|
||||||
}else if(oracleTerminalExcel.getLoadType().equals("半导体制造") ||oracleTerminalExcel.getLoadType().equals("精密加工")){
|
continue;
|
||||||
if (objTypeDicMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
}
|
||||||
String objTypeId = objTypeDicMap.get("重要或敏感用户").getId();
|
|
||||||
monitorPO.setMonitorTag(objTypeId);
|
|
||||||
}else {
|
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
}else if(oracleTerminalExcel.getLoadType().equals("二类变电站") ||oracleTerminalExcel.getLoadType().equals("三类变电站") ||oracleTerminalExcel.getLoadType().equals("四类变电站")){
|
//行业类型
|
||||||
if (objTypeDicMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
|
||||||
String objTypeId = objTypeDicMap.get("主变低压侧").getId();
|
|
||||||
monitorPO.setMonitorTag(objTypeId);
|
|
||||||
}else {
|
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
if (objTypeDicMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
|
||||||
String objTypeId = objTypeDicMap.get(oracleTerminalExcel.getLoadType()).getId();
|
|
||||||
monitorPO.setMonitorTag(objTypeId);
|
|
||||||
} else {
|
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典监测标签不存在,请确认后重试"));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//监测点对象类型
|
|
||||||
|
|
||||||
if (objTypeMap.containsKey(oracleTerminalExcel.getLoadType())) {
|
|
||||||
String objTypeId = objTypeMap.get(oracleTerminalExcel.getLoadType()).getId();
|
|
||||||
monitorPO.setObjType(objTypeId);
|
|
||||||
} else {
|
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, oracleTerminalExcel.getLoadType()+"字典监测点对象类型不存在,请确认后重试"));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
//行业类型
|
|
||||||
/* if (businessDicMap.containsKey(oracleTerminalExcel.getBusinessType())) {
|
/* if (businessDicMap.containsKey(oracleTerminalExcel.getBusinessType())) {
|
||||||
String busTypeId = businessDicMap.get(oracleTerminalExcel.getBusinessType()).getId();
|
String busTypeId = businessDicMap.get(oracleTerminalExcel.getBusinessType()).getId();
|
||||||
monitorPO.setTradeCode(busTypeId);
|
monitorPO.setTradeCode(busTypeId);
|
||||||
@@ -1667,92 +1705,93 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
continue;
|
continue;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
//TODO 监测点对象名称
|
//TODO 监测点对象名称
|
||||||
|
|
||||||
|
|
||||||
String wireMethod = "";
|
String wireMethod = "";
|
||||||
switch (oracleTerminalExcel.getPtType()) {
|
switch (oracleTerminalExcel.getPtType()) {
|
||||||
case 0:
|
case 0:
|
||||||
wireMethod = DicDataEnum.STAR.getName();
|
wireMethod = DicDataEnum.STAR.getName();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
wireMethod = DicDataEnum.STAR_TRIANGLE.getName();
|
wireMethod = DicDataEnum.STAR_TRIANGLE.getName();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
wireMethod = DicDataEnum.OPEN_DELTA.getName();
|
wireMethod = DicDataEnum.OPEN_DELTA.getName();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典接线方式不存在,请确认后重试"));
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典接线方式不存在,请确认后重试"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (wireListMap.containsKey(wireMethod)) {
|
if (wireListMap.containsKey(wireMethod)) {
|
||||||
monitorPO.setTerminalWiringMethod(wireListMap.get(wireMethod).getId());
|
monitorPO.setTerminalWiringMethod(wireListMap.get(wireMethod).getId());
|
||||||
} else {
|
} else {
|
||||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典接线方式不存在,请确认后重试"));
|
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "字典接线方式不存在,请确认后重试"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
monitorPO.setStatus(DataStateEnum.ENABLE.getCode());
|
monitorPO.setStatus(DataStateEnum.ENABLE.getCode());
|
||||||
monitorPO.setIsSpecialMonitor(0);
|
monitorPO.setIsSpecialMonitor(0);
|
||||||
monitorPO.setPt1(oracleTerminalExcel.getPt1());
|
monitorPO.setPt1(oracleTerminalExcel.getPt1());
|
||||||
monitorPO.setPt2(oracleTerminalExcel.getPt2());
|
monitorPO.setPt2(oracleTerminalExcel.getPt2());
|
||||||
monitorPO.setCt1(oracleTerminalExcel.getCt1());
|
monitorPO.setCt1(oracleTerminalExcel.getCt1());
|
||||||
monitorPO.setCt2(oracleTerminalExcel.getCt2());
|
monitorPO.setCt2(oracleTerminalExcel.getCt2());
|
||||||
|
|
||||||
|
|
||||||
if(oracleTerminalExcel.getLoadType().equals("光伏电站") || oracleTerminalExcel.getLoadType().equals("风电场")){
|
if (oracleTerminalExcel.getLoadType().equals("光伏电站") || oracleTerminalExcel.getLoadType().equals("风电场")) {
|
||||||
monitorPO.setFieldStation("01");
|
monitorPO.setFieldStation("01");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(oracleTerminalExcel.getPowerFlag() == 0){
|
if (oracleTerminalExcel.getPowerFlag() == 0) {
|
||||||
monitorPO.setPowerFlag("101");
|
monitorPO.setPowerFlag("101");
|
||||||
}else if(oracleTerminalExcel.getPowerFlag() == 1){
|
} else if (oracleTerminalExcel.getPowerFlag() == 1) {
|
||||||
monitorPO.setPowerFlag("102");
|
monitorPO.setPowerFlag("102");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (Objects.isNull(lineBak) && Objects.isNull(monitor)) {
|
||||||
|
monitorPO.setIsUpToGrid(0);
|
||||||
|
monitorMapper.insert(monitorPO);
|
||||||
|
Overlimit overlimit = COverlimitUtil.globalAssemble(Float.parseFloat(scale.getValue()), oracleTerminalExcel.getDealCapacity(), oracleTerminalExcel.getDevCapacity(), oracleTerminalExcel.getShortCapacity(), 0, 0);
|
||||||
|
overlimit.setId(monitorPO.getId());
|
||||||
|
Overlimit overlimitRes = overlimitMapper.selectById(monitorPO.getId());
|
||||||
|
if (Objects.isNull(overlimitRes)) {
|
||||||
|
overlimitMapper.insert(overlimit);
|
||||||
|
} else {
|
||||||
|
overlimitMapper.updateById(overlimit);
|
||||||
|
}
|
||||||
|
|
||||||
|
LineBak lineBakPO = new LineBak();
|
||||||
|
lineBakPO.setId(monitorPO.getId());
|
||||||
|
lineBakPO.setLineId(oracleTerminalExcel.getId());
|
||||||
|
lineBakMapper.insert(lineBakPO);
|
||||||
|
} else {
|
||||||
|
if (Objects.isNull(lineBak)) {
|
||||||
|
LineBak lineBakPO = new LineBak();
|
||||||
|
lineBakPO.setId(monitor.getId());
|
||||||
|
lineBakPO.setLineId(oracleTerminalExcel.getId());
|
||||||
|
lineBakMapper.insert(lineBakPO);
|
||||||
|
monitorMapper.updateById(monitorPO);
|
||||||
|
} else if (Objects.isNull(monitor)) {
|
||||||
|
monitorPO.setIsUpToGrid(0);
|
||||||
|
monitorMapper.deleteById(lineBak.getId());
|
||||||
|
monitorPO.setId(lineBak.getId());
|
||||||
|
monitorMapper.insert(monitorPO);
|
||||||
|
} else {
|
||||||
|
monitorPO.setId(lineBak.getId());
|
||||||
|
monitorMapper.updateById(monitorPO);
|
||||||
|
}
|
||||||
|
|
||||||
if (Objects.isNull(lineBak) && Objects.isNull(monitor)) {
|
Overlimit overlimit = COverlimitUtil.globalAssemble(Float.parseFloat(scale.getValue()), oracleTerminalExcel.getDealCapacity(), oracleTerminalExcel.getDevCapacity(), oracleTerminalExcel.getShortCapacity(), 0, 0);
|
||||||
monitorPO.setIsUpToGrid(0);
|
overlimit.setId(monitorPO.getId());
|
||||||
monitorMapper.insert(monitorPO);
|
Overlimit overlimitRes = overlimitMapper.selectById(monitorPO.getId());
|
||||||
Overlimit overlimit = COverlimitUtil.globalAssemble(Float.parseFloat(scale.getValue()), oracleTerminalExcel.getDealCapacity(), oracleTerminalExcel.getDevCapacity(), oracleTerminalExcel.getShortCapacity(), 0, 0);
|
if (Objects.isNull(overlimitRes)) {
|
||||||
overlimit.setId(monitorPO.getId());
|
overlimitMapper.insert(overlimit);
|
||||||
Overlimit overlimitRes = overlimitMapper.selectById(monitorPO.getId());
|
} else {
|
||||||
if (Objects.isNull(overlimitRes)) {
|
overlimitMapper.updateById(overlimit);
|
||||||
overlimitMapper.insert(overlimit);
|
}
|
||||||
} else {
|
|
||||||
overlimitMapper.updateById(overlimit);
|
|
||||||
}
|
|
||||||
|
|
||||||
LineBak lineBakPO = new LineBak();
|
}
|
||||||
lineBakPO.setId(monitorPO.getId());
|
|
||||||
lineBakPO.setLineId(oracleTerminalExcel.getId());
|
|
||||||
lineBakMapper.insert(lineBakPO);
|
|
||||||
} else {
|
|
||||||
if (Objects.isNull(lineBak)) {
|
|
||||||
LineBak lineBakPO = new LineBak();
|
|
||||||
lineBakPO.setId(monitor.getId());
|
|
||||||
lineBakPO.setLineId(oracleTerminalExcel.getId());
|
|
||||||
lineBakMapper.insert(lineBakPO);
|
|
||||||
monitorMapper.updateById(monitorPO);
|
|
||||||
} else if (Objects.isNull(monitor)) {
|
|
||||||
monitorPO.setIsUpToGrid(0);
|
|
||||||
monitorMapper.deleteById(lineBak.getId());
|
|
||||||
monitorPO.setId(lineBak.getId());
|
|
||||||
monitorMapper.insert(monitorPO);
|
|
||||||
} else {
|
|
||||||
monitorPO.setId(lineBak.getId());
|
|
||||||
monitorMapper.updateById(monitorPO);
|
|
||||||
}
|
|
||||||
|
|
||||||
Overlimit overlimit = COverlimitUtil.globalAssemble(Float.parseFloat(scale.getValue()), oracleTerminalExcel.getDealCapacity(), oracleTerminalExcel.getDevCapacity(), oracleTerminalExcel.getShortCapacity(), 0, 0);
|
|
||||||
overlimit.setId(monitorPO.getId());
|
|
||||||
Overlimit overlimitRes = overlimitMapper.selectById(monitorPO.getId());
|
|
||||||
if (Objects.isNull(overlimitRes)) {
|
|
||||||
overlimitMapper.insert(overlimit);
|
|
||||||
} else {
|
|
||||||
overlimitMapper.updateById(overlimit);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public class RmpEventDetailController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/getImMonitorEvents")
|
@PostMapping("/getImMonitorEvents")
|
||||||
@ApiOperation("暂降事件记录")
|
@ApiOperation("查询重要监测点指定时间发生的暂降次数")
|
||||||
public HttpResult<List<Map<String,Object>>> getImMonitorEvents(@RequestBody EventBaseParam param) {
|
public HttpResult<List<Map<String,Object>>> getImMonitorEvents(@RequestBody EventBaseParam param) {
|
||||||
String methodDescribe = getMethodDescribe("getImMonitorEvents");
|
String methodDescribe = getMethodDescribe("getImMonitorEvents");
|
||||||
List<Map<String,Object>> result = rmpEventDetailService.getImMonitorEvents(param);
|
List<Map<String,Object>> result = rmpEventDetailService.getImMonitorEvents(param);
|
||||||
|
|||||||
@@ -399,6 +399,7 @@ public class RmpEventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> getImMonitorEvents(EventBaseParam param) {
|
public List<Map<String, Object>> getImMonitorEvents(EventBaseParam param) {
|
||||||
|
List<Map<String,Object>> mapList = new ArrayList<>();
|
||||||
DictData eventDic = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.VOLTAGE_DIP.getCode(),DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
DictData eventDic = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.VOLTAGE_DIP.getCode(),DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
||||||
DictData dictData = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.MOST_IMPORMENT.getCode(),DicDataTypeEnum.DEV_GRADE.getCode()).getData();
|
DictData dictData = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.MOST_IMPORMENT.getCode(),DicDataTypeEnum.DEV_GRADE.getCode()).getData();
|
||||||
|
|
||||||
@@ -408,6 +409,9 @@ public class RmpEventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper,
|
|||||||
queryWrapper.eq("measurement_point_id",param.getSearchValue());
|
queryWrapper.eq("measurement_point_id",param.getSearchValue());
|
||||||
}else {
|
}else {
|
||||||
List<String> lineIds = lineFeignClient.getLevelMonitorIdByDept(dictData.getId(),param.getDeptId()).getData();
|
List<String> lineIds = lineFeignClient.getLevelMonitorIdByDept(dictData.getId(),param.getDeptId()).getData();
|
||||||
|
if(CollUtil.isEmpty(lineIds)){
|
||||||
|
return mapList;
|
||||||
|
}
|
||||||
queryWrapper.in("measurement_point_id",lineIds);
|
queryWrapper.in("measurement_point_id",lineIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -415,13 +419,17 @@ public class RmpEventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper,
|
|||||||
queryWrapper.select("measurement_point_id as lineId","count(event_id) as eventCount").between("start_time",param.getSearchBeginTime(),param.getSearchEndTime())
|
queryWrapper.select("measurement_point_id as lineId","count(event_id) as eventCount").between("start_time",param.getSearchBeginTime(),param.getSearchEndTime())
|
||||||
.eq("event_type",eventDic.getId())
|
.eq("event_type",eventDic.getId())
|
||||||
.groupBy("measurement_point_id");
|
.groupBy("measurement_point_id");
|
||||||
List<Map<String,Object>> mapList = this.baseMapper.selectMaps(queryWrapper);
|
mapList = this.baseMapper.selectMaps(queryWrapper);
|
||||||
|
if(CollUtil.isEmpty(mapList)){
|
||||||
|
return mapList;
|
||||||
|
}
|
||||||
List<String> ids = mapList.stream().map(it->it.get("lineId").toString()).distinct().collect(Collectors.toList());
|
List<String> ids = mapList.stream().map(it->it.get("lineId").toString()).distinct().collect(Collectors.toList());
|
||||||
List<Line> lineList = lineFeignClient.getBaseLineList(ids).getData();
|
List<AreaLineInfoVO> lineList = lineFeignClient.getBaseLineAreaInfo(ids).getData();
|
||||||
Map<String,Line> lineMap = lineList.stream().collect(Collectors.toMap(Line::getId,Function.identity()));
|
Map<String,AreaLineInfoVO> lineMap = lineList.stream().collect(Collectors.toMap(AreaLineInfoVO::getLineId,Function.identity()));
|
||||||
|
|
||||||
mapList.forEach(item->{
|
mapList.forEach(item->{
|
||||||
item.put("lineName",lineMap.get(item.get("lineId")).getName());
|
AreaLineInfoVO tem = lineMap.get(item.get("lineId").toString());
|
||||||
|
item.put("lineName",tem.getVoltageName()+"_"+tem.getLineName());
|
||||||
});
|
});
|
||||||
|
|
||||||
return mapList;
|
return mapList;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user