12 Commits

Author SHA1 Message Date
hzj
eed647d3d1 高级算法异常抛出 2026-04-30 12:25:25 +08:00
hzj
4a5fde6a47 设备退运bug修复 2026-04-27 16:23:53 +08:00
hzj
82ab1de5b9 Merge remote-tracking branch 'origin/main' 2026-04-27 16:21:16 +08:00
hzj
ecc56dd2f6 暂态原因算法bug修复 2026-04-27 16:19:43 +08:00
xy
39ae7412a8 微调 2026-04-27 15:33:08 +08:00
xy
52677f84dc fix(utils): 修复JNA调用动态库的路径和错误处理问题
- 移除硬编码的文件后缀名,根据操作系统自动识别.dll或.so文件
- 修正Linux系统下的库文件命名规则,移除多余的"_dll"后缀
- 添加对文件扩展名的条件判断,在Windows下确保.dll后缀
- 添加动态库加载成功后的路径打印功能
2026-04-27 15:32:39 +08:00
cdf
abdb855919 注释prepareboot模块无用代码 2026-04-23 15:11:07 +08:00
cdf
64bcbfff91 注释prepareboot模块无用代码 2026-04-23 14:56:12 +08:00
wr
499eee6784 redis工具类优化 2026-04-23 14:37:24 +08:00
caozehui
c58bd87a78 微调 2026-04-23 09:11:02 +08:00
caozehui
0902f92838 Merge remote-tracking branch 'origin/main' 2026-04-23 08:53:24 +08:00
caozehui
850b3174a2 云前置文件文件目录功能 2026-04-20 13:43:26 +08:00
36 changed files with 3831 additions and 3287 deletions

View File

@@ -75,7 +75,7 @@ public class EventAdvanceServiceImpl implements IEventAdvanceService {
if (Objects.isNull(cfgStream) || Objects.isNull(datStream)) {
throw new BusinessException(WaveFileResponseEnum.ANALYSE_WAVE_NOT_FOUND);
}
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 0);
waveDataDTO = waveFileComponent.getComtradeNoAddPoints(cfgStream, datStream, 0);
} catch (Exception e) {
try {
InputStream cfgStream = fileStorageUtil.getFileStream(cfgPath2);

View File

@@ -1,11 +1,11 @@
package com.njcn.advance.utils;
import cn.hutool.core.io.resource.ClassPathResource;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import java.io.*;
import java.net.URLDecoder;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStream;
/**
* pqs
@@ -20,21 +20,20 @@ public class JnaCallDllOrSo {
public JnaCallDllOrSo(String name) {
super();
String suffix = ".dll";
try {
String os = System.getProperty("os.name");
// windows操作系统为1 否则为0
int beginIndex = os != null && os.startsWith("Windows") ? 1 : 0;
String nameDll;
if (beginIndex == 0) {
//linux操作系统
nameDll = "lib" + name + "_dll";
suffix = ".so";
nameDll = "lib" + name + ".so";
} else {
nameDll = name;
if (!name.endsWith(".dll")) {
nameDll = name + ".dll";
}
}
String tem = "/usr/local/dllFile/"+ nameDll.concat(suffix);
String tem = "/usr/local/dllFile/"+ nameDll;
File dockerFile = new File(tem);
if(!dockerFile.exists()){
boolean f = dockerFile.getParentFile().mkdirs();
@@ -42,7 +41,11 @@ public class JnaCallDllOrSo {
System.out.println("文件夹创建:"+f);
System.out.println("文件创建:"+d);
try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream(nameDll.concat(suffix))) {
try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream(nameDll)) {
if (inputStream == null) {
log.error("找不到资源文件: {}", nameDll);
throw new FileNotFoundException("找不到资源文件: " + nameDll);
}
try (FileOutputStream outputStream = new FileOutputStream(dockerFile)) {
byte[] buffer = new byte[1024];
int bytesRead;
@@ -53,9 +56,11 @@ public class JnaCallDllOrSo {
}
}
this.path = dockerFile.getAbsolutePath();
System.out.println("动态库路径: " + this.path);
} catch (Exception e) {
log.error("调用高级算法文件异常,异常信息如下:");
log.error(e.getMessage());
log.error(e.getMessage(), e);
throw new RuntimeException("加载动态库失败: " + e.getMessage(), e);
}

View File

@@ -14,11 +14,13 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.awt.*;
import java.io.*;
import java.nio.file.Files;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.List;
/**
* @author hongawen
@@ -79,6 +81,46 @@ public class WaveFileComponent {
return waveDataDTO;
}
public WaveDataDTO getComtradeNoAddPoints(InputStream cfgStream, InputStream datStream, int iType) {
WaveDataDTO waveDataDTO = new WaveDataDTO();
// 首先判断文件路径是否为空
// 读取cfg文件
ComtradeCfgDTO comtradeCfgDTO = getComtradeCfgNoAddPoints(cfgStream);
// 为空或者未找到结束符号
if (comtradeCfgDTO == null || !"BINARY".equalsIgnoreCase(comtradeCfgDTO.getStrBinType())) {
throw new BusinessException(WaveFileResponseEnum.CFG_DATA_ERROR);
}
/*****根据通道号计算相别** add by yexb -----Start****
* 1、判断是否是3的倍数是3的倍数则是3相
* 2、假如不是3的倍数 是1的倍数则是单相
********************************************************/
if (comtradeCfgDTO.getNAnalogNum() % 3 == 0) {
comtradeCfgDTO.setNPhasic(3);
} else {
comtradeCfgDTO.setNPhasic(1);
}
// 给相别数量赋值
waveDataDTO.setIPhasic(comtradeCfgDTO.getNPhasic());
// 组装解析抬头
getWaveTitle(waveDataDTO, comtradeCfgDTO);
// 解析.dat文件
List<List<Float>> listWaveData = getComtradeDatNoAddPoints(comtradeCfgDTO, datStream, iType);
waveDataDTO.setComtradeCfgDTO(comtradeCfgDTO);
waveDataDTO.setListWaveData(listWaveData);
//add by hongawen,将暂态触发起始时间记录下来
waveDataDTO.setTime(DateUtil.format(comtradeCfgDTO.getTimeTrige(), DatePattern.NORM_DATETIME_MS_PATTERN));
/*****根据通道号计算相别** add by yexb -----end****/
return waveDataDTO;
}
/*********************************
* 根据波形数据算出rms值数据
* param waveDataDTO 瞬时波形包含了CFG配置文件
@@ -470,6 +512,127 @@ public class WaveFileComponent {
return comtradeCfgDTO;
}
private ComtradeCfgDTO getComtradeCfgNoAddPoints(InputStream cfgStream) {
ComtradeCfgDTO comtradeCfgDTO = new ComtradeCfgDTO();
try (InputStreamReader read = new InputStreamReader(cfgStream, CharsetUtil.CHARSET_GBK); BufferedReader bufferedReader = new BufferedReader(read);) {
// 第一行不关心仅仅是一些描述类的信息
String strFileLine = bufferedReader.readLine();
// 第二行需要关心第二个(模拟量的个数)和第三个参数(开关量的个数)
strFileLine = bufferedReader.readLine();
// 按“,”进行分割
String[] strTempArray = strFileLine.split(StrUtil.COMMA);
// 总个数
comtradeCfgDTO.setNChannelNum(Integer.parseInt(strTempArray[0]));
// 模拟量的个数
comtradeCfgDTO.setNAnalogNum(Integer.parseInt(strTempArray[1].substring(0, strTempArray[1].length() - 1)));
// 开关量的个数
comtradeCfgDTO.setNDigitalNum(Integer.parseInt(strTempArray[2].substring(0, strTempArray[2].length() - 1)));
// 从第三行开始的ComtradeCfg.nChannelNum行是模拟量通道和数字量通道
List<AnalogDTO> lstAnalogDTO = new ArrayList<>();
comtradeCfgDTO.setLstAnalogDTO(lstAnalogDTO);
for (int i = 0; i < comtradeCfgDTO.getNChannelNum(); i++) {
AnalogDTO analogDTO = new AnalogDTO();
lstAnalogDTO.add(analogDTO);
strFileLine = bufferedReader.readLine();
strTempArray = strFileLine.split(StrUtil.COMMA);
//通道序号
analogDTO.setNIndex(Integer.parseInt(strTempArray[0]));
// 通道名称
analogDTO.setSzChannleName(strTempArray[1]);
// 相位名称
analogDTO.setSzPhasicName(strTempArray[2]);
// 监视的通道名称
analogDTO.setSzMonitoredChannleName(strTempArray[3]);
// 通道的单位
analogDTO.setSzUnitName(strTempArray[4]);
// 通道的系数
analogDTO.setFCoefficent(Float.parseFloat(strTempArray[5]));
// 通道的偏移量
analogDTO.setFOffset(Float.parseFloat(strTempArray[6]));
// 起始采样时间的偏移量
analogDTO.setFTimeOffset(Float.parseFloat(strTempArray[7]));
// 采样值的最小值
analogDTO.setNMin(Integer.parseInt(strTempArray[8]));
// 采样值的最大值
analogDTO.setNMax(Integer.parseInt(strTempArray[9]));
// 一次变比
analogDTO.setFPrimary(Float.parseFloat(strTempArray[10]));
// 二次变比
analogDTO.setFSecondary(Float.parseFloat(strTempArray[11]));
// 一次值还是二次值标志
analogDTO.setSzValueType(strTempArray[12]);
}
//WW 2019-11-14 // 采样频率
String freqLine = bufferedReader.readLine();
int nFreq;
try {
// 先尝试解析为double再四舍五入为整数以兼容"50.00"这样的格式
nFreq = (int) Math.round(Double.parseDouble(freqLine));
} catch (NumberFormatException e) {
// 如果失败则使用原来的整数解析方式
nFreq = Integer.parseInt(freqLine);
}
// 获取采样段数
strFileLine = bufferedReader.readLine();
int nRates = Integer.parseInt(strFileLine);
comtradeCfgDTO.setNRates(nRates);
// 获得每段的采样率 //采样率
List<RateDTO> lstRate = new ArrayList<>();
int nOffset = 0;
for (int i = 0; i < nRates; i++) {
strFileLine = bufferedReader.readLine();
strTempArray = strFileLine.split(StrUtil.COMMA);
RateDTO rateDTO = new RateDTO();
// 单周波采样点数 //WW 2019-11-14
double doubleValue = Double.parseDouble(strTempArray[0]); // 解析为 double
int result = (int) (doubleValue / nFreq); // 强制转换为 int
rateDTO.setNOneSample(result);
// 总点数 //这里的strTemp是一个偏移量
rateDTO.setNSampleNum((Integer.parseInt(strTempArray[1]) - nOffset));
nOffset = rateDTO.getNSampleNum();
lstRate.add(rateDTO);
}
comtradeCfgDTO.setLstRate(lstRate);
// 增加读取波形起始时间个结束时间
String timeFormat = "dd/MM/yyyy,HH:mm:ss.SSS";
// 波形起始时间
strFileLine = bufferedReader.readLine();
strFileLine = strFileLine.substring(0, strFileLine.length() - 3);
comtradeCfgDTO.setTimeStart(DateUtil.parse(strFileLine, timeFormat));
// 暂态触发时间
strFileLine = bufferedReader.readLine();
strFileLine = strFileLine.substring(0, strFileLine.length() - 3);
comtradeCfgDTO.setTimeTrige(DateUtil.parse(strFileLine, timeFormat));
// 获取触发时间的时间 + 毫秒
Calendar calendar = DateUtil.calendar(comtradeCfgDTO.getTimeTrige());
comtradeCfgDTO.setFirstMs(calendar.get(Calendar.MILLISECOND));
comtradeCfgDTO.setFirstTime(calendar.getTime());
long a = comtradeCfgDTO.getTimeStart().getTime();
long b = comtradeCfgDTO.getTimeTrige().getTime();
int c = (int) (b - a);
if (c >= 90 && c <= 110) {
comtradeCfgDTO.setNPush(100);
} else if (c >= 190 && c <= 210) {
comtradeCfgDTO.setNPush(200);
}
// 赋值编码格式(二进制)
comtradeCfgDTO.setStrBinType(bufferedReader.readLine().toUpperCase());
} catch (Exception e) {
// 解析.cfg文件出错
comtradeCfgDTO = null;
}
return comtradeCfgDTO;
}
/*********************************
* 读取dat方法
* param strFilePath .dat访问路径
@@ -765,46 +928,46 @@ public class WaveFileComponent {
return listWaveData;
}
// private List<List<Float>> getComtradeDat(ComtradeCfgDTO comtradeCfgDTO, InputStream datStream, int iType) {
// //返回数据如果仅仅做展示后期考虑换String类型降低内存开销
// List<List<Float>> listWaveData = new ArrayList<>();
// //初始化xValue的值
// float xValueAll = 0;
// //判断是否首次登陆
// boolean blxValue = false;
// byte[] datArray;
// try {
// datArray = IoUtil.readBytes(datStream);
// if (ArrayUtil.isEmpty(datArray)) {
// throw new BusinessException(WaveFileResponseEnum.DAT_DATA_ERROR);
// }
// // 计算每个单独的数据块的大小 4个字节的序号 4个字节的时间 2个字节的值
// // 示例中的排布是 4个字节的序号 4个字节的时间 UA(2字节) UB(2字节) UC(2字节) IA(2字节) IB(2字节) IC(2字节)
// int nDigSize = (comtradeCfgDTO.getNDigitalNum() % 16) > 0 ? (comtradeCfgDTO.getNDigitalNum() / 16 + 1) * 2 : comtradeCfgDTO.getNDigitalNum() / 16 * 2;
// int nBlockSize = 2 * Integer.SIZE / 8 + comtradeCfgDTO.getNAnalogNum() * 2 + nDigSize;
// // 总长度除以每个块的大小
// int nBlockNum = (int)Math.floor(datArray.length / nBlockSize);
//
// // 获取采样率
// int finalSampleRate = getFinalWaveSample(comtradeCfgDTO.getLstRate(), iType);
// if (finalSampleRate != -1) {
// //设置最终采样率
// comtradeCfgDTO.setFinalSampleRate(finalSampleRate);
// // 计算转换后的采样率
// int nnInd = 0;
// // 抽点后总共多少点数据
// int nWaveNum;
// //抽点后新的的采样率
// List<RateDTO> newLstRate = new ArrayList<>();
// for (int iRate = 0; iRate < comtradeCfgDTO.getNRates(); iRate++) {
//// if (comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() >= 32) {
// // 计算本段录波总共有多少波形
// nWaveNum = comtradeCfgDTO.getLstRate().get(iRate).getNSampleNum() / comtradeCfgDTO.getLstRate().get(iRate).getNOneSample();
// //设置总波形大小
// comtradeCfgDTO.setNAllWaveNum(comtradeCfgDTO.getNAllWaveNum() + nWaveNum);
// // 将最低采样率替换到本段录波内
// RateDTO tmpRateDTO = new RateDTO();
// // 有效值标志,如果是有效值,那么就需要反向补点,而不是抽点
private List<List<Float>> getComtradeDatNoAddPoints(ComtradeCfgDTO comtradeCfgDTO, InputStream datStream, int iType) {
//返回数据如果仅仅做展示后期考虑换String类型降低内存开销
List<List<Float>> listWaveData = new ArrayList<>();
//初始化xValue的值
float xValueAll = 0;
//判断是否首次登陆
boolean blxValue = false;
byte[] datArray;
try {
datArray = IoUtil.readBytes(datStream);
if (ArrayUtil.isEmpty(datArray)) {
throw new BusinessException(WaveFileResponseEnum.DAT_DATA_ERROR);
}
// 计算每个单独的数据块的大小 4个字节的序号 4个字节的时间 2个字节的值
// 示例中的排布是 4个字节的序号 4个字节的时间 UA(2字节) UB(2字节) UC(2字节) IA(2字节) IB(2字节) IC(2字节)
int nDigSize = (comtradeCfgDTO.getNDigitalNum() % 16) > 0 ? (comtradeCfgDTO.getNDigitalNum() / 16 + 1) * 2 : comtradeCfgDTO.getNDigitalNum() / 16 * 2;
int nBlockSize = 2 * Integer.SIZE / 8 + comtradeCfgDTO.getNAnalogNum() * 2 + nDigSize;
// 总长度除以每个块的大小
int nBlockNum = (int)Math.floor(datArray.length / nBlockSize);
// 获取采样率
int finalSampleRate = getFinalWaveSample(comtradeCfgDTO.getLstRate(), iType);
if (finalSampleRate != -1) {
//设置最终采样率
comtradeCfgDTO.setFinalSampleRate(finalSampleRate);
// 计算转换后的采样率
int nnInd = 0;
// 抽点后总共多少点数据
int nWaveNum;
//抽点后新的的采样率
List<RateDTO> newLstRate = new ArrayList<>();
for (int iRate = 0; iRate < comtradeCfgDTO.getNRates(); iRate++) {
if (comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() >= 32) {
// 计算本段录波总共有多少波形
nWaveNum = comtradeCfgDTO.getLstRate().get(iRate).getNSampleNum() / comtradeCfgDTO.getLstRate().get(iRate).getNOneSample();
//设置总波形大小
comtradeCfgDTO.setNAllWaveNum(comtradeCfgDTO.getNAllWaveNum() + nWaveNum);
// 将最低采样率替换到本段录波内
RateDTO tmpRateDTO = new RateDTO();
// 有效值标志,如果是有效值,那么就需要反向补点,而不是抽点
// if (comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() >= 32) {
// //YXB 2025-08-27
// tmpRateDTO.bRMSFlag = false;
@@ -814,52 +977,53 @@ public class WaveFileComponent {
// //YXB 2025-08-27
// tmpRateDTO.bRMSFlag = true;
// }
// newLstRate.add(tmpRateDTO);
// //iFlag =3 一定不进行抽点算法
// if (iType != 3) {
// //true 抽点算法(当前采样率跟统一采样率不一样则是抽点,否则是未抽点)
// if (!Objects.equals(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample(), comtradeCfgDTO.getFinalSampleRate())) {
// newLstRate.get(nnInd).setNOneSample(comtradeCfgDTO.getFinalSampleRate());
// // 计算本段录波按照最低采样点应该有多少录波
// newLstRate.get(nnInd).setNSampleNum(comtradeCfgDTO.getFinalSampleRate() * nWaveNum);
// } else {
// newLstRate.get(nnInd).setNOneSample(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample());
// // 计算本段录波按照最低采样点应该有多少录波
// newLstRate.get(nnInd).setNSampleNum(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() * nWaveNum);
// }
// } else {
// newLstRate.get(nnInd).setNOneSample(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample());
// // 计算本段录波按照最低采样点应该有多少录波
// newLstRate.get(nnInd).setNSampleNum(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() * nWaveNum);
// }
//
// // 正常的配置中采样率
// /* comtradeCfgDTO.getLstRate().get(nnInd).setNOneSample(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample());
// comtradeCfgDTO.getLstRate().get(nnInd).setNSampleNum(comtradeCfgDTO.getLstRate().get(iRate).getNSampleNum());*/
//
// nnInd++;
//// }
// }
// // 偏移量,采样间隔
// long nOffSet = 0, nWaveSpan;
// //两个点之间的时间差
// float fValue, dfValue;
// // 计算不同块的采样率
// int nIndex = 0;
// // 将最低采样率替换到本段录波内
// // .CFG中采样率
// RateDTO tmpRateDTO;
// // nBlockNum 总循环次数
// for (int i = 0; i < nBlockNum; i++) {
// tmpRateDTO = comtradeCfgDTO.getLstRate().get(nIndex);
// // 判断是否进入下一段
// if (i == tmpRateDTO.getNSampleNum() + nOffSet) {
// nOffSet += tmpRateDTO.getNSampleNum();
// nIndex++;
// if (nIndex == nnInd) {
// break;
// }
// }
newLstRate.add(tmpRateDTO);
//iFlag =3 一定不进行抽点算法
if (iType != 3) {
//true 抽点算法(当前采样率跟统一采样率不一样则是抽点,否则是未抽点)
if (!Objects.equals(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample(), comtradeCfgDTO.getFinalSampleRate())) {
newLstRate.get(nnInd).setNOneSample(comtradeCfgDTO.getFinalSampleRate());
// 计算本段录波按照最低采样点应该有多少录波
newLstRate.get(nnInd).setNSampleNum(comtradeCfgDTO.getFinalSampleRate() * nWaveNum);
} else {
newLstRate.get(nnInd).setNOneSample(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample());
// 计算本段录波按照最低采样点应该有多少录波
newLstRate.get(nnInd).setNSampleNum(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() * nWaveNum);
}
} else {
newLstRate.get(nnInd).setNOneSample(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample());
// 计算本段录波按照最低采样点应该有多少录波
newLstRate.get(nnInd).setNSampleNum(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() * nWaveNum);
}
// 正常的配置中采样率
comtradeCfgDTO.getLstRate().get(nnInd).setNOneSample(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample());
comtradeCfgDTO.getLstRate().get(nnInd).setNSampleNum(comtradeCfgDTO.getLstRate().get(iRate).getNSampleNum());
nnInd++;
}
}
// 偏移量,采样间隔
long nOffSet = 0, nWaveSpan;
//两个点之间的时间差
float fValue, dfValue;
// 计算不同块的采样率
int nIndex = 0;
// 将最低采样率替换到本段录波内
// .CFG中采样率
RateDTO tmpRateDTO;
// nBlockNum 总循环次数
for (int i = 0; i < nBlockNum; i++) {
tmpRateDTO = comtradeCfgDTO.getLstRate().get(nIndex);
// 判断是否进入下一段
if (i == tmpRateDTO.getNSampleNum() + nOffSet) {
nOffSet += tmpRateDTO.getNSampleNum();
nIndex++;
if (nIndex == nnInd) {
break;
}
}
nWaveSpan = tmpRateDTO.getNOneSample() / newLstRate.get(nIndex).getNOneSample();
// tmpRateDTO = comtradeCfgDTO.getLstRate().get(nIndex);
// //YXB 2025-08-27 如果是有效值,那么需要去补点,而不是抽点
// if (newLstRate.get(nIndex).bRMSFlag == true) {
@@ -869,199 +1033,99 @@ public class WaveFileComponent {
// // 计算本段抽点采样间隔
// nWaveSpan = tmpRateDTO.getNOneSample() / newLstRate.get(nIndex).getNOneSample();
// }
//
// dfValue = (float) 20 / tmpRateDTO.getNOneSample();
// // 判断是否到了需要抽的采样点
// if (i % nWaveSpan == 0) {
// // 计算每个通道的值
// //存储局部数据集合包含了时间ABC三相
// List<Float> tmpWaveData = new ArrayList<>();
// //YXB 2025-08-27 如果是有效值,那么需要去补点,而不是抽点
// if (newLstRate.get(nIndex).bRMSFlag == true) {
// // 计算有多少个周波
// long allWaveTemp = newLstRate.get(nIndex).getNSampleNum() / newLstRate.get(nIndex).getNOneSample();
// // 本段需要补多少点
// long allempSample = newLstRate.get(nIndex).getNOneSample();
// //int iStartWaveTemp = i ;// 开始补点的起点
// for (int iWaveTemp = 0; iWaveTemp < allWaveTemp; iWaveTemp++) {
// for (int mTempSample = 0; mTempSample < allempSample; mTempSample++) {
// //最多只有半波有效值也就是每周波是1个或者2个点然后去补最少16个点
// if (mTempSample / nWaveSpan == 1 && mTempSample % nWaveSpan == 0) {
// i++;
// }
// //存储局部数据集合包含了时间ABC三相
// tmpWaveData = new ArrayList<>();
// for (int j = 0; j < comtradeCfgDTO.getNAnalogNum(); j++) {
// //数据只有电压ABC三相数据不展示U0、I0等数据 YXB2020-10-09 去除相别为N相的数据
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzPhasicName().equalsIgnoreCase("N")) {
// break;
// }
// float fCoef = comtradeCfgDTO.getLstAnalogDTO().get(j).getFCoefficent();
//
// if((i * nBlockSize + 2 * 4 + j * 2) == 2437568){
// System.out.println(55);
// }
// fValue = BitConverter.byte2ToUnsignedShort(datArray, i * nBlockSize + 2 * 4 + j * 2) * fCoef;
// //WW 2019-11-14
// /*************************
// * 1、接口返回的默认是二次值
// * 2、P是一次值 S是二次值
// * 3、S(二次值)情况下:
// * ①、单位为"V"时候则直接等于;
// * ②、单位为"kV"时候需要乘以1000
// * 4、P(一次值)情况下:
// * ①、单位为"V"时候则直接等于;
// * ②、单位为"kV"时候需要乘以1000
// *************************/
// //P是一次值 S是二次值
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzValueType().equalsIgnoreCase("S")) {
// //判断单位是V还是kV
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("KV")) {
// fValue = fValue * 1000.0f;
// } else {
// fValue = fValue;
// }
// }
// //P是一次值 S是二次值
// else if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzValueType().equalsIgnoreCase("P")) {
// //判断单位是V还是kV
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("V")) {
// //根据cfg内的变比将一次值转换成二次值
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
// fValue = fValue * comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
// } else {
// fValue = fValue;
// }
// }
// //判断单位是V还是kV
// else if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("KV")) {
// //根据cfg内的变比将一次值转换成二次值
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
// fValue = fValue * 1000.0f * comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
// } else {
// fValue = fValue;
// }
// } else //还有可能是 电流单位是A
// {
// //根据cfg内的变比将一次值转换成二次值
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
// fValue = comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
// } else {
// fValue = fValue;
// }
// }
// }
//
// //xValue前移量假如是第一次时候则需要前移
// if (!blxValue && j == 0) {
// xValueAll = (float) (i * 20) / tmpRateDTO.getNOneSample() - comtradeCfgDTO.getNPush();
// blxValue = true;
// //只增加一个xValue的值 //增加时间值
// tmpWaveData.add((float) (Math.round(xValueAll * 100)) / 100);
// } else if (j == 0) {
// xValueAll += (float) dfValue / nWaveSpan;
// //只增加一个xValue的值 //增加时间值
// tmpWaveData.add((float) (Math.round(xValueAll * 100)) / 100);
// }
//
// //不同通道yValue的值都需要增加最终成ABC三相 //每个通道的值
// tmpWaveData.add((float) (Math.round(fValue * 100)) / 100);
// }
// //把每个单独的值赋予到整体里面去
// listWaveData.add(tmpWaveData);
// }
// // 把每个单独的值赋予到整体里面去
// if (iWaveTemp < (allWaveTemp - 1)) {
// i++;
// }
// }
// } else {
// for (int j = 0; j < comtradeCfgDTO.getNAnalogNum(); j++) {
// //数据只有电压ABC三相数据不展示U0、I0等数据 YXB2020-10-09 去除相别为N相的数据
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzPhasicName().equalsIgnoreCase("N")) {
// break;
// }
//
// float fCoef = comtradeCfgDTO.getLstAnalogDTO().get(j).getFCoefficent();
// fValue = BitConverter.byte2ToUnsignedShort(datArray, i * nBlockSize + 2 * 4 + j * 2) * fCoef;
//
// //WW 2019-11-14
// /**************************
// * 1、接口返回的默认是二次值
// * 2、P是一次值 S是二次值
// * 3、S(二次值)情况下:
// * ①、单位为"V"时候则直接等于;
// * ②、单位为"kV"时候需要乘以1000
// * 4、P(一次值)情况下:
// * ①、单位为"V"时候则直接等于;
// * ②、单位为"kV"时候需要乘以1000
// **************************/
// //P是一次值 S是二次值
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzValueType().equalsIgnoreCase("S")) {
// //判断单位是V还是kV
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("KV")) {
// fValue = fValue * 1000.0f;
// } else {
// fValue = fValue;
// }
// }
// //P是一次值 S是二次值
// else if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzValueType().equalsIgnoreCase("P")) {
// //判断单位是V还是kV
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("V")) {
// //根据cfg内的变比将一次值转换成二次值
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
// fValue = fValue * comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
// } else {
// fValue = fValue;
// }
// }
// //判断单位是V还是kV
// else if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("KV")) {
// //根据cfg内的变比将一次值转换成二次值
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
// fValue = fValue * 1000.0f * comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
// } else {
// fValue = fValue;
// }
// } else //还有可能是 电流单位是A
// {
// //根据cfg内的变比将一次值转换成二次值
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
// fValue = comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
// } else {
// fValue = fValue;
// }
// }
// }
// //xValue前移量假如是第一次时候则需要前移
// if (!blxValue && j == 0) {
// xValueAll = (float) (i * 20) / tmpRateDTO.getNOneSample() - comtradeCfgDTO.getNPush();
// blxValue = true;
// //只增加一个xValue的值 //增加时间值
// tmpWaveData.add((float) (Math.round(xValueAll * 100)) / 100);
// } else if (j == 0) {
// xValueAll += (float) nWaveSpan * dfValue;
// //只增加一个xValue的值 //增加时间值
// tmpWaveData.add((float) (Math.round(xValueAll * 100)) / 100);
// }
//
// //不同通道yValue的值都需要增加最终成ABC三相 //每个通道的值
// tmpWaveData.add((float) (Math.round(fValue * 100)) / 100);
// }
// //把每个单独的值赋予到整体里面去
// listWaveData.add(tmpWaveData);
// }
// }
// }
// }
// } catch (Exception e) {
// e.printStackTrace();
// throw new BusinessException(WaveFileResponseEnum.DAT_DATA_ERROR);
// }
//
// return listWaveData;
// }
dfValue = (float) 20 / tmpRateDTO.getNOneSample();
// 判断是否到了需要抽的采样点
if (i % nWaveSpan == 0) {
// 计算每个通道的值
//存储局部数据集合包含了时间ABC三相
List<Float> tmpWaveData = new ArrayList<>();
for (int j = 0; j < comtradeCfgDTO.getNAnalogNum(); j++) {
//数据只有电压ABC三相数据不展示U0、I0等数据 YXB2020-10-09 去除相别为N相的数据
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzPhasicName().equalsIgnoreCase("N")) {
break;
}
float fCoef = comtradeCfgDTO.getLstAnalogDTO().get(j).getFCoefficent();
fValue = BitConverter.byte2ToUnsignedShort(datArray, i * nBlockSize + 2 * 4 + j * 2) * fCoef;
//WW 2019-11-14
/**************************
* 1、接口返回的默认是二次值
* 2、P是一次值 S是二次值
* 3、S(二次值)情况下:
* ①、单位为"V"时候则直接等于;
* ②、单位为"kV"时候需要乘以1000
* 4、P(一次值)情况下:
* ①、单位为"V"时候则直接等于;
* ②、单位为"kV"时候需要乘以1000
**************************/
//P是一次值 S是二次值
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzValueType().equalsIgnoreCase("S")) {
//判断单位是V还是kV
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("KV")) {
fValue = fValue * 1000.0f;
} else {
fValue = fValue;
}
}
//P是一次值 S是二次值
else if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzValueType().equalsIgnoreCase("P")) {
//判断单位是V还是kV
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("V")) {
//根据cfg内的变比将一次值转换成二次值
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
fValue = fValue * comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
} else {
fValue = fValue;
}
}
//判断单位是V还是kV
else if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("KV")) {
//根据cfg内的变比将一次值转换成二次值
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
fValue = fValue * 1000.0f * comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
} else {
fValue = fValue;
}
} else //还有可能是 电流单位是A
{
//根据cfg内的变比将一次值转换成二次值
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
fValue = fValue *comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
} else {
fValue = fValue;
}
}
}
//xValue前移量假如是第一次时候则需要前移
if (!blxValue && j == 0) {
xValueAll = (float) (i * 20) / tmpRateDTO.getNOneSample() - comtradeCfgDTO.getNPush();
blxValue = true;
//只增加一个xValue的值 //增加时间值
tmpWaveData.add((float) (Math.round(xValueAll * 100)) / 100);
} else if (j == 0) {
xValueAll += (float) nWaveSpan * dfValue;
//只增加一个xValue的值 //增加时间值
tmpWaveData.add((float) (Math.round(xValueAll * 100)) / 100);
}
//不同通道yValue的值都需要增加最终成ABC三相 //每个通道的值
tmpWaveData.add((float) (Math.round(fValue * 100)) / 100);
}
//把每个单独的值赋予到整体里面去
listWaveData.add(tmpWaveData);
}
}
}
} catch (Exception e) {
e.printStackTrace();
throw new BusinessException(WaveFileResponseEnum.DAT_DATA_ERROR);
}
return listWaveData;
}
/*********************************
@@ -1656,10 +1720,10 @@ public class WaveFileComponent {
s = sdf.format(d);
System.out.println(s);
WaveFileComponent waveFileComponent = new WaveFileComponent();
InputStream cfgStream = waveFileComponent.getFileInputStreamByFilePath("C:\\Users\\Administrator\\Desktop\\wave\\PQMonitor_PQM2_006970_20260320_175033_734.CFG");
InputStream datStream = waveFileComponent.getFileInputStreamByFilePath("C:\\Users\\Administrator\\Desktop\\wave\\PQMonitor_PQM2_006970_20260320_175033_734.DAT");
InputStream cfgStream = waveFileComponent.getFileInputStreamByFilePath("C:\\Users\\无名\\Desktop\\月报\\2026\\202603\\文档\\暂态事件及波形\\新建文件夹 (3)\\Comtrade\\Comtrade\\10.95.0.201\\PQMonitor_PQM1_001183_20260320_175042_316.CFG");
InputStream datStream = waveFileComponent.getFileInputStreamByFilePath("C:\\Users\\无名\\Desktop\\月报\\2026\\202603\\文档\\暂态事件及波形\\新建文件夹 (3)\\Comtrade\\Comtrade\\10.95.0.201\\PQMonitor_PQM1_001183_20260320_175042_316.DAT");
// 获取瞬时波形 //获取原始波形值
WaveDataDTO waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 1);
WaveDataDTO waveDataDTO = waveFileComponent.getComtradeNoAddPoints(cfgStream, datStream, 0);
d = new Date();
s = sdf.format(d);
System.out.println(s);

View File

@@ -81,6 +81,29 @@ public interface BusinessTopic {
String RMP_EVENT_DETAIL_TOPIC = "rmpEventDetailTopic";
// /**
// * 云前置文件信息请求主题
// */
// String FILE_INFO_REQUEST_TOPIC = "fileInfoRequestTopic";
//
// /**
// * 云前置文件信息响应主题
// */
// String FILE_INFO_RESPONSE_TOPIC = "fileInfoResponseTopic";
//
// /**
// * 云前置文件下载请求主题
// */
// String FILE_DOWNLOAD_REQUEST_TOPIC = "fileDownloadRequestTopic";
// /**
// * 云前置文件下载响应主题
// */
// String FILE_DOWNLOAD_RESPONSE_TOPIC = "fileDownloadResponseTopic";
String CLOUD_TOPIC = "Cloud_Topic";
String CLOUD_REPLY_TOPIC = "Cloud_Reply_Topic";
interface AppDataTag {

View File

@@ -2,9 +2,12 @@ package com.njcn.oss.utils;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.IdUtil;
import com.aliyun.oss.OSS;
import com.njcn.ali.oss.config.AliYunOssConfig;
import com.njcn.ali.oss.util.AliYunOssUtils;
import com.njcn.common.config.GeneralInfo;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.huawei.obs.config.HuaweiObsProperties;
import com.njcn.huawei.obs.util.OBSUtil;
import com.njcn.minioss.bo.MinIoUploadResDTO;
import com.njcn.minioss.config.MinIossProperties;
@@ -12,6 +15,8 @@ import com.njcn.minioss.util.MinIoUtils;
import com.njcn.oss.constant.GeneralConstant;
import com.njcn.oss.constant.OssPath;
import com.njcn.oss.enums.OssResponseEnum;
import com.obs.services.ObsClient;
import com.obs.services.model.PutObjectRequest;
import io.minio.*;
import io.minio.messages.Item;
import lombok.RequiredArgsConstructor;
@@ -70,6 +75,11 @@ public class FileStorageUtil {
*/
private final AliYunOssUtils aliYunOssUtils;
private final HuaweiObsProperties huaweiObsProperties;
private final OSS ossClient;
private final AliYunOssConfig ossConfig;
/***
* 上传MultipartFile文件
@@ -442,4 +452,62 @@ public class FileStorageUtil {
return file;
}
public void mkdir(String directoryPath) {
if (generalInfo.getBusinessFileStorage() == GeneralConstant.HUAWEI_OBS) {
this.createDirectoryHW(directoryPath);
} else if (generalInfo.getBusinessFileStorage() == GeneralConstant.MINIO_OSS) {
minIoUtils.createDirectory(minIossProperties.getBucket(), directoryPath);
} else if (generalInfo.getBusinessFileStorage() == GeneralConstant.AliYUN_OSS) {
this.createDirectoryAli(directoryPath);
} else {
}
}
/**
* 华为文件服务器创建空目录
*
* @param dirPath
*/
private void createDirectoryHW(String dirPath) {
ObsClient obsClient = null;
try {
obsClient = this.huaweiObsProperties.getInstance();
String bucketName = this.huaweiObsProperties.getObs().getBucket();
// 确保路径以 / 结尾
String directoryKey = dirPath.endsWith("/") ? dirPath : dirPath + "/";
// 创建空对象作为目录占位符
InputStream emptyStream = new ByteArrayInputStream(new byte[0]);
PutObjectRequest request = new PutObjectRequest(bucketName, directoryKey, emptyStream);
obsClient.putObject(request);
log.info("已创建目录占位符:" + directoryKey);
} catch (Exception e) {
throw new RuntimeException("创建目录失败" + dirPath, e);
} finally {
this.huaweiObsProperties.destroy(obsClient);
}
}
/**
* 阿里云文件服务器创建空目录
*
* @param dirPath
*/
public void createDirectoryAli(String dirPath) {
try {
// 确保路径以 / 结尾,表示目录
String directoryKey = dirPath.endsWith("/") ? dirPath : dirPath + "/";
// 创建空输入流作为目录占位符
ByteArrayInputStream emptyStream = new ByteArrayInputStream(new byte[0]);
this.ossClient.putObject(this.ossConfig.getBucket(), directoryKey, emptyStream);
} catch (Exception e) {
throw new RuntimeException("创建目录失败:" + dirPath, e);
}
}
}

View File

@@ -115,4 +115,8 @@ public interface AppRedisKey {
* 补召文件
*/
String MAKE_UP_FILES = "makeUpFilesKey:";
String COMMON_REQUEST = "commonRequestKey:";
String COMMON_RESOPNSE = "commonResponseKey:";
}

View File

@@ -2,9 +2,7 @@ package com.njcn.redis.utils;
import lombok.RequiredArgsConstructor;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.*;
import org.springframework.stereotype.Component;
import java.nio.charset.StandardCharsets;
@@ -325,8 +323,25 @@ public class RedisUtil {
* @return
*/
public List<?> getLikeListAllValues(String key) {
List<Object> info=new ArrayList<>();
for (String s : redisTemplate.keys(key + "*")) {
List<Object> info = new ArrayList<>();
// 使用 SCAN 替代 keys解决 Tair 禁用 KEYS 命令的问题
Set<String> keys = redisTemplate.execute((RedisCallback<Set<String>>) connection -> {
Set<String> keySet = new HashSet<>();
ScanOptions options = ScanOptions.scanOptions()
.match(key + "*")
.count(1000)
.build();
try (Cursor<byte[]> cursor = connection.scan(options)) {
while (cursor.hasNext()) {
keySet.add(new String(cursor.next()));
}
} catch (Exception e) {
throw new RuntimeException("Redis SCAN 模糊查询失败", e);
}
return keySet;
});
for (String s : keys) {
info.add(redisTemplate.opsForValue().get(s));
}
return info;

View File

@@ -1,6 +1,8 @@
package com.njcn.device.pq.pojo.po;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
@@ -17,6 +19,7 @@ import java.io.Serializable;
public class DeviceProcess implements Serializable {
private static final long serialVersionUID = 1L;
//设备id
@TableId("Id")
private String id;
//设备设备所在前置机进程号
private Integer processNo;

View File

@@ -139,7 +139,7 @@ public class RunManageServiceImpl implements RunManageService {
List<String> devIndexes = generalDeviceDTOList.stream().flatMap(list -> list.getDeviceIndexes().stream()).collect(Collectors.toList());
List<String> manuList = runManageParam.getManufacturer().stream().map(SimpleDTO::getId).collect(Collectors.toList());
if (CollectionUtil.isEmpty(devIndexes)) {
throw new BusinessException("当前部门没有装置台账");
return new Page<>(PageFactory.getPageNum(runManageParam), PageFactory.getPageSize(runManageParam));
}
return deviceMapper.getRunManageDevList(new Page<>(PageFactory.getPageNum(runManageParam), PageFactory.getPageSize(runManageParam)),devIndexes, runManageParam.getComFlag(), runManageParam.getRunFlag(), manuList, runManageParam.getSearchValue());
}

View File

@@ -853,7 +853,8 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
if (!Objects.equals(lineDetail.getCt1(), lineDetailRes.getCt1()) || !Objects.equals(lineDetail.getCt2(), lineDetailRes.getCt2())
|| !Objects.equals(lineDetail.getPt1(), lineDetailRes.getPt1()) || !Objects.equals(lineDetail.getPt2(), lineDetailRes.getPt2())
|| !Objects.equals(lineDetail.getDevCapacity(), lineDetailRes.getDevCapacity()) || !Objects.equals(lineDetail.getShortCapacity(), lineDetailRes.getShortCapacity())
|| !Objects.equals(lineDetail.getStandardCapacity(), lineDetailRes.getStandardCapacity()) || !Objects.equals(lineDetail.getDealCapacity(), lineDetailRes.getDealCapacity())) {
|| !Objects.equals(lineDetail.getStandardCapacity(), lineDetailRes.getStandardCapacity()) || !Objects.equals(lineDetail.getDealCapacity(), lineDetailRes.getDealCapacity())
|| !Objects.equals(lineDetail.getPtType(), lineDetailRes.getPtType())) {
//获取用户信息
String index = RequestUtil.getUserIndex();
queryUpdateAndInsertLog(userName, index, lineDetail, lineDetailRes);
@@ -959,6 +960,11 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
sbNew.append("协议容量: ").append(newLine.getDealCapacity()).append(";");
sbOld.append("协议容量: ").append(oldLine.getDealCapacity()).append(";");
}
//接线方式
if (!Objects.equals(newLine.getPtType(), oldLine.getPtType())) {
sbNew.append("接线方式: ").append(newLine.getPtType()).append(";");
sbOld.append("接线方式: ").append(oldLine.getPtType()).append(";");
}
sb.append(sbNew).append(sbOld);
HttpResult<DictData> dicDataByCode = dicDataFeignClient.getDicDataByCode(DicDataEnum.LINE_PARAMETER.getCode());
DictData data = dicDataByCode.getData();
@@ -3851,14 +3857,29 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
}
//设备删除找不到设备名称,重日志截取
if (Objects.equals(temp.getOperateType(), Param.DEL)) {
String temLos = "%s名称:%s;前置信息:%s";
List<String> strings = this.parseTemplateValues(temLos, temp.getTerminalDescribe());
String devName = strings.get(1); // 设备名称
String nodeName = strings.get(2); // 进程名称
pqsTerminalPushLogDTO.setDevName(devName);
String nodeId = nodeNameMap.get(nodeName).getId();
pqsTerminalPushLogDTO.setNodeId(nodeId);
pqsTerminalPushLogDTO.setNodeName(nodeName);
//删除有2种情况1.设备删除2设备状态修改
if (lineMap.containsKey(deviceId)) {
pqsTerminalPushLogDTO.setDevName(lineMap.get(deviceId).getName());
String nodeId = deviceMap.get(deviceId).getNodeId();
pqsTerminalPushLogDTO.setNodeId(nodeId);
pqsTerminalPushLogDTO.setNodeName(nodeMap.containsKey(nodeId)?nodeMap.get(nodeId).getName():"删除前置");
}else {
if(temp.getTerminalDescribe().contains("前置信息")){
String temLos = "%s名称:%s;前置信息:%s";
List<String> strings = this.parseTemplateValues(temLos, temp.getTerminalDescribe());
String devName = strings.get(1); // 设备名称
String nodeName = strings.get(2); // 进程名称
pqsTerminalPushLogDTO.setDevName(devName);
String nodeId = nodeNameMap.get(nodeName).getId();
pqsTerminalPushLogDTO.setNodeId(nodeId);
pqsTerminalPushLogDTO.setNodeName(nodeName);
}else {
return;
}
}
} else {
//如果存在说明设备未被删除不存在说明有一条删除日志直接return
if (lineMap.containsKey(deviceId)) {

View File

@@ -13,10 +13,12 @@ import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.common.mapper.SuperDataMapper;
import com.njcn.device.common.service.GeneralDeviceService;
import com.njcn.device.device.mapper.DevFuctionMapper;
import com.njcn.device.device.service.DeviceProcessService;
import com.njcn.device.device.service.IDevMealService;
import com.njcn.device.device.service.IDevStrategyService;
import com.njcn.device.device.service.IDeviceService;
import com.njcn.device.line.service.LineService;
import com.njcn.device.pq.constant.Param;
import com.njcn.device.pq.enums.LineBaseEnum;
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
import com.njcn.device.pq.pojo.param.*;
@@ -84,6 +86,7 @@ public class TerminalMaintainServiceImpl implements TerminalMaintainService {
private final CldStatisticsFlowMapper cldStatisticsFlowMapper;
private final LineService lineService;
private final DeviceProcessService deviceProcessService;
@Override
public List<TerminalMaintainVO> getTerminalMainList(TerminalMainQueryParam terminalMainQueryParam) {
@@ -205,7 +208,19 @@ public class TerminalMaintainServiceImpl implements TerminalMaintainService {
terminalLogsNew.setObjIndex(device.getId());
terminalLogsNew.setTerminalDescribe(sb.toString());
terminalLogsNew.setIsPush(0);
terminalLogsNew.setOperateType("update");
if(device.getRunFlag() == 0&&device1.getRunFlag()!=0){
terminalLogsNew.setOperateType(Param.DEL);
}
if(device1.getRunFlag() == 0&&device.getRunFlag()!=0){
terminalLogsNew.setOperateType(Param.ADD);
//判断device是否绑定进程号
DeviceProcess deviceProcess = new DeviceProcess();
deviceProcess.setId(device1.getId());
deviceProcess.setProcessNo(1);
deviceProcessService.saveOrUpdate(deviceProcess);
}
terminalLogsNew.setLogsType(data.getId());
terminalLogsNew.setTerminalType(LineBaseEnum.DEVICE_LEVEL.getCode());
terminalLogsNew.setState(DataStateEnum.ENABLE.getCode());

View File

@@ -175,37 +175,40 @@ public class EventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper, Rm
//如果不为空,说明是二次上传波形文件了;
String reason,type;
if(!StringUtils.isEmpty(rmpEventDetailPO.getWavePath())){
LineDetailDataVO lineDetailData = lineFeignClient.getLineDetailData(rmpEventDetailPO.getLineId()).getData();
String ip = lineDetailData.getIp();
EventAnalysisDTO eventAnalysisDTO = new EventAnalysisDTO();
eventAnalysisDTO.setIp(ip);
eventAnalysisDTO.setWaveName(rmpEventDetailPO.getWavePath());
try {
LineDetailDataVO lineDetailData = lineFeignClient.getLineDetailData(rmpEventDetailPO.getLineId()).getData();
String ip = lineDetailData.getIp();
EventAnalysisDTO eventAnalysisDTO = new EventAnalysisDTO();
eventAnalysisDTO.setIp(ip);
eventAnalysisDTO.setWaveName(rmpEventDetailPO.getWavePath());
EventAnalysisDTO result = eventCauseFeignClient.analysisCauseAndType(eventAnalysisDTO).getData();
if(Objects.isNull(result.getCause())){
reason =reasonReflection(0);
EventAnalysisDTO result = eventCauseFeignClient.analysisCauseAndType(eventAnalysisDTO).getData();
if(Objects.isNull(result.getCause())){
reason =reasonReflection(0);
}else {
reason =reasonReflection(result.getCause());
}else {
reason =reasonReflection(result.getCause());
}
if(Objects.isNull(result.getType())){
type =advanceTypeReflection(10);
}
if(Objects.isNull(result.getType())){
type =advanceTypeReflection(10);
}else {
type =advanceTypeReflection(result.getType());
}else {
type =advanceTypeReflection(result.getType());
}
DictData advancereason = dicDataFeignClient.getDicDataByCode(reason).getData();
DictData advanceType = dicDataFeignClient.getDicDataByCode(type).getData();
if(Objects.equals(result.getCauseFlag(),1)&&Objects.equals(result.getTypeFlag(),1)){
rmpEventDetailPO.setDealFlag(1);
}else {
}
DictData advancereason = dicDataFeignClient.getDicDataByCode(reason).getData();
DictData advanceType = dicDataFeignClient.getDicDataByCode(type).getData();
if(Objects.equals(result.getCauseFlag(),1)&&Objects.equals(result.getTypeFlag(),1)){
rmpEventDetailPO.setDealFlag(1);
}else {
rmpEventDetailPO.setDealFlag(0);
}
rmpEventDetailPO.setAdvanceReason(advancereason.getId());
rmpEventDetailPO.setAdvanceType(advanceType.getId());
}catch (Exception e){
rmpEventDetailPO.setDealFlag(0);
}
rmpEventDetailPO.setAdvanceReason(advancereason.getId());
rmpEventDetailPO.setAdvanceType(advanceType.getId());
}
//默认都是其他
// DictData reason = dicDataFeignClient.getDicDataByCode(DicDataEnum.RESON_REST.getCode()).getData();

View File

@@ -1,3 +1,283 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: "@name@"
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10215
spring:
profiles:
active: @spring.profiles.active@
application:
name: @artifactId@
main:
allow-bean-definition-overriding: true
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
gateway:
globalcors:
corsConfigurations:
'[/**]':
allowCredentials: true
exposedHeaders: "Content-Disposition,Content-Type,Cache-Control"
allowedHeaders: "*"
allowedOrigins: "*"
allowedMethods: "*"
discovery:
locator:
# 开启自动代理 (自动装载从配置中心serviceId)
enabled: true
# 服务id为true --> 这样小写服务就可访问了
lower-case-service-id: true
routes:
- id: pqs-auth
uri: lb://pqs-auth
predicates:
- Path=/pqs-auth/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: user-boot
uri: lb://user-boot
predicates:
- Path=/user-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: device-boot
uri: lb://device-boot
predicates:
- Path=/device-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: system-boot
uri: lb://system-boot
predicates:
- Path=/system-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: harmonic-boot
uri: lb://harmonic-boot
predicates:
- Path=/harmonic-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: energy-boot
uri: lb://energy-boot
predicates:
- Path=/energy-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: event-boot
uri: lb://event-boot
predicates:
- Path=/event-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: quality-boot
uri: lb://quality-boot
predicates:
- Path=/quality-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: harmonic-prepare
uri: lb://harmonic-prepare
predicates:
- Path=/harmonic-prepare/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: process-boot
uri: lb://process-boot
predicates:
- Path=/process-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: prepare-boot
uri: lb://prepare-boot
predicates:
- Path=/prepare-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: algorithm-boot
uri: lb://algorithm-boot
predicates:
- Path=/algorithm-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: access-boot
uri: lb://access-boot
predicates:
- Path=/access-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-device-boot
uri: lb://cs-device-boot
predicates:
- Path=/cs-device-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-system-boot
uri: lb://cs-system-boot
predicates:
- Path=/cs-system-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-warn-boot
uri: lb://cs-warn-boot
predicates:
- Path=/cs-warn-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-harmonic-boot
uri: lb://cs-harmonic-boot
predicates:
- Path=/cs-harmonic-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: advance-boot
uri: lb://advance-boot
predicates:
- Path=/advance-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: bpm-boot
uri: lb://bpm-boot
predicates:
- Path=/bpm-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: supervision-boot
uri: lb://supervision-boot
predicates:
- Path=/supervision-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-report-boot
uri: lb://cs-report-boot
predicates:
- Path=/cs-report-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
#河北国网总部调用省侧接口,路径总部统一规定
- id: hb_pms_down
uri: lb://harmonic-boot
predicates:
- Path=/IndexAnalysis/**
- Path=/pms-tech-powerquality-start/**
- id: zl-event-boot
uri: lb://zl-event-boot
predicates:
- Path=/zl-event-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
whitelist:
urls:
- /user-boot/user/generateSm2Key
- /user-boot/theme/getTheme
- /user-boot/user/updateFirstPassword
- /user-boot/appUser/authCode
- /user-boot/appUser/register
- /user-boot/appUser/resetPsd
- /pqs-auth/oauth/logout
- /pqs-auth/oauth/token
- /pqs-auth/oauth/autoLogin
- /pqs-auth/auth/getImgCode
- /pqs-auth/oauth/getPublicKey
- /pqs-auth/judgeToken/heBei
- /pqs-auth/judgeToken/guangZhou
- /webjars/**
- /actuator/**
- /doc.html
- /swagger-resources/**
- /*/v2/api-docs
- /favicon.ico
- /system-boot/theme/getTheme
- /system-boot/image/toStream
- /system-boot/file/download
- /cs-system-boot/appinfo/queryAppInfoByType
- /system-boot/dictType/dictDataCache
- /system-boot/file/**
- /system-boot/area/**
- /bpm-boot/**
- /harmonic-boot/comAccess/getComAccessData
- /harmonic-boot/harmonic/getHistoryResult
- /event-boot/transient/getTransientAnalyseWave
# - /**
#开始
# - /advance-boot/**
# - /device-boot/**
# - /system-boot/**
# - /harmonic-boot/**
# - /energy-boot/**
# - /event-boot/**
# - /quality-boot/**
# - /harmonic-prepare/**
# - /process-boot/**
# - /bpm-boot/**
# - /system-boot/**
# - /supervision-boot/**
# - /user-boot/**
# - /harmonic-boot/**
# - /cs-device-boot/**
#结束
- /user-boot/user/listAllUserByDeptId
- /IndexAnalysis/**
#mqtt:
# client-id: @artifactId@${random.value}

View File

@@ -99,12 +99,12 @@
<artifactId>joda-time</artifactId>
<version>2.9.9</version>
</dependency>
<!-- <dependency>
<groupId>com.njcn</groupId>
<artifactId>prepare-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>-->
<!-- <dependency>
<groupId>com.njcn</groupId>
<artifactId>prepare-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>-->
<dependency>
<groupId>com.njcn</groupId>
<artifactId>advance-api</artifactId>

View File

@@ -80,11 +80,11 @@
<version>${project.version}</version>
</dependency>
<dependency>
<!-- <dependency>
<groupId>com.njcn</groupId>
<artifactId>energy-api</artifactId>
<version>${project.version}</version>
</dependency>
</dependency>-->
<dependency>
<groupId>com.njcn</groupId>

View File

@@ -5,7 +5,6 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.algorithm.pojo.bo.BaseParam;
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

View File

@@ -1,39 +1,39 @@
package com.njcn.system.timer.tasks;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
/**
* 类的介绍:母线算法执行链定时任务
*
* @author xuyang
* @version 1.0.0
* @createTime 2023/12/6 9:35
*/
@Component
@RequiredArgsConstructor
public class GeneraTrixTaskRunner implements TimerTaskRunner {
private final LiteFlowFeignClient liteFlowFeignClient;
@Override
public void action(String date) {
BaseParam baseParam = new BaseParam();
baseParam.setFullChain(true);
baseParam.setRepair(false);
if(StrUtil.isBlank(date)){
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
}else {
baseParam.setDataDate(date);
}
liteFlowFeignClient.generaTrixExecutor(baseParam);
}
}
//package com.njcn.system.timer.tasks;
//
//import cn.hutool.core.date.DatePattern;
//import cn.hutool.core.date.DateUtil;
//import cn.hutool.core.util.StrUtil;
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
//import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import org.springframework.stereotype.Component;
//
///**
// * 类的介绍:母线算法执行链定时任务
// *
// * @author xuyang
// * @version 1.0.0
// * @createTime 2023/12/6 9:35
// */
//@Component
//@RequiredArgsConstructor
//public class GeneraTrixTaskRunner implements TimerTaskRunner {
//
// private final LiteFlowFeignClient liteFlowFeignClient;
//
// @Override
// public void action(String date) {
// BaseParam baseParam = new BaseParam();
// baseParam.setFullChain(true);
// baseParam.setRepair(false);
// if(StrUtil.isBlank(date)){
// baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
// }else {
// baseParam.setDataDate(date);
// }
// liteFlowFeignClient.generaTrixExecutor(baseParam);
// }
//
//
//}

View File

@@ -1,42 +1,42 @@
package com.njcn.system.timer.tasks;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
/**
* 类的介绍:监测点算法执行链定时任务
*
* @author xuyang
* @version 1.0.0
* @createTime 2023/12/6 9:35
*/
@Component
@RequiredArgsConstructor
public class MeasurementHourTaskRunner implements TimerTaskRunner {
private final LiteFlowFeignClient liteFlowFeignClient;
@Override
public void action(String date) {
BaseParam baseParam = new BaseParam();
baseParam.setFullChain(true);
//由于是按小时跑的,前端其他算法都是按天跑的,因此修改参数
if(StrUtil.isBlank(date)){
baseParam.setRepair(false);
baseParam.setDataDate(DateUtil.now());
}else {
baseParam.setRepair(true);
baseParam.setBeginTime(date+ " 00:00:00");
baseParam.setEndTime(date+ " 24:00:00");
}
liteFlowFeignClient.measurementPointExecutorByHour(baseParam);
}
}
//package com.njcn.system.timer.tasks;
//
//import cn.hutool.core.date.DatePattern;
//import cn.hutool.core.date.DateUtil;
//import cn.hutool.core.util.StrUtil;
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
//import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import org.springframework.stereotype.Component;
//
///**
// * 类的介绍:监测点算法执行链定时任务
// *
// * @author xuyang
// * @version 1.0.0
// * @createTime 2023/12/6 9:35
// */
//@Component
//@RequiredArgsConstructor
//public class MeasurementHourTaskRunner implements TimerTaskRunner {
//
// private final LiteFlowFeignClient liteFlowFeignClient;
//
// @Override
// public void action(String date) {
// BaseParam baseParam = new BaseParam();
// baseParam.setFullChain(true);
// //由于是按小时跑的,前端其他算法都是按天跑的,因此修改参数
// if(StrUtil.isBlank(date)){
// baseParam.setRepair(false);
// baseParam.setDataDate(DateUtil.now());
// }else {
// baseParam.setRepair(true);
// baseParam.setBeginTime(date+ " 00:00:00");
// baseParam.setEndTime(date+ " 24:00:00");
// }
// liteFlowFeignClient.measurementPointExecutorByHour(baseParam);
// }
//
//
//}

View File

@@ -5,7 +5,6 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.algorithm.pojo.bo.BaseParam;
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
@@ -21,8 +20,6 @@ import org.springframework.stereotype.Component;
@RequiredArgsConstructor
public class MeasurementTaskRunner implements TimerTaskRunner {
private final LiteFlowFeignClient liteFlowFeignClient;
private final LiteFlowAlgorithmFeignClient liteFlowAlgorithmFeignClient;
@Override

View File

@@ -1,39 +1,39 @@
package com.njcn.system.timer.tasks;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
/**
* 类的介绍:监测点算法执行链定时任务
*
* @author xuyang
* @version 1.0.0
* @createTime 2023/12/6 9:35
*/
@Component
@RequiredArgsConstructor
public class OrgSubStationTaskRunner implements TimerTaskRunner {
private final LiteFlowFeignClient liteFlowFeignClient;
@Override
public void action(String date) {
BaseParam baseParam = new BaseParam();
baseParam.setFullChain(true);
baseParam.setRepair(false);
if(StrUtil.isBlank(date)){
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
}else {
baseParam.setDataDate(date);
}
liteFlowFeignClient.orgSubStationExecutor(baseParam);
}
}
//package com.njcn.system.timer.tasks;
//
//import cn.hutool.core.date.DatePattern;
//import cn.hutool.core.date.DateUtil;
//import cn.hutool.core.util.StrUtil;
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
//import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import org.springframework.stereotype.Component;
//
///**
// * 类的介绍:监测点算法执行链定时任务
// *
// * @author xuyang
// * @version 1.0.0
// * @createTime 2023/12/6 9:35
// */
//@Component
//@RequiredArgsConstructor
//public class OrgSubStationTaskRunner implements TimerTaskRunner {
//
// private final LiteFlowFeignClient liteFlowFeignClient;
//
// @Override
// public void action(String date) {
// BaseParam baseParam = new BaseParam();
// baseParam.setFullChain(true);
// baseParam.setRepair(false);
// if(StrUtil.isBlank(date)){
// baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
// }else {
// baseParam.setDataDate(date);
// }
// liteFlowFeignClient.orgSubStationExecutor(baseParam);
// }
//
//
//}

View File

@@ -1,38 +1,38 @@
package com.njcn.system.timer.tasks;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.algorithm.pojo.bo.BaseParam;
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
/**
* 类的介绍:单位监测点算法执行链定时任务
*
* @author xuyang
* @version 1.0.0
* @createTime 2023/12/6 9:35
*/
@Component
@RequiredArgsConstructor
public class OrgTaskRunner implements TimerTaskRunner {
private final LiteFlowAlgorithmFeignClient liteFlowFeignClient;
@Override
public void action(String date) {
BaseParam baseParam = new BaseParam();
baseParam.setFullChain(true);
baseParam.setRepair(false);
if(StrUtil.isBlank(date)){
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
}else {
baseParam.setDataDate(date);
}
liteFlowFeignClient.orgPointExecutor(baseParam);
}
}
//package com.njcn.system.timer.tasks;
//
//import cn.hutool.core.date.DatePattern;
//import cn.hutool.core.date.DateUtil;
//import cn.hutool.core.util.StrUtil;
//import com.njcn.algorithm.pojo.bo.BaseParam;
//import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import org.springframework.stereotype.Component;
//
///**
// * 类的介绍:单位监测点算法执行链定时任务
// *
// * @author xuyang
// * @version 1.0.0
// * @createTime 2023/12/6 9:35
// */
//@Component
//@RequiredArgsConstructor
//public class OrgTaskRunner implements TimerTaskRunner {
//
// private final LiteFlowAlgorithmFeignClient liteFlowFeignClient;
//
// @Override
// public void action(String date) {
// BaseParam baseParam = new BaseParam();
// baseParam.setFullChain(true);
// baseParam.setRepair(false);
// if(StrUtil.isBlank(date)){
// baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
// }else {
// baseParam.setDataDate(date);
// }
// liteFlowFeignClient.orgPointExecutor(baseParam);
// }
//}

View File

@@ -1,37 +1,37 @@
package com.njcn.system.timer.tasks;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
/**
* 类的介绍:变电站母线算法执行链定时任务
*
* @author xuyang
* @version 1.0.0
* @createTime 2023/12/6 9:35
*/
@Component
@RequiredArgsConstructor
public class PmsDimTaskRunner implements TimerTaskRunner {
private final LiteFlowFeignClient liteFlowFeignClient;
@Override
public void action(String date) {
BaseParam baseParam = new BaseParam();
baseParam.setFullChain(true);
baseParam.setRepair(false);
if(StrUtil.isBlank(date)){
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
}else {
baseParam.setDataDate(date);
}
liteFlowFeignClient.pmsDimExecutor(baseParam);
}
}
//package com.njcn.system.timer.tasks;
//
//import cn.hutool.core.date.DatePattern;
//import cn.hutool.core.date.DateUtil;
//import cn.hutool.core.util.StrUtil;
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
//import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import org.springframework.stereotype.Component;
//
///**
// * 类的介绍:变电站母线算法执行链定时任务
// *
// * @author xuyang
// * @version 1.0.0
// * @createTime 2023/12/6 9:35
// */
//@Component
//@RequiredArgsConstructor
//public class PmsDimTaskRunner implements TimerTaskRunner {
//
// private final LiteFlowFeignClient liteFlowFeignClient;
//
// @Override
// public void action(String date) {
// BaseParam baseParam = new BaseParam();
// baseParam.setFullChain(true);
// baseParam.setRepair(false);
// if(StrUtil.isBlank(date)){
// baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
// }else {
// baseParam.setDataDate(date);
// }
// liteFlowFeignClient.pmsDimExecutor(baseParam);
// }
//}

View File

@@ -1,32 +1,32 @@
package com.njcn.system.timer.tasks;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
import com.njcn.prepare.harmonic.api.upload.DimBusGlobalFeignClient;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
/**
* pqs
*
* @author cdf
* @date 2024/4/17
*/
@Component
@RequiredArgsConstructor
public class PmsRunStatisticTaskRunner implements TimerTaskRunner {
private final DimBusGlobalFeignClient dimBusGlobalFeignClient;
@Override
public void action(String date) {
if(StrUtil.isBlank(date)){
date = DateUtil.format(DateUtil.yesterday(),DatePattern.NORM_DATE_PATTERN);
}
dimBusGlobalFeignClient.runLedgerStatistic(date);
dimBusGlobalFeignClient.dimBusUpEveryDay(date);
}
}
//package com.njcn.system.timer.tasks;
//
//import cn.hutool.core.date.DatePattern;
//import cn.hutool.core.date.DateUtil;
//import cn.hutool.core.util.StrUtil;
//import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
//import com.njcn.prepare.harmonic.api.upload.DimBusGlobalFeignClient;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import org.springframework.stereotype.Component;
//
///**
// * pqs
// *
// * @author cdf
// * @date 2024/4/17
// */
//@Component
//@RequiredArgsConstructor
//public class PmsRunStatisticTaskRunner implements TimerTaskRunner {
//
// private final DimBusGlobalFeignClient dimBusGlobalFeignClient;
//
// @Override
// public void action(String date) {
// if(StrUtil.isBlank(date)){
// date = DateUtil.format(DateUtil.yesterday(),DatePattern.NORM_DATE_PATTERN);
// }
// dimBusGlobalFeignClient.runLedgerStatistic(date);
// dimBusGlobalFeignClient.dimBusUpEveryDay(date);
// }
//}

View File

@@ -1,113 +1,113 @@
package com.njcn.system.timer.tasks;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.common.pojo.constant.BizParamConstant;
import com.njcn.prepare.harmonic.api.newalgorithm.PmsStatisticsSpecialMonitorFeignClient;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Calendar;
import java.util.Date;
import java.util.Objects;
/**
* 类的介绍:专项分析-台账统计定时任务
*
* @author xuyang
* @version 1.0.0
* @createTime 2023/12/08 11:23
*/
@Component
@RequiredArgsConstructor
@Slf4j
public class PmsStatisticsSpecialMonitorTaskRunner implements TimerTaskRunner {
private final PmsStatisticsSpecialMonitorFeignClient pmsStatisticsSpecialMonitorFeignClient;
@Override
public void action(String date) {
log.info(LocalDateTime.now()+"专项分析-台账统计调度开始");
LineParam lineParam = new LineParam();
lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
pmsStatisticsSpecialMonitorFeignClient.pmsStatisticsSpecialMonitorHandler(lineParam);
}
public String prepareTimeDeal(String command) {
if (StrUtil.isBlank(command)) {
log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar = Calendar.getInstance();
if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
calendar.add(Calendar.DAY_OF_MONTH, -1);
} else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
calendar.set(Calendar.DAY_OF_MONTH, 1);
} else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
int nowMonth = calendar.get(Calendar.MONTH);
calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
} else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
calendar.set(Calendar.DAY_OF_YEAR, 1);
}
log.info("job调度时间:" + sdf.format(calendar.getTime()));
return sdf.format(calendar.getTime());
}
/**
* 根据xxl-job的参数生成一个任务的起始时间和结束时间
*
* @author cdf
* @date 2023/9/20
*/
public void commDefineDate(String command, LineParam lineParam) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String begin;
String end;
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_MONTH, -1);
Date temDate = calendar.getTime();
switch (command) {
case BizParamConstant.STAT_BIZ_DAY:
begin = sdf.format(DateUtil.beginOfDay(temDate));
end = sdf.format(DateUtil.endOfDay(temDate));
break;
case BizParamConstant.STAT_BIZ_WEEK:
begin = sdf.format(DateUtil.beginOfWeek(temDate));
end = sdf.format(DateUtil.endOfWeek(temDate));
break;
case BizParamConstant.STAT_BIZ_MONTH:
begin = sdf.format(DateUtil.beginOfMonth(temDate));
end = sdf.format(DateUtil.endOfMonth(temDate));
break;
case BizParamConstant.STAT_BIZ_QUARTER:
begin = sdf.format(DateUtil.beginOfQuarter(temDate));
end = sdf.format(DateUtil.endOfQuarter(temDate));
break;
case BizParamConstant.STAT_BIZ_YEAR:
begin = sdf.format(DateUtil.beginOfYear(temDate));
end = sdf.format(DateUtil.endOfYear(temDate));
break;
default:
begin = sdf.format(DateUtil.beginOfDay(temDate));
end = sdf.format(DateUtil.endOfDay(temDate));
break;
}
lineParam.setBeginTime(begin);
lineParam.setEndTime(end);
lineParam.setDataDate(begin.substring(0, 10));
}
}
//package com.njcn.system.timer.tasks;
//
//import cn.hutool.core.date.DateUtil;
//import cn.hutool.core.util.StrUtil;
//import com.njcn.common.pojo.constant.BizParamConstant;
//import com.njcn.prepare.harmonic.api.newalgorithm.PmsStatisticsSpecialMonitorFeignClient;
//import com.njcn.prepare.harmonic.pojo.param.LineParam;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component;
//
//import java.text.SimpleDateFormat;
//import java.time.LocalDateTime;
//import java.util.Calendar;
//import java.util.Date;
//import java.util.Objects;
//
///**
// * 类的介绍:专项分析-台账统计定时任务
// *
// * @author xuyang
// * @version 1.0.0
// * @createTime 2023/12/08 11:23
// */
//@Component
//@RequiredArgsConstructor
//@Slf4j
//public class PmsStatisticsSpecialMonitorTaskRunner implements TimerTaskRunner {
//
// private final PmsStatisticsSpecialMonitorFeignClient pmsStatisticsSpecialMonitorFeignClient;
//
// @Override
// public void action(String date) {
// log.info(LocalDateTime.now()+"专项分析-台账统计调度开始");
// LineParam lineParam = new LineParam();
// lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
// lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
// this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
// pmsStatisticsSpecialMonitorFeignClient.pmsStatisticsSpecialMonitorHandler(lineParam);
// }
//
// public String prepareTimeDeal(String command) {
// if (StrUtil.isBlank(command)) {
// log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
// return null;
// }
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// Calendar calendar = Calendar.getInstance();
// if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
// calendar.add(Calendar.DAY_OF_MONTH, -1);
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
// calendar.set(Calendar.DAY_OF_MONTH, 1);
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
// int nowMonth = calendar.get(Calendar.MONTH);
// calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
// calendar.set(Calendar.DAY_OF_MONTH, 1);
// calendar.set(Calendar.HOUR_OF_DAY, 0);
// calendar.set(Calendar.MINUTE, 0);
// calendar.set(Calendar.SECOND, 0);
// calendar.set(Calendar.MILLISECOND, 0);
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
// calendar.set(Calendar.DAY_OF_YEAR, 1);
// }
// log.info("job调度时间:" + sdf.format(calendar.getTime()));
// return sdf.format(calendar.getTime());
// }
//
// /**
// * 根据xxl-job的参数生成一个任务的起始时间和结束时间
// *
// * @author cdf
// * @date 2023/9/20
// */
// public void commDefineDate(String command, LineParam lineParam) {
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// String begin;
// String end;
// Calendar calendar = Calendar.getInstance();
// calendar.add(Calendar.DAY_OF_MONTH, -1);
// Date temDate = calendar.getTime();
// switch (command) {
// case BizParamConstant.STAT_BIZ_DAY:
// begin = sdf.format(DateUtil.beginOfDay(temDate));
// end = sdf.format(DateUtil.endOfDay(temDate));
// break;
// case BizParamConstant.STAT_BIZ_WEEK:
// begin = sdf.format(DateUtil.beginOfWeek(temDate));
// end = sdf.format(DateUtil.endOfWeek(temDate));
// break;
// case BizParamConstant.STAT_BIZ_MONTH:
// begin = sdf.format(DateUtil.beginOfMonth(temDate));
// end = sdf.format(DateUtil.endOfMonth(temDate));
// break;
// case BizParamConstant.STAT_BIZ_QUARTER:
// begin = sdf.format(DateUtil.beginOfQuarter(temDate));
// end = sdf.format(DateUtil.endOfQuarter(temDate));
// break;
// case BizParamConstant.STAT_BIZ_YEAR:
// begin = sdf.format(DateUtil.beginOfYear(temDate));
// end = sdf.format(DateUtil.endOfYear(temDate));
// break;
// default:
// begin = sdf.format(DateUtil.beginOfDay(temDate));
// end = sdf.format(DateUtil.endOfDay(temDate));
// break;
// }
// lineParam.setBeginTime(begin);
// lineParam.setEndTime(end);
// lineParam.setDataDate(begin.substring(0, 10));
// }
//
//}

View File

@@ -1,113 +1,113 @@
package com.njcn.system.timer.tasks;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.common.pojo.constant.BizParamConstant;
import com.njcn.prepare.harmonic.api.newalgorithm.RMpEmissionFeignClient;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Calendar;
import java.util.Date;
import java.util.Objects;
/**
* 类的介绍:发射特性定时任务
*
* @author xuyang
* @version 1.0.0
* @createTime 2023/12/20 13:55
*/
@Component
@RequiredArgsConstructor
@Slf4j
public class RMpEmissionTaskRunner implements TimerTaskRunner {
private final RMpEmissionFeignClient rMpEmissionFeignClient;
@Override
public void action(String date) {
log.info(LocalDateTime.now()+"发射特性调度开始");
LineParam lineParam = new LineParam();
lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
rMpEmissionFeignClient.rMpEmissionMHandler(lineParam);
}
public String prepareTimeDeal(String command) {
if (StrUtil.isBlank(command)) {
log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar = Calendar.getInstance();
if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
calendar.add(Calendar.DAY_OF_MONTH, -1);
} else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
calendar.set(Calendar.DAY_OF_MONTH, 1);
} else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
int nowMonth = calendar.get(Calendar.MONTH);
calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
} else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
calendar.set(Calendar.DAY_OF_YEAR, 1);
}
log.info("job调度时间:" + sdf.format(calendar.getTime()));
return sdf.format(calendar.getTime());
}
/**
* 根据xxl-job的参数生成一个任务的起始时间和结束时间
*
* @author cdf
* @date 2023/9/20
*/
public void commDefineDate(String command, LineParam lineParam) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String begin;
String end;
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_MONTH, -1);
Date temDate = calendar.getTime();
switch (command) {
case BizParamConstant.STAT_BIZ_DAY:
begin = sdf.format(DateUtil.beginOfDay(temDate));
end = sdf.format(DateUtil.endOfDay(temDate));
break;
case BizParamConstant.STAT_BIZ_WEEK:
begin = sdf.format(DateUtil.beginOfWeek(temDate));
end = sdf.format(DateUtil.endOfWeek(temDate));
break;
case BizParamConstant.STAT_BIZ_MONTH:
begin = sdf.format(DateUtil.beginOfMonth(temDate));
end = sdf.format(DateUtil.endOfMonth(temDate));
break;
case BizParamConstant.STAT_BIZ_QUARTER:
begin = sdf.format(DateUtil.beginOfQuarter(temDate));
end = sdf.format(DateUtil.endOfQuarter(temDate));
break;
case BizParamConstant.STAT_BIZ_YEAR:
begin = sdf.format(DateUtil.beginOfYear(temDate));
end = sdf.format(DateUtil.endOfYear(temDate));
break;
default:
begin = sdf.format(DateUtil.beginOfDay(temDate));
end = sdf.format(DateUtil.endOfDay(temDate));
break;
}
lineParam.setBeginTime(begin);
lineParam.setEndTime(end);
lineParam.setDataDate(begin.substring(0, 10));
}
}
//package com.njcn.system.timer.tasks;
//
//import cn.hutool.core.date.DateUtil;
//import cn.hutool.core.util.StrUtil;
//import com.njcn.common.pojo.constant.BizParamConstant;
//import com.njcn.prepare.harmonic.api.newalgorithm.RMpEmissionFeignClient;
//import com.njcn.prepare.harmonic.pojo.param.LineParam;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component;
//
//import java.text.SimpleDateFormat;
//import java.time.LocalDateTime;
//import java.util.Calendar;
//import java.util.Date;
//import java.util.Objects;
//
///**
// * 类的介绍:发射特性定时任务
// *
// * @author xuyang
// * @version 1.0.0
// * @createTime 2023/12/20 13:55
// */
//@Component
//@RequiredArgsConstructor
//@Slf4j
//public class RMpEmissionTaskRunner implements TimerTaskRunner {
//
// private final RMpEmissionFeignClient rMpEmissionFeignClient;
//
// @Override
// public void action(String date) {
// log.info(LocalDateTime.now()+"发射特性调度开始");
// LineParam lineParam = new LineParam();
// lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
// lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
// this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
// rMpEmissionFeignClient.rMpEmissionMHandler(lineParam);
// }
//
// public String prepareTimeDeal(String command) {
// if (StrUtil.isBlank(command)) {
// log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
// return null;
// }
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// Calendar calendar = Calendar.getInstance();
// if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
// calendar.add(Calendar.DAY_OF_MONTH, -1);
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
// calendar.set(Calendar.DAY_OF_MONTH, 1);
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
// int nowMonth = calendar.get(Calendar.MONTH);
// calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
// calendar.set(Calendar.DAY_OF_MONTH, 1);
// calendar.set(Calendar.HOUR_OF_DAY, 0);
// calendar.set(Calendar.MINUTE, 0);
// calendar.set(Calendar.SECOND, 0);
// calendar.set(Calendar.MILLISECOND, 0);
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
// calendar.set(Calendar.DAY_OF_YEAR, 1);
// }
// log.info("job调度时间:" + sdf.format(calendar.getTime()));
// return sdf.format(calendar.getTime());
// }
//
// /**
// * 根据xxl-job的参数生成一个任务的起始时间和结束时间
// *
// * @author cdf
// * @date 2023/9/20
// */
// public void commDefineDate(String command, LineParam lineParam) {
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// String begin;
// String end;
// Calendar calendar = Calendar.getInstance();
// calendar.add(Calendar.DAY_OF_MONTH, -1);
// Date temDate = calendar.getTime();
// switch (command) {
// case BizParamConstant.STAT_BIZ_DAY:
// begin = sdf.format(DateUtil.beginOfDay(temDate));
// end = sdf.format(DateUtil.endOfDay(temDate));
// break;
// case BizParamConstant.STAT_BIZ_WEEK:
// begin = sdf.format(DateUtil.beginOfWeek(temDate));
// end = sdf.format(DateUtil.endOfWeek(temDate));
// break;
// case BizParamConstant.STAT_BIZ_MONTH:
// begin = sdf.format(DateUtil.beginOfMonth(temDate));
// end = sdf.format(DateUtil.endOfMonth(temDate));
// break;
// case BizParamConstant.STAT_BIZ_QUARTER:
// begin = sdf.format(DateUtil.beginOfQuarter(temDate));
// end = sdf.format(DateUtil.endOfQuarter(temDate));
// break;
// case BizParamConstant.STAT_BIZ_YEAR:
// begin = sdf.format(DateUtil.beginOfYear(temDate));
// end = sdf.format(DateUtil.endOfYear(temDate));
// break;
// default:
// begin = sdf.format(DateUtil.beginOfDay(temDate));
// end = sdf.format(DateUtil.endOfDay(temDate));
// break;
// }
// lineParam.setBeginTime(begin);
// lineParam.setEndTime(end);
// lineParam.setDataDate(begin.substring(0, 10));
// }
//
//}

View File

@@ -1,113 +1,113 @@
package com.njcn.system.timer.tasks;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.common.pojo.constant.BizParamConstant;
import com.njcn.prepare.harmonic.api.newalgorithm.RMpInfluenceFeignClient;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Calendar;
import java.util.Date;
import java.util.Objects;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2023/12/20 14:12
*/
@Component
@RequiredArgsConstructor
@Slf4j
public class RMpInfluenceTaskRunner implements TimerTaskRunner {
private final RMpInfluenceFeignClient rMpInfluenceFeignClient;
@Override
public void action(String date) {
log.info(LocalDateTime.now()+"影响特性调度开始");
LineParam lineParam = new LineParam();
lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
rMpInfluenceFeignClient.rMpInfluenceMHandler(lineParam);
}
public String prepareTimeDeal(String command) {
if (StrUtil.isBlank(command)) {
log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar = Calendar.getInstance();
if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
calendar.add(Calendar.DAY_OF_MONTH, -1);
} else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
calendar.set(Calendar.DAY_OF_MONTH, 1);
} else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
int nowMonth = calendar.get(Calendar.MONTH);
calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
} else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
calendar.set(Calendar.DAY_OF_YEAR, 1);
}
log.info("job调度时间:" + sdf.format(calendar.getTime()));
return sdf.format(calendar.getTime());
}
/**
* 根据xxl-job的参数生成一个任务的起始时间和结束时间
*
* @author cdf
* @date 2023/9/20
*/
public void commDefineDate(String command, LineParam lineParam) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String begin;
String end;
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_MONTH, -1);
Date temDate = calendar.getTime();
switch (command) {
case BizParamConstant.STAT_BIZ_DAY:
begin = sdf.format(DateUtil.beginOfDay(temDate));
end = sdf.format(DateUtil.endOfDay(temDate));
break;
case BizParamConstant.STAT_BIZ_WEEK:
begin = sdf.format(DateUtil.beginOfWeek(temDate));
end = sdf.format(DateUtil.endOfWeek(temDate));
break;
case BizParamConstant.STAT_BIZ_MONTH:
begin = sdf.format(DateUtil.beginOfMonth(temDate));
end = sdf.format(DateUtil.endOfMonth(temDate));
break;
case BizParamConstant.STAT_BIZ_QUARTER:
begin = sdf.format(DateUtil.beginOfQuarter(temDate));
end = sdf.format(DateUtil.endOfQuarter(temDate));
break;
case BizParamConstant.STAT_BIZ_YEAR:
begin = sdf.format(DateUtil.beginOfYear(temDate));
end = sdf.format(DateUtil.endOfYear(temDate));
break;
default:
begin = sdf.format(DateUtil.beginOfDay(temDate));
end = sdf.format(DateUtil.endOfDay(temDate));
break;
}
lineParam.setBeginTime(begin);
lineParam.setEndTime(end);
lineParam.setDataDate(begin.substring(0, 10));
}
}
//package com.njcn.system.timer.tasks;
//
//import cn.hutool.core.date.DateUtil;
//import cn.hutool.core.util.StrUtil;
//import com.njcn.common.pojo.constant.BizParamConstant;
//import com.njcn.prepare.harmonic.api.newalgorithm.RMpInfluenceFeignClient;
//import com.njcn.prepare.harmonic.pojo.param.LineParam;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component;
//
//import java.text.SimpleDateFormat;
//import java.time.LocalDateTime;
//import java.util.Calendar;
//import java.util.Date;
//import java.util.Objects;
//
///**
// * 类的介绍:
// *
// * @author xuyang
// * @version 1.0.0
// * @createTime 2023/12/20 14:12
// */
//@Component
//@RequiredArgsConstructor
//@Slf4j
//public class RMpInfluenceTaskRunner implements TimerTaskRunner {
//
// private final RMpInfluenceFeignClient rMpInfluenceFeignClient;
//
// @Override
// public void action(String date) {
// log.info(LocalDateTime.now()+"影响特性调度开始");
// LineParam lineParam = new LineParam();
// lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
// lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
// this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
// rMpInfluenceFeignClient.rMpInfluenceMHandler(lineParam);
// }
//
// public String prepareTimeDeal(String command) {
// if (StrUtil.isBlank(command)) {
// log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
// return null;
// }
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// Calendar calendar = Calendar.getInstance();
// if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
// calendar.add(Calendar.DAY_OF_MONTH, -1);
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
// calendar.set(Calendar.DAY_OF_MONTH, 1);
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
// int nowMonth = calendar.get(Calendar.MONTH);
// calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
// calendar.set(Calendar.DAY_OF_MONTH, 1);
// calendar.set(Calendar.HOUR_OF_DAY, 0);
// calendar.set(Calendar.MINUTE, 0);
// calendar.set(Calendar.SECOND, 0);
// calendar.set(Calendar.MILLISECOND, 0);
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
// calendar.set(Calendar.DAY_OF_YEAR, 1);
// }
// log.info("job调度时间:" + sdf.format(calendar.getTime()));
// return sdf.format(calendar.getTime());
// }
//
// /**
// * 根据xxl-job的参数生成一个任务的起始时间和结束时间
// *
// * @author cdf
// * @date 2023/9/20
// */
// public void commDefineDate(String command, LineParam lineParam) {
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// String begin;
// String end;
// Calendar calendar = Calendar.getInstance();
// calendar.add(Calendar.DAY_OF_MONTH, -1);
// Date temDate = calendar.getTime();
// switch (command) {
// case BizParamConstant.STAT_BIZ_DAY:
// begin = sdf.format(DateUtil.beginOfDay(temDate));
// end = sdf.format(DateUtil.endOfDay(temDate));
// break;
// case BizParamConstant.STAT_BIZ_WEEK:
// begin = sdf.format(DateUtil.beginOfWeek(temDate));
// end = sdf.format(DateUtil.endOfWeek(temDate));
// break;
// case BizParamConstant.STAT_BIZ_MONTH:
// begin = sdf.format(DateUtil.beginOfMonth(temDate));
// end = sdf.format(DateUtil.endOfMonth(temDate));
// break;
// case BizParamConstant.STAT_BIZ_QUARTER:
// begin = sdf.format(DateUtil.beginOfQuarter(temDate));
// end = sdf.format(DateUtil.endOfQuarter(temDate));
// break;
// case BizParamConstant.STAT_BIZ_YEAR:
// begin = sdf.format(DateUtil.beginOfYear(temDate));
// end = sdf.format(DateUtil.endOfYear(temDate));
// break;
// default:
// begin = sdf.format(DateUtil.beginOfDay(temDate));
// end = sdf.format(DateUtil.endOfDay(temDate));
// break;
// }
// lineParam.setBeginTime(begin);
// lineParam.setEndTime(end);
// lineParam.setDataDate(begin.substring(0, 10));
// }
//
//}

View File

@@ -5,7 +5,6 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.algorithm.pojo.bo.BaseParam;
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;

View File

@@ -1,31 +1,31 @@
package com.njcn.system.timer.tasks;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
/**
* pqs
* 每日定时统计河北两级贯通接口主网数据,用于后续定时上送国网
* @author cdf
* @date 2024/2/22
*/
@Component
@RequiredArgsConstructor
public class UploadGwOrgAllRunner implements TimerTaskRunner {
private final LiteFlowFeignClient liteFlowFeignClient;
@Override
public void action(String date) {
BaseParam baseParam = new BaseParam();
baseParam.setFullChain(true);
baseParam.setRepair(false);
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
liteFlowFeignClient.uploadOrgExecutor(baseParam);
}
}
//package com.njcn.system.timer.tasks;
//
//import cn.hutool.core.date.DatePattern;
//import cn.hutool.core.date.DateUtil;
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
//import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import org.springframework.stereotype.Component;
//
///**
// * pqs
// * 每日定时统计河北两级贯通接口主网数据,用于后续定时上送国网
// * @author cdf
// * @date 2024/2/22
// */
//@Component
//@RequiredArgsConstructor
//public class UploadGwOrgAllRunner implements TimerTaskRunner {
//
// private final LiteFlowFeignClient liteFlowFeignClient;
//
// @Override
// public void action(String date) {
// BaseParam baseParam = new BaseParam();
// baseParam.setFullChain(true);
// baseParam.setRepair(false);
// baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
// liteFlowFeignClient.uploadOrgExecutor(baseParam);
// }
//}

View File

@@ -1,19 +1,19 @@
package com.njcn.system.timer.tasks.energy;
import com.njcn.energy.pojo.api.EleAirStrategyFeignClient;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
@Component
@RequiredArgsConstructor
public class AirControllerRunner implements TimerTaskRunner {
private final EleAirStrategyFeignClient eleAirStrategyFeignClient;
@Override
public void action(String date) {
eleAirStrategyFeignClient.dealAirStrategyId("close");
}
}
//package com.njcn.system.timer.tasks.energy;
//
//
//import com.njcn.energy.pojo.api.EleAirStrategyFeignClient;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import org.springframework.stereotype.Component;
//
//@Component
//@RequiredArgsConstructor
//public class AirControllerRunner implements TimerTaskRunner {
//
// private final EleAirStrategyFeignClient eleAirStrategyFeignClient;
//
// @Override
// public void action(String date) {
// eleAirStrategyFeignClient.dealAirStrategyId("close");
// }
//}

View File

@@ -1,18 +1,18 @@
package com.njcn.system.timer.tasks.energy;
import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
@Component
@RequiredArgsConstructor
public class EleIntegrityRunner implements TimerTaskRunner {
private final EnergyStatisticFeignClient energyStatisticFeignClient;
@Override
public void action(String date) {
energyStatisticFeignClient.eleIntegrityJobHandler();
}
}
//package com.njcn.system.timer.tasks.energy;
//
//import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import org.springframework.stereotype.Component;
//
//@Component
//@RequiredArgsConstructor
//public class EleIntegrityRunner implements TimerTaskRunner {
//
// private final EnergyStatisticFeignClient energyStatisticFeignClient;
//
// @Override
// public void action(String date) {
// energyStatisticFeignClient.eleIntegrityJobHandler();
// }
//}

View File

@@ -1,18 +1,18 @@
package com.njcn.system.timer.tasks.energy;
import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
@Component
@RequiredArgsConstructor
public class EleOnlineRateRunner implements TimerTaskRunner {
private final EnergyStatisticFeignClient energyStatisticFeignClient;
@Override
public void action(String date) {
energyStatisticFeignClient.eleOnlineRateJobHandler();
}
}
//package com.njcn.system.timer.tasks.energy;
//
//import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import org.springframework.stereotype.Component;
//
//@Component
//@RequiredArgsConstructor
//public class EleOnlineRateRunner implements TimerTaskRunner {
//
// private final EnergyStatisticFeignClient energyStatisticFeignClient;
//
// @Override
// public void action(String date) {
// energyStatisticFeignClient.eleOnlineRateJobHandler();
// }
//}

View File

@@ -1,21 +1,21 @@
package com.njcn.system.timer.tasks.energy;
import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
@Component
@RequiredArgsConstructor
public class EnergyStatisticRunner implements TimerTaskRunner {
private final EnergyStatisticFeignClient energyStatisticFeignClient;
@Override
public void action(String date) {
energyStatisticFeignClient.electricCalJob();
}
}
//package com.njcn.system.timer.tasks.energy;
//
//
//import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import org.springframework.stereotype.Component;
//
//@Component
//@RequiredArgsConstructor
//public class EnergyStatisticRunner implements TimerTaskRunner {
//
// private final EnergyStatisticFeignClient energyStatisticFeignClient;
//
// @Override
// public void action(String date) {
//
// energyStatisticFeignClient.electricCalJob();
//
// }
//}

View File

@@ -1,38 +1,38 @@
package com.njcn.system.timer.tasks.report;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.harmonic.api.ReportFeignClient;
import com.njcn.prepare.harmonic.api.line.CustomReportFeignClient;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* 自定义报表预处理
*/
@Component
@RequiredArgsConstructor
@Slf4j
public class CustomReportRunner implements TimerTaskRunner {
private final CustomReportFeignClient customReportFeignClient;
@Override
public void action(String date) {
LineParam lineParam = new LineParam();
if(StrUtil.isNotBlank(date)){
lineParam.setDataDate(date);
}else {
DateTime dealDate = DateUtil.yesterday();
String end = DateUtil.format(dealDate, DatePattern.NORM_DATE_PATTERN);
lineParam.setDataDate(end);
}
customReportFeignClient.batchReport(lineParam);
}
}
//package com.njcn.system.timer.tasks.report;
//
//import cn.hutool.core.date.DatePattern;
//import cn.hutool.core.date.DateTime;
//import cn.hutool.core.date.DateUtil;
//import cn.hutool.core.util.StrUtil;
//import com.njcn.harmonic.api.ReportFeignClient;
//import com.njcn.prepare.harmonic.api.line.CustomReportFeignClient;
//import com.njcn.prepare.harmonic.pojo.param.LineParam;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component;
//
///**
// * 自定义报表预处理
// */
//@Component
//@RequiredArgsConstructor
//@Slf4j
//public class CustomReportRunner implements TimerTaskRunner {
//
// private final CustomReportFeignClient customReportFeignClient;
//
//
// @Override
// public void action(String date) {
// LineParam lineParam = new LineParam();
// if(StrUtil.isNotBlank(date)){
// lineParam.setDataDate(date);
// }else {
// DateTime dealDate = DateUtil.yesterday();
// String end = DateUtil.format(dealDate, DatePattern.NORM_DATE_PATTERN);
// lineParam.setDataDate(end);
// }
// customReportFeignClient.batchReport(lineParam);
// }
//}

View File

@@ -1,113 +1,113 @@
package com.njcn.system.timer.tasks;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.common.pojo.constant.BizParamConstant;
import com.njcn.prepare.harmonic.api.specialanalysis.SpecialAnalysisFeignClient;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
import com.njcn.system.timer.TimerTaskRunner;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Calendar;
import java.util.Date;
import java.util.Objects;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2023/12/20 14:15
*/
@Component
@RequiredArgsConstructor
@Slf4j
public class specialAnalysisIndexOverviewTaskRunner implements TimerTaskRunner {
private final SpecialAnalysisFeignClient specialAnalysisFeignClient;
@Override
public void action(String date) {
log.info(LocalDateTime.now()+"专项分析-指标总览开始执行");
LineParam lineParam = new LineParam();
lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
specialAnalysisFeignClient.hanlder(lineParam);
}
public String prepareTimeDeal(String command) {
if (StrUtil.isBlank(command)) {
log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar = Calendar.getInstance();
if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
calendar.add(Calendar.DAY_OF_MONTH, -1);
} else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
calendar.set(Calendar.DAY_OF_MONTH, 1);
} else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
int nowMonth = calendar.get(Calendar.MONTH);
calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
} else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
calendar.set(Calendar.DAY_OF_YEAR, 1);
}
log.info("job调度时间:" + sdf.format(calendar.getTime()));
return sdf.format(calendar.getTime());
}
/**
* 根据xxl-job的参数生成一个任务的起始时间和结束时间
*
* @author cdf
* @date 2023/9/20
*/
public void commDefineDate(String command, LineParam lineParam) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String begin;
String end;
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_MONTH, -1);
Date temDate = calendar.getTime();
switch (command) {
case BizParamConstant.STAT_BIZ_DAY:
begin = sdf.format(DateUtil.beginOfDay(temDate));
end = sdf.format(DateUtil.endOfDay(temDate));
break;
case BizParamConstant.STAT_BIZ_WEEK:
begin = sdf.format(DateUtil.beginOfWeek(temDate));
end = sdf.format(DateUtil.endOfWeek(temDate));
break;
case BizParamConstant.STAT_BIZ_MONTH:
begin = sdf.format(DateUtil.beginOfMonth(temDate));
end = sdf.format(DateUtil.endOfMonth(temDate));
break;
case BizParamConstant.STAT_BIZ_QUARTER:
begin = sdf.format(DateUtil.beginOfQuarter(temDate));
end = sdf.format(DateUtil.endOfQuarter(temDate));
break;
case BizParamConstant.STAT_BIZ_YEAR:
begin = sdf.format(DateUtil.beginOfYear(temDate));
end = sdf.format(DateUtil.endOfYear(temDate));
break;
default:
begin = sdf.format(DateUtil.beginOfDay(temDate));
end = sdf.format(DateUtil.endOfDay(temDate));
break;
}
lineParam.setBeginTime(begin);
lineParam.setEndTime(end);
lineParam.setDataDate(begin.substring(0, 10));
}
}
//package com.njcn.system.timer.tasks;
//
//import cn.hutool.core.date.DateUtil;
//import cn.hutool.core.util.StrUtil;
//import com.njcn.common.pojo.constant.BizParamConstant;
//import com.njcn.prepare.harmonic.api.specialanalysis.SpecialAnalysisFeignClient;
//import com.njcn.prepare.harmonic.pojo.param.LineParam;
//import com.njcn.system.timer.TimerTaskRunner;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component;
//
//import java.text.SimpleDateFormat;
//import java.time.LocalDateTime;
//import java.util.Calendar;
//import java.util.Date;
//import java.util.Objects;
//
///**
// * 类的介绍:
// *
// * @author xuyang
// * @version 1.0.0
// * @createTime 2023/12/20 14:15
// */
//@Component
//@RequiredArgsConstructor
//@Slf4j
//public class specialAnalysisIndexOverviewTaskRunner implements TimerTaskRunner {
//
// private final SpecialAnalysisFeignClient specialAnalysisFeignClient;
//
// @Override
// public void action(String date) {
// log.info(LocalDateTime.now()+"专项分析-指标总览开始执行");
// LineParam lineParam = new LineParam();
// lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
// lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
// this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
// specialAnalysisFeignClient.hanlder(lineParam);
// }
//
// public String prepareTimeDeal(String command) {
// if (StrUtil.isBlank(command)) {
// log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
// return null;
// }
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// Calendar calendar = Calendar.getInstance();
// if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
// calendar.add(Calendar.DAY_OF_MONTH, -1);
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
// calendar.set(Calendar.DAY_OF_MONTH, 1);
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
// int nowMonth = calendar.get(Calendar.MONTH);
// calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
// calendar.set(Calendar.DAY_OF_MONTH, 1);
// calendar.set(Calendar.HOUR_OF_DAY, 0);
// calendar.set(Calendar.MINUTE, 0);
// calendar.set(Calendar.SECOND, 0);
// calendar.set(Calendar.MILLISECOND, 0);
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
// calendar.set(Calendar.DAY_OF_YEAR, 1);
// }
// log.info("job调度时间:" + sdf.format(calendar.getTime()));
// return sdf.format(calendar.getTime());
// }
//
// /**
// * 根据xxl-job的参数生成一个任务的起始时间和结束时间
// *
// * @author cdf
// * @date 2023/9/20
// */
// public void commDefineDate(String command, LineParam lineParam) {
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// String begin;
// String end;
// Calendar calendar = Calendar.getInstance();
// calendar.add(Calendar.DAY_OF_MONTH, -1);
// Date temDate = calendar.getTime();
// switch (command) {
// case BizParamConstant.STAT_BIZ_DAY:
// begin = sdf.format(DateUtil.beginOfDay(temDate));
// end = sdf.format(DateUtil.endOfDay(temDate));
// break;
// case BizParamConstant.STAT_BIZ_WEEK:
// begin = sdf.format(DateUtil.beginOfWeek(temDate));
// end = sdf.format(DateUtil.endOfWeek(temDate));
// break;
// case BizParamConstant.STAT_BIZ_MONTH:
// begin = sdf.format(DateUtil.beginOfMonth(temDate));
// end = sdf.format(DateUtil.endOfMonth(temDate));
// break;
// case BizParamConstant.STAT_BIZ_QUARTER:
// begin = sdf.format(DateUtil.beginOfQuarter(temDate));
// end = sdf.format(DateUtil.endOfQuarter(temDate));
// break;
// case BizParamConstant.STAT_BIZ_YEAR:
// begin = sdf.format(DateUtil.beginOfYear(temDate));
// end = sdf.format(DateUtil.endOfYear(temDate));
// break;
// default:
// begin = sdf.format(DateUtil.beginOfDay(temDate));
// end = sdf.format(DateUtil.endOfDay(temDate));
// break;
// }
// lineParam.setBeginTime(begin);
// lineParam.setEndTime(end);
// lineParam.setDataDate(begin.substring(0, 10));
// }
//
//}

4049
pqs.ipr

File diff suppressed because one or more lines are too long

225
pqs.iws
View File

@@ -6,13 +6,11 @@
<component name="ChangeListManager">
<list default="true" id="2448d918-1a26-4571-be80-21a8dfa375ac" name="Default" comment="海南bug修改提交">
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs-bpm/bpm-boot/src/main/java/com/njcn/bpm/BpmApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/pqs-bpm/bpm-boot/src/main/java/com/njcn/bpm/BpmApplication.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/job/DeviceComflagTasks.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/job/ScheduledTasks.java" beforeDir="false" afterPath="$PROJECT_DIR$/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/job/ScheduledTasks.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/TransientServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/TransientServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/TerminalServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/TerminalServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/LineWarningServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/LineWarningServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs-common/common-mq/src/main/java/com/njcn/mq/constant/BusinessTopic.java" beforeDir="false" afterPath="$PROJECT_DIR$/pqs-common/common-mq/src/main/java/com/njcn/mq/constant/BusinessTopic.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs-common/common-oss/src/main/java/com/njcn/oss/utils/FileStorageUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/pqs-common/common-oss/src/main/java/com/njcn/oss/utils/FileStorageUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs-common/common-redis/src/main/java/com/njcn/redis/pojo/enums/AppRedisKey.java" beforeDir="false" afterPath="$PROJECT_DIR$/pqs-common/common-redis/src/main/java/com/njcn/redis/pojo/enums/AppRedisKey.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs-gateway/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/pqs-gateway/src/main/resources/bootstrap.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs-harmonic/harmonic-boot/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pqs-harmonic/harmonic-boot/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs.ipr" beforeDir="false" afterPath="$PROJECT_DIR$/pqs.ipr" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pqs.iws" beforeDir="false" afterPath="$PROJECT_DIR$/pqs.iws" afterDir="false" />
</list>
@@ -274,9 +272,10 @@
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
<option name="localRepository" value="D:\maven3.6.3\repository" />
<option name="mavenHome" value="Use Maven wrapper" />
<option name="userSettingsFile" value="D:\java\apache-maven-3.3.9\conf\settings.xml" />
<option name="customMavenHome" value="D:\program\apache-maven-3.8.1" />
<option name="localRepository" value="D:\maven-repository" />
<option name="mavenHomeTypeForPersistence" value="CUSTOM" />
<option name="userSettingsFile" value="D:\program\apache-maven-3.8.1\conf\settings.xml" />
</MavenGeneralSettings>
</option>
</component>
@@ -315,6 +314,9 @@
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 6
}</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-9" />
<option name="y" value="-9" />
@@ -423,16 +425,49 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;project.structure.last.edited&quot;: &quot;Project&quot;,
&quot;project.structure.proportion&quot;: &quot;0.0&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.0&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;MavenSettings&quot;
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"Maven.common-core [compile].executor": "Run",
"Maven.common-core [install].executor": "Run",
"Maven.common-huawei [install].executor": "Run",
"Maven.common-mq [install].executor": "Run",
"Maven.common-oss [clean].executor": "Run",
"Maven.common-oss [compile].executor": "Run",
"Maven.common-oss [install].executor": "Run",
"Maven.common-redis [install].executor": "Run",
"Maven.event-boot [compile].executor": "Run",
"Maven.event-boot [install].executor": "Run",
"Maven.harmonic-boot [clean].executor": "Run",
"Maven.harmonic-boot [compile].executor": "Run",
"Maven.pqs [clean].executor": "Run",
"Maven.pqs [compile].executor": "Run",
"Maven.pqs [install].executor": "Run",
"Maven.pqs-event [compile].executor": "Run",
"RequestMappingsPanelOrder0": "0",
"RequestMappingsPanelOrder1": "1",
"RequestMappingsPanelWidth0": "75",
"RequestMappingsPanelWidth1": "75",
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"Spring Boot.AuthApplication.executor": "Debug",
"Spring Boot.GatewayMain.executor": "Debug",
"Spring Boot.SystemBootMain.executor": "Debug",
"Spring Boot.UserBootApplication.executor": "Debug",
"ignore.virus.scanning.warn.message": "true",
"kotlin-language-version-configured": "true",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"project.structure.last.edited": "Libraries",
"project.structure.proportion": "0.15",
"project.structure.side.proportion": "0.31609195",
"run.configurations.included.in.services": "true",
"settings.editor.selected.configurable": "File.Encoding",
"vue.rearranger.settings.migration": "true"
}
}</component>
}]]></component>
<component name="ReactorSettings">
<option name="notificationShown" value="true" />
</component>
@@ -458,6 +493,8 @@
<set>
<option value="Application" />
<option value="JarApplication" />
<option value="MicronautRunConfigurationType" />
<option value="QuarkusRunConfigurationType" />
<option value="SpringBootApplicationConfigurationType" />
</set>
</option>
@@ -470,15 +507,6 @@
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
</configuration>
<configuration default="true" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SHORTEN_COMMAND_LINE" value="NONE" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="DeviceBootApplication" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="com.njcn.DeviceBootApplication" />
<module name="device-boot" />
@@ -572,20 +600,48 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="AdvanceBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="advance-boot" />
<option name="SHORTEN_COMMAND_LINE" value="NONE" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.advance.AdvanceBootApplication" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="AuthApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<module name="pqs-auth" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.auth.AuthApplication" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SHORTEN_COMMAND_LINE" value="MANIFEST" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.auth.AuthApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="BpmApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="bpm-boot" />
<option name="SHORTEN_COMMAND_LINE" value="NONE" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.bpm.BpmApplication" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="DeviceBootApplication (1)" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="device-boot" />
<option name="SHORTEN_COMMAND_LINE" value="NONE" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.DeviceBootApplication" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="DeviceBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<module name="device-boot" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.device.DeviceBootApplication" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SHORTEN_COMMAND_LINE" value="MANIFEST" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.device.DeviceBootApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
@@ -599,9 +655,8 @@
</configuration>
<configuration name="EventBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<module name="event-boot" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.event.EventBootApplication" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SHORTEN_COMMAND_LINE" value="MANIFEST" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.event.EventBootApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
@@ -614,12 +669,11 @@
</method>
</configuration>
<configuration name="HarmonicBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<module name="harmonic-boot" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.harmonic.HarmonicBootApplication" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SHORTEN_COMMAND_LINE" value="NONE" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="harmonic-boot" />
<option name="SHORTEN_COMMAND_LINE" value="NONE" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.harmonic.HarmonicBootApplication" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<method v="2">
<option name="Make" enabled="true" />
</method>
@@ -633,40 +687,74 @@
</configuration>
<configuration name="JobExecutorApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<module name="job-executor" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.executor.JobExecutorApplication" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SHORTEN_COMMAND_LINE" value="CLASSPATH_FILE" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.executor.JobExecutorApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="PrepareApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="prepare-boot" />
<option name="SHORTEN_COMMAND_LINE" value="NONE" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.prepare.PrepareApplication" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="ProcessApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="process-boot" />
<option name="SHORTEN_COMMAND_LINE" value="NONE" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.process.ProcessApplication" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="QualityBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<module name="quality-boot" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.quality.QualityBootApplication" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SHORTEN_COMMAND_LINE" value="NONE" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="quality-boot" />
<option name="SHORTEN_COMMAND_LINE" value="NONE" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.quality.QualityBootApplication" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="SupervisionBootMain" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="supervision-boot" />
<option name="SHORTEN_COMMAND_LINE" value="NONE" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.supervision.SupervisionBootMain" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="SystemBootMain" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<module name="system-boot" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.system.SystemBootMain" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SHORTEN_COMMAND_LINE" value="MANIFEST" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="system-boot" />
<option name="SHORTEN_COMMAND_LINE" value="MANIFEST" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.system.SystemBootMain" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="UserBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<module name="user-boot" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.user.UserBootApplication" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SHORTEN_COMMAND_LINE" value="MANIFEST" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.user.UserBootApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration default="true" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<option name="SHORTEN_COMMAND_LINE" value="NONE" />
<option name="UPDATE_ACTION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<method v="2">
<option name="Make" enabled="true" />
</method>
@@ -677,6 +765,23 @@
<item itemvalue="Application.HarmonicBootApplication" />
<item itemvalue="Application.EventBootApplication" />
<item itemvalue="Application.DeviceBootApplication" />
<item itemvalue="Spring Boot.AdvanceBootApplication" />
<item itemvalue="Spring Boot.AuthApplication" />
<item itemvalue="Spring Boot.BpmApplication" />
<item itemvalue="Spring Boot.DeviceBootApplication" />
<item itemvalue="Spring Boot.DeviceBootApplication (1)" />
<item itemvalue="Spring Boot.EnergyBootApplication" />
<item itemvalue="Spring Boot.EventBootApplication" />
<item itemvalue="Spring Boot.GatewayMain" />
<item itemvalue="Spring Boot.HarmonicBootApplication" />
<item itemvalue="Spring Boot.JobAdminApplication" />
<item itemvalue="Spring Boot.JobExecutorApplication" />
<item itemvalue="Spring Boot.PrepareApplication" />
<item itemvalue="Spring Boot.ProcessApplication" />
<item itemvalue="Spring Boot.QualityBootApplication" />
<item itemvalue="Spring Boot.SupervisionBootMain" />
<item itemvalue="Spring Boot.SystemBootMain" />
<item itemvalue="Spring Boot.UserBootApplication" />
</list>
<recent_temporary>
<list>
@@ -773,6 +878,15 @@
<workItem from="1664328876284" duration="428000" />
<workItem from="1664329319344" duration="573000" />
<workItem from="1664329912185" duration="38768000" />
<workItem from="1773642083180" duration="22757000" />
<workItem from="1773886549173" duration="3097000" />
<workItem from="1773974783783" duration="31292000" />
<workItem from="1774856426890" duration="3134000" />
<workItem from="1775091589260" duration="166000" />
<workItem from="1775091790955" duration="710000" />
<workItem from="1775093137399" duration="2418000" />
<workItem from="1775543391617" duration="3118000" />
<workItem from="1776299986570" duration="1702000" />
</task>
<task id="LOCAL-00001" summary="EventTemplate控制器编写">
<created>1663058049505</created>
@@ -1072,11 +1186,6 @@
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/pqs-auth/src/main/java/com/njcn/auth/config/AuthorizationServerConfig.java</url>
<line>161</line>
<option name="timeStamp" value="1" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/pqs-advance/advance-boot/src/main/java/com/njcn/advance/controller/EventRelevantAnalysisController.java</url>
<line>85</line>