Compare commits
12 Commits
87818db6f3
...
2026-04
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eed647d3d1 | ||
|
|
4a5fde6a47 | ||
|
|
82ab1de5b9 | ||
|
|
ecc56dd2f6 | ||
| 39ae7412a8 | |||
| 52677f84dc | |||
| abdb855919 | |||
| 64bcbfff91 | |||
|
|
499eee6784 | ||
|
|
c58bd87a78 | ||
|
|
0902f92838 | ||
|
|
850b3174a2 |
@@ -75,7 +75,7 @@ public class EventAdvanceServiceImpl implements IEventAdvanceService {
|
|||||||
if (Objects.isNull(cfgStream) || Objects.isNull(datStream)) {
|
if (Objects.isNull(cfgStream) || Objects.isNull(datStream)) {
|
||||||
throw new BusinessException(WaveFileResponseEnum.ANALYSE_WAVE_NOT_FOUND);
|
throw new BusinessException(WaveFileResponseEnum.ANALYSE_WAVE_NOT_FOUND);
|
||||||
}
|
}
|
||||||
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 0);
|
waveDataDTO = waveFileComponent.getComtradeNoAddPoints(cfgStream, datStream, 0);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
try {
|
try {
|
||||||
InputStream cfgStream = fileStorageUtil.getFileStream(cfgPath2);
|
InputStream cfgStream = fileStorageUtil.getFileStream(cfgPath2);
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.njcn.advance.utils;
|
package com.njcn.advance.utils;
|
||||||
|
|
||||||
import cn.hutool.core.io.resource.ClassPathResource;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.io.FileUtils;
|
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.File;
|
||||||
import java.net.URLDecoder;
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pqs
|
* pqs
|
||||||
@@ -20,21 +20,20 @@ public class JnaCallDllOrSo {
|
|||||||
|
|
||||||
public JnaCallDllOrSo(String name) {
|
public JnaCallDllOrSo(String name) {
|
||||||
super();
|
super();
|
||||||
String suffix = ".dll";
|
|
||||||
try {
|
try {
|
||||||
String os = System.getProperty("os.name");
|
String os = System.getProperty("os.name");
|
||||||
// windows操作系统为1 否则为0
|
|
||||||
int beginIndex = os != null && os.startsWith("Windows") ? 1 : 0;
|
int beginIndex = os != null && os.startsWith("Windows") ? 1 : 0;
|
||||||
String nameDll;
|
String nameDll;
|
||||||
if (beginIndex == 0) {
|
if (beginIndex == 0) {
|
||||||
//linux操作系统
|
nameDll = "lib" + name + ".so";
|
||||||
nameDll = "lib" + name + "_dll";
|
|
||||||
suffix = ".so";
|
|
||||||
} else {
|
} else {
|
||||||
nameDll = name;
|
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);
|
File dockerFile = new File(tem);
|
||||||
if(!dockerFile.exists()){
|
if(!dockerFile.exists()){
|
||||||
boolean f = dockerFile.getParentFile().mkdirs();
|
boolean f = dockerFile.getParentFile().mkdirs();
|
||||||
@@ -42,7 +41,11 @@ public class JnaCallDllOrSo {
|
|||||||
System.out.println("文件夹创建:"+f);
|
System.out.println("文件夹创建:"+f);
|
||||||
System.out.println("文件创建:"+d);
|
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)) {
|
try (FileOutputStream outputStream = new FileOutputStream(dockerFile)) {
|
||||||
byte[] buffer = new byte[1024];
|
byte[] buffer = new byte[1024];
|
||||||
int bytesRead;
|
int bytesRead;
|
||||||
@@ -53,9 +56,11 @@ public class JnaCallDllOrSo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.path = dockerFile.getAbsolutePath();
|
this.path = dockerFile.getAbsolutePath();
|
||||||
|
System.out.println("动态库路径: " + this.path);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("调用高级算法文件异常,异常信息如下:");
|
log.error("调用高级算法文件异常,异常信息如下:");
|
||||||
log.error(e.getMessage());
|
log.error(e.getMessage(), e);
|
||||||
|
throw new RuntimeException("加载动态库失败: " + e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,11 +14,13 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author hongawen
|
* @author hongawen
|
||||||
@@ -79,6 +81,46 @@ public class WaveFileComponent {
|
|||||||
return waveDataDTO;
|
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值数据
|
* 根据波形数据算出rms值数据
|
||||||
* param waveDataDTO 瞬时波形(包含了CFG配置文件)
|
* param waveDataDTO 瞬时波形(包含了CFG配置文件)
|
||||||
@@ -470,6 +512,127 @@ public class WaveFileComponent {
|
|||||||
return comtradeCfgDTO;
|
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方法
|
* 读取dat方法
|
||||||
* param strFilePath .dat访问路径
|
* param strFilePath .dat访问路径
|
||||||
@@ -765,46 +928,46 @@ public class WaveFileComponent {
|
|||||||
return listWaveData;
|
return listWaveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
// private List<List<Float>> getComtradeDat(ComtradeCfgDTO comtradeCfgDTO, InputStream datStream, int iType) {
|
private List<List<Float>> getComtradeDatNoAddPoints(ComtradeCfgDTO comtradeCfgDTO, InputStream datStream, int iType) {
|
||||||
// //返回数据,如果仅仅做展示后期考虑换String类型,降低内存开销
|
//返回数据,如果仅仅做展示后期考虑换String类型,降低内存开销
|
||||||
// List<List<Float>> listWaveData = new ArrayList<>();
|
List<List<Float>> listWaveData = new ArrayList<>();
|
||||||
// //初始化xValue的值
|
//初始化xValue的值
|
||||||
// float xValueAll = 0;
|
float xValueAll = 0;
|
||||||
// //判断是否首次登陆
|
//判断是否首次登陆
|
||||||
// boolean blxValue = false;
|
boolean blxValue = false;
|
||||||
// byte[] datArray;
|
byte[] datArray;
|
||||||
// try {
|
try {
|
||||||
// datArray = IoUtil.readBytes(datStream);
|
datArray = IoUtil.readBytes(datStream);
|
||||||
// if (ArrayUtil.isEmpty(datArray)) {
|
if (ArrayUtil.isEmpty(datArray)) {
|
||||||
// throw new BusinessException(WaveFileResponseEnum.DAT_DATA_ERROR);
|
throw new BusinessException(WaveFileResponseEnum.DAT_DATA_ERROR);
|
||||||
// }
|
}
|
||||||
// // 计算每个单独的数据块的大小 4个字节的序号 4个字节的时间 2个字节的值
|
// 计算每个单独的数据块的大小 4个字节的序号 4个字节的时间 2个字节的值
|
||||||
// // 示例中的排布是 4个字节的序号 4个字节的时间 UA(2字节) UB(2字节) UC(2字节) IA(2字节) IB(2字节) IC(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 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 nBlockSize = 2 * Integer.SIZE / 8 + comtradeCfgDTO.getNAnalogNum() * 2 + nDigSize;
|
||||||
// // 总长度除以每个块的大小
|
// 总长度除以每个块的大小
|
||||||
// int nBlockNum = (int)Math.floor(datArray.length / nBlockSize);
|
int nBlockNum = (int)Math.floor(datArray.length / nBlockSize);
|
||||||
//
|
|
||||||
// // 获取采样率
|
// 获取采样率
|
||||||
// int finalSampleRate = getFinalWaveSample(comtradeCfgDTO.getLstRate(), iType);
|
int finalSampleRate = getFinalWaveSample(comtradeCfgDTO.getLstRate(), iType);
|
||||||
// if (finalSampleRate != -1) {
|
if (finalSampleRate != -1) {
|
||||||
// //设置最终采样率
|
//设置最终采样率
|
||||||
// comtradeCfgDTO.setFinalSampleRate(finalSampleRate);
|
comtradeCfgDTO.setFinalSampleRate(finalSampleRate);
|
||||||
// // 计算转换后的采样率
|
// 计算转换后的采样率
|
||||||
// int nnInd = 0;
|
int nnInd = 0;
|
||||||
// // 抽点后总共多少点数据
|
// 抽点后总共多少点数据
|
||||||
// int nWaveNum;
|
int nWaveNum;
|
||||||
// //抽点后新的的采样率
|
//抽点后新的的采样率
|
||||||
// List<RateDTO> newLstRate = new ArrayList<>();
|
List<RateDTO> newLstRate = new ArrayList<>();
|
||||||
// for (int iRate = 0; iRate < comtradeCfgDTO.getNRates(); iRate++) {
|
for (int iRate = 0; iRate < comtradeCfgDTO.getNRates(); iRate++) {
|
||||||
//// if (comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() >= 32) {
|
if (comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() >= 32) {
|
||||||
// // 计算本段录波总共有多少波形
|
// 计算本段录波总共有多少波形
|
||||||
// nWaveNum = comtradeCfgDTO.getLstRate().get(iRate).getNSampleNum() / comtradeCfgDTO.getLstRate().get(iRate).getNOneSample();
|
nWaveNum = comtradeCfgDTO.getLstRate().get(iRate).getNSampleNum() / comtradeCfgDTO.getLstRate().get(iRate).getNOneSample();
|
||||||
// //设置总波形大小
|
//设置总波形大小
|
||||||
// comtradeCfgDTO.setNAllWaveNum(comtradeCfgDTO.getNAllWaveNum() + nWaveNum);
|
comtradeCfgDTO.setNAllWaveNum(comtradeCfgDTO.getNAllWaveNum() + nWaveNum);
|
||||||
// // 将最低采样率替换到本段录波内
|
// 将最低采样率替换到本段录波内
|
||||||
// RateDTO tmpRateDTO = new RateDTO();
|
RateDTO tmpRateDTO = new RateDTO();
|
||||||
// // 有效值标志,如果是有效值,那么就需要反向补点,而不是抽点
|
// 有效值标志,如果是有效值,那么就需要反向补点,而不是抽点
|
||||||
// if (comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() >= 32) {
|
// if (comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() >= 32) {
|
||||||
// //YXB 2025-08-27
|
// //YXB 2025-08-27
|
||||||
// tmpRateDTO.bRMSFlag = false;
|
// tmpRateDTO.bRMSFlag = false;
|
||||||
@@ -814,52 +977,53 @@ public class WaveFileComponent {
|
|||||||
// //YXB 2025-08-27
|
// //YXB 2025-08-27
|
||||||
// tmpRateDTO.bRMSFlag = true;
|
// tmpRateDTO.bRMSFlag = true;
|
||||||
// }
|
// }
|
||||||
// newLstRate.add(tmpRateDTO);
|
newLstRate.add(tmpRateDTO);
|
||||||
// //iFlag =3 一定不进行抽点算法
|
//iFlag =3 一定不进行抽点算法
|
||||||
// if (iType != 3) {
|
if (iType != 3) {
|
||||||
// //true 抽点算法(当前采样率跟统一采样率不一样则是抽点,否则是未抽点)
|
//true 抽点算法(当前采样率跟统一采样率不一样则是抽点,否则是未抽点)
|
||||||
// if (!Objects.equals(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample(), comtradeCfgDTO.getFinalSampleRate())) {
|
if (!Objects.equals(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample(), comtradeCfgDTO.getFinalSampleRate())) {
|
||||||
// newLstRate.get(nnInd).setNOneSample(comtradeCfgDTO.getFinalSampleRate());
|
newLstRate.get(nnInd).setNOneSample(comtradeCfgDTO.getFinalSampleRate());
|
||||||
// // 计算本段录波按照最低采样点应该有多少录波
|
// 计算本段录波按照最低采样点应该有多少录波
|
||||||
// newLstRate.get(nnInd).setNSampleNum(comtradeCfgDTO.getFinalSampleRate() * nWaveNum);
|
newLstRate.get(nnInd).setNSampleNum(comtradeCfgDTO.getFinalSampleRate() * nWaveNum);
|
||||||
// } else {
|
} else {
|
||||||
// newLstRate.get(nnInd).setNOneSample(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample());
|
newLstRate.get(nnInd).setNOneSample(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample());
|
||||||
// // 计算本段录波按照最低采样点应该有多少录波
|
// 计算本段录波按照最低采样点应该有多少录波
|
||||||
// newLstRate.get(nnInd).setNSampleNum(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() * nWaveNum);
|
newLstRate.get(nnInd).setNSampleNum(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() * nWaveNum);
|
||||||
// }
|
}
|
||||||
// } else {
|
} else {
|
||||||
// newLstRate.get(nnInd).setNOneSample(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample());
|
newLstRate.get(nnInd).setNOneSample(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample());
|
||||||
// // 计算本段录波按照最低采样点应该有多少录波
|
// 计算本段录波按照最低采样点应该有多少录波
|
||||||
// newLstRate.get(nnInd).setNSampleNum(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() * nWaveNum);
|
newLstRate.get(nnInd).setNSampleNum(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample() * nWaveNum);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// // 正常的配置中采样率
|
// 正常的配置中采样率
|
||||||
// /* comtradeCfgDTO.getLstRate().get(nnInd).setNOneSample(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample());
|
comtradeCfgDTO.getLstRate().get(nnInd).setNOneSample(comtradeCfgDTO.getLstRate().get(iRate).getNOneSample());
|
||||||
// comtradeCfgDTO.getLstRate().get(nnInd).setNSampleNum(comtradeCfgDTO.getLstRate().get(iRate).getNSampleNum());*/
|
comtradeCfgDTO.getLstRate().get(nnInd).setNSampleNum(comtradeCfgDTO.getLstRate().get(iRate).getNSampleNum());
|
||||||
//
|
|
||||||
// nnInd++;
|
nnInd++;
|
||||||
//// }
|
}
|
||||||
// }
|
}
|
||||||
// // 偏移量,采样间隔
|
// 偏移量,采样间隔
|
||||||
// long nOffSet = 0, nWaveSpan;
|
long nOffSet = 0, nWaveSpan;
|
||||||
// //两个点之间的时间差
|
//两个点之间的时间差
|
||||||
// float fValue, dfValue;
|
float fValue, dfValue;
|
||||||
// // 计算不同块的采样率
|
// 计算不同块的采样率
|
||||||
// int nIndex = 0;
|
int nIndex = 0;
|
||||||
// // 将最低采样率替换到本段录波内
|
// 将最低采样率替换到本段录波内
|
||||||
// // .CFG中采样率
|
// .CFG中采样率
|
||||||
// RateDTO tmpRateDTO;
|
RateDTO tmpRateDTO;
|
||||||
// // nBlockNum 总循环次数
|
// nBlockNum 总循环次数
|
||||||
// for (int i = 0; i < nBlockNum; i++) {
|
for (int i = 0; i < nBlockNum; i++) {
|
||||||
// tmpRateDTO = comtradeCfgDTO.getLstRate().get(nIndex);
|
tmpRateDTO = comtradeCfgDTO.getLstRate().get(nIndex);
|
||||||
// // 判断是否进入下一段
|
// 判断是否进入下一段
|
||||||
// if (i == tmpRateDTO.getNSampleNum() + nOffSet) {
|
if (i == tmpRateDTO.getNSampleNum() + nOffSet) {
|
||||||
// nOffSet += tmpRateDTO.getNSampleNum();
|
nOffSet += tmpRateDTO.getNSampleNum();
|
||||||
// nIndex++;
|
nIndex++;
|
||||||
// if (nIndex == nnInd) {
|
if (nIndex == nnInd) {
|
||||||
// break;
|
break;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
nWaveSpan = tmpRateDTO.getNOneSample() / newLstRate.get(nIndex).getNOneSample();
|
||||||
// tmpRateDTO = comtradeCfgDTO.getLstRate().get(nIndex);
|
// tmpRateDTO = comtradeCfgDTO.getLstRate().get(nIndex);
|
||||||
// //YXB 2025-08-27 如果是有效值,那么需要去补点,而不是抽点
|
// //YXB 2025-08-27 如果是有效值,那么需要去补点,而不是抽点
|
||||||
// if (newLstRate.get(nIndex).bRMSFlag == true) {
|
// if (newLstRate.get(nIndex).bRMSFlag == true) {
|
||||||
@@ -869,199 +1033,99 @@ public class WaveFileComponent {
|
|||||||
// // 计算本段抽点采样间隔
|
// // 计算本段抽点采样间隔
|
||||||
// nWaveSpan = tmpRateDTO.getNOneSample() / newLstRate.get(nIndex).getNOneSample();
|
// nWaveSpan = tmpRateDTO.getNOneSample() / newLstRate.get(nIndex).getNOneSample();
|
||||||
// }
|
// }
|
||||||
//
|
|
||||||
// dfValue = (float) 20 / tmpRateDTO.getNOneSample();
|
dfValue = (float) 20 / tmpRateDTO.getNOneSample();
|
||||||
// // 判断是否到了需要抽的采样点
|
// 判断是否到了需要抽的采样点
|
||||||
// if (i % nWaveSpan == 0) {
|
if (i % nWaveSpan == 0) {
|
||||||
// // 计算每个通道的值
|
// 计算每个通道的值
|
||||||
// //存储局部数据集合,包含了时间,A,B,C三相
|
//存储局部数据集合,包含了时间,A,B,C三相
|
||||||
// List<Float> tmpWaveData = new ArrayList<>();
|
List<Float> tmpWaveData = new ArrayList<>();
|
||||||
// //YXB 2025-08-27 如果是有效值,那么需要去补点,而不是抽点
|
for (int j = 0; j < comtradeCfgDTO.getNAnalogNum(); j++) {
|
||||||
// if (newLstRate.get(nIndex).bRMSFlag == true) {
|
//数据只有电压ABC三相数据,不展示U0、I0等数据 YXB2020-10-09 去除相别为N相的数据
|
||||||
// // 计算有多少个周波
|
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzPhasicName().equalsIgnoreCase("N")) {
|
||||||
// long allWaveTemp = newLstRate.get(nIndex).getNSampleNum() / newLstRate.get(nIndex).getNOneSample();
|
break;
|
||||||
// // 本段需要补多少点
|
}
|
||||||
// long allempSample = newLstRate.get(nIndex).getNOneSample();
|
|
||||||
// //int iStartWaveTemp = i ;// 开始补点的起点
|
float fCoef = comtradeCfgDTO.getLstAnalogDTO().get(j).getFCoefficent();
|
||||||
// for (int iWaveTemp = 0; iWaveTemp < allWaveTemp; iWaveTemp++) {
|
fValue = BitConverter.byte2ToUnsignedShort(datArray, i * nBlockSize + 2 * 4 + j * 2) * fCoef;
|
||||||
// for (int mTempSample = 0; mTempSample < allempSample; mTempSample++) {
|
|
||||||
// //最多只有半波有效值,也就是每周波是1个或者2个点,然后去补最少16个点
|
//WW 2019-11-14
|
||||||
// if (mTempSample / nWaveSpan == 1 && mTempSample % nWaveSpan == 0) {
|
/**************************
|
||||||
// i++;
|
* 1、接口返回的默认是二次值
|
||||||
// }
|
* 2、P是一次值 S是二次值
|
||||||
// //存储局部数据集合,包含了时间,A,B,C三相
|
* 3、S(二次值)情况下:
|
||||||
// tmpWaveData = new ArrayList<>();
|
* ①、单位为"V"时候则直接等于;
|
||||||
// for (int j = 0; j < comtradeCfgDTO.getNAnalogNum(); j++) {
|
* ②、单位为"kV"时候需要乘以1000
|
||||||
// //数据只有电压ABC三相数据,不展示U0、I0等数据 YXB2020-10-09 去除相别为N相的数据
|
* 4、P(一次值)情况下:
|
||||||
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzPhasicName().equalsIgnoreCase("N")) {
|
* ①、单位为"V"时候则直接等于;
|
||||||
// break;
|
* ②、单位为"kV"时候需要乘以1000
|
||||||
// }
|
**************************/
|
||||||
// float fCoef = comtradeCfgDTO.getLstAnalogDTO().get(j).getFCoefficent();
|
//P是一次值 S是二次值
|
||||||
//
|
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzValueType().equalsIgnoreCase("S")) {
|
||||||
// if((i * nBlockSize + 2 * 4 + j * 2) == 2437568){
|
//判断单位是V还是kV
|
||||||
// System.out.println(55);
|
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("KV")) {
|
||||||
// }
|
fValue = fValue * 1000.0f;
|
||||||
// fValue = BitConverter.byte2ToUnsignedShort(datArray, i * nBlockSize + 2 * 4 + j * 2) * fCoef;
|
} else {
|
||||||
// //WW 2019-11-14
|
fValue = fValue;
|
||||||
// /*************************
|
}
|
||||||
// * 1、接口返回的默认是二次值
|
}
|
||||||
// * 2、P是一次值 S是二次值
|
//P是一次值 S是二次值
|
||||||
// * 3、S(二次值)情况下:
|
else if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzValueType().equalsIgnoreCase("P")) {
|
||||||
// * ①、单位为"V"时候则直接等于;
|
//判断单位是V还是kV
|
||||||
// * ②、单位为"kV"时候需要乘以1000
|
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("V")) {
|
||||||
// * 4、P(一次值)情况下:
|
//根据cfg内的变比,将一次值转换成二次值
|
||||||
// * ①、单位为"V"时候则直接等于;
|
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
|
||||||
// * ②、单位为"kV"时候需要乘以1000
|
fValue = fValue * comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
|
||||||
// *************************/
|
} else {
|
||||||
// //P是一次值 S是二次值
|
fValue = fValue;
|
||||||
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzValueType().equalsIgnoreCase("S")) {
|
}
|
||||||
// //判断单位是V还是kV
|
}
|
||||||
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("KV")) {
|
//判断单位是V还是kV
|
||||||
// fValue = fValue * 1000.0f;
|
else if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("KV")) {
|
||||||
// } else {
|
//根据cfg内的变比,将一次值转换成二次值
|
||||||
// fValue = fValue;
|
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
|
||||||
// }
|
fValue = fValue * 1000.0f * comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
|
||||||
// }
|
} else {
|
||||||
// //P是一次值 S是二次值
|
fValue = fValue;
|
||||||
// else if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzValueType().equalsIgnoreCase("P")) {
|
}
|
||||||
// //判断单位是V还是kV
|
} else //还有可能是 电流,单位是A
|
||||||
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("V")) {
|
{
|
||||||
// //根据cfg内的变比,将一次值转换成二次值
|
//根据cfg内的变比,将一次值转换成二次值
|
||||||
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
|
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
|
||||||
// fValue = fValue * comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
|
fValue = fValue *comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
|
||||||
// } else {
|
} else {
|
||||||
// fValue = fValue;
|
fValue = fValue;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// //判断单位是V还是kV
|
}
|
||||||
// else if (comtradeCfgDTO.getLstAnalogDTO().get(j).getSzUnitName().equalsIgnoreCase("KV")) {
|
//xValue前移量,假如是第一次时候则需要前移
|
||||||
// //根据cfg内的变比,将一次值转换成二次值
|
if (!blxValue && j == 0) {
|
||||||
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
|
xValueAll = (float) (i * 20) / tmpRateDTO.getNOneSample() - comtradeCfgDTO.getNPush();
|
||||||
// fValue = fValue * 1000.0f * comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
|
blxValue = true;
|
||||||
// } else {
|
//只增加一个xValue的值 //增加时间值
|
||||||
// fValue = fValue;
|
tmpWaveData.add((float) (Math.round(xValueAll * 100)) / 100);
|
||||||
// }
|
} else if (j == 0) {
|
||||||
// } else //还有可能是 电流,单位是A
|
xValueAll += (float) nWaveSpan * dfValue;
|
||||||
// {
|
//只增加一个xValue的值 //增加时间值
|
||||||
// //根据cfg内的变比,将一次值转换成二次值
|
tmpWaveData.add((float) (Math.round(xValueAll * 100)) / 100);
|
||||||
// if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
|
}
|
||||||
// fValue = comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
|
|
||||||
// } else {
|
//不同通道yValue的值都需要增加,最终成ABC三相 //每个通道的值
|
||||||
// fValue = fValue;
|
tmpWaveData.add((float) (Math.round(fValue * 100)) / 100);
|
||||||
// }
|
}
|
||||||
// }
|
//把每个单独的值赋予到整体里面去
|
||||||
// }
|
listWaveData.add(tmpWaveData);
|
||||||
//
|
|
||||||
// //xValue前移量,假如是第一次时候则需要前移
|
}
|
||||||
// if (!blxValue && j == 0) {
|
}
|
||||||
// xValueAll = (float) (i * 20) / tmpRateDTO.getNOneSample() - comtradeCfgDTO.getNPush();
|
}
|
||||||
// blxValue = true;
|
} catch (Exception e) {
|
||||||
// //只增加一个xValue的值 //增加时间值
|
e.printStackTrace();
|
||||||
// tmpWaveData.add((float) (Math.round(xValueAll * 100)) / 100);
|
throw new BusinessException(WaveFileResponseEnum.DAT_DATA_ERROR);
|
||||||
// } else if (j == 0) {
|
}
|
||||||
// xValueAll += (float) dfValue / nWaveSpan;
|
|
||||||
// //只增加一个xValue的值 //增加时间值
|
return listWaveData;
|
||||||
// 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;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
/*********************************
|
/*********************************
|
||||||
@@ -1656,10 +1720,10 @@ public class WaveFileComponent {
|
|||||||
s = sdf.format(d);
|
s = sdf.format(d);
|
||||||
System.out.println(s);
|
System.out.println(s);
|
||||||
WaveFileComponent waveFileComponent = new WaveFileComponent();
|
WaveFileComponent waveFileComponent = new WaveFileComponent();
|
||||||
InputStream cfgStream = waveFileComponent.getFileInputStreamByFilePath("C:\\Users\\Administrator\\Desktop\\wave\\PQMonitor_PQM2_006970_20260320_175033_734.CFG");
|
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\\Administrator\\Desktop\\wave\\PQMonitor_PQM2_006970_20260320_175033_734.DAT");
|
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();
|
d = new Date();
|
||||||
s = sdf.format(d);
|
s = sdf.format(d);
|
||||||
System.out.println(s);
|
System.out.println(s);
|
||||||
|
|||||||
@@ -81,6 +81,29 @@ public interface BusinessTopic {
|
|||||||
|
|
||||||
String RMP_EVENT_DETAIL_TOPIC = "rmpEventDetailTopic";
|
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 {
|
interface AppDataTag {
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,12 @@ package com.njcn.oss.utils;
|
|||||||
|
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
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.ali.oss.util.AliYunOssUtils;
|
||||||
import com.njcn.common.config.GeneralInfo;
|
import com.njcn.common.config.GeneralInfo;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.huawei.obs.config.HuaweiObsProperties;
|
||||||
import com.njcn.huawei.obs.util.OBSUtil;
|
import com.njcn.huawei.obs.util.OBSUtil;
|
||||||
import com.njcn.minioss.bo.MinIoUploadResDTO;
|
import com.njcn.minioss.bo.MinIoUploadResDTO;
|
||||||
import com.njcn.minioss.config.MinIossProperties;
|
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.GeneralConstant;
|
||||||
import com.njcn.oss.constant.OssPath;
|
import com.njcn.oss.constant.OssPath;
|
||||||
import com.njcn.oss.enums.OssResponseEnum;
|
import com.njcn.oss.enums.OssResponseEnum;
|
||||||
|
import com.obs.services.ObsClient;
|
||||||
|
import com.obs.services.model.PutObjectRequest;
|
||||||
import io.minio.*;
|
import io.minio.*;
|
||||||
import io.minio.messages.Item;
|
import io.minio.messages.Item;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -70,6 +75,11 @@ public class FileStorageUtil {
|
|||||||
*/
|
*/
|
||||||
private final AliYunOssUtils aliYunOssUtils;
|
private final AliYunOssUtils aliYunOssUtils;
|
||||||
|
|
||||||
|
private final HuaweiObsProperties huaweiObsProperties;
|
||||||
|
|
||||||
|
private final OSS ossClient;
|
||||||
|
private final AliYunOssConfig ossConfig;
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 上传MultipartFile文件,
|
* 上传MultipartFile文件,
|
||||||
@@ -442,4 +452,62 @@ public class FileStorageUtil {
|
|||||||
return file;
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,4 +115,8 @@ public interface AppRedisKey {
|
|||||||
* 补召文件
|
* 补召文件
|
||||||
*/
|
*/
|
||||||
String MAKE_UP_FILES = "makeUpFilesKey:";
|
String MAKE_UP_FILES = "makeUpFilesKey:";
|
||||||
|
|
||||||
|
String COMMON_REQUEST = "commonRequestKey:";
|
||||||
|
|
||||||
|
String COMMON_RESOPNSE = "commonResponseKey:";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,7 @@ package com.njcn.redis.utils;
|
|||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
||||||
import org.springframework.data.redis.core.RedisCallback;
|
import org.springframework.data.redis.core.*;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
@@ -325,8 +323,25 @@ public class RedisUtil {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<?> getLikeListAllValues(String key) {
|
public List<?> getLikeListAllValues(String key) {
|
||||||
List<Object> info=new ArrayList<>();
|
List<Object> info = new ArrayList<>();
|
||||||
for (String s : redisTemplate.keys(key + "*")) {
|
// 使用 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));
|
info.add(redisTemplate.opsForValue().get(s));
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.njcn.device.pq.pojo.po;
|
package com.njcn.device.pq.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -17,6 +19,7 @@ import java.io.Serializable;
|
|||||||
public class DeviceProcess implements Serializable {
|
public class DeviceProcess implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
//设备id
|
//设备id
|
||||||
|
@TableId("Id")
|
||||||
private String id;
|
private String id;
|
||||||
//设备设备所在前置机进程号
|
//设备设备所在前置机进程号
|
||||||
private Integer processNo;
|
private Integer processNo;
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public class RunManageServiceImpl implements RunManageService {
|
|||||||
List<String> devIndexes = generalDeviceDTOList.stream().flatMap(list -> list.getDeviceIndexes().stream()).collect(Collectors.toList());
|
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());
|
List<String> manuList = runManageParam.getManufacturer().stream().map(SimpleDTO::getId).collect(Collectors.toList());
|
||||||
if (CollectionUtil.isEmpty(devIndexes)) {
|
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());
|
return deviceMapper.getRunManageDevList(new Page<>(PageFactory.getPageNum(runManageParam), PageFactory.getPageSize(runManageParam)),devIndexes, runManageParam.getComFlag(), runManageParam.getRunFlag(), manuList, runManageParam.getSearchValue());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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())
|
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.getPt1(), lineDetailRes.getPt1()) || !Objects.equals(lineDetail.getPt2(), lineDetailRes.getPt2())
|
||||||
|| !Objects.equals(lineDetail.getDevCapacity(), lineDetailRes.getDevCapacity()) || !Objects.equals(lineDetail.getShortCapacity(), lineDetailRes.getShortCapacity())
|
|| !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();
|
String index = RequestUtil.getUserIndex();
|
||||||
queryUpdateAndInsertLog(userName, index, lineDetail, lineDetailRes);
|
queryUpdateAndInsertLog(userName, index, lineDetail, lineDetailRes);
|
||||||
@@ -959,6 +960,11 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
sbNew.append("协议容量: ").append(newLine.getDealCapacity()).append(";");
|
sbNew.append("协议容量: ").append(newLine.getDealCapacity()).append(";");
|
||||||
sbOld.append("协议容量: ").append(oldLine.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);
|
sb.append(sbNew).append(sbOld);
|
||||||
HttpResult<DictData> dicDataByCode = dicDataFeignClient.getDicDataByCode(DicDataEnum.LINE_PARAMETER.getCode());
|
HttpResult<DictData> dicDataByCode = dicDataFeignClient.getDicDataByCode(DicDataEnum.LINE_PARAMETER.getCode());
|
||||||
DictData data = dicDataByCode.getData();
|
DictData data = dicDataByCode.getData();
|
||||||
@@ -3851,14 +3857,29 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
}
|
}
|
||||||
//设备删除找不到设备名称,重日志截取
|
//设备删除找不到设备名称,重日志截取
|
||||||
if (Objects.equals(temp.getOperateType(), Param.DEL)) {
|
if (Objects.equals(temp.getOperateType(), Param.DEL)) {
|
||||||
String temLos = "%s名称:%s;前置信息:%s";
|
//删除有2种情况,1.设备删除,2,设备状态修改;
|
||||||
List<String> strings = this.parseTemplateValues(temLos, temp.getTerminalDescribe());
|
if (lineMap.containsKey(deviceId)) {
|
||||||
String devName = strings.get(1); // 设备名称
|
pqsTerminalPushLogDTO.setDevName(lineMap.get(deviceId).getName());
|
||||||
String nodeName = strings.get(2); // 进程名称
|
String nodeId = deviceMap.get(deviceId).getNodeId();
|
||||||
pqsTerminalPushLogDTO.setDevName(devName);
|
pqsTerminalPushLogDTO.setNodeId(nodeId);
|
||||||
String nodeId = nodeNameMap.get(nodeName).getId();
|
pqsTerminalPushLogDTO.setNodeName(nodeMap.containsKey(nodeId)?nodeMap.get(nodeId).getName():"删除前置");
|
||||||
pqsTerminalPushLogDTO.setNodeId(nodeId);
|
|
||||||
pqsTerminalPushLogDTO.setNodeName(nodeName);
|
}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 {
|
} else {
|
||||||
//如果存在说明设备未被删除,不存在说明有一条删除日志,直接return;
|
//如果存在说明设备未被删除,不存在说明有一条删除日志,直接return;
|
||||||
if (lineMap.containsKey(deviceId)) {
|
if (lineMap.containsKey(deviceId)) {
|
||||||
|
|||||||
@@ -13,10 +13,12 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.device.common.mapper.SuperDataMapper;
|
import com.njcn.device.common.mapper.SuperDataMapper;
|
||||||
import com.njcn.device.common.service.GeneralDeviceService;
|
import com.njcn.device.common.service.GeneralDeviceService;
|
||||||
import com.njcn.device.device.mapper.DevFuctionMapper;
|
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.IDevMealService;
|
||||||
import com.njcn.device.device.service.IDevStrategyService;
|
import com.njcn.device.device.service.IDevStrategyService;
|
||||||
import com.njcn.device.device.service.IDeviceService;
|
import com.njcn.device.device.service.IDeviceService;
|
||||||
import com.njcn.device.line.service.LineService;
|
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.enums.LineBaseEnum;
|
||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
import com.njcn.device.pq.pojo.param.*;
|
import com.njcn.device.pq.pojo.param.*;
|
||||||
@@ -84,6 +86,7 @@ public class TerminalMaintainServiceImpl implements TerminalMaintainService {
|
|||||||
|
|
||||||
private final CldStatisticsFlowMapper cldStatisticsFlowMapper;
|
private final CldStatisticsFlowMapper cldStatisticsFlowMapper;
|
||||||
private final LineService lineService;
|
private final LineService lineService;
|
||||||
|
private final DeviceProcessService deviceProcessService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TerminalMaintainVO> getTerminalMainList(TerminalMainQueryParam terminalMainQueryParam) {
|
public List<TerminalMaintainVO> getTerminalMainList(TerminalMainQueryParam terminalMainQueryParam) {
|
||||||
@@ -205,7 +208,19 @@ public class TerminalMaintainServiceImpl implements TerminalMaintainService {
|
|||||||
terminalLogsNew.setObjIndex(device.getId());
|
terminalLogsNew.setObjIndex(device.getId());
|
||||||
terminalLogsNew.setTerminalDescribe(sb.toString());
|
terminalLogsNew.setTerminalDescribe(sb.toString());
|
||||||
terminalLogsNew.setIsPush(0);
|
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.setLogsType(data.getId());
|
||||||
terminalLogsNew.setTerminalType(LineBaseEnum.DEVICE_LEVEL.getCode());
|
terminalLogsNew.setTerminalType(LineBaseEnum.DEVICE_LEVEL.getCode());
|
||||||
terminalLogsNew.setState(DataStateEnum.ENABLE.getCode());
|
terminalLogsNew.setState(DataStateEnum.ENABLE.getCode());
|
||||||
|
|||||||
@@ -175,37 +175,40 @@ public class EventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper, Rm
|
|||||||
//如果不为空,说明是二次上传波形文件了;
|
//如果不为空,说明是二次上传波形文件了;
|
||||||
String reason,type;
|
String reason,type;
|
||||||
if(!StringUtils.isEmpty(rmpEventDetailPO.getWavePath())){
|
if(!StringUtils.isEmpty(rmpEventDetailPO.getWavePath())){
|
||||||
LineDetailDataVO lineDetailData = lineFeignClient.getLineDetailData(rmpEventDetailPO.getLineId()).getData();
|
try {
|
||||||
String ip = lineDetailData.getIp();
|
LineDetailDataVO lineDetailData = lineFeignClient.getLineDetailData(rmpEventDetailPO.getLineId()).getData();
|
||||||
EventAnalysisDTO eventAnalysisDTO = new EventAnalysisDTO();
|
String ip = lineDetailData.getIp();
|
||||||
eventAnalysisDTO.setIp(ip);
|
EventAnalysisDTO eventAnalysisDTO = new EventAnalysisDTO();
|
||||||
eventAnalysisDTO.setWaveName(rmpEventDetailPO.getWavePath());
|
eventAnalysisDTO.setIp(ip);
|
||||||
|
eventAnalysisDTO.setWaveName(rmpEventDetailPO.getWavePath());
|
||||||
|
|
||||||
EventAnalysisDTO result = eventCauseFeignClient.analysisCauseAndType(eventAnalysisDTO).getData();
|
EventAnalysisDTO result = eventCauseFeignClient.analysisCauseAndType(eventAnalysisDTO).getData();
|
||||||
if(Objects.isNull(result.getCause())){
|
if(Objects.isNull(result.getCause())){
|
||||||
reason =reasonReflection(0);
|
reason =reasonReflection(0);
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
reason =reasonReflection(result.getCause());
|
reason =reasonReflection(result.getCause());
|
||||||
|
|
||||||
}
|
}
|
||||||
if(Objects.isNull(result.getType())){
|
if(Objects.isNull(result.getType())){
|
||||||
type =advanceTypeReflection(10);
|
type =advanceTypeReflection(10);
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
type =advanceTypeReflection(result.getType());
|
type =advanceTypeReflection(result.getType());
|
||||||
|
|
||||||
}
|
}
|
||||||
DictData advancereason = dicDataFeignClient.getDicDataByCode(reason).getData();
|
DictData advancereason = dicDataFeignClient.getDicDataByCode(reason).getData();
|
||||||
DictData advanceType = dicDataFeignClient.getDicDataByCode(type).getData();
|
DictData advanceType = dicDataFeignClient.getDicDataByCode(type).getData();
|
||||||
if(Objects.equals(result.getCauseFlag(),1)&&Objects.equals(result.getTypeFlag(),1)){
|
if(Objects.equals(result.getCauseFlag(),1)&&Objects.equals(result.getTypeFlag(),1)){
|
||||||
rmpEventDetailPO.setDealFlag(1);
|
rmpEventDetailPO.setDealFlag(1);
|
||||||
}else {
|
}else {
|
||||||
|
rmpEventDetailPO.setDealFlag(0);
|
||||||
|
}
|
||||||
|
rmpEventDetailPO.setAdvanceReason(advancereason.getId());
|
||||||
|
rmpEventDetailPO.setAdvanceType(advanceType.getId());
|
||||||
|
}catch (Exception e){
|
||||||
rmpEventDetailPO.setDealFlag(0);
|
rmpEventDetailPO.setDealFlag(0);
|
||||||
}
|
}
|
||||||
rmpEventDetailPO.setAdvanceReason(advancereason.getId());
|
|
||||||
rmpEventDetailPO.setAdvanceType(advanceType.getId());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//默认都是其他
|
//默认都是其他
|
||||||
// DictData reason = dicDataFeignClient.getDicDataByCode(DicDataEnum.RESON_REST.getCode()).getData();
|
// DictData reason = dicDataFeignClient.getDicDataByCode(DicDataEnum.RESON_REST.getCode()).getData();
|
||||||
|
|||||||
@@ -1,3 +1,283 @@
|
|||||||
|
#当前服务的基本信息
|
||||||
|
microservice:
|
||||||
|
ename: @artifactId@
|
||||||
|
name: "@name@"
|
||||||
|
version: @version@
|
||||||
|
sentinel:
|
||||||
|
url: @sentinel.url@
|
||||||
|
gateway:
|
||||||
|
url: @gateway.url@
|
||||||
|
server:
|
||||||
|
port: 10215
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
application:
|
||||||
active: @spring.profiles.active@
|
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}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -99,12 +99,12 @@
|
|||||||
<artifactId>joda-time</artifactId>
|
<artifactId>joda-time</artifactId>
|
||||||
<version>2.9.9</version>
|
<version>2.9.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>prepare-api</artifactId>
|
<artifactId>prepare-api</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>-->
|
</dependency>-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>advance-api</artifactId>
|
<artifactId>advance-api</artifactId>
|
||||||
|
|||||||
@@ -80,11 +80,11 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>energy-api</artifactId>
|
<artifactId>energy-api</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>-->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.algorithm.pojo.bo.BaseParam;
|
import com.njcn.algorithm.pojo.bo.BaseParam;
|
||||||
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
|
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
|
||||||
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|||||||
@@ -1,39 +1,39 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
//package com.njcn.system.timer.tasks;
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DatePattern;
|
//import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
||||||
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
//import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 类的介绍:母线算法执行链定时任务
|
// * 类的介绍:母线算法执行链定时任务
|
||||||
*
|
// *
|
||||||
* @author xuyang
|
// * @author xuyang
|
||||||
* @version 1.0.0
|
// * @version 1.0.0
|
||||||
* @createTime 2023/12/6 9:35
|
// * @createTime 2023/12/6 9:35
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class GeneraTrixTaskRunner implements TimerTaskRunner {
|
//public class GeneraTrixTaskRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final LiteFlowFeignClient liteFlowFeignClient;
|
// private final LiteFlowFeignClient liteFlowFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
BaseParam baseParam = new BaseParam();
|
// BaseParam baseParam = new BaseParam();
|
||||||
baseParam.setFullChain(true);
|
// baseParam.setFullChain(true);
|
||||||
baseParam.setRepair(false);
|
// baseParam.setRepair(false);
|
||||||
if(StrUtil.isBlank(date)){
|
// if(StrUtil.isBlank(date)){
|
||||||
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
// baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
||||||
}else {
|
// }else {
|
||||||
baseParam.setDataDate(date);
|
// baseParam.setDataDate(date);
|
||||||
}
|
// }
|
||||||
liteFlowFeignClient.generaTrixExecutor(baseParam);
|
// liteFlowFeignClient.generaTrixExecutor(baseParam);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,42 +1,42 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
//package com.njcn.system.timer.tasks;
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DatePattern;
|
//import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
||||||
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
//import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 类的介绍:监测点算法执行链定时任务
|
// * 类的介绍:监测点算法执行链定时任务
|
||||||
*
|
// *
|
||||||
* @author xuyang
|
// * @author xuyang
|
||||||
* @version 1.0.0
|
// * @version 1.0.0
|
||||||
* @createTime 2023/12/6 9:35
|
// * @createTime 2023/12/6 9:35
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class MeasurementHourTaskRunner implements TimerTaskRunner {
|
//public class MeasurementHourTaskRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final LiteFlowFeignClient liteFlowFeignClient;
|
// private final LiteFlowFeignClient liteFlowFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
BaseParam baseParam = new BaseParam();
|
// BaseParam baseParam = new BaseParam();
|
||||||
baseParam.setFullChain(true);
|
// baseParam.setFullChain(true);
|
||||||
//由于是按小时跑的,前端其他算法都是按天跑的,因此修改参数
|
// //由于是按小时跑的,前端其他算法都是按天跑的,因此修改参数
|
||||||
if(StrUtil.isBlank(date)){
|
// if(StrUtil.isBlank(date)){
|
||||||
baseParam.setRepair(false);
|
// baseParam.setRepair(false);
|
||||||
baseParam.setDataDate(DateUtil.now());
|
// baseParam.setDataDate(DateUtil.now());
|
||||||
}else {
|
// }else {
|
||||||
baseParam.setRepair(true);
|
// baseParam.setRepair(true);
|
||||||
baseParam.setBeginTime(date+ " 00:00:00");
|
// baseParam.setBeginTime(date+ " 00:00:00");
|
||||||
baseParam.setEndTime(date+ " 24:00:00");
|
// baseParam.setEndTime(date+ " 24:00:00");
|
||||||
}
|
// }
|
||||||
liteFlowFeignClient.measurementPointExecutorByHour(baseParam);
|
// liteFlowFeignClient.measurementPointExecutorByHour(baseParam);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.algorithm.pojo.bo.BaseParam;
|
import com.njcn.algorithm.pojo.bo.BaseParam;
|
||||||
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
|
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
|
||||||
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -21,8 +20,6 @@ import org.springframework.stereotype.Component;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class MeasurementTaskRunner implements TimerTaskRunner {
|
public class MeasurementTaskRunner implements TimerTaskRunner {
|
||||||
|
|
||||||
private final LiteFlowFeignClient liteFlowFeignClient;
|
|
||||||
|
|
||||||
private final LiteFlowAlgorithmFeignClient liteFlowAlgorithmFeignClient;
|
private final LiteFlowAlgorithmFeignClient liteFlowAlgorithmFeignClient;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,39 +1,39 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
//package com.njcn.system.timer.tasks;
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DatePattern;
|
//import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
||||||
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
//import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 类的介绍:监测点算法执行链定时任务
|
// * 类的介绍:监测点算法执行链定时任务
|
||||||
*
|
// *
|
||||||
* @author xuyang
|
// * @author xuyang
|
||||||
* @version 1.0.0
|
// * @version 1.0.0
|
||||||
* @createTime 2023/12/6 9:35
|
// * @createTime 2023/12/6 9:35
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class OrgSubStationTaskRunner implements TimerTaskRunner {
|
//public class OrgSubStationTaskRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final LiteFlowFeignClient liteFlowFeignClient;
|
// private final LiteFlowFeignClient liteFlowFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
BaseParam baseParam = new BaseParam();
|
// BaseParam baseParam = new BaseParam();
|
||||||
baseParam.setFullChain(true);
|
// baseParam.setFullChain(true);
|
||||||
baseParam.setRepair(false);
|
// baseParam.setRepair(false);
|
||||||
if(StrUtil.isBlank(date)){
|
// if(StrUtil.isBlank(date)){
|
||||||
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
// baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
||||||
}else {
|
// }else {
|
||||||
baseParam.setDataDate(date);
|
// baseParam.setDataDate(date);
|
||||||
}
|
// }
|
||||||
liteFlowFeignClient.orgSubStationExecutor(baseParam);
|
// liteFlowFeignClient.orgSubStationExecutor(baseParam);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,38 +1,38 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
//package com.njcn.system.timer.tasks;
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DatePattern;
|
//import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.algorithm.pojo.bo.BaseParam;
|
//import com.njcn.algorithm.pojo.bo.BaseParam;
|
||||||
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
|
//import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
|
||||||
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 类的介绍:单位监测点算法执行链定时任务
|
// * 类的介绍:单位监测点算法执行链定时任务
|
||||||
*
|
// *
|
||||||
* @author xuyang
|
// * @author xuyang
|
||||||
* @version 1.0.0
|
// * @version 1.0.0
|
||||||
* @createTime 2023/12/6 9:35
|
// * @createTime 2023/12/6 9:35
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class OrgTaskRunner implements TimerTaskRunner {
|
//public class OrgTaskRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final LiteFlowAlgorithmFeignClient liteFlowFeignClient;
|
// private final LiteFlowAlgorithmFeignClient liteFlowFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
BaseParam baseParam = new BaseParam();
|
// BaseParam baseParam = new BaseParam();
|
||||||
baseParam.setFullChain(true);
|
// baseParam.setFullChain(true);
|
||||||
baseParam.setRepair(false);
|
// baseParam.setRepair(false);
|
||||||
if(StrUtil.isBlank(date)){
|
// if(StrUtil.isBlank(date)){
|
||||||
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
// baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
||||||
}else {
|
// }else {
|
||||||
baseParam.setDataDate(date);
|
// baseParam.setDataDate(date);
|
||||||
}
|
// }
|
||||||
liteFlowFeignClient.orgPointExecutor(baseParam);
|
// liteFlowFeignClient.orgPointExecutor(baseParam);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,37 +1,37 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
//package com.njcn.system.timer.tasks;
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DatePattern;
|
//import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
||||||
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
//import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 类的介绍:变电站母线算法执行链定时任务
|
// * 类的介绍:变电站母线算法执行链定时任务
|
||||||
*
|
// *
|
||||||
* @author xuyang
|
// * @author xuyang
|
||||||
* @version 1.0.0
|
// * @version 1.0.0
|
||||||
* @createTime 2023/12/6 9:35
|
// * @createTime 2023/12/6 9:35
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class PmsDimTaskRunner implements TimerTaskRunner {
|
//public class PmsDimTaskRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final LiteFlowFeignClient liteFlowFeignClient;
|
// private final LiteFlowFeignClient liteFlowFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
BaseParam baseParam = new BaseParam();
|
// BaseParam baseParam = new BaseParam();
|
||||||
baseParam.setFullChain(true);
|
// baseParam.setFullChain(true);
|
||||||
baseParam.setRepair(false);
|
// baseParam.setRepair(false);
|
||||||
if(StrUtil.isBlank(date)){
|
// if(StrUtil.isBlank(date)){
|
||||||
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
// baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
||||||
}else {
|
// }else {
|
||||||
baseParam.setDataDate(date);
|
// baseParam.setDataDate(date);
|
||||||
}
|
// }
|
||||||
liteFlowFeignClient.pmsDimExecutor(baseParam);
|
// liteFlowFeignClient.pmsDimExecutor(baseParam);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,32 +1,32 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
//package com.njcn.system.timer.tasks;
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DatePattern;
|
//import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
//import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||||
import com.njcn.prepare.harmonic.api.upload.DimBusGlobalFeignClient;
|
//import com.njcn.prepare.harmonic.api.upload.DimBusGlobalFeignClient;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* pqs
|
// * pqs
|
||||||
*
|
// *
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2024/4/17
|
// * @date 2024/4/17
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class PmsRunStatisticTaskRunner implements TimerTaskRunner {
|
//public class PmsRunStatisticTaskRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final DimBusGlobalFeignClient dimBusGlobalFeignClient;
|
// private final DimBusGlobalFeignClient dimBusGlobalFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
if(StrUtil.isBlank(date)){
|
// if(StrUtil.isBlank(date)){
|
||||||
date = DateUtil.format(DateUtil.yesterday(),DatePattern.NORM_DATE_PATTERN);
|
// date = DateUtil.format(DateUtil.yesterday(),DatePattern.NORM_DATE_PATTERN);
|
||||||
}
|
// }
|
||||||
dimBusGlobalFeignClient.runLedgerStatistic(date);
|
// dimBusGlobalFeignClient.runLedgerStatistic(date);
|
||||||
dimBusGlobalFeignClient.dimBusUpEveryDay(date);
|
// dimBusGlobalFeignClient.dimBusUpEveryDay(date);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,113 +1,113 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
//package com.njcn.system.timer.tasks;
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.common.pojo.constant.BizParamConstant;
|
//import com.njcn.common.pojo.constant.BizParamConstant;
|
||||||
import com.njcn.prepare.harmonic.api.newalgorithm.PmsStatisticsSpecialMonitorFeignClient;
|
//import com.njcn.prepare.harmonic.api.newalgorithm.PmsStatisticsSpecialMonitorFeignClient;
|
||||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
//import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
import java.text.SimpleDateFormat;
|
//import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
//import java.time.LocalDateTime;
|
||||||
import java.util.Calendar;
|
//import java.util.Calendar;
|
||||||
import java.util.Date;
|
//import java.util.Date;
|
||||||
import java.util.Objects;
|
//import java.util.Objects;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 类的介绍:专项分析-台账统计定时任务
|
// * 类的介绍:专项分析-台账统计定时任务
|
||||||
*
|
// *
|
||||||
* @author xuyang
|
// * @author xuyang
|
||||||
* @version 1.0.0
|
// * @version 1.0.0
|
||||||
* @createTime 2023/12/08 11:23
|
// * @createTime 2023/12/08 11:23
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
public class PmsStatisticsSpecialMonitorTaskRunner implements TimerTaskRunner {
|
//public class PmsStatisticsSpecialMonitorTaskRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final PmsStatisticsSpecialMonitorFeignClient pmsStatisticsSpecialMonitorFeignClient;
|
// private final PmsStatisticsSpecialMonitorFeignClient pmsStatisticsSpecialMonitorFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
log.info(LocalDateTime.now()+"专项分析-台账统计调度开始");
|
// log.info(LocalDateTime.now()+"专项分析-台账统计调度开始");
|
||||||
LineParam lineParam = new LineParam();
|
// LineParam lineParam = new LineParam();
|
||||||
lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
|
// lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
|
||||||
lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
|
// lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
|
||||||
this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
|
// this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
|
||||||
pmsStatisticsSpecialMonitorFeignClient.pmsStatisticsSpecialMonitorHandler(lineParam);
|
// pmsStatisticsSpecialMonitorFeignClient.pmsStatisticsSpecialMonitorHandler(lineParam);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public String prepareTimeDeal(String command) {
|
// public String prepareTimeDeal(String command) {
|
||||||
if (StrUtil.isBlank(command)) {
|
// if (StrUtil.isBlank(command)) {
|
||||||
log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
|
// log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
Calendar calendar = Calendar.getInstance();
|
// Calendar calendar = Calendar.getInstance();
|
||||||
if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
|
// if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
// calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||||
} else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
|
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
|
||||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
// calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
} else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
|
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
|
||||||
int nowMonth = calendar.get(Calendar.MONTH);
|
// int nowMonth = calendar.get(Calendar.MONTH);
|
||||||
calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
|
// calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
|
||||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
// calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
// calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
calendar.set(Calendar.MINUTE, 0);
|
// calendar.set(Calendar.MINUTE, 0);
|
||||||
calendar.set(Calendar.SECOND, 0);
|
// calendar.set(Calendar.SECOND, 0);
|
||||||
calendar.set(Calendar.MILLISECOND, 0);
|
// calendar.set(Calendar.MILLISECOND, 0);
|
||||||
} else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
|
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
|
||||||
calendar.set(Calendar.DAY_OF_YEAR, 1);
|
// calendar.set(Calendar.DAY_OF_YEAR, 1);
|
||||||
}
|
// }
|
||||||
log.info("job调度时间:" + sdf.format(calendar.getTime()));
|
// log.info("job调度时间:" + sdf.format(calendar.getTime()));
|
||||||
return sdf.format(calendar.getTime());
|
// return sdf.format(calendar.getTime());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 根据xxl-job的参数,生成一个任务的起始时间和结束时间
|
// * 根据xxl-job的参数,生成一个任务的起始时间和结束时间
|
||||||
*
|
// *
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2023/9/20
|
// * @date 2023/9/20
|
||||||
*/
|
// */
|
||||||
public void commDefineDate(String command, LineParam lineParam) {
|
// public void commDefineDate(String command, LineParam lineParam) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
String begin;
|
// String begin;
|
||||||
String end;
|
// String end;
|
||||||
Calendar calendar = Calendar.getInstance();
|
// Calendar calendar = Calendar.getInstance();
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
// calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||||
Date temDate = calendar.getTime();
|
// Date temDate = calendar.getTime();
|
||||||
switch (command) {
|
// switch (command) {
|
||||||
case BizParamConstant.STAT_BIZ_DAY:
|
// case BizParamConstant.STAT_BIZ_DAY:
|
||||||
begin = sdf.format(DateUtil.beginOfDay(temDate));
|
// begin = sdf.format(DateUtil.beginOfDay(temDate));
|
||||||
end = sdf.format(DateUtil.endOfDay(temDate));
|
// end = sdf.format(DateUtil.endOfDay(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_WEEK:
|
// case BizParamConstant.STAT_BIZ_WEEK:
|
||||||
begin = sdf.format(DateUtil.beginOfWeek(temDate));
|
// begin = sdf.format(DateUtil.beginOfWeek(temDate));
|
||||||
end = sdf.format(DateUtil.endOfWeek(temDate));
|
// end = sdf.format(DateUtil.endOfWeek(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_MONTH:
|
// case BizParamConstant.STAT_BIZ_MONTH:
|
||||||
begin = sdf.format(DateUtil.beginOfMonth(temDate));
|
// begin = sdf.format(DateUtil.beginOfMonth(temDate));
|
||||||
end = sdf.format(DateUtil.endOfMonth(temDate));
|
// end = sdf.format(DateUtil.endOfMonth(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
// case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
begin = sdf.format(DateUtil.beginOfQuarter(temDate));
|
// begin = sdf.format(DateUtil.beginOfQuarter(temDate));
|
||||||
end = sdf.format(DateUtil.endOfQuarter(temDate));
|
// end = sdf.format(DateUtil.endOfQuarter(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_YEAR:
|
// case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
begin = sdf.format(DateUtil.beginOfYear(temDate));
|
// begin = sdf.format(DateUtil.beginOfYear(temDate));
|
||||||
end = sdf.format(DateUtil.endOfYear(temDate));
|
// end = sdf.format(DateUtil.endOfYear(temDate));
|
||||||
break;
|
// break;
|
||||||
default:
|
// default:
|
||||||
begin = sdf.format(DateUtil.beginOfDay(temDate));
|
// begin = sdf.format(DateUtil.beginOfDay(temDate));
|
||||||
end = sdf.format(DateUtil.endOfDay(temDate));
|
// end = sdf.format(DateUtil.endOfDay(temDate));
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
lineParam.setBeginTime(begin);
|
// lineParam.setBeginTime(begin);
|
||||||
lineParam.setEndTime(end);
|
// lineParam.setEndTime(end);
|
||||||
lineParam.setDataDate(begin.substring(0, 10));
|
// lineParam.setDataDate(begin.substring(0, 10));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,113 +1,113 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
//package com.njcn.system.timer.tasks;
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.common.pojo.constant.BizParamConstant;
|
//import com.njcn.common.pojo.constant.BizParamConstant;
|
||||||
import com.njcn.prepare.harmonic.api.newalgorithm.RMpEmissionFeignClient;
|
//import com.njcn.prepare.harmonic.api.newalgorithm.RMpEmissionFeignClient;
|
||||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
//import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
import java.text.SimpleDateFormat;
|
//import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
//import java.time.LocalDateTime;
|
||||||
import java.util.Calendar;
|
//import java.util.Calendar;
|
||||||
import java.util.Date;
|
//import java.util.Date;
|
||||||
import java.util.Objects;
|
//import java.util.Objects;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 类的介绍:发射特性定时任务
|
// * 类的介绍:发射特性定时任务
|
||||||
*
|
// *
|
||||||
* @author xuyang
|
// * @author xuyang
|
||||||
* @version 1.0.0
|
// * @version 1.0.0
|
||||||
* @createTime 2023/12/20 13:55
|
// * @createTime 2023/12/20 13:55
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
public class RMpEmissionTaskRunner implements TimerTaskRunner {
|
//public class RMpEmissionTaskRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final RMpEmissionFeignClient rMpEmissionFeignClient;
|
// private final RMpEmissionFeignClient rMpEmissionFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
log.info(LocalDateTime.now()+"发射特性调度开始");
|
// log.info(LocalDateTime.now()+"发射特性调度开始");
|
||||||
LineParam lineParam = new LineParam();
|
// LineParam lineParam = new LineParam();
|
||||||
lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
|
// lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
|
||||||
lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
|
// lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
|
||||||
this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
|
// this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
|
||||||
rMpEmissionFeignClient.rMpEmissionMHandler(lineParam);
|
// rMpEmissionFeignClient.rMpEmissionMHandler(lineParam);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public String prepareTimeDeal(String command) {
|
// public String prepareTimeDeal(String command) {
|
||||||
if (StrUtil.isBlank(command)) {
|
// if (StrUtil.isBlank(command)) {
|
||||||
log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
|
// log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
Calendar calendar = Calendar.getInstance();
|
// Calendar calendar = Calendar.getInstance();
|
||||||
if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
|
// if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
// calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||||
} else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
|
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
|
||||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
// calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
} else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
|
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
|
||||||
int nowMonth = calendar.get(Calendar.MONTH);
|
// int nowMonth = calendar.get(Calendar.MONTH);
|
||||||
calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
|
// calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
|
||||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
// calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
// calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
calendar.set(Calendar.MINUTE, 0);
|
// calendar.set(Calendar.MINUTE, 0);
|
||||||
calendar.set(Calendar.SECOND, 0);
|
// calendar.set(Calendar.SECOND, 0);
|
||||||
calendar.set(Calendar.MILLISECOND, 0);
|
// calendar.set(Calendar.MILLISECOND, 0);
|
||||||
} else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
|
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
|
||||||
calendar.set(Calendar.DAY_OF_YEAR, 1);
|
// calendar.set(Calendar.DAY_OF_YEAR, 1);
|
||||||
}
|
// }
|
||||||
log.info("job调度时间:" + sdf.format(calendar.getTime()));
|
// log.info("job调度时间:" + sdf.format(calendar.getTime()));
|
||||||
return sdf.format(calendar.getTime());
|
// return sdf.format(calendar.getTime());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 根据xxl-job的参数,生成一个任务的起始时间和结束时间
|
// * 根据xxl-job的参数,生成一个任务的起始时间和结束时间
|
||||||
*
|
// *
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2023/9/20
|
// * @date 2023/9/20
|
||||||
*/
|
// */
|
||||||
public void commDefineDate(String command, LineParam lineParam) {
|
// public void commDefineDate(String command, LineParam lineParam) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
String begin;
|
// String begin;
|
||||||
String end;
|
// String end;
|
||||||
Calendar calendar = Calendar.getInstance();
|
// Calendar calendar = Calendar.getInstance();
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
// calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||||
Date temDate = calendar.getTime();
|
// Date temDate = calendar.getTime();
|
||||||
switch (command) {
|
// switch (command) {
|
||||||
case BizParamConstant.STAT_BIZ_DAY:
|
// case BizParamConstant.STAT_BIZ_DAY:
|
||||||
begin = sdf.format(DateUtil.beginOfDay(temDate));
|
// begin = sdf.format(DateUtil.beginOfDay(temDate));
|
||||||
end = sdf.format(DateUtil.endOfDay(temDate));
|
// end = sdf.format(DateUtil.endOfDay(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_WEEK:
|
// case BizParamConstant.STAT_BIZ_WEEK:
|
||||||
begin = sdf.format(DateUtil.beginOfWeek(temDate));
|
// begin = sdf.format(DateUtil.beginOfWeek(temDate));
|
||||||
end = sdf.format(DateUtil.endOfWeek(temDate));
|
// end = sdf.format(DateUtil.endOfWeek(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_MONTH:
|
// case BizParamConstant.STAT_BIZ_MONTH:
|
||||||
begin = sdf.format(DateUtil.beginOfMonth(temDate));
|
// begin = sdf.format(DateUtil.beginOfMonth(temDate));
|
||||||
end = sdf.format(DateUtil.endOfMonth(temDate));
|
// end = sdf.format(DateUtil.endOfMonth(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
// case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
begin = sdf.format(DateUtil.beginOfQuarter(temDate));
|
// begin = sdf.format(DateUtil.beginOfQuarter(temDate));
|
||||||
end = sdf.format(DateUtil.endOfQuarter(temDate));
|
// end = sdf.format(DateUtil.endOfQuarter(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_YEAR:
|
// case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
begin = sdf.format(DateUtil.beginOfYear(temDate));
|
// begin = sdf.format(DateUtil.beginOfYear(temDate));
|
||||||
end = sdf.format(DateUtil.endOfYear(temDate));
|
// end = sdf.format(DateUtil.endOfYear(temDate));
|
||||||
break;
|
// break;
|
||||||
default:
|
// default:
|
||||||
begin = sdf.format(DateUtil.beginOfDay(temDate));
|
// begin = sdf.format(DateUtil.beginOfDay(temDate));
|
||||||
end = sdf.format(DateUtil.endOfDay(temDate));
|
// end = sdf.format(DateUtil.endOfDay(temDate));
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
lineParam.setBeginTime(begin);
|
// lineParam.setBeginTime(begin);
|
||||||
lineParam.setEndTime(end);
|
// lineParam.setEndTime(end);
|
||||||
lineParam.setDataDate(begin.substring(0, 10));
|
// lineParam.setDataDate(begin.substring(0, 10));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,113 +1,113 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
//package com.njcn.system.timer.tasks;
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.common.pojo.constant.BizParamConstant;
|
//import com.njcn.common.pojo.constant.BizParamConstant;
|
||||||
import com.njcn.prepare.harmonic.api.newalgorithm.RMpInfluenceFeignClient;
|
//import com.njcn.prepare.harmonic.api.newalgorithm.RMpInfluenceFeignClient;
|
||||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
//import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
import java.text.SimpleDateFormat;
|
//import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
//import java.time.LocalDateTime;
|
||||||
import java.util.Calendar;
|
//import java.util.Calendar;
|
||||||
import java.util.Date;
|
//import java.util.Date;
|
||||||
import java.util.Objects;
|
//import java.util.Objects;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 类的介绍:
|
// * 类的介绍:
|
||||||
*
|
// *
|
||||||
* @author xuyang
|
// * @author xuyang
|
||||||
* @version 1.0.0
|
// * @version 1.0.0
|
||||||
* @createTime 2023/12/20 14:12
|
// * @createTime 2023/12/20 14:12
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
public class RMpInfluenceTaskRunner implements TimerTaskRunner {
|
//public class RMpInfluenceTaskRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final RMpInfluenceFeignClient rMpInfluenceFeignClient;
|
// private final RMpInfluenceFeignClient rMpInfluenceFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
log.info(LocalDateTime.now()+"影响特性调度开始");
|
// log.info(LocalDateTime.now()+"影响特性调度开始");
|
||||||
LineParam lineParam = new LineParam();
|
// LineParam lineParam = new LineParam();
|
||||||
lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
|
// lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
|
||||||
lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
|
// lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
|
||||||
this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
|
// this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
|
||||||
rMpInfluenceFeignClient.rMpInfluenceMHandler(lineParam);
|
// rMpInfluenceFeignClient.rMpInfluenceMHandler(lineParam);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public String prepareTimeDeal(String command) {
|
// public String prepareTimeDeal(String command) {
|
||||||
if (StrUtil.isBlank(command)) {
|
// if (StrUtil.isBlank(command)) {
|
||||||
log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
|
// log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
Calendar calendar = Calendar.getInstance();
|
// Calendar calendar = Calendar.getInstance();
|
||||||
if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
|
// if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
// calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||||
} else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
|
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
|
||||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
// calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
} else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
|
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
|
||||||
int nowMonth = calendar.get(Calendar.MONTH);
|
// int nowMonth = calendar.get(Calendar.MONTH);
|
||||||
calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
|
// calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
|
||||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
// calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
// calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
calendar.set(Calendar.MINUTE, 0);
|
// calendar.set(Calendar.MINUTE, 0);
|
||||||
calendar.set(Calendar.SECOND, 0);
|
// calendar.set(Calendar.SECOND, 0);
|
||||||
calendar.set(Calendar.MILLISECOND, 0);
|
// calendar.set(Calendar.MILLISECOND, 0);
|
||||||
} else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
|
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
|
||||||
calendar.set(Calendar.DAY_OF_YEAR, 1);
|
// calendar.set(Calendar.DAY_OF_YEAR, 1);
|
||||||
}
|
// }
|
||||||
log.info("job调度时间:" + sdf.format(calendar.getTime()));
|
// log.info("job调度时间:" + sdf.format(calendar.getTime()));
|
||||||
return sdf.format(calendar.getTime());
|
// return sdf.format(calendar.getTime());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 根据xxl-job的参数,生成一个任务的起始时间和结束时间
|
// * 根据xxl-job的参数,生成一个任务的起始时间和结束时间
|
||||||
*
|
// *
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2023/9/20
|
// * @date 2023/9/20
|
||||||
*/
|
// */
|
||||||
public void commDefineDate(String command, LineParam lineParam) {
|
// public void commDefineDate(String command, LineParam lineParam) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
String begin;
|
// String begin;
|
||||||
String end;
|
// String end;
|
||||||
Calendar calendar = Calendar.getInstance();
|
// Calendar calendar = Calendar.getInstance();
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
// calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||||
Date temDate = calendar.getTime();
|
// Date temDate = calendar.getTime();
|
||||||
switch (command) {
|
// switch (command) {
|
||||||
case BizParamConstant.STAT_BIZ_DAY:
|
// case BizParamConstant.STAT_BIZ_DAY:
|
||||||
begin = sdf.format(DateUtil.beginOfDay(temDate));
|
// begin = sdf.format(DateUtil.beginOfDay(temDate));
|
||||||
end = sdf.format(DateUtil.endOfDay(temDate));
|
// end = sdf.format(DateUtil.endOfDay(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_WEEK:
|
// case BizParamConstant.STAT_BIZ_WEEK:
|
||||||
begin = sdf.format(DateUtil.beginOfWeek(temDate));
|
// begin = sdf.format(DateUtil.beginOfWeek(temDate));
|
||||||
end = sdf.format(DateUtil.endOfWeek(temDate));
|
// end = sdf.format(DateUtil.endOfWeek(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_MONTH:
|
// case BizParamConstant.STAT_BIZ_MONTH:
|
||||||
begin = sdf.format(DateUtil.beginOfMonth(temDate));
|
// begin = sdf.format(DateUtil.beginOfMonth(temDate));
|
||||||
end = sdf.format(DateUtil.endOfMonth(temDate));
|
// end = sdf.format(DateUtil.endOfMonth(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
// case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
begin = sdf.format(DateUtil.beginOfQuarter(temDate));
|
// begin = sdf.format(DateUtil.beginOfQuarter(temDate));
|
||||||
end = sdf.format(DateUtil.endOfQuarter(temDate));
|
// end = sdf.format(DateUtil.endOfQuarter(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_YEAR:
|
// case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
begin = sdf.format(DateUtil.beginOfYear(temDate));
|
// begin = sdf.format(DateUtil.beginOfYear(temDate));
|
||||||
end = sdf.format(DateUtil.endOfYear(temDate));
|
// end = sdf.format(DateUtil.endOfYear(temDate));
|
||||||
break;
|
// break;
|
||||||
default:
|
// default:
|
||||||
begin = sdf.format(DateUtil.beginOfDay(temDate));
|
// begin = sdf.format(DateUtil.beginOfDay(temDate));
|
||||||
end = sdf.format(DateUtil.endOfDay(temDate));
|
// end = sdf.format(DateUtil.endOfDay(temDate));
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
lineParam.setBeginTime(begin);
|
// lineParam.setBeginTime(begin);
|
||||||
lineParam.setEndTime(end);
|
// lineParam.setEndTime(end);
|
||||||
lineParam.setDataDate(begin.substring(0, 10));
|
// lineParam.setDataDate(begin.substring(0, 10));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.algorithm.pojo.bo.BaseParam;
|
import com.njcn.algorithm.pojo.bo.BaseParam;
|
||||||
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
|
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
|
||||||
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
|
||||||
|
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
//package com.njcn.system.timer.tasks;
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DatePattern;
|
//import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
//import com.njcn.prepare.harmonic.api.liteflow.LiteFlowFeignClient;
|
||||||
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
//import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* pqs
|
// * pqs
|
||||||
* 每日定时统计河北两级贯通接口主网数据,用于后续定时上送国网
|
// * 每日定时统计河北两级贯通接口主网数据,用于后续定时上送国网
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2024/2/22
|
// * @date 2024/2/22
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class UploadGwOrgAllRunner implements TimerTaskRunner {
|
//public class UploadGwOrgAllRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final LiteFlowFeignClient liteFlowFeignClient;
|
// private final LiteFlowFeignClient liteFlowFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
BaseParam baseParam = new BaseParam();
|
// BaseParam baseParam = new BaseParam();
|
||||||
baseParam.setFullChain(true);
|
// baseParam.setFullChain(true);
|
||||||
baseParam.setRepair(false);
|
// baseParam.setRepair(false);
|
||||||
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
// baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
||||||
liteFlowFeignClient.uploadOrgExecutor(baseParam);
|
// liteFlowFeignClient.uploadOrgExecutor(baseParam);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
package com.njcn.system.timer.tasks.energy;
|
//package com.njcn.system.timer.tasks.energy;
|
||||||
|
//
|
||||||
|
//
|
||||||
import com.njcn.energy.pojo.api.EleAirStrategyFeignClient;
|
//import com.njcn.energy.pojo.api.EleAirStrategyFeignClient;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class AirControllerRunner implements TimerTaskRunner {
|
//public class AirControllerRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final EleAirStrategyFeignClient eleAirStrategyFeignClient;
|
// private final EleAirStrategyFeignClient eleAirStrategyFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
eleAirStrategyFeignClient.dealAirStrategyId("close");
|
// eleAirStrategyFeignClient.dealAirStrategyId("close");
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
package com.njcn.system.timer.tasks.energy;
|
//package com.njcn.system.timer.tasks.energy;
|
||||||
|
//
|
||||||
import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
|
//import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class EleIntegrityRunner implements TimerTaskRunner {
|
//public class EleIntegrityRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final EnergyStatisticFeignClient energyStatisticFeignClient;
|
// private final EnergyStatisticFeignClient energyStatisticFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
energyStatisticFeignClient.eleIntegrityJobHandler();
|
// energyStatisticFeignClient.eleIntegrityJobHandler();
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
package com.njcn.system.timer.tasks.energy;
|
//package com.njcn.system.timer.tasks.energy;
|
||||||
|
//
|
||||||
import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
|
//import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class EleOnlineRateRunner implements TimerTaskRunner {
|
//public class EleOnlineRateRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final EnergyStatisticFeignClient energyStatisticFeignClient;
|
// private final EnergyStatisticFeignClient energyStatisticFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
energyStatisticFeignClient.eleOnlineRateJobHandler();
|
// energyStatisticFeignClient.eleOnlineRateJobHandler();
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
package com.njcn.system.timer.tasks.energy;
|
//package com.njcn.system.timer.tasks.energy;
|
||||||
|
//
|
||||||
|
//
|
||||||
import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
|
//import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class EnergyStatisticRunner implements TimerTaskRunner {
|
//public class EnergyStatisticRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final EnergyStatisticFeignClient energyStatisticFeignClient;
|
// private final EnergyStatisticFeignClient energyStatisticFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
|
//
|
||||||
energyStatisticFeignClient.electricCalJob();
|
// energyStatisticFeignClient.electricCalJob();
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,38 +1,38 @@
|
|||||||
package com.njcn.system.timer.tasks.report;
|
//package com.njcn.system.timer.tasks.report;
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DatePattern;
|
//import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateTime;
|
//import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.harmonic.api.ReportFeignClient;
|
//import com.njcn.harmonic.api.ReportFeignClient;
|
||||||
import com.njcn.prepare.harmonic.api.line.CustomReportFeignClient;
|
//import com.njcn.prepare.harmonic.api.line.CustomReportFeignClient;
|
||||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
//import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 自定义报表预处理
|
// * 自定义报表预处理
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
public class CustomReportRunner implements TimerTaskRunner {
|
//public class CustomReportRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final CustomReportFeignClient customReportFeignClient;
|
// private final CustomReportFeignClient customReportFeignClient;
|
||||||
|
//
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
LineParam lineParam = new LineParam();
|
// LineParam lineParam = new LineParam();
|
||||||
if(StrUtil.isNotBlank(date)){
|
// if(StrUtil.isNotBlank(date)){
|
||||||
lineParam.setDataDate(date);
|
// lineParam.setDataDate(date);
|
||||||
}else {
|
// }else {
|
||||||
DateTime dealDate = DateUtil.yesterday();
|
// DateTime dealDate = DateUtil.yesterday();
|
||||||
String end = DateUtil.format(dealDate, DatePattern.NORM_DATE_PATTERN);
|
// String end = DateUtil.format(dealDate, DatePattern.NORM_DATE_PATTERN);
|
||||||
lineParam.setDataDate(end);
|
// lineParam.setDataDate(end);
|
||||||
}
|
// }
|
||||||
customReportFeignClient.batchReport(lineParam);
|
// customReportFeignClient.batchReport(lineParam);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,113 +1,113 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
//package com.njcn.system.timer.tasks;
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.njcn.common.pojo.constant.BizParamConstant;
|
//import com.njcn.common.pojo.constant.BizParamConstant;
|
||||||
import com.njcn.prepare.harmonic.api.specialanalysis.SpecialAnalysisFeignClient;
|
//import com.njcn.prepare.harmonic.api.specialanalysis.SpecialAnalysisFeignClient;
|
||||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
//import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
//import com.njcn.system.timer.TimerTaskRunner;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
import java.text.SimpleDateFormat;
|
//import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
//import java.time.LocalDateTime;
|
||||||
import java.util.Calendar;
|
//import java.util.Calendar;
|
||||||
import java.util.Date;
|
//import java.util.Date;
|
||||||
import java.util.Objects;
|
//import java.util.Objects;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 类的介绍:
|
// * 类的介绍:
|
||||||
*
|
// *
|
||||||
* @author xuyang
|
// * @author xuyang
|
||||||
* @version 1.0.0
|
// * @version 1.0.0
|
||||||
* @createTime 2023/12/20 14:15
|
// * @createTime 2023/12/20 14:15
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
public class specialAnalysisIndexOverviewTaskRunner implements TimerTaskRunner {
|
//public class specialAnalysisIndexOverviewTaskRunner implements TimerTaskRunner {
|
||||||
|
//
|
||||||
private final SpecialAnalysisFeignClient specialAnalysisFeignClient;
|
// private final SpecialAnalysisFeignClient specialAnalysisFeignClient;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void action(String date) {
|
// public void action(String date) {
|
||||||
log.info(LocalDateTime.now()+"专项分析-指标总览开始执行");
|
// log.info(LocalDateTime.now()+"专项分析-指标总览开始执行");
|
||||||
LineParam lineParam = new LineParam();
|
// LineParam lineParam = new LineParam();
|
||||||
lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
|
// lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
|
||||||
lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
|
// lineParam.setDataDate(this.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
|
||||||
this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
|
// this.commDefineDate(BizParamConstant.STAT_BIZ_MONTH,lineParam);
|
||||||
specialAnalysisFeignClient.hanlder(lineParam);
|
// specialAnalysisFeignClient.hanlder(lineParam);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public String prepareTimeDeal(String command) {
|
// public String prepareTimeDeal(String command) {
|
||||||
if (StrUtil.isBlank(command)) {
|
// if (StrUtil.isBlank(command)) {
|
||||||
log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
|
// log.error(LocalDateTime.now() + "xxl调度任务参数未设置");
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
Calendar calendar = Calendar.getInstance();
|
// Calendar calendar = Calendar.getInstance();
|
||||||
if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
|
// if (Objects.equals(BizParamConstant.STAT_BIZ_DAY, command)) {
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
// calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||||
} else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
|
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_MONTH, command)) {
|
||||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
// calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
} else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
|
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_QUARTER, command)) {
|
||||||
int nowMonth = calendar.get(Calendar.MONTH);
|
// int nowMonth = calendar.get(Calendar.MONTH);
|
||||||
calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
|
// calendar.set(Calendar.MONTH, nowMonth - (nowMonth % 3));
|
||||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
// calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
// calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
calendar.set(Calendar.MINUTE, 0);
|
// calendar.set(Calendar.MINUTE, 0);
|
||||||
calendar.set(Calendar.SECOND, 0);
|
// calendar.set(Calendar.SECOND, 0);
|
||||||
calendar.set(Calendar.MILLISECOND, 0);
|
// calendar.set(Calendar.MILLISECOND, 0);
|
||||||
} else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
|
// } else if (Objects.equals(BizParamConstant.STAT_BIZ_YEAR, command)) {
|
||||||
calendar.set(Calendar.DAY_OF_YEAR, 1);
|
// calendar.set(Calendar.DAY_OF_YEAR, 1);
|
||||||
}
|
// }
|
||||||
log.info("job调度时间:" + sdf.format(calendar.getTime()));
|
// log.info("job调度时间:" + sdf.format(calendar.getTime()));
|
||||||
return sdf.format(calendar.getTime());
|
// return sdf.format(calendar.getTime());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 根据xxl-job的参数,生成一个任务的起始时间和结束时间
|
// * 根据xxl-job的参数,生成一个任务的起始时间和结束时间
|
||||||
*
|
// *
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2023/9/20
|
// * @date 2023/9/20
|
||||||
*/
|
// */
|
||||||
public void commDefineDate(String command, LineParam lineParam) {
|
// public void commDefineDate(String command, LineParam lineParam) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
String begin;
|
// String begin;
|
||||||
String end;
|
// String end;
|
||||||
Calendar calendar = Calendar.getInstance();
|
// Calendar calendar = Calendar.getInstance();
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
// calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||||
Date temDate = calendar.getTime();
|
// Date temDate = calendar.getTime();
|
||||||
switch (command) {
|
// switch (command) {
|
||||||
case BizParamConstant.STAT_BIZ_DAY:
|
// case BizParamConstant.STAT_BIZ_DAY:
|
||||||
begin = sdf.format(DateUtil.beginOfDay(temDate));
|
// begin = sdf.format(DateUtil.beginOfDay(temDate));
|
||||||
end = sdf.format(DateUtil.endOfDay(temDate));
|
// end = sdf.format(DateUtil.endOfDay(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_WEEK:
|
// case BizParamConstant.STAT_BIZ_WEEK:
|
||||||
begin = sdf.format(DateUtil.beginOfWeek(temDate));
|
// begin = sdf.format(DateUtil.beginOfWeek(temDate));
|
||||||
end = sdf.format(DateUtil.endOfWeek(temDate));
|
// end = sdf.format(DateUtil.endOfWeek(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_MONTH:
|
// case BizParamConstant.STAT_BIZ_MONTH:
|
||||||
begin = sdf.format(DateUtil.beginOfMonth(temDate));
|
// begin = sdf.format(DateUtil.beginOfMonth(temDate));
|
||||||
end = sdf.format(DateUtil.endOfMonth(temDate));
|
// end = sdf.format(DateUtil.endOfMonth(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
// case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
begin = sdf.format(DateUtil.beginOfQuarter(temDate));
|
// begin = sdf.format(DateUtil.beginOfQuarter(temDate));
|
||||||
end = sdf.format(DateUtil.endOfQuarter(temDate));
|
// end = sdf.format(DateUtil.endOfQuarter(temDate));
|
||||||
break;
|
// break;
|
||||||
case BizParamConstant.STAT_BIZ_YEAR:
|
// case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
begin = sdf.format(DateUtil.beginOfYear(temDate));
|
// begin = sdf.format(DateUtil.beginOfYear(temDate));
|
||||||
end = sdf.format(DateUtil.endOfYear(temDate));
|
// end = sdf.format(DateUtil.endOfYear(temDate));
|
||||||
break;
|
// break;
|
||||||
default:
|
// default:
|
||||||
begin = sdf.format(DateUtil.beginOfDay(temDate));
|
// begin = sdf.format(DateUtil.beginOfDay(temDate));
|
||||||
end = sdf.format(DateUtil.endOfDay(temDate));
|
// end = sdf.format(DateUtil.endOfDay(temDate));
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
lineParam.setBeginTime(begin);
|
// lineParam.setBeginTime(begin);
|
||||||
lineParam.setEndTime(end);
|
// lineParam.setEndTime(end);
|
||||||
lineParam.setDataDate(begin.substring(0, 10));
|
// lineParam.setDataDate(begin.substring(0, 10));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|||||||
225
pqs.iws
225
pqs.iws
@@ -6,13 +6,11 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="2448d918-1a26-4571-be80-21a8dfa375ac" name="Default" comment="海南bug修改提交">
|
<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$/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-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-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/job/DeviceComflagTasks.java" beforeDir="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-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-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-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-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/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-harmonic/harmonic-boot/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pqs-harmonic/harmonic-boot/pom.xml" 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.ipr" beforeDir="false" afterPath="$PROJECT_DIR$/pqs.ipr" 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" />
|
<change beforePath="$PROJECT_DIR$/pqs.iws" beforeDir="false" afterPath="$PROJECT_DIR$/pqs.iws" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
@@ -274,9 +272,10 @@
|
|||||||
<component name="MavenImportPreferences">
|
<component name="MavenImportPreferences">
|
||||||
<option name="generalSettings">
|
<option name="generalSettings">
|
||||||
<MavenGeneralSettings>
|
<MavenGeneralSettings>
|
||||||
<option name="localRepository" value="D:\maven3.6.3\repository" />
|
<option name="customMavenHome" value="D:\program\apache-maven-3.8.1" />
|
||||||
<option name="mavenHome" value="Use Maven wrapper" />
|
<option name="localRepository" value="D:\maven-repository" />
|
||||||
<option name="userSettingsFile" value="D:\java\apache-maven-3.3.9\conf\settings.xml" />
|
<option name="mavenHomeTypeForPersistence" value="CUSTOM" />
|
||||||
|
<option name="userSettingsFile" value="D:\program\apache-maven-3.8.1\conf\settings.xml" />
|
||||||
</MavenGeneralSettings>
|
</MavenGeneralSettings>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
@@ -315,6 +314,9 @@
|
|||||||
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
|
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
|
||||||
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
|
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="ProjectColorInfo">{
|
||||||
|
"associatedIndex": 6
|
||||||
|
}</component>
|
||||||
<component name="ProjectFrameBounds" extendedState="6">
|
<component name="ProjectFrameBounds" extendedState="6">
|
||||||
<option name="x" value="-9" />
|
<option name="x" value="-9" />
|
||||||
<option name="y" value="-9" />
|
<option name="y" value="-9" />
|
||||||
@@ -423,16 +425,49 @@
|
|||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">{
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
"Maven.common-core [compile].executor": "Run",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"Maven.common-core [install].executor": "Run",
|
||||||
"project.structure.last.edited": "Project",
|
"Maven.common-huawei [install].executor": "Run",
|
||||||
"project.structure.proportion": "0.0",
|
"Maven.common-mq [install].executor": "Run",
|
||||||
"project.structure.side.proportion": "0.0",
|
"Maven.common-oss [clean].executor": "Run",
|
||||||
"settings.editor.selected.configurable": "MavenSettings"
|
"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">
|
<component name="ReactorSettings">
|
||||||
<option name="notificationShown" value="true" />
|
<option name="notificationShown" value="true" />
|
||||||
</component>
|
</component>
|
||||||
@@ -458,6 +493,8 @@
|
|||||||
<set>
|
<set>
|
||||||
<option value="Application" />
|
<option value="Application" />
|
||||||
<option value="JarApplication" />
|
<option value="JarApplication" />
|
||||||
|
<option value="MicronautRunConfigurationType" />
|
||||||
|
<option value="QuarkusRunConfigurationType" />
|
||||||
<option value="SpringBootApplicationConfigurationType" />
|
<option value="SpringBootApplicationConfigurationType" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
@@ -470,15 +507,6 @@
|
|||||||
<option name="HEIGHT" value="300" />
|
<option name="HEIGHT" value="300" />
|
||||||
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
|
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
|
||||||
</configuration>
|
</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">
|
<configuration name="DeviceBootApplication" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||||
<option name="MAIN_CLASS_NAME" value="com.njcn.DeviceBootApplication" />
|
<option name="MAIN_CLASS_NAME" value="com.njcn.DeviceBootApplication" />
|
||||||
<module name="device-boot" />
|
<module name="device-boot" />
|
||||||
@@ -572,20 +600,48 @@
|
|||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</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">
|
<configuration name="AuthApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
||||||
<module name="pqs-auth" />
|
<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="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">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="DeviceBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
<configuration name="DeviceBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
||||||
<module name="device-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="SHORTEN_COMMAND_LINE" value="MANIFEST" />
|
||||||
|
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.device.DeviceBootApplication" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
@@ -599,9 +655,8 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="EventBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
<configuration name="EventBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
||||||
<module name="event-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="SHORTEN_COMMAND_LINE" value="MANIFEST" />
|
||||||
|
<option name="SPRING_BOOT_MAIN_CLASS" value="com.njcn.event.EventBootApplication" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
@@ -614,12 +669,11 @@
|
|||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="HarmonicBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
<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" />
|
<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">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
@@ -633,40 +687,74 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="JobExecutorApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
<configuration name="JobExecutorApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
||||||
<module name="job-executor" />
|
<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="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">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="QualityBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
<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" />
|
<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">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="SystemBootMain" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
<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" />
|
<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">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="UserBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
<configuration name="UserBootApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
||||||
<module name="user-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="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">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
@@ -677,6 +765,23 @@
|
|||||||
<item itemvalue="Application.HarmonicBootApplication" />
|
<item itemvalue="Application.HarmonicBootApplication" />
|
||||||
<item itemvalue="Application.EventBootApplication" />
|
<item itemvalue="Application.EventBootApplication" />
|
||||||
<item itemvalue="Application.DeviceBootApplication" />
|
<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>
|
</list>
|
||||||
<recent_temporary>
|
<recent_temporary>
|
||||||
<list>
|
<list>
|
||||||
@@ -773,6 +878,15 @@
|
|||||||
<workItem from="1664328876284" duration="428000" />
|
<workItem from="1664328876284" duration="428000" />
|
||||||
<workItem from="1664329319344" duration="573000" />
|
<workItem from="1664329319344" duration="573000" />
|
||||||
<workItem from="1664329912185" duration="38768000" />
|
<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>
|
||||||
<task id="LOCAL-00001" summary="EventTemplate控制器编写">
|
<task id="LOCAL-00001" summary="EventTemplate控制器编写">
|
||||||
<created>1663058049505</created>
|
<created>1663058049505</created>
|
||||||
@@ -1072,11 +1186,6 @@
|
|||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
<breakpoints>
|
<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">
|
<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>
|
<url>file://$PROJECT_DIR$/pqs-advance/advance-boot/src/main/java/com/njcn/advance/controller/EventRelevantAnalysisController.java</url>
|
||||||
<line>85</line>
|
<line>85</line>
|
||||||
|
|||||||
Reference in New Issue
Block a user