|
|
|
|
@@ -3,6 +3,7 @@ package com.njcn.device.pms.service.ledgerManger.impl;
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
|
|
|
|
import com.njcn.common.pojo.enums.common.ServerEnum;
|
|
|
|
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
|
|
|
|
import com.njcn.common.pojo.exception.BusinessException;
|
|
|
|
|
@@ -29,9 +30,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.function.Function;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
@@ -76,12 +75,9 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
private final PowerGenerationUserMapper powerGenerationUserMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 基础获取单位信息
|
|
|
|
|
*
|
|
|
|
|
* @author cdf
|
|
|
|
|
* @date 2023/5/10
|
|
|
|
|
*/
|
|
|
|
|
@@ -116,11 +112,11 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
List<DictData> voltageDic = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
|
|
|
|
Map<String, DictData> mapVoltage = voltageDic.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
|
|
|
|
//监测点状态
|
|
|
|
|
DictData dictData = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.LINE_STATE.getName(),DicDataEnum.RUN.getName()).getData();
|
|
|
|
|
List<Monitor> monitorList = monitorMapper.selectList(new LambdaQueryWrapper<Monitor>().eq(Monitor::getStatus,1).eq(Monitor::getMonitorState,dictData.getId()));
|
|
|
|
|
DictData dictData = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.LINE_STATE.getName(), DicDataEnum.RUN.getName()).getData();
|
|
|
|
|
List<Monitor> monitorList = monitorMapper.selectList(new LambdaQueryWrapper<Monitor>().eq(Monitor::getStatus, 1).eq(Monitor::getMonitorState, dictData.getId()));
|
|
|
|
|
Map<String, List<Monitor>> map = monitorList.stream().collect(Collectors.groupingBy(Monitor::getOrgId));
|
|
|
|
|
|
|
|
|
|
List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList =distributionMonitorMapper.getDisMonitorAllList(null,0);
|
|
|
|
|
List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList = distributionMonitorMapper.getDisMonitorAllList(null, 0);
|
|
|
|
|
Map<String, List<PmsMonitorBaseDTO>> mapPms = pmsMonitorBaseDTOList.stream().collect(Collectors.groupingBy(PmsMonitorBaseDTO::getOrgId));
|
|
|
|
|
|
|
|
|
|
temDept.forEach(item -> {
|
|
|
|
|
@@ -134,7 +130,7 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
List<LineDevGetDTO> lineListPw = new ArrayList<>();
|
|
|
|
|
deptIds.forEach(i -> {
|
|
|
|
|
if (map.containsKey(i)) {
|
|
|
|
|
map.get(i).forEach(it->{
|
|
|
|
|
map.get(i).forEach(it -> {
|
|
|
|
|
LineDevGetDTO lineDevGetDTO = new LineDevGetDTO();
|
|
|
|
|
lineDevGetDTO.setPointId(it.getId());
|
|
|
|
|
lineDevGetDTO.setInterval(it.getStatisticalInterval());
|
|
|
|
|
@@ -146,7 +142,7 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (mapPms.containsKey(i)) {
|
|
|
|
|
mapPms.get(i).forEach(it->{
|
|
|
|
|
mapPms.get(i).forEach(it -> {
|
|
|
|
|
LineDevGetDTO lineDevGetDTOPms = new LineDevGetDTO();
|
|
|
|
|
lineDevGetDTOPms.setPointId(it.getMonitorId());
|
|
|
|
|
lineDevGetDTOPms.setInterval(10);
|
|
|
|
|
@@ -171,10 +167,10 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
public List<DeptGetSubStationDTO> deptSubStation(DeptGetLineParam deptGetLineParam) {
|
|
|
|
|
List<DeptGetSubStationDTO> result = new ArrayList<>();
|
|
|
|
|
List<DeptGetBase> temDept = getDeptChildrenByParent(deptGetLineParam);
|
|
|
|
|
List<StatationStat> statationStatList = statationStatMapper.selectList(new LambdaQueryWrapper<StatationStat>().eq(StatationStat::getStatus,1));
|
|
|
|
|
List<StatationStat> statationStatList = statationStatMapper.selectList(new LambdaQueryWrapper<StatationStat>().eq(StatationStat::getStatus, 1));
|
|
|
|
|
Map<String, List<StatationStat>> map = statationStatList.stream().collect(Collectors.groupingBy(StatationStat::getOrgId));
|
|
|
|
|
|
|
|
|
|
List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList =distributionMonitorMapper.getDisMonitorAllList(null,0);
|
|
|
|
|
List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList = distributionMonitorMapper.getDisMonitorAllList(null, 0);
|
|
|
|
|
Map<String, List<PmsMonitorBaseDTO>> mapPms = pmsMonitorBaseDTOList.stream().collect(Collectors.groupingBy(PmsMonitorBaseDTO::getOrgId));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -212,7 +208,7 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
List<GeneratrixWire> generatrixWireList = pmsGeneratrixWireMapper.getGeneratrixWireList();
|
|
|
|
|
Map<String, List<GeneratrixWire>> map = generatrixWireList.stream().collect(Collectors.groupingBy(GeneratrixWire::getOrgId));
|
|
|
|
|
|
|
|
|
|
List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList =distributionMonitorMapper.getDisMonitorAllList(null,0);
|
|
|
|
|
List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList = distributionMonitorMapper.getDisMonitorAllList(null, 0);
|
|
|
|
|
Map<String, List<PmsMonitorBaseDTO>> mapPms = pmsMonitorBaseDTOList.stream().collect(Collectors.groupingBy(PmsMonitorBaseDTO::getOrgId));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -242,17 +238,36 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<DeptGetDeviceDTO> deptGetDevice(DeptGetLineParam deptGetLineParam) {
|
|
|
|
|
public List<DeptGetDeviceDTO> deptGetDevice(DeptGetLineParam deptGetLineParam, Integer type) {
|
|
|
|
|
List<DeptGetDeviceDTO> result = new ArrayList<>();
|
|
|
|
|
List<DeptGetBase> temDept = getDeptChildrenByParent(deptGetLineParam);
|
|
|
|
|
|
|
|
|
|
List<PmsTerminal> pmsTerminalList = terminalMapper.selectList(new LambdaQueryWrapper<PmsTerminal>().eq(PmsTerminal::getStatus,1));
|
|
|
|
|
Map<String, List<PmsTerminal>> map = pmsTerminalList.stream().collect(Collectors.groupingBy(PmsTerminal::getOrgId));
|
|
|
|
|
List<Monitor> monitorList = monitorMapper.selectList(new LambdaQueryWrapper<Monitor>().select(Monitor::getId, Monitor::getTerminalId, Monitor::getOrgId).eq(Monitor::getStatus, 1));
|
|
|
|
|
List<String> terminalIds = monitorList.stream().map(Monitor::getTerminalId).distinct().collect(Collectors.toList());
|
|
|
|
|
LambdaQueryWrapper<PmsTerminal> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
lambdaQueryWrapper.in(PmsTerminal::getId, terminalIds);
|
|
|
|
|
List<PmsTerminal> pmsTerminals = terminalMapper.selectList(lambdaQueryWrapper);
|
|
|
|
|
Map<String, List<PmsTerminal>> map = pmsTerminals.stream().collect(Collectors.groupingBy(PmsTerminal::getOrgId));
|
|
|
|
|
|
|
|
|
|
List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList =distributionMonitorMapper.getDisMonitorAllList(null,0);
|
|
|
|
|
Map<String, List<PmsMonitorBaseDTO>> mapPms = pmsMonitorBaseDTOList.stream().collect(Collectors.groupingBy(PmsMonitorBaseDTO::getOrgId));
|
|
|
|
|
List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList = distributionMonitorMapper.getDisMonitorAllList(null, 0);
|
|
|
|
|
List<String> pwTerminalIds = pmsMonitorBaseDTOList.stream().map(PmsMonitorBaseDTO::getTerminalId).distinct().collect(Collectors.toList());
|
|
|
|
|
lambdaQueryWrapper.clear();
|
|
|
|
|
lambdaQueryWrapper.in(PmsTerminal::getId, pwTerminalIds);
|
|
|
|
|
List<PmsTerminal> pwPmsTerminals = terminalMapper.selectList(lambdaQueryWrapper);
|
|
|
|
|
Map<String, List<PmsTerminal>> mapPms = pwPmsTerminals.stream().collect(Collectors.groupingBy(PmsTerminal::getOrgId));
|
|
|
|
|
|
|
|
|
|
Map<String, List<Monitor>> monitorMap = new HashMap<>();
|
|
|
|
|
Map<String, List<PmsMonitorBaseDTO>> pwMonitorMap = new HashMap<>();
|
|
|
|
|
if (type == 1) {
|
|
|
|
|
//获取装置接入的监测点
|
|
|
|
|
monitorMap = monitorList.stream().collect(Collectors.groupingBy(Monitor::getTerminalId));
|
|
|
|
|
pwMonitorMap = pmsMonitorBaseDTOList.stream().collect(Collectors.groupingBy(PmsMonitorBaseDTO::getTerminalId));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, List<Monitor>> finalMonitorMap = monitorMap;
|
|
|
|
|
Map<String, List<PmsMonitorBaseDTO>> finalPwMonitorMap = pwMonitorMap;
|
|
|
|
|
temDept.forEach(item -> {
|
|
|
|
|
DeptGetDeviceDTO deptGetDeviceDTO = new DeptGetDeviceDTO();
|
|
|
|
|
deptGetDeviceDTO.setUnitId(item.getUnitId());
|
|
|
|
|
@@ -264,21 +279,31 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
List<LineDevGetDTO> devGetDTOListPw = new ArrayList<>();
|
|
|
|
|
deptIds.forEach(i -> {
|
|
|
|
|
if (map.containsKey(i)) {
|
|
|
|
|
map.get(i).forEach(dev->{
|
|
|
|
|
map.get(i).forEach(dev -> {
|
|
|
|
|
LineDevGetDTO lineDevGetDTO = new LineDevGetDTO();
|
|
|
|
|
lineDevGetDTO.setDevId(dev.getId());
|
|
|
|
|
lineDevGetDTO.setType(1);
|
|
|
|
|
lineDevGetDTO.setType(0);
|
|
|
|
|
lineDevGetDTO.setUpdateTime(dev.getUpdateTime());
|
|
|
|
|
if(type == 1) {
|
|
|
|
|
if (finalMonitorMap.containsKey(dev.getId())) {
|
|
|
|
|
lineDevGetDTO.setMonitorIds(finalMonitorMap.get(dev.getId()).stream().map(Monitor::getId).distinct().collect(Collectors.toList()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
devGetDTOList.add(lineDevGetDTO);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mapPms.containsKey(i)) {
|
|
|
|
|
mapPms.get(i).forEach(dev->{
|
|
|
|
|
mapPms.get(i).forEach(dev -> {
|
|
|
|
|
LineDevGetDTO lineDevGetDTO = new LineDevGetDTO();
|
|
|
|
|
lineDevGetDTO.setDevId(dev.getTerminalId());
|
|
|
|
|
lineDevGetDTO.setDevId(dev.getId());
|
|
|
|
|
lineDevGetDTO.setType(1);
|
|
|
|
|
|
|
|
|
|
lineDevGetDTO.setUpdateTime(dev.getUpdateTime());
|
|
|
|
|
if(type == 1) {
|
|
|
|
|
if (finalPwMonitorMap.containsKey(dev.getId())) {
|
|
|
|
|
lineDevGetDTO.setMonitorIds(finalMonitorMap.get(dev.getId()).stream().map(Monitor::getId).distinct().collect(Collectors.toList()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
devGetDTOListPw.add(lineDevGetDTO);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@@ -294,18 +319,18 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
@Override
|
|
|
|
|
public LineDevGetBandDTO substationGetLine(String substationId) {
|
|
|
|
|
LineDevGetBandDTO result = new LineDevGetBandDTO();
|
|
|
|
|
List<Monitor> monitorList = monitorMapper.selectList(new LambdaQueryWrapper<Monitor>().eq(Monitor::getStatus,1).eq(Monitor::getPowerrId,substationId));
|
|
|
|
|
List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList =distributionMonitorMapper.getDisMonitorAllList(substationId,1);
|
|
|
|
|
assLineDev(result,monitorList,pmsMonitorBaseDTOList);
|
|
|
|
|
List<Monitor> monitorList = monitorMapper.selectList(new LambdaQueryWrapper<Monitor>().eq(Monitor::getStatus, 1).eq(Monitor::getPowerrId, substationId));
|
|
|
|
|
List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList = distributionMonitorMapper.getDisMonitorAllList(substationId, 1);
|
|
|
|
|
assLineDev(result, monitorList, pmsMonitorBaseDTOList);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public LineDevGetBandDTO busBarGetLine(String busBarId) {
|
|
|
|
|
LineDevGetBandDTO result = new LineDevGetBandDTO();
|
|
|
|
|
List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList =distributionMonitorMapper.getDisMonitorAllList(busBarId,1);
|
|
|
|
|
List<Monitor> monitorList = monitorMapper.selectList(new LambdaQueryWrapper<Monitor>().eq(Monitor::getStatus,1).eq(Monitor::getLineId,busBarId));
|
|
|
|
|
assLineDev(result,monitorList,pmsMonitorBaseDTOList);
|
|
|
|
|
List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList = distributionMonitorMapper.getDisMonitorAllList(busBarId, 1);
|
|
|
|
|
List<Monitor> monitorList = monitorMapper.selectList(new LambdaQueryWrapper<Monitor>().eq(Monitor::getStatus, 1).eq(Monitor::getLineId, busBarId));
|
|
|
|
|
assLineDev(result, monitorList, pmsMonitorBaseDTOList);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -313,14 +338,14 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
/**
|
|
|
|
|
* 组装信息
|
|
|
|
|
*/
|
|
|
|
|
private void assLineDev(LineDevGetBandDTO result,List<Monitor> monitorList,List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList){
|
|
|
|
|
private void assLineDev(LineDevGetBandDTO result, List<Monitor> monitorList, List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList) {
|
|
|
|
|
List<DictData> voltageDic = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
|
|
|
|
Map<String, DictData> mapVoltage = voltageDic.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
|
|
|
|
|
|
|
|
|
if(CollectionUtil.isNotEmpty(monitorList)){
|
|
|
|
|
if (CollectionUtil.isNotEmpty(monitorList)) {
|
|
|
|
|
List<LineDevGetDTO> temZw = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
monitorList.forEach(item->{
|
|
|
|
|
monitorList.forEach(item -> {
|
|
|
|
|
LineDevGetDTO lineDevGetDTO = new LineDevGetDTO();
|
|
|
|
|
lineDevGetDTO.setPointId(item.getId());
|
|
|
|
|
lineDevGetDTO.setType(1);
|
|
|
|
|
@@ -331,9 +356,9 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
result.setZwList(temZw);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(CollectionUtil.isNotEmpty(pmsMonitorBaseDTOList)){
|
|
|
|
|
if (CollectionUtil.isNotEmpty(pmsMonitorBaseDTOList)) {
|
|
|
|
|
List<LineDevGetDTO> temPw = new ArrayList<>();
|
|
|
|
|
pmsMonitorBaseDTOList.forEach(item->{
|
|
|
|
|
pmsMonitorBaseDTOList.forEach(item -> {
|
|
|
|
|
LineDevGetDTO lineDevGetDTO = new LineDevGetDTO();
|
|
|
|
|
lineDevGetDTO.setPointId(item.getMonitorId());
|
|
|
|
|
lineDevGetDTO.setType(1);
|
|
|
|
|
@@ -418,41 +443,40 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public String updatePmsOverLimit() {
|
|
|
|
|
List<DictData> dictDataList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
|
|
|
|
Map<String, DictData> map = dictDataList.stream().collect(Collectors.toMap(DictData::getId,Function.identity()));
|
|
|
|
|
Map<String, DictData> map = dictDataList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
|
|
|
|
|
|
|
|
|
List<Monitor> monitorList = monitorMapper.selectList(new LambdaQueryWrapper<>());
|
|
|
|
|
|
|
|
|
|
int count = 0;
|
|
|
|
|
for (Monitor monitor : monitorList) {
|
|
|
|
|
Float voltage = Float.parseFloat(map.get(monitor.getVoltageLevel()).getValue());
|
|
|
|
|
Overlimit overlimit = COverlimitUtil.globalAssemble(voltage, monitor.getUserAgreementCapacity(), monitor.getPowerSupplyEqCapacity(), monitor.getMinShortCircuitCapacity(), 1, 0);
|
|
|
|
|
overlimit.setId(monitor.getId());
|
|
|
|
|
overlimitMapper.deleteById(monitor.getId());
|
|
|
|
|
overlimitMapper.insert(overlimit);
|
|
|
|
|
count++;
|
|
|
|
|
Float voltage = Float.parseFloat(map.get(monitor.getVoltageLevel()).getValue());
|
|
|
|
|
Overlimit overlimit = COverlimitUtil.globalAssemble(voltage, monitor.getUserAgreementCapacity(), monitor.getPowerSupplyEqCapacity(), monitor.getMinShortCircuitCapacity(), 1, 0);
|
|
|
|
|
overlimit.setId(monitor.getId());
|
|
|
|
|
overlimitMapper.deleteById(monitor.getId());
|
|
|
|
|
overlimitMapper.insert(overlimit);
|
|
|
|
|
count++;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//二类监测点
|
|
|
|
|
List<PowerDistributionarea> powerDistributionareaList = powerDistributionareaMapper.selectList(new LambdaQueryWrapper<>());
|
|
|
|
|
int countArea = 0;
|
|
|
|
|
for (PowerDistributionarea powerDistributionarea : powerDistributionareaList) {
|
|
|
|
|
Float voltage = Float.parseFloat(map.get(powerDistributionarea.getVoltageLevel()).getValue());
|
|
|
|
|
Overlimit overlimit = COverlimitUtil.globalAssemble(voltage, null, null, null, 1, 1);
|
|
|
|
|
overlimit.setId(powerDistributionarea.getId());
|
|
|
|
|
overlimitMapper.deleteById(powerDistributionarea.getId());
|
|
|
|
|
overlimitMapper.insert(overlimit);
|
|
|
|
|
Float voltage = Float.parseFloat(map.get(powerDistributionarea.getVoltageLevel()).getValue());
|
|
|
|
|
Overlimit overlimit = COverlimitUtil.globalAssemble(voltage, null, null, null, 1, 1);
|
|
|
|
|
overlimit.setId(powerDistributionarea.getId());
|
|
|
|
|
overlimitMapper.deleteById(powerDistributionarea.getId());
|
|
|
|
|
overlimitMapper.insert(overlimit);
|
|
|
|
|
countArea++;
|
|
|
|
|
}
|
|
|
|
|
//三类监测
|
|
|
|
|
List<PowerClient> powerClientList = powerClientMapper.selectList(new LambdaQueryWrapper<>());
|
|
|
|
|
int countClient = 0;
|
|
|
|
|
for (PowerClient powerClient : powerClientList) {
|
|
|
|
|
Float voltage = Float.parseFloat(map.get(powerClient.getVoltageLevel()).getValue());
|
|
|
|
|
Float voltage = Float.parseFloat(map.get(powerClient.getVoltageLevel()).getValue());
|
|
|
|
|
Overlimit overlimit = COverlimitUtil.globalAssemble(voltage, null, null, null, 1, 1);
|
|
|
|
|
overlimit.setId(powerClient.getId());
|
|
|
|
|
overlimitMapper.deleteById(powerClient.getId());
|
|
|
|
|
@@ -463,14 +487,14 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|
|
|
|
List<PowerGenerationUser> powerGenerationUserList = powerGenerationUserMapper.selectList(new LambdaQueryWrapper<>());
|
|
|
|
|
|
|
|
|
|
for (PowerGenerationUser powerGenerationUser : powerGenerationUserList) {
|
|
|
|
|
Float voltage = Float.parseFloat(map.get(powerGenerationUser.getVoltageLevel()).getValue());
|
|
|
|
|
Float voltage = Float.parseFloat(map.get(powerGenerationUser.getVoltageLevel()).getValue());
|
|
|
|
|
Overlimit overlimit = COverlimitUtil.globalAssemble(voltage, null, null, null, 1, 1);
|
|
|
|
|
overlimit.setId(powerGenerationUser.getId());
|
|
|
|
|
overlimitMapper.deleteById(powerGenerationUser.getId());
|
|
|
|
|
overlimitMapper.insert(overlimit);
|
|
|
|
|
countClient++;
|
|
|
|
|
}
|
|
|
|
|
return "主网监测点限值更新"+count+"个,台区限值更新"+countArea+"个,发电用电用户"+countClient+"个";
|
|
|
|
|
return "主网监测点限值更新" + count + "个,台区限值更新" + countArea + "个,发电用电用户" + countClient + "个";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|