1.台账增加默认排序
2.增加场站/用户监测规模接口
This commit is contained in:
@@ -19,14 +19,16 @@ public enum RunFlagEnum {
|
|||||||
QUIT(4, "退运"),
|
QUIT(4, "退运"),
|
||||||
|
|
||||||
|
|
||||||
|
POWER_FLAG(0,"电网侧"),
|
||||||
|
NO_POWER_FLAG(1,"非电网侧"),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GW_FLAG(0,"主网"),
|
GW_FLAG(0,"主网"),
|
||||||
PW_FLAG(1,"配网"),
|
PW_FLAG(1,"配网"),
|
||||||
|
|
||||||
|
I_SORT(1,"I类测点"),
|
||||||
|
II_SORT(2,"II类测点"),
|
||||||
|
III_SORT(3,"III类测点"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.njcn.device.biz.pojo.po;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.njcn.device.biz.utils.COverlimit;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ import java.util.Objects;
|
|||||||
*/
|
*/
|
||||||
public class COverlimitUtil {
|
public class COverlimitUtil {
|
||||||
|
|
||||||
|
/** 配网占位默认值 */
|
||||||
|
private static final float PLACEHOLDER = -3.14159f;
|
||||||
/**
|
/**
|
||||||
* 谐波电流系数
|
* 谐波电流系数
|
||||||
*/
|
*/
|
||||||
@@ -34,38 +35,76 @@ public class COverlimitUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算监测点限值
|
* 计算监测点限值
|
||||||
* @param voltageLevel 电压等级(10kV = 10 220kV = 220 )
|
* @param voltageLevel 电压等级(kV)
|
||||||
* @param protocolCapacity 协议容量
|
* @param protocolCapacity 协议容量(MVA)
|
||||||
* @param devCapacity 设备容量
|
* @param devCapacity 供电设备容量(MVA),为空/0自动取对应电压默认值
|
||||||
* @param shortCapacity 短路容量
|
* @param shortCapacity 实际最小短路容量(MVA)
|
||||||
* @param powerFlag 0.用户侧 1.电网侧
|
* @param powerFlag 0=电网侧(不执行两步计算) 1=非电网侧/用户侧(执行两步计算)
|
||||||
* @param lineType 0.主网 1.配网 需要注意配网目前没有四种容量,谐波电流幅值限值,负序电流限值无法计算默认-3.14159
|
* @param pointClass 配网点类型 0=Ⅱ类 1=Ⅲ类光伏;主网该字段传0即可
|
||||||
*/
|
*/
|
||||||
public static Overlimit globalAssemble(Float voltageLevel, Float protocolCapacity, Float devCapacity,
|
public static Overlimit globalAssemble(Float voltageLevel, Float protocolCapacity, Float devCapacity,
|
||||||
Float shortCapacity, Integer powerFlag, Integer lineType) {
|
Float shortCapacity, Integer powerFlag,Integer pointClass) {
|
||||||
Overlimit overlimit = new Overlimit();
|
Overlimit overlimit = new Overlimit();
|
||||||
voltageDeviation(overlimit,voltageLevel);
|
voltageDeviation(overlimit, voltageLevel);
|
||||||
frequency(overlimit);
|
frequency(overlimit);
|
||||||
voltageFluctuation(overlimit,voltageLevel);
|
voltageFluctuation(overlimit, voltageLevel);
|
||||||
voltageFlicker(overlimit,voltageLevel);
|
voltageFlicker(overlimit, voltageLevel);
|
||||||
totalHarmonicDistortion(overlimit,voltageLevel);
|
totalHarmonicDistortion(overlimit, voltageLevel);
|
||||||
uHarm(overlimit,voltageLevel);
|
uHarm(overlimit, voltageLevel);
|
||||||
threeVoltageUnbalance(overlimit);
|
threeVoltageUnbalance(overlimit);
|
||||||
interharmonicCurrent(overlimit,voltageLevel);
|
interharmonicCurrent(overlimit, voltageLevel);
|
||||||
|
|
||||||
if(Objects.equals(lineType, RunFlagEnum.PW_FLAG.getStatus())) {
|
//谐波电流限值
|
||||||
//配网
|
int lineType;
|
||||||
|
if (voltageLevel >= DicDataEnum.KV220.getValue()) {
|
||||||
|
lineType = 0; // 主网
|
||||||
|
} else {
|
||||||
|
lineType = 1; // 配网(110、66、35、10kV)
|
||||||
|
}
|
||||||
|
float sc = Objects.isNull(shortCapacity) ? 0f : shortCapacity;
|
||||||
|
float pc = Objects.isNull(protocolCapacity) ? 0f : protocolCapacity;
|
||||||
|
|
||||||
|
float dc;
|
||||||
|
if (Objects.isNull(devCapacity) || devCapacity <= 0) {
|
||||||
|
dc = getDefaultDevCapacity(voltageLevel);
|
||||||
|
} else {
|
||||||
|
dc = devCapacity;
|
||||||
|
}
|
||||||
|
// 1. 配网 lineType = 1
|
||||||
|
if (Objects.equals(lineType, RunFlagEnum.PW_FLAG.getStatus())) {
|
||||||
|
overlimit.setINeg(PLACEHOLDER);
|
||||||
Float[] iHarmTem = new Float[49];
|
Float[] iHarmTem = new Float[49];
|
||||||
for (int i = 0; i <= 48; i++) {
|
|
||||||
//目前只处理了配网II类测点,III类测点暂未处理,III类测点参考主网
|
// 配网-电网侧(powerFlag=0) / 配网Ⅱ类:直接基准限值,不折算
|
||||||
iHarmTem[i] = getHarmTag(i+2,voltageLevel).floatValue();
|
if (Objects.equals(powerFlag,RunFlagEnum.POWER_FLAG.getStatus()) || Objects.equals(pointClass, 0)) {
|
||||||
|
for (int i = 0; i <= 48; i++) {
|
||||||
|
iHarmTem[i] = getHarmTag(i + 2, voltageLevel).floatValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 配网-非电网侧 且 Ⅲ类光伏:两步计算,折算系数固定为1
|
||||||
|
else {
|
||||||
|
float calCap = 1.0f;
|
||||||
|
for (int i = 0; i <= 48; i++) {
|
||||||
|
float inHarm = iHarmCalculate(i + 2, voltageLevel, pc, dc, calCap);
|
||||||
|
iHarmTem[i] = inHarm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
overlimit.buildIHarm(iHarmTem);
|
overlimit.buildIHarm(iHarmTem);
|
||||||
overlimit.setINeg(-3.14159f);
|
} else {
|
||||||
}else {
|
// 主网-电网侧(powerFlag=0):直接基准限值
|
||||||
//主网
|
if (Objects.equals(powerFlag, RunFlagEnum.POWER_FLAG.getStatus())) {
|
||||||
iHarm(overlimit, voltageLevel, protocolCapacity, devCapacity, shortCapacity);
|
Float[] iHarmTem = new Float[49];
|
||||||
negativeSequenceCurrent(overlimit, voltageLevel, shortCapacity);
|
for (int i = 0; i <= 48; i++) {
|
||||||
|
iHarmTem[i] = getHarmTag(i + 2, voltageLevel).floatValue();
|
||||||
|
}
|
||||||
|
overlimit.buildIHarm(iHarmTem);
|
||||||
|
}
|
||||||
|
// 主网-非电网侧/用户侧(风光场站):完整两步计算
|
||||||
|
else {
|
||||||
|
iHarm(overlimit, voltageLevel, pc, dc, sc);
|
||||||
|
}
|
||||||
|
// 主网统一计算负序电流
|
||||||
|
negativeSequenceCurrent(overlimit, voltageLevel, sc);
|
||||||
}
|
}
|
||||||
return overlimit;
|
return overlimit;
|
||||||
}
|
}
|
||||||
@@ -304,6 +343,30 @@ public class COverlimitUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据电压等级获取【默认公共连接点供电设备容量】St(MVA)
|
||||||
|
* 无实际台账容量时兜底使用
|
||||||
|
*/
|
||||||
|
public static float getDefaultDevCapacity(Float voltageLevel) {
|
||||||
|
if (voltageLevel < 0.4f) {
|
||||||
|
return 1.0f;
|
||||||
|
} else if (voltageLevel < 6f) {
|
||||||
|
return 100f;
|
||||||
|
} else if (voltageLevel < 20f) {
|
||||||
|
return 200f;
|
||||||
|
} else if (voltageLevel < 35f) {
|
||||||
|
return 500f;
|
||||||
|
} else if (voltageLevel < 66f) {
|
||||||
|
return 800f;
|
||||||
|
} else if (voltageLevel < 110f) {
|
||||||
|
return 1000f;
|
||||||
|
} else if (voltageLevel < 220f) {
|
||||||
|
return 2000f;
|
||||||
|
} else {
|
||||||
|
return 3000f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*---------------------------------谐波电流限值end-----------------------------------*/
|
/*---------------------------------谐波电流限值end-----------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
@@ -376,8 +439,9 @@ public class COverlimitUtil {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("sss");
|
System.out.println("sss");
|
||||||
float aa = iHarmCalculate(9,500f,10,10,0.002222222222f);
|
Overlimit overlimit = new Overlimit();
|
||||||
|
iHarm(overlimit, 220f, 100f, 100f, 2000f);
|
||||||
|
|
||||||
System.out.println(aa);
|
System.out.println(overlimit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ import com.njcn.device.subvoltage.mapper.VoltageMapper;
|
|||||||
import com.njcn.device.terminal.mapper.PqsTerminalLogsMapper;
|
import com.njcn.device.terminal.mapper.PqsTerminalLogsMapper;
|
||||||
import com.njcn.device.userledger.service.UserLedgerService;
|
import com.njcn.device.userledger.service.UserLedgerService;
|
||||||
import com.njcn.device.utils.ExcelStyleUtil;
|
import com.njcn.device.utils.ExcelStyleUtil;
|
||||||
|
import com.njcn.device.utils.LineSortHelper;
|
||||||
import com.njcn.message.api.ProduceFeignClient;
|
import com.njcn.message.api.ProduceFeignClient;
|
||||||
import com.njcn.message.constant.DeviceRebootType;
|
import com.njcn.message.constant.DeviceRebootType;
|
||||||
import com.njcn.message.constant.RedisKeyPrefix;
|
import com.njcn.message.constant.RedisKeyPrefix;
|
||||||
@@ -144,6 +145,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
private final ProduceFeignClient produceFeignClient;
|
private final ProduceFeignClient produceFeignClient;
|
||||||
private final UserLedgerService userLedgerService;
|
private final UserLedgerService userLedgerService;
|
||||||
private final PqDevTypeService pqDevTypeService;
|
private final PqDevTypeService pqDevTypeService;
|
||||||
|
private final LineSortHelper lineSortHelper;
|
||||||
|
|
||||||
@Value("${oracle.isSync}")
|
@Value("${oracle.isSync}")
|
||||||
private Boolean isSync;
|
private Boolean isSync;
|
||||||
@@ -205,6 +207,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
if (StrUtil.isBlank(projectIndex)) {
|
if (StrUtil.isBlank(projectIndex)) {
|
||||||
checkName(addTerminalParam, PROJECT_LEVEL.getCode(), null);
|
checkName(addTerminalParam, PROJECT_LEVEL.getCode(), null);
|
||||||
Line line = assembleLine(addTerminalParam.getProjectParam().getName(), PROJECT_LEVEL.getCode(), "0", "0", addTerminalParam.getProjectParam().getSort());
|
Line line = assembleLine(addTerminalParam.getProjectParam().getName(), PROJECT_LEVEL.getCode(), "0", "0", addTerminalParam.getProjectParam().getSort());
|
||||||
|
lineSortHelper.handleSort(PROJECT_LEVEL.getCode(),addTerminalParam.getProjectParam().getSort(),line);
|
||||||
this.baseMapper.insert(line);
|
this.baseMapper.insert(line);
|
||||||
projectIndex = line.getId();
|
projectIndex = line.getId();
|
||||||
}
|
}
|
||||||
@@ -219,6 +222,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
LogUtil.njcnDebug(log, "获取区域信息:{}", result.toString());
|
LogUtil.njcnDebug(log, "获取区域信息:{}", result.toString());
|
||||||
checkName(addTerminalParam, PROVINCE_LEVEL.getCode(), projectIndex);
|
checkName(addTerminalParam, PROVINCE_LEVEL.getCode(), projectIndex);
|
||||||
Line province = assembleLine(result.getId(), PROVINCE_LEVEL.getCode(), projectIndex, projectIndex, addTerminalParam.getProvinceParam().getSort());
|
Line province = assembleLine(result.getId(), PROVINCE_LEVEL.getCode(), projectIndex, projectIndex, addTerminalParam.getProvinceParam().getSort());
|
||||||
|
lineSortHelper.handleSort(PROVINCE_LEVEL.getCode(),addTerminalParam.getProvinceParam().getSort(),province);
|
||||||
this.baseMapper.insert(province);
|
this.baseMapper.insert(province);
|
||||||
provinceIndex = province.getId();
|
provinceIndex = province.getId();
|
||||||
}
|
}
|
||||||
@@ -229,6 +233,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
if (StrUtil.isBlank(gdIndex) && StrUtil.isNotBlank(provinceIndex)) {
|
if (StrUtil.isBlank(gdIndex) && StrUtil.isNotBlank(provinceIndex)) {
|
||||||
checkName(addTerminalParam, GD_LEVEL.getCode(), provinceIndex);
|
checkName(addTerminalParam, GD_LEVEL.getCode(), provinceIndex);
|
||||||
Line gdInformation = assembleLine(addTerminalParam.getGdInformationParam().getName(), GD_LEVEL.getCode(), provinceIndex, projectIndex + StrUtil.COMMA + provinceIndex, addTerminalParam.getGdInformationParam().getSort());
|
Line gdInformation = assembleLine(addTerminalParam.getGdInformationParam().getName(), GD_LEVEL.getCode(), provinceIndex, projectIndex + StrUtil.COMMA + provinceIndex, addTerminalParam.getGdInformationParam().getSort());
|
||||||
|
lineSortHelper.handleSort(GD_LEVEL.getCode(),addTerminalParam.getGdInformationParam().getSort(),gdInformation);
|
||||||
this.baseMapper.insert(gdInformation);
|
this.baseMapper.insert(gdInformation);
|
||||||
gdIndex = gdInformation.getId();
|
gdIndex = gdInformation.getId();
|
||||||
}
|
}
|
||||||
@@ -239,6 +244,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
if (StrUtil.isBlank(subIndex) && StrUtil.isNotBlank(gdIndex)) {
|
if (StrUtil.isBlank(subIndex) && StrUtil.isNotBlank(gdIndex)) {
|
||||||
checkName(addTerminalParam, LineBaseEnum.SUB_LEVEL.getCode(), gdIndex);
|
checkName(addTerminalParam, LineBaseEnum.SUB_LEVEL.getCode(), gdIndex);
|
||||||
Line subStation = assembleLine(addTerminalParam.getSubStationParam().getName(), LineBaseEnum.SUB_LEVEL.getCode(), gdIndex, projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex, addTerminalParam.getSubStationParam().getSort());
|
Line subStation = assembleLine(addTerminalParam.getSubStationParam().getName(), LineBaseEnum.SUB_LEVEL.getCode(), gdIndex, projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex, addTerminalParam.getSubStationParam().getSort());
|
||||||
|
lineSortHelper.handleSort(SUB_LEVEL.getCode(),addTerminalParam.getSubStationParam().getSort(),subStation);
|
||||||
this.baseMapper.insert(subStation);
|
this.baseMapper.insert(subStation);
|
||||||
subIndex = subStation.getId();
|
subIndex = subStation.getId();
|
||||||
|
|
||||||
@@ -259,6 +265,8 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
if (CollectionUtil.isNotEmpty(addTerminalParam.getDeviceParam()) && StrUtil.isNotBlank(subIndex)) {
|
if (CollectionUtil.isNotEmpty(addTerminalParam.getDeviceParam()) && StrUtil.isNotBlank(subIndex)) {
|
||||||
//校验变电站下的装置名称ip是否重复
|
//校验变电站下的装置名称ip是否重复
|
||||||
checkDevNameAndIp(addTerminalParam, subIndex, lineLambdaQueryWrapper);
|
checkDevNameAndIp(addTerminalParam, subIndex, lineLambdaQueryWrapper);
|
||||||
|
|
||||||
|
Integer devSort = lineSortHelper.getNextSort(DEVICE_LEVEL.getCode());
|
||||||
for (DeviceParam deviceParam : addTerminalParam.getDeviceParam()) {
|
for (DeviceParam deviceParam : addTerminalParam.getDeviceParam()) {
|
||||||
//用于记录装置id
|
//用于记录装置id
|
||||||
String devIdIndex;
|
String devIdIndex;
|
||||||
@@ -286,9 +294,16 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (StrUtil.isBlank(deviceParam.getDevIndex())) {
|
if (StrUtil.isBlank(deviceParam.getDevIndex())) {
|
||||||
Line device = assembleLine(deviceParam.getName(), LineBaseEnum.DEVICE_LEVEL.getCode(), subIndex, projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex + StrUtil.COMMA + subIndex, deviceParam.getSort());
|
Line device = assembleLine(deviceParam.getName(), LineBaseEnum.DEVICE_LEVEL.getCode(), subIndex, projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex + StrUtil.COMMA + subIndex, deviceParam.getSort());
|
||||||
|
if(Objects.isNull(deviceParam.getSort()) || deviceParam.getSort() == 0){
|
||||||
|
device.setSort(devSort);
|
||||||
|
}
|
||||||
this.baseMapper.insert(device);
|
this.baseMapper.insert(device);
|
||||||
|
if(Objects.isNull(deviceParam.getSort()) || deviceParam.getSort() == 0){
|
||||||
|
devSort++;
|
||||||
|
}
|
||||||
devIdIndex = device.getId();
|
devIdIndex = device.getId();
|
||||||
|
|
||||||
//装置详情
|
//装置详情
|
||||||
@@ -393,7 +408,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
throw new BusinessException(DeviceResponseEnum.SUBV_NAME_SAME, voltageListBySubId.stream().map(Line::getName).collect(Collectors.joining(";")));
|
throw new BusinessException(DeviceResponseEnum.SUBV_NAME_SAME, voltageListBySubId.stream().map(Line::getName).collect(Collectors.joining(";")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Integer subvSort = lineSortHelper.getNextSort(SUB_V_LEVEL.getCode());
|
||||||
for (SubVoltageParam subVoltageParam : deviceParam.getSubVoltageParam()) {
|
for (SubVoltageParam subVoltageParam : deviceParam.getSubVoltageParam()) {
|
||||||
//母线id
|
//母线id
|
||||||
String subvIndex;
|
String subvIndex;
|
||||||
@@ -413,7 +428,13 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
Line subVoltage = assembleLine(subVoltageParam.getName(), LineBaseEnum.SUB_V_LEVEL.getCode(), devIdIndex, projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex + StrUtil.COMMA + subIndex + StrUtil.COMMA + devIdIndex, subVoltageParam.getSort());
|
Line subVoltage = assembleLine(subVoltageParam.getName(), LineBaseEnum.SUB_V_LEVEL.getCode(), devIdIndex, projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex + StrUtil.COMMA + subIndex + StrUtil.COMMA + devIdIndex, subVoltageParam.getSort());
|
||||||
|
if(Objects.isNull(subVoltageParam.getSort()) || subVoltageParam.getSort() == 0) {
|
||||||
|
subVoltage.setSort(subvSort);
|
||||||
|
}
|
||||||
this.baseMapper.insert(subVoltage);
|
this.baseMapper.insert(subVoltage);
|
||||||
|
if(Objects.isNull(subVoltageParam.getSort()) || subVoltageParam.getSort() == 0) {
|
||||||
|
subvSort++;
|
||||||
|
}
|
||||||
subvIndex = subVoltage.getId();
|
subvIndex = subVoltage.getId();
|
||||||
Voltage voltage = new Voltage();
|
Voltage voltage = new Voltage();
|
||||||
voltage.setId(subVoltage.getId());
|
voltage.setId(subVoltage.getId());
|
||||||
@@ -441,6 +462,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//通用新增监测点
|
//通用新增监测点
|
||||||
|
Integer lineSort = lineSortHelper.getNextSort(LineBaseEnum.LINE_LEVEL.getCode());
|
||||||
for (LineParam lineParam : subVoltageParam.getLineParam()) {
|
for (LineParam lineParam : subVoltageParam.getLineParam()) {
|
||||||
if (StrUtil.isBlank(lineParam.getLineIndex()) && StrUtil.isNotBlank(subvIndex)) {
|
if (StrUtil.isBlank(lineParam.getLineIndex()) && StrUtil.isNotBlank(subvIndex)) {
|
||||||
//判断监测点序号是否重复
|
//判断监测点序号是否重复
|
||||||
@@ -454,7 +476,13 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
//删除与当前线路号重复的项
|
//删除与当前线路号重复的项
|
||||||
listLineNum.removeIf(lineNo -> lineNo.equals(lineParam.getNum()));
|
listLineNum.removeIf(lineNo -> lineNo.equals(lineParam.getNum()));
|
||||||
Line line = assembleLine(lineParam.getName(), LineBaseEnum.LINE_LEVEL.getCode(), subvIndex, projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex + StrUtil.COMMA + subIndex + StrUtil.COMMA + devIdIndex + StrUtil.COMMA + subvIndex, lineParam.getSort());
|
Line line = assembleLine(lineParam.getName(), LineBaseEnum.LINE_LEVEL.getCode(), subvIndex, projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex + StrUtil.COMMA + subIndex + StrUtil.COMMA + devIdIndex + StrUtil.COMMA + subvIndex, lineParam.getSort());
|
||||||
|
if(Objects.isNull(lineParam.getSort()) || lineParam.getSort() == 0) {
|
||||||
|
line.setSort(lineSort);
|
||||||
|
}
|
||||||
this.baseMapper.insert(line);
|
this.baseMapper.insert(line);
|
||||||
|
if(Objects.isNull(lineParam.getSort()) || lineParam.getSort() == 0) {
|
||||||
|
lineSort++;
|
||||||
|
}
|
||||||
LineDetail lineDetail = new LineDetail();
|
LineDetail lineDetail = new LineDetail();
|
||||||
BeanUtils.copyProperties(lineParam, lineDetail);
|
BeanUtils.copyProperties(lineParam, lineDetail);
|
||||||
lineDetail.setId(line.getId());
|
lineDetail.setId(line.getId());
|
||||||
@@ -481,7 +509,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
//监测点限值
|
//监测点限值
|
||||||
DictData scaleResult = dicDataFeignClient.getDicDataById(voltage.getScale()).getData();
|
DictData scaleResult = dicDataFeignClient.getDicDataById(voltage.getScale()).getData();
|
||||||
float scaTmp = Float.parseFloat(scaleResult.getValue());
|
float scaTmp = Float.parseFloat(scaleResult.getValue());
|
||||||
Overlimit overlimit = COverlimitUtil.globalAssemble(scaTmp, lineDetail.getDealCapacity(), lineDetail.getDevCapacity(), lineDetail.getShortCapacity(), 1, 0);
|
Overlimit overlimit = COverlimitUtil.globalAssemble(scaTmp, lineDetail.getDealCapacity(), lineDetail.getDevCapacity(), lineDetail.getShortCapacity(), lineDetail.getPowerFlag(), 0);
|
||||||
|
|
||||||
if (Objects.isNull(lineParam.getVoltageDev())) {
|
if (Objects.isNull(lineParam.getVoltageDev())) {
|
||||||
overlimit.setVoltageDev(overlimit.getVoltageDev());
|
overlimit.setVoltageDev(overlimit.getVoltageDev());
|
||||||
@@ -752,7 +780,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
float voltageLevel = Float.parseFloat(dictData.getValue());
|
float voltageLevel = Float.parseFloat(dictData.getValue());
|
||||||
if (CollectionUtil.isNotEmpty(lineList)) {
|
if (CollectionUtil.isNotEmpty(lineList)) {
|
||||||
for (LineDetail lineDetail : lineList) {
|
for (LineDetail lineDetail : lineList) {
|
||||||
Overlimit overlimit = COverlimitUtil.globalAssemble(voltageLevel, lineDetail.getDealCapacity(), lineDetail.getDevCapacity(), lineDetail.getShortCapacity(), 1, 0);
|
Overlimit overlimit = COverlimitUtil.globalAssemble(voltageLevel, lineDetail.getDealCapacity(), lineDetail.getDevCapacity(), lineDetail.getShortCapacity(), lineDetail.getPowerFlag(), 0);
|
||||||
overlimit.setId(lineDetail.getId());
|
overlimit.setId(lineDetail.getId());
|
||||||
overlimitMapper.deleteById(lineDetail.getId());
|
overlimitMapper.deleteById(lineDetail.getId());
|
||||||
overlimitMapper.insert(overlimit);
|
overlimitMapper.insert(overlimit);
|
||||||
@@ -839,7 +867,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
float scaTmp = Float.parseFloat(scaleResult.getValue());
|
float scaTmp = Float.parseFloat(scaleResult.getValue());
|
||||||
|
|
||||||
//监测点限值
|
//监测点限值
|
||||||
Overlimit overlimit = COverlimitUtil.globalAssemble(scaTmp, lineDetail.getDealCapacity(), lineDetail.getDevCapacity(), lineDetail.getShortCapacity(), 1, 0);
|
Overlimit overlimit = COverlimitUtil.globalAssemble(scaTmp, lineDetail.getDealCapacity(), lineDetail.getDevCapacity(), lineDetail.getShortCapacity(), lineDetail.getPowerFlag(), 0);
|
||||||
if (Objects.isNull(updateLineBO.getVoltageDev())) {
|
if (Objects.isNull(updateLineBO.getVoltageDev())) {
|
||||||
overlimit.setVoltageDev(overlimit.getVoltageDev());
|
overlimit.setVoltageDev(overlimit.getVoltageDev());
|
||||||
} else {
|
} else {
|
||||||
@@ -1860,7 +1888,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
float voltageLevel = Float.parseFloat(scaleResult.getValue());
|
float voltageLevel = Float.parseFloat(scaleResult.getValue());
|
||||||
Overlimit overlimit = COverlimitUtil.globalAssemble(voltageLevel, lineDetail.getDealCapacity(), lineDetail.getDevCapacity(), lineDetail.getShortCapacity(), 1, 0);
|
Overlimit overlimit = COverlimitUtil.globalAssemble(voltageLevel, lineDetail.getDealCapacity(), lineDetail.getDevCapacity(), lineDetail.getShortCapacity(), lineDetail.getPowerFlag(), 0);
|
||||||
overlimit.setId(lineDetail.getId());
|
overlimit.setId(lineDetail.getId());
|
||||||
overlimitMapper.insert(overlimit);
|
overlimitMapper.insert(overlimit);
|
||||||
count++;
|
count++;
|
||||||
@@ -2193,7 +2221,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
//监测点限值
|
//监测点限值
|
||||||
DictData scaleResult = dicDataFeignClient.getDicDataById(voltage.getScale()).getData();
|
DictData scaleResult = dicDataFeignClient.getDicDataById(voltage.getScale()).getData();
|
||||||
float scaTmp = Float.parseFloat(scaleResult.getValue());
|
float scaTmp = Float.parseFloat(scaleResult.getValue());
|
||||||
Overlimit overlimit = COverlimitUtil.globalAssemble(scaTmp, lineDetail.getDealCapacity(), lineDetail.getDevCapacity(), lineDetail.getShortCapacity(), 1, 0);
|
Overlimit overlimit = COverlimitUtil.globalAssemble(scaTmp, lineDetail.getDealCapacity(), lineDetail.getDevCapacity(), lineDetail.getShortCapacity(), lineDetail.getPowerFlag(), 0);
|
||||||
|
|
||||||
if (Objects.isNull(lineParam.getVoltageDev())) {
|
if (Objects.isNull(lineParam.getVoltageDev())) {
|
||||||
overlimit.setVoltageDev(overlimit.getVoltageDev());
|
overlimit.setVoltageDev(overlimit.getVoltageDev());
|
||||||
@@ -2742,7 +2770,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
* @date 2022/5/18
|
* @date 2022/5/18
|
||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
private void saveTerminalBase(List<TerminalBaseExcel> terminalBaseExcels) {
|
public void saveTerminalBase(List<TerminalBaseExcel> terminalBaseExcels) {
|
||||||
List<TerminalBaseExcel.TerminalBaseExcelMsg> terminalBaseExcelMsgs = new ArrayList<>();
|
List<TerminalBaseExcel.TerminalBaseExcelMsg> terminalBaseExcelMsgs = new ArrayList<>();
|
||||||
//任意集合数据为空,不处理
|
//任意集合数据为空,不处理
|
||||||
if (CollectionUtil.isNotEmpty(terminalBaseExcels)) {
|
if (CollectionUtil.isNotEmpty(terminalBaseExcels)) {
|
||||||
@@ -3006,7 +3034,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
DictData dictData = dicDataFeignClient.getDicDataByNameAndType(terminalBaseExcel.getSubvScale(), DicDataTypeEnum.DEV_VOLTAGE_STAND.getName()).getData();
|
DictData dictData = dicDataFeignClient.getDicDataByNameAndType(terminalBaseExcel.getSubvScale(), DicDataTypeEnum.DEV_VOLTAGE_STAND.getName()).getData();
|
||||||
|
|
||||||
lineDetailMapper.insert(lineDetail);
|
lineDetailMapper.insert(lineDetail);
|
||||||
Overlimit overlimit = COverlimitUtil.globalAssemble(Float.parseFloat(dictData.getValue()), terminalBaseExcel.getDealCapacity(), terminalBaseExcel.getDevCapacity(), terminalBaseExcel.getShortCapacity(), null, null);
|
Overlimit overlimit = COverlimitUtil.globalAssemble(Float.parseFloat(dictData.getValue()), terminalBaseExcel.getDealCapacity(), terminalBaseExcel.getDevCapacity(), terminalBaseExcel.getShortCapacity(), terminalBaseExcel.getPowerFlag(), 0);
|
||||||
overlimit.setId(temp.getId());
|
overlimit.setId(temp.getId());
|
||||||
overlimitMapper.insert(overlimit);
|
overlimitMapper.insert(overlimit);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
supervision_user_report.status,
|
supervision_user_report.status,
|
||||||
supervision_user_report.dev_id,
|
supervision_user_report.dev_id,
|
||||||
supervision_user_report.line_id,
|
supervision_user_report.line_id,
|
||||||
|
supervision_user_report.station_id,
|
||||||
supervision_user_report.second_assessment_id secondAssessmentId
|
supervision_user_report.second_assessment_id secondAssessmentId
|
||||||
FROM supervision_user_report supervision_user_report
|
FROM supervision_user_report supervision_user_report
|
||||||
WHERE ${ew.sqlSegment}
|
WHERE ${ew.sqlSegment}
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
|||||||
import com.njcn.common.pojo.constant.PatternRegex;
|
import com.njcn.common.pojo.constant.PatternRegex;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.device.line.mapper.LineMapper;
|
||||||
|
import com.njcn.device.pq.pojo.po.Line;
|
||||||
|
import com.njcn.device.substation.mapper.SubstationMapper;
|
||||||
import com.njcn.device.userledger.mapper.UserReportNormalMapper;
|
import com.njcn.device.userledger.mapper.UserReportNormalMapper;
|
||||||
import com.njcn.device.userledger.mapper.UserReportPOMapper;
|
import com.njcn.device.userledger.mapper.UserReportPOMapper;
|
||||||
import com.njcn.device.userledger.service.UserLedgerService;
|
import com.njcn.device.userledger.service.UserLedgerService;
|
||||||
@@ -67,6 +70,7 @@ public class UserLedgerServiceImpl extends ServiceImpl<UserReportPOMapper, UserR
|
|||||||
private final UserReportNormalMapper userReportNormalMapper;
|
private final UserReportNormalMapper userReportNormalMapper;
|
||||||
private final UserReportSensitivePOService userReportSensitivePOService;
|
private final UserReportSensitivePOService userReportSensitivePOService;
|
||||||
private final UserFeignClient userFeignClient;
|
private final UserFeignClient userFeignClient;
|
||||||
|
private final LineMapper substationMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<UserLedgerVO> selectUserList(UserReportParam userReportParam) {
|
public List<UserLedgerVO> selectUserList(UserReportParam userReportParam) {
|
||||||
@@ -171,7 +175,16 @@ public class UserLedgerServiceImpl extends ServiceImpl<UserReportPOMapper, UserR
|
|||||||
userReportVOQueryWrapper.orderByDesc("supervision_user_report.create_time");
|
userReportVOQueryWrapper.orderByDesc("supervision_user_report.create_time");
|
||||||
Page<UserReportVO> page;
|
Page<UserReportVO> page;
|
||||||
page = this.baseMapper.page(new Page<>(PageFactory.getPageNum(userReportQueryParam), PageFactory.getPageSize(userReportQueryParam)), userReportVOQueryWrapper);
|
page = this.baseMapper.page(new Page<>(PageFactory.getPageNum(userReportQueryParam), PageFactory.getPageSize(userReportQueryParam)), userReportVOQueryWrapper);
|
||||||
|
Map<String,String> atationMap = new HashMap<>();
|
||||||
|
if(CollUtil.isNotEmpty(page.getRecords())){
|
||||||
|
List<String> stationIds = page.getRecords().stream().map(UserReportVO::getStationId).filter(StrUtil::isNotBlank).distinct().collect(Collectors.toList());
|
||||||
|
if(CollUtil.isNotEmpty(stationIds)){
|
||||||
|
List<Line> stationList = substationMapper.selectBatchIds(stationIds);
|
||||||
|
stationList.forEach(line -> atationMap.put(line.getId(), line.getName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
page.getRecords().forEach(temp -> {
|
page.getRecords().forEach(temp -> {
|
||||||
|
temp.setStationId(atationMap.getOrDefault(temp.getStationId(),"/"));
|
||||||
Integer needGovernance = 0;
|
Integer needGovernance = 0;
|
||||||
if (
|
if (
|
||||||
CollectionUtil.newArrayList(
|
CollectionUtil.newArrayList(
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.njcn.device.utils;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
|
import com.njcn.device.line.mapper.LineMapper;
|
||||||
|
import com.njcn.device.pq.pojo.po.Line;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: cdf
|
||||||
|
* @CreateTime: 2026-06-13
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class LineSortHelper {
|
||||||
|
|
||||||
|
private final LineMapper lineMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取同一父节点下的最大 sort 值 + 1
|
||||||
|
* @param level 层级
|
||||||
|
* @return 下一个可用的 sort 值
|
||||||
|
*/
|
||||||
|
public Integer getNextSort(Integer level) {
|
||||||
|
LambdaQueryWrapper<Line> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(Line::getState, DataStateEnum.ENABLE.getCode())
|
||||||
|
.eq(Line::getLevel,level)
|
||||||
|
.orderByDesc(Line::getSort)
|
||||||
|
.last("limit 1");
|
||||||
|
Line maxSortLine = lineMapper.selectOne(wrapper);
|
||||||
|
|
||||||
|
if (Objects.nonNull(maxSortLine) && Objects.nonNull(maxSortLine.getSort())) {
|
||||||
|
return maxSortLine.getSort() + 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void handleSort(Integer level, Integer sort,Line line) {
|
||||||
|
int lastSort;
|
||||||
|
if (Objects.isNull(sort) || sort == 0) {
|
||||||
|
lastSort = getNextSort(level);
|
||||||
|
}else {
|
||||||
|
lastSort = sort;
|
||||||
|
}
|
||||||
|
line.setSort(lastSort);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Integer handleSortBatch(Integer currentSort, Line line) {
|
||||||
|
line.setSort(currentSort);
|
||||||
|
return currentSort + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -58,6 +58,16 @@ public class GridDiagramHarmController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, subLineGiveAnAlarm, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, subLineGiveAnAlarm, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getAreaObjAlarm")
|
||||||
|
@ApiOperation("区域场站监测点规模")
|
||||||
|
@ApiImplicitParam(name = "param", value = "区域场站监测点规模参数", required = true)
|
||||||
|
public HttpResult<GridDiagramVO> getAreaObjAlarm(@RequestBody StatSubstationBizBaseParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("getAreaObjAlarm");
|
||||||
|
GridDiagramVO subLineGiveAnAlarm = irMpTargetWarnDService.getAreaObjAlarm(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, subLineGiveAnAlarm, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/getPollutionAlarmData")
|
@PostMapping("/getPollutionAlarmData")
|
||||||
@ApiOperation("变电站污染告警占比")
|
@ApiOperation("变电站污染告警占比")
|
||||||
|
|||||||
@@ -20,4 +20,6 @@ public interface IRMpTargetWarnDService extends IService<RMpTargetWarnDPO> {
|
|||||||
|
|
||||||
|
|
||||||
GridDiagramVO getSubLineGiveAnAlarm(StatSubstationBizBaseParam param);
|
GridDiagramVO getSubLineGiveAnAlarm(StatSubstationBizBaseParam param);
|
||||||
|
|
||||||
|
GridDiagramVO getAreaObjAlarm(StatSubstationBizBaseParam param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,7 +329,8 @@ public class HistoryResultServiceImpl implements HistoryResultService {
|
|||||||
DictData dictData = dicDataFeignClient.getDicDataById(lineDetailDataVO.getVoltageLevel()).getData();
|
DictData dictData = dicDataFeignClient.getDicDataById(lineDetailDataVO.getVoltageLevel()).getData();
|
||||||
float voltageLevel = Float.parseFloat(dictData.getValue());
|
float voltageLevel = Float.parseFloat(dictData.getValue());
|
||||||
float shortVal = COverlimitUtil.getDlCapByVoltageLevel(voltageLevel);
|
float shortVal = COverlimitUtil.getDlCapByVoltageLevel(voltageLevel);
|
||||||
overlimit = COverlimitUtil.globalAssemble(voltageLevel, 10f, 10f, shortVal, 1, 1);
|
float devVal = COverlimitUtil.getDefaultDevCapacity(voltageLevel);
|
||||||
|
overlimit = COverlimitUtil.globalAssemble(voltageLevel, devVal, devVal, shortVal, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//组装sql语句
|
//组装sql语句
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package com.njcn.harmonic.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||||
import com.njcn.device.biz.pojo.dto.DeptGetSubStationDTO;
|
import com.njcn.device.biz.pojo.dto.*;
|
||||||
import com.njcn.device.biz.pojo.dto.SubGetBase;
|
|
||||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||||
import com.njcn.device.pq.api.LineIntegrityClient;
|
import com.njcn.device.pq.api.LineIntegrityClient;
|
||||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||||
@@ -124,6 +124,74 @@ public class RMpTargetWarnDServiceImpl extends ServiceImpl<RMpTargetWarnDMapper,
|
|||||||
return gridDiagramVO;
|
return gridDiagramVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GridDiagramVO getAreaObjAlarm(StatSubstationBizBaseParam param) {
|
||||||
|
//获取电压等级
|
||||||
|
List<DictData> dictDataList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE_STAND.getCode()).getData();
|
||||||
|
|
||||||
|
List<DictData> v = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.PANORAMIC_VOLTAGE.getCode()).getData();
|
||||||
|
List<String> voltageIds;
|
||||||
|
//获取电压等级550 220 110 35
|
||||||
|
if(CollUtil.isNotEmpty(v)){
|
||||||
|
List<String> vName = v.stream().map(DictData::getName).collect(Collectors.toList());
|
||||||
|
voltageIds = dictDataList.stream().filter(item -> vName.contains(item.getName())).sorted(Comparator.comparing(DictData::getSort).reversed()).map(DictData::getId).collect(Collectors.toList());
|
||||||
|
}else{
|
||||||
|
voltageIds = dictDataList.stream().filter(item -> Objects.equals(DicDataEnum.DY_500KV.getCode(), item.getCode()) || Objects.equals(DicDataEnum.DY_220KV.getCode(), item.getCode()) || Objects.equals(DicDataEnum.DY_110KV.getCode(), item.getCode()) || Objects.equals(DicDataEnum.DY_35KV.getCode(), item.getCode())).sorted(Comparator.comparing(DictData::getSort).reversed()).map(DictData::getId).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
GridDiagramVO gridDiagramVO = new GridDiagramVO();
|
||||||
|
List<GridDiagramVO.LineStatistics> info = new ArrayList<>();
|
||||||
|
List<GridDiagramVO.LineStatistics> gwInfo = new ArrayList<>();
|
||||||
|
|
||||||
|
//获取部门数据关系
|
||||||
|
List<Dept> data = deptFeignClient.getDirectSonSelf(param.getId()).getData();
|
||||||
|
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||||
|
deptGetLineParam.setDeptId(param.getId());
|
||||||
|
deptGetLineParam.setMonitorStateRunning(false);
|
||||||
|
List<DeptGetChildrenMoreDTO> deptGetChildrenMoreDTOS = commTerminalGeneralClient.deptGetLine(deptGetLineParam).getData();
|
||||||
|
|
||||||
|
Map<String,DeptGetChildrenMoreDTO> listMap = deptGetChildrenMoreDTOS.stream().collect(Collectors.toMap(DeptGetChildrenMoreDTO::getUnitId,Function.identity()));
|
||||||
|
|
||||||
|
GridDiagramVO.LineStatistics lineStatistics;
|
||||||
|
GridDiagramVO.LineStatistics gwLineStatistics;
|
||||||
|
for (Dept datum : data) {
|
||||||
|
if (listMap.containsKey(datum.getId())) {
|
||||||
|
lineStatistics = new GridDiagramVO.LineStatistics();
|
||||||
|
lineStatistics.setOrgId(datum.getId());
|
||||||
|
lineStatistics.setOrgName(datum.getName());
|
||||||
|
gwLineStatistics = new GridDiagramVO.LineStatistics();
|
||||||
|
gwLineStatistics.setOrgId(datum.getId());
|
||||||
|
gwLineStatistics.setOrgName(datum.getName());
|
||||||
|
List<LineDevGetDTO> baseList = listMap.get(datum.getId()).getLineBaseList().stream().filter(it->StrUtil.isNotBlank(it.getObjId())).collect(Collectors.toList());
|
||||||
|
Map<String,List<LineDevGetDTO>> voltageMonitorMap = baseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getVoltageLevel));
|
||||||
|
List<GridDiagramVO.StatisticsData> statisticsData = new ArrayList<>();
|
||||||
|
List<GridDiagramVO.StatisticsData> gwStatisticsData = new ArrayList<>();
|
||||||
|
|
||||||
|
for(String voltage:voltageIds){
|
||||||
|
GridDiagramVO.StatisticsData voltageItem = new GridDiagramVO.StatisticsData();
|
||||||
|
voltageItem.setColumnName(voltage);
|
||||||
|
if(voltageMonitorMap.containsKey(voltage)){
|
||||||
|
List<String> ids = voltageMonitorMap.get(voltage).stream().map(LineDevGetDTO::getObjId).distinct().collect(Collectors.toList());
|
||||||
|
voltageItem.setNumOne((long)ids.size());
|
||||||
|
voltageItem.setNumOneList(ids);
|
||||||
|
}else {
|
||||||
|
voltageItem.setNumOne(0L);
|
||||||
|
voltageItem.setNumOneList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
statisticsData.add(voltageItem);
|
||||||
|
}
|
||||||
|
lineStatistics.setData(statisticsData);
|
||||||
|
gwLineStatistics.setData(gwStatisticsData);
|
||||||
|
|
||||||
|
info.add(lineStatistics);
|
||||||
|
gwInfo.add(gwLineStatistics);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gridDiagramVO.setInfo(info);
|
||||||
|
gridDiagramVO.setGwInfo(gwInfo);
|
||||||
|
return gridDiagramVO;
|
||||||
|
}
|
||||||
|
|
||||||
private void getSubStationStatisticsData(List<GridDiagramVO.StatisticsData> statisticsData,
|
private void getSubStationStatisticsData(List<GridDiagramVO.StatisticsData> statisticsData,
|
||||||
List<GridDiagramVO.StatisticsData> gwStatisticsData,
|
List<GridDiagramVO.StatisticsData> gwStatisticsData,
|
||||||
List<SubGetBase> subBaseList,
|
List<SubGetBase> subBaseList,
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
|
|
||||||
private final WlRecordFeignClient wlRecordFeignClient;
|
private final WlRecordFeignClient wlRecordFeignClient;
|
||||||
|
|
||||||
private final ExecutorService executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() + 1);
|
|
||||||
|
|
||||||
private final String CELL_DATA = "celldata";
|
private final String CELL_DATA = "celldata";
|
||||||
private final String V = "v";
|
private final String V = "v";
|
||||||
@@ -863,260 +862,7 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 处理
|
|
||||||
*
|
|
||||||
* @author cdf
|
|
||||||
* @date 2023/10/8
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
private void analyzeReport(ReportSearchParam reportSearchParam, ExcelRptTemp excelRptTemp, HttpServletResponse response) {
|
|
||||||
//定义一个线程集合
|
|
||||||
List<Future<?>> futures = new ArrayList<>();
|
|
||||||
//指标
|
|
||||||
List<ReportTemplateDTO> reportTemplateDTOList = new ArrayList<>();
|
|
||||||
//限值
|
|
||||||
List<ReportTemplateDTO> reportLimitList = new ArrayList<>();
|
|
||||||
//台账
|
|
||||||
List<ReportTemplateDTO> terminalList = new ArrayList<>();
|
|
||||||
JSONArray jsonArray;
|
|
||||||
try (InputStream fileStream = fileStorageUtil.getFileStream(excelRptTemp.getContent())) {
|
|
||||||
jsonArray = new JSONArray(new JSONTokener(fileStream, new JSONConfig()));
|
|
||||||
parseTemplate(jsonArray, reportTemplateDTOList, reportLimitList, terminalList);
|
|
||||||
} catch (Exception e) {
|
|
||||||
if(e instanceof BusinessException){
|
|
||||||
throw new BusinessException(e.getMessage());
|
|
||||||
}else {
|
|
||||||
throw new BusinessException(HarmonicResponseEnum.CUSTOM_REPORT_JSON);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//查询不分相别的指标
|
|
||||||
DictData dictData = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.EPD.getCode(), DicDataTypeEnum.CS_DATA_TYPE.getCode()).getData();
|
|
||||||
if(Objects.isNull(dictData)){
|
|
||||||
throw new BusinessException(CommonResponseEnum.FAIL,"字典类型模板缺少!");
|
|
||||||
}
|
|
||||||
List<EleEpdPqd> temTargetList = eleEpdMapper.selectList(new LambdaQueryWrapper<EleEpdPqd>().eq(EleEpdPqd::getDataType,dictData.getId()).in(EleEpdPqd::getPhase,Arrays.asList("T", "M")));
|
|
||||||
List<String> noPhaseList = temTargetList.stream().filter(it->StrUtil.isNotBlank(it.getOtherName())).map(it->it.getOtherName().toUpperCase()).collect(Collectors.toList());
|
|
||||||
|
|
||||||
//处理指标是否合格
|
|
||||||
reportLimitList = new LinkedHashSet<>(reportLimitList).stream().sorted(Comparator.comparing(ReportTemplateDTO::getItemName)).collect(Collectors.toList());
|
|
||||||
Map<String, Float> limitMap = overLimitDeal(reportLimitList, reportSearchParam);
|
|
||||||
//存放限值指标的map
|
|
||||||
Map<String, ReportTemplateDTO> limitTargetMapX = reportLimitList.stream().collect(Collectors.toMap(ReportTemplateDTO::getItemName, Function.identity()));
|
|
||||||
|
|
||||||
List<ReportTemplateDTO> endList = new CopyOnWriteArrayList<>();
|
|
||||||
if (CollUtil.isNotEmpty(reportTemplateDTOList)) {
|
|
||||||
//开始组织sql
|
|
||||||
reportTemplateDTOList = new LinkedHashSet<>(reportTemplateDTOList).stream().sorted(Comparator.comparing(ReportTemplateDTO::getItemName)).collect(Collectors.toList());
|
|
||||||
Map<String, List<ReportTemplateDTO>> classMap = reportTemplateDTOList.stream().collect(Collectors.groupingBy(ReportTemplateDTO::getResourceId));
|
|
||||||
//定义存放越限指标的map
|
|
||||||
Map<String, ReportTemplateDTO> assNoPassMap = new HashMap<>();
|
|
||||||
classMap.forEach((classKey, templateValue) -> {
|
|
||||||
Map<String, List<ReportTemplateDTO>> valueTypeMap = templateValue.stream().collect(Collectors.groupingBy(ReportTemplateDTO::getStatMethod));
|
|
||||||
//每张表开启一个独立线程查询
|
|
||||||
futures.add(executorService.submit(() -> {
|
|
||||||
//avg.max,min,cp95
|
|
||||||
valueTypeMap.forEach((valueTypeKey, valueTypeVal) -> {
|
|
||||||
//相别分组
|
|
||||||
Map<String, List<ReportTemplateDTO>> phaseMap = valueTypeVal.stream().collect(Collectors.groupingBy(ReportTemplateDTO::getPhase));
|
|
||||||
phaseMap.forEach((phaseKey, phaseVal) -> {
|
|
||||||
StringBuilder sql = new StringBuilder(InfluxDbSqlConstant.SELECT);
|
|
||||||
if (InfluxDbSqlConstant.MAX.equalsIgnoreCase(valueTypeKey)) {
|
|
||||||
assSqlByMysql(phaseVal, sql, endList, InfluxDbSqlConstant.MAX, reportSearchParam, limitTargetMapX, limitMap, assNoPassMap,noPhaseList);
|
|
||||||
} else if (InfluxDbSqlConstant.MIN.equalsIgnoreCase(valueTypeKey)) {
|
|
||||||
assSqlByMysql(phaseVal, sql, endList, InfluxDbSqlConstant.MIN, reportSearchParam, limitTargetMapX, limitMap, assNoPassMap,noPhaseList);
|
|
||||||
} else if (InfluxDbSqlConstant.AVG_WEB.equalsIgnoreCase(valueTypeKey)) {
|
|
||||||
assSqlByMysql(phaseVal, sql, endList, InfluxDbSqlConstant.AVG_WEB, reportSearchParam, limitTargetMapX, limitMap, assNoPassMap,noPhaseList);
|
|
||||||
} else if (InfluxDbSqlConstant.CP95.equalsIgnoreCase(valueTypeKey)) {
|
|
||||||
assSqlByMysql(phaseVal, sql, endList, InfluxDbSqlConstant.CP95, reportSearchParam, limitTargetMapX, limitMap, assNoPassMap,noPhaseList);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// 等待所有任务完成
|
|
||||||
for (Future<?> future : futures) {
|
|
||||||
try {
|
|
||||||
future.get(); // 这会阻塞直到任务完成或抛出异常
|
|
||||||
} catch (InterruptedException | ExecutionException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
log.error("自定义报表多线程查询流程出错!错误信息{}",e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//处理指标最终判定合格还是不合格
|
|
||||||
dealTargetResult(assNoPassMap, limitTargetMapX, endList);
|
|
||||||
}
|
|
||||||
if (CollUtil.isNotEmpty(endList)) {
|
|
||||||
//数据单位信息
|
|
||||||
Map<String, String> unit = unitMap(reportSearchParam);
|
|
||||||
//进行反向赋值到模板
|
|
||||||
//1、根据itemName分组
|
|
||||||
Map<String, List<ReportTemplateDTO>> assMap = endList.stream().collect(Collectors.groupingBy(ReportTemplateDTO::getItemName));
|
|
||||||
//处理台账信息
|
|
||||||
Map<String, String> finalTerminalMap;
|
|
||||||
if (CollUtil.isNotEmpty(terminalList)) {
|
|
||||||
finalTerminalMap = convertKeysToUpperCase(commTerminalGeneralClient.getCustomDetailByLineId(reportSearchParam.getLineId()).getData());
|
|
||||||
}else {
|
|
||||||
finalTerminalMap = new HashMap<>();
|
|
||||||
}
|
|
||||||
//2、把itemName的value赋给v和m
|
|
||||||
jsonArray.forEach(item -> {
|
|
||||||
JSONObject jsonObject = (JSONObject) item;
|
|
||||||
JSONArray itemArr = (JSONArray) jsonObject.get(CELL_DATA);
|
|
||||||
itemArr.forEach((it) -> {
|
|
||||||
if (Objects.nonNull(it) && !"null".equals(it.toString())) {
|
|
||||||
//获取到1列
|
|
||||||
JSONObject data = (JSONObject) it;
|
|
||||||
JSONObject son = (JSONObject) data.get(V);
|
|
||||||
if (son.containsKey(V)) {
|
|
||||||
String v = son.getStr(V);
|
|
||||||
//数据格式:$HA[_25]#B#max#classId$ 或 $HA[_25]#max#classId$
|
|
||||||
if (v.charAt(0) == '$' && v.contains(STR_ONE)) {
|
|
||||||
String str = "";
|
|
||||||
List<ReportTemplateDTO> rDto = assMap.get(v.replace(STR_TWO, "").toUpperCase());
|
|
||||||
if (Objects.nonNull(rDto)) {
|
|
||||||
str = rDto.get(0).getValue();
|
|
||||||
//没有值,赋"/"
|
|
||||||
if (StringUtils.isBlank(str)) {
|
|
||||||
str = "/";
|
|
||||||
}
|
|
||||||
son.set(V, str);
|
|
||||||
if (Objects.nonNull(rDto.get(0).getOverLimitFlag()) && rDto.get(0).getOverLimitFlag() == 1) {
|
|
||||||
son.set("fc", "#990000");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (v.charAt(0) == '%' && v.contains(STR_ONE)) {
|
|
||||||
//指标合格情况
|
|
||||||
String str = "";
|
|
||||||
List<ReportTemplateDTO> rDto = assMap.get(v.replace(STR_FOUR, "").toUpperCase());
|
|
||||||
if (Objects.nonNull(rDto)) {
|
|
||||||
str = rDto.get(0).getValue();
|
|
||||||
//没有值,赋"/"
|
|
||||||
if (StringUtils.isBlank(str)) {
|
|
||||||
str = "/";
|
|
||||||
}
|
|
||||||
son.set(V, str);
|
|
||||||
if ("不合格".equals(str)) {
|
|
||||||
son.set("fc", "#990000");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (v.charAt(0) == '&') {
|
|
||||||
//结论
|
|
||||||
String tem = v.replace(STR_THREE, "").toUpperCase();
|
|
||||||
if (Objects.nonNull(finalTerminalMap)) {
|
|
||||||
if ("STATIS_TIME".equals(tem)) {
|
|
||||||
//如何时间是大于当前时间则用当前时间
|
|
||||||
String localTime = InfluxDbSqlConstant.END_TIME;
|
|
||||||
LocalDate localDate = LocalDateTimeUtil.parseDate(reportSearchParam.getEndTime(), DatePattern.NORM_DATE_PATTERN);
|
|
||||||
LocalDate nowDate = LocalDate.now();
|
|
||||||
if (nowDate.isAfter(localDate)) {
|
|
||||||
son.set(V, reportSearchParam.getStartTime() + InfluxDbSqlConstant.START_TIME + "_" + reportSearchParam.getEndTime() + localTime);
|
|
||||||
} else {
|
|
||||||
localTime = " " + LocalTime.now().format(DatePattern.NORM_TIME_FORMATTER);
|
|
||||||
son.set(V, reportSearchParam.getStartTime() + InfluxDbSqlConstant.START_TIME + "_" + nowDate + localTime);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//台账信息
|
|
||||||
son.set(V, finalTerminalMap.getOrDefault(tem, "/"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//解决数据单位问题 @指标#类型@
|
|
||||||
if (v.charAt(0) == '@' && v.contains(STR_ONE)) {
|
|
||||||
String replace = v.replace("@", "");
|
|
||||||
son.set(V, unit.getOrDefault(replace, "/"));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//导出自定义报表
|
|
||||||
downReport(jsonArray, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 解析模板
|
|
||||||
* @author cdf
|
|
||||||
* @date 2023/10/20
|
|
||||||
*/
|
|
||||||
/* private void parseTemplate(JSONArray jsonArray, List<ReportTemplateDTO> reportTemplateDTOList, List<ReportTemplateDTO> reportLimitList, List<ReportTemplateDTO> terminalList) {
|
|
||||||
try {
|
|
||||||
//通过文件服务器获取
|
|
||||||
jsonArray.forEach(item -> {
|
|
||||||
JSONObject jsonObject = (JSONObject) item;
|
|
||||||
JSONArray itemArr = (JSONArray) jsonObject.get(CELL_DATA);
|
|
||||||
itemArr.forEach((it) -> {
|
|
||||||
if (Objects.nonNull(it) && !"null".equals(it.toString())) {
|
|
||||||
//获取到1列
|
|
||||||
JSONObject data = (JSONObject) it;
|
|
||||||
JSONObject son = (JSONObject) data.get(V);
|
|
||||||
if (son.containsKey(V)) {
|
|
||||||
String v = son.getStr(V);
|
|
||||||
//数据格式:$HA[_25]#B#max#classId$ 或 $HA[_25]#max#classId$
|
|
||||||
if (v.charAt(0) == '$' && v.contains(STR_ONE)) {
|
|
||||||
//剔除前后$
|
|
||||||
v = v.replace(STR_TWO, "");
|
|
||||||
//封装ReportTemplateDTO
|
|
||||||
ReportTemplateDTO reportTemplateDTO = new ReportTemplateDTO();
|
|
||||||
reportTemplateDTO.setItemName(v.toUpperCase());
|
|
||||||
//根据#分割数据
|
|
||||||
String[] vItem = v.split(STR_ONE);
|
|
||||||
if (vItem.length == 5) {
|
|
||||||
//$HA[_25]#B#max#classId$
|
|
||||||
reportTemplateDTO.setTemplateName(vItem[0].toUpperCase());
|
|
||||||
reportTemplateDTO.setPhase(vItem[1].substring(0, 1).toUpperCase());
|
|
||||||
reportTemplateDTO.setStatMethod(vItem[2].toUpperCase());
|
|
||||||
reportTemplateDTO.setResourceId(vItem[3].toUpperCase());
|
|
||||||
reportTemplateDTO.setLimitName(vItem[4].toUpperCase());
|
|
||||||
} else if (vItem.length == 4) {
|
|
||||||
//$HA[_25]#max#classId$
|
|
||||||
reportTemplateDTO.setTemplateName(vItem[0].toUpperCase());
|
|
||||||
reportTemplateDTO.setPhase("T");
|
|
||||||
reportTemplateDTO.setStatMethod(vItem[1].toUpperCase());
|
|
||||||
reportTemplateDTO.setResourceId(vItem[2].toUpperCase());
|
|
||||||
reportTemplateDTO.setLimitName(vItem[3].toUpperCase());
|
|
||||||
}
|
|
||||||
|
|
||||||
reportTemplateDTOList.add(reportTemplateDTO);
|
|
||||||
} else if (v.charAt(0) == '%' && v.contains(STR_ONE)) {
|
|
||||||
//封装指标结论ReportTemplateDTO
|
|
||||||
ReportTemplateDTO reportTemplateDTO = new ReportTemplateDTO();
|
|
||||||
v = v.replace(STR_FOUR, "");
|
|
||||||
reportTemplateDTO.setItemName(v.toUpperCase());
|
|
||||||
//根据#分割数据
|
|
||||||
String[] vItem = v.split(STR_ONE);
|
|
||||||
if (vItem.length == 3) {
|
|
||||||
reportTemplateDTO.setTemplateName(vItem[0].toUpperCase());
|
|
||||||
reportTemplateDTO.setStatMethod(vItem[1].toUpperCase());
|
|
||||||
reportTemplateDTO.setResourceId(vItem[2].toUpperCase());
|
|
||||||
}
|
|
||||||
reportLimitList.add(reportTemplateDTO);
|
|
||||||
} else if (v.charAt(0) == '&') {
|
|
||||||
//封装ReportTemplateDTO
|
|
||||||
ReportTemplateDTO reportTemplateDTO = new ReportTemplateDTO();
|
|
||||||
v = v.replace(STR_THREE, "");
|
|
||||||
reportTemplateDTO.setItemName(v.toUpperCase());
|
|
||||||
reportTemplateDTO.setTemplateName(v.toUpperCase());
|
|
||||||
terminalList.add(reportTemplateDTO);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new BusinessException(HarmonicResponseEnum.CUSTOM_REPORT_JSON);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取测点限值
|
* 获取测点限值
|
||||||
|
|||||||
@@ -96,8 +96,7 @@ public class UserReportVO {
|
|||||||
/**
|
/**
|
||||||
* 变电站
|
* 变电站
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "变电站")
|
@ApiModelProperty(value = "场站")
|
||||||
@Deprecated
|
|
||||||
private String substation;
|
private String substation;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ public class TimersServiceImpl extends ServiceImpl<TimersMapper, Timers> impleme
|
|||||||
public boolean editTimer(TimersParam timersParam) {
|
public boolean editTimer(TimersParam timersParam) {
|
||||||
Timers timers = new Timers();
|
Timers timers = new Timers();
|
||||||
BeanUtil.copyProperties(timersParam, timers);
|
BeanUtil.copyProperties(timersParam, timers);
|
||||||
|
timers.setJobStatus(TimerJobStatusEnum.STOP.getCode());
|
||||||
return this.updateById(timers);
|
return this.updateById(timers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,38 +1,38 @@
|
|||||||
//package com.njcn.system.timer.tasks;
|
package com.njcn.system.timer.tasks;
|
||||||
//
|
|
||||||
//import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
//import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
//import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
//import com.njcn.algorithm.pojo.bo.BaseParam;
|
import com.njcn.algorithm.pojo.bo.BaseParam;
|
||||||
//import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
|
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
|
||||||
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
||||||
//import com.njcn.system.timer.TimerTaskRunner;
|
import com.njcn.system.timer.TimerTaskRunner;
|
||||||
//import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
//import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
//
|
|
||||||
///**
|
/**
|
||||||
// * 类的介绍:单位监测点算法执行链定时任务
|
* 类的介绍:单位监测点算法执行链定时任务
|
||||||
// *
|
*
|
||||||
// * @author xuyang
|
* @author xuyang
|
||||||
// * @version 1.0.0
|
* @version 1.0.0
|
||||||
// * @createTime 2023/12/6 9:35
|
* @createTime 2023/12/6 9:35
|
||||||
// */
|
*/
|
||||||
//@Component
|
@Component
|
||||||
//@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
//public class OrgTaskRunner implements TimerTaskRunner {
|
public class OrgTaskRunner implements TimerTaskRunner {
|
||||||
//
|
|
||||||
// private final LiteFlowAlgorithmFeignClient liteFlowFeignClient;
|
private final LiteFlowAlgorithmFeignClient liteFlowFeignClient;
|
||||||
//
|
|
||||||
// @Override
|
@Override
|
||||||
// public void action(String date) {
|
public void action(String date) {
|
||||||
// BaseParam baseParam = new BaseParam();
|
BaseParam baseParam = new BaseParam();
|
||||||
// baseParam.setFullChain(true);
|
baseParam.setFullChain(true);
|
||||||
// baseParam.setRepair(false);
|
baseParam.setRepair(false);
|
||||||
// if(StrUtil.isBlank(date)){
|
if(StrUtil.isBlank(date)){
|
||||||
// baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
||||||
// }else {
|
}else {
|
||||||
// baseParam.setDataDate(date);
|
baseParam.setDataDate(date);
|
||||||
// }
|
}
|
||||||
// liteFlowFeignClient.orgPointExecutor(baseParam);
|
liteFlowFeignClient.orgPointExecutor(baseParam);
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user