Merge remote-tracking branch 'origin/station' into station

This commit is contained in:
nieziyan 2023-10-24 10:45:07 +08:00
commit 74c54c98f0
24 changed files with 434 additions and 354 deletions

View File

@ -126,8 +126,14 @@ public class EmailServiceManager {
//如果邮箱邮件数量 > 0
final int messageCount = folder.getMessageCount();
if(messageCount > 0){
Message[] messages = null;
if(Objects.isNull(this.systemStartupTime)){
int finalNum = messageCount > this.receiveNum?this.receiveNum:messageCount;
//邮箱邮件下标是从1开始的
return folder.getMessages(1,finalNum);
}
SearchTerm searchTerm = new ReceivedDateTerm(ComparisonTerm.GE,this.systemStartupTime);
Message[] messages = folder.search(searchTerm);
messages = folder.search(searchTerm);
Arrays.sort(messages, (o1, o2) -> {
try {
return o1.getReceivedDate().compareTo(o2.getReceivedDate());
@ -139,9 +145,8 @@ public class EmailServiceManager {
if(this.receiveNum >= messages.length){
return messages;
}else{
messages = Arrays.copyOfRange(messages,0,this.receiveNum-1);
return Arrays.copyOfRange(messages,0,this.receiveNum-1);
}
return messages;
}
return null;
}
@ -233,7 +238,6 @@ public class EmailServiceManager {
if(part.isMimeType(MailContentType.PLAIN.getContentType())){
content.append(part.getContent());
}else if(part.isMimeType("multipart/*")){
System.out.println(part.getContentType());
Multipart multipart = (Multipart) part.getContent();
for(int i=0;i<multipart.getCount();i++) {
final Part bodyPart = multipart.getBodyPart(i);

View File

@ -59,7 +59,7 @@ public class GammaReportUtil {
try {
out = new PrintWriter(file);
out.println("#" + fileType);
out.printf("%" + (String.valueOf(data.size()).length() + (colLength - String.valueOf(data.size()).length())) + "s", data.size() + "\n");
// out.printf("%" + (String.valueOf(data.size()).length() + (colLength - String.valueOf(data.size()).length())) + "s", data.size() + "\n");
format(data, out);
} catch (FileNotFoundException e) {

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.exception;
/**
* B谱分析异常
*/
public class GAnalyseException extends Exception{
/**
* Constructs a new exception with the specified detail message. The
* cause is not initialized, and may subsequently be initialized by
* a call to {@link #initCause}.
*
* @param message the detail message. The detail message is saved for
* later retrieval by the {@link #getMessage()} method.
*/
public GAnalyseException(String message) {
super(message);
}
}

View File

@ -15,4 +15,11 @@ public interface IAlertSpectrumService extends IService<GardsAlertData> {
* @param fileName
*/
public GardsAlertData create(AlertSpectrumStruct struct,String fileName) throws Exception;
/**
* 查询GardsAlertData
* @param inputFileName
* @return
*/
public GardsAlertData findByInputFileName(String inputFileName);
}

View File

@ -3,7 +3,6 @@ package org.jeecg.modules.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.base.entity.original.GardsSohData;
import org.jeecg.modules.native_jni.struct.SOHSpectrumStruct;
import java.util.List;
/**

View File

@ -1,5 +1,6 @@
package org.jeecg.modules.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -7,6 +8,7 @@ import lombok.RequiredArgsConstructor;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.base.entity.configuration.GardsStations;
import org.jeecg.modules.base.entity.original.GardsAlertData;
import org.jeecg.modules.file.FileOperation;
import org.jeecg.modules.mapper.GardsAlertDataMapper;
import org.jeecg.modules.mapper.GardsStationsMapper;
import org.jeecg.modules.native_jni.struct.AlertSpectrumStruct;
@ -48,8 +50,25 @@ public class AlertSpectrumServiceImpl extends ServiceImpl<GardsAlertDataMapper,
alertData.setTime(DateUtils.parseDate(struct.date+" "+struct.time));
alertData.setAlertType(struct.alert_type);
alertData.setAlertText(struct.desc);
alertData.setInputFileName(fileName);
alertData.setInputFileName(FileOperation.separatorConvert(fileName));
this.save(alertData);
return alertData;
}
/**
* 查询GardsAlertData
*
* @param inputFileName
* @return
*/
@Override
public GardsAlertData findByInputFileName(String inputFileName) {
if (StrUtil.isNotBlank(inputFileName)){
inputFileName = FileOperation.separatorConvert(inputFileName);
LambdaQueryWrapper<GardsAlertData> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(GardsAlertData::getInputFileName,inputFileName);
return this.getOne(queryWrapper);
}
return null;
}
}

View File

@ -8,6 +8,7 @@ import org.apache.commons.compress.utils.Lists;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.base.entity.configuration.GardsStations;
import org.jeecg.modules.base.entity.original.GardsMetData;
import org.jeecg.modules.file.FileOperation;
import org.jeecg.modules.mapper.GardsMetDataMapper;
import org.jeecg.modules.mapper.GardsStationsMapper;
import org.jeecg.modules.native_jni.struct.MetSpectrumStruct;
@ -61,7 +62,7 @@ public class MetSpectrumServiceImpl extends ServiceImpl<GardsMetDataMapper, Gard
metData.setAveWindDir(struct.average_wind_direction.get(i));
metData.setAveWindSpeed(struct.average_wind_speed.get(i));
metData.setRainfall(struct.rainfall.get(i));
metData.setInputFileName(fileName);
metData.setInputFileName(FileOperation.separatorConvert(fileName));
metData.setModdate(new Date());
list.add(metData);
}

View File

@ -9,6 +9,7 @@ import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.base.entity.configuration.GardsDetectors;
import org.jeecg.modules.base.entity.configuration.GardsStations;
import org.jeecg.modules.base.entity.original.GardsSohData;
import org.jeecg.modules.file.FileOperation;
import org.jeecg.modules.mapper.GardsDetectorsMapper;
import org.jeecg.modules.mapper.GardsSohDataMapper;
import org.jeecg.modules.mapper.GardsStationsMapper;
@ -67,7 +68,7 @@ public class SOHSpectrumServiceImpl extends ServiceImpl<GardsSohDataMapper, Gard
sohData.setTime(struct.af_interval_duration.get(i).doubleValue());
sohData.setAvgflowrate(struct.average_flow_rate.get(i));
sohData.setFlowratedev(struct.flow_rate_standard_deviation.get(i));
sohData.setInputFileName(fileName);
sohData.setInputFileName(FileOperation.separatorConvert(fileName));
sohData.setDetectorId(gardsDetectors.getDetectorId());
sohData.setModdate(new Date());
list.add(sohData);

View File

@ -6,6 +6,7 @@ import org.jeecg.common.properties.SpectrumPathProperties;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.base.entity.original.GardsAlertData;
import org.jeecg.modules.base.enums.DataType;
import org.jeecg.modules.exception.FileRepeatException;
import org.jeecg.modules.exception.PHD_ReadException;
import org.jeecg.modules.file.FileOperation;
import org.jeecg.modules.native_jni.EnergySpectrumHandler;
@ -34,6 +35,10 @@ public class AlertSpectrum extends AbstractSpectrumHandler{
* 结束存库时间
*/
private Date endIntoDatabaseTime = null;
/**
* 文件是否重复
*/
private boolean isFileRepeat;
/**
* 设置过滤链路
@ -56,6 +61,7 @@ public class AlertSpectrum extends AbstractSpectrumHandler{
DataType.ALERT_TEMP.getType().equals(super.currDataType.getType()) ||
DataType.ALERT_SYSTEM.getType().equals(super.currDataType.getType()) ||
DataType.ALERT_UPS.getType().equals(super.currDataType.getType())){
try{
//打印当前处理的能谱类型
super.printCurrDataType();
//解析邮件内容
@ -66,8 +72,12 @@ public class AlertSpectrum extends AbstractSpectrumHandler{
this.handlerOriginalData();
//删除本地临时文件
super.deleteLocalTemporaryFile();
}catch (Exception e){
throw e;
}finally {
//把流程日志保存到日志目录
this.saveLogToLogDir();
}
}else{
super.next.handler();
}
@ -129,6 +139,13 @@ public class AlertSpectrum extends AbstractSpectrumHandler{
@Override
protected void handlerOriginalData() throws Exception {
this.startIntoDatabaseTime = new Date();
final GardsAlertData alertData = super.spectrumServiceQuotes.getAlertSpectrumService().findByInputFileName(super.spectrumFileRelativePath);
if(Objects.nonNull(alertData)){
this.alertData = alertData;
this.endIntoDatabaseTime = new Date();
this.isFileRepeat = true;
throw new FileRepeatException("file repeat");
}
this.alertData = super.spectrumServiceQuotes.getAlertSpectrumService().create(this.sourceData, super.spectrumFileRelativePath);
this.endIntoDatabaseTime = new Date();
}
@ -138,18 +155,28 @@ public class AlertSpectrum extends AbstractSpectrumHandler{
*/
@Override
protected void saveLogToLogDir() throws IOException {
final SpectrumPathProperties properties = super.spectrumServiceQuotes.getSpectrumPathProperties();
final String dirPath = properties.getRootPath()+File.separator+properties.getLogPath()+File.separator+this.getFileSaveRelativePath();
final String fileName = super.spectrumFile.getName().replace(this.currDataType.getSuffix(),LOG_FILE_SUFFIX);
final String finalPath = dirPath+File.separator+fileName;
//组装日志文件内容
StringBuilder logContent = new StringBuilder();
logContent.append("-------------------------- Write Data into Database at ").append(DateUtils.formatDate(this.startIntoDatabaseTime,"yyyy-MM-dd HH:mm:ss")).append(" ---------------------------");
logContent.append(System.lineSeparator()).append(System.lineSeparator());
logContent.append("ALERT ID: ").append(this.alertData.getAlertId()).append(" StandardFile:").append(super.spectrumServiceQuotes.getSpectrumPathProperties().getRootPath()).append(StringConstant.SLASH).append(super.spectrumFileRelativePath);
logContent.append(System.lineSeparator()).append(System.lineSeparator());
logContent.append("------------------- ").append("Write Data into Database Successfully at ").append(DateUtils.formatDate(this.endIntoDatabaseTime,"yyyy-MM-dd HH:mm:ss")).append(" --------------------");
final SpectrumPathProperties properties = super.spectrumServiceQuotes.getSpectrumPathProperties();
final String dirPath = properties.getLogPath()+File.separator+this.getFileSaveRelativePath();
final String fileName = super.spectrumFile.getName().replace(this.currDataType.getSuffix(),LOG_FILE_SUFFIX);
final String finalPath = dirPath+File.separator+fileName;
String handleFlag = "Successfully";
if(this.isFileRepeat){
handleFlag = "Error";
String fileStoreRelativePath = this.getFileSaveRelativePath()+File.separator+fileName;
logContent.append("File: ").append(fileStoreRelativePath).append(" repeat");
logContent.append(System.lineSeparator()).append(System.lineSeparator());
}
logContent.append("------------------- ").append("Write Data into Database ").append(handleFlag).append(" at ").append(DateUtils.formatDate(this.endIntoDatabaseTime,"yyyy-MM-dd HH:mm:ss")).append(" --------------------");
logContent.append(System.lineSeparator()).append(System.lineSeparator()).append(System.lineSeparator());
FileOperation.saveOrAppendFile(finalPath,logContent.toString(),true);
}
}

View File

@ -1,6 +1,5 @@
package org.jeecg.modules.spectrum;
import cn.hutool.core.io.FileUtil;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.constant.StringConstant;
import org.jeecg.common.properties.SpectrumPathProperties;
@ -39,7 +38,7 @@ public class HealthStatusSpectrum extends AbstractSpectrumHandler{
*/
private Date endIntoDatabaseTime = null;
private List<GardsSohData> sohDatas;
private List<GardsSohData> sohData;
/**
* 设置过滤链路
@ -134,7 +133,7 @@ public class HealthStatusSpectrum extends AbstractSpectrumHandler{
@Override
protected void handlerOriginalData() throws Exception {
this.startIntoDatabaseTime = new Date();
this.sohDatas = spectrumServiceQuotes.getSohSpectrumService().create(this.sourceData, super.spectrumFileRelativePath);
this.sohData = spectrumServiceQuotes.getSohSpectrumService().create(this.sourceData, super.spectrumFileRelativePath);
this.endIntoDatabaseTime = new Date();
}
@ -145,8 +144,8 @@ public class HealthStatusSpectrum extends AbstractSpectrumHandler{
protected void saveLogToLogDir() throws IOException {
//获取健康谱记录ID范围
String sohIdRange = "";
if(!CollectionUtils.isEmpty(this.sohDatas)){
sohIdRange = this.sohDatas.get(0).getSohId()+"-"+this.sohDatas.get(this.sohDatas.size()-1).getSohId();
if(!CollectionUtils.isEmpty(this.sohData)){
sohIdRange = this.sohData.get(0).getSohId()+"-"+this.sohData.get(this.sohData.size()-1).getSohId();
}
//组装日志文件内容
StringBuilder logContent = new StringBuilder();
@ -157,7 +156,7 @@ public class HealthStatusSpectrum extends AbstractSpectrumHandler{
logContent.append("------------------- ").append("Write Data into Database Successfully at ").append(DateUtils.formatDate(this.endIntoDatabaseTime,"yyyy-MM-dd HH:mm:ss")).append(" --------------------");
final SpectrumPathProperties properties = this.spectrumServiceQuotes.getSpectrumPathProperties();
final String dirPath = properties.getLogPath()+File.separator+this.getFileSaveRelativePath();
final String dirPath = properties.getRootPath()+File.separator+properties.getLogPath()+File.separator+this.getFileSaveRelativePath();
final String fileName = super.spectrumFile.getName().replace(this.currDataType.getSuffix(),LOG_FILE_SUFFIX);
final String finalPath = dirPath+ File.separator+fileName;
FileOperation.saveOrAppendFile(finalPath,logContent.toString(),true);

View File

@ -150,7 +150,7 @@ public class MetSpectrum extends AbstractSpectrumHandler{
logContent.append("------------------- ").append("Write Data into Database Successfully at ").append(DateUtils.formatDate(this.endIntoDatabaseTime,"yyyy-MM-dd HH:mm:ss")).append(" --------------------");
final SpectrumPathProperties properties = this.spectrumServiceQuotes.getSpectrumPathProperties();
final String dirPath = properties.getLogPath()+File.separator+this.getFileSaveRelativePath();
final String dirPath = properties.getRootPath()+File.separator+properties.getLogPath()+File.separator+this.getFileSaveRelativePath();
final String fileName = super.spectrumFile.getName().replace(this.currDataType.getSuffix(),LOG_FILE_SUFFIX);
final String finalPath = dirPath+File.separator+fileName;
FileOperation.saveOrAppendFile(finalPath,logContent.toString(),true);

View File

@ -50,7 +50,6 @@ public class SamplephdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
super.status = SampleStatus.COMPLETE.getValue();
super.updateStatus();
}catch (Exception e){
e.printStackTrace();
//修改状态为解析失败
super.status = SampleStatus.FAIL.getValue();
super.updateStatus();

View File

@ -104,7 +104,6 @@ public class SpectrumParsingActuator implements Runnable{
}
}
} catch (Exception e) {
// log.error(mailContent.toString());
log.error("This email failed to parse. The email subject is: {}, sent on: {}, received on: {}, and the reason for the failure is: {}",subject,sendTime,receiveTime,e.getMessage());
e.printStackTrace();
}finally {

View File

@ -67,7 +67,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
//连接ftp
FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){
result.error500("ftp连接失败");
result.error500("ftp connection failed");
return false;
}
InputStream inputStream = null;
@ -280,7 +280,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
//连接ftp
FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){
String warning = "ftp连接失败";
String warning = "ftp connection failed";
}
InputStream inputStream = null;
File file = null;
@ -328,7 +328,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
//连接ftp
FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){
String warning = "ftp连接失败";
String warning = "ftp connection failed";
}
InputStream inputStream = null;
File file = null;
@ -376,7 +376,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
//连接ftp
FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){
String warning = "ftp连接失败";
String warning = "ftp connection failed";
}
InputStream inputStream = null;
try {
@ -2641,6 +2641,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
}
public String GetReportContent(GStoreMiddleProcessData middleData) {
try {
StringBuffer strBuffer = new StringBuffer();
strBuffer.append(" CNL06 GENERATED REPORT");
//换行
@ -2984,6 +2985,10 @@ public class GammaFileUtil extends AbstractLogOrReport {
strBuffer.append(System.lineSeparator());
}
return strBuffer.toString();
} catch (Exception e) {
log.error("错误文件名称:"+ middleData.analyses_save_filePath+" 错误内容:"+e.getMessage());
}
return "";
}
public List<String> DoubleLimit(List data) {
@ -4064,7 +4069,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
//连接ftp
FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){
result.error500("ftp连接失败");
result.error500("ftp connection failed");
return m_vecCompare;
}
InputStream inputStream = null;

View File

@ -265,7 +265,7 @@ public class PHDFileUtil {
FTPClient ftpClient = ftpUtil.LoginFTP();
//判断ftp是否连接成功
if (Objects.isNull(ftpClient)){
throw new RuntimeException("ftp连接失败!");
throw new RuntimeException("ftp connection failed!");
}
InputStream iStream= null;
File file = null;

View File

@ -134,7 +134,7 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
result.setResult(stations);
result.setSuccess(true);
}else {
result.error500("台站下对应信息不存在");
result.error500("The corresponding information under the station does not exist");
}
}else if(type.equals("Nuclear Facility")){
HashMap<String, GardsNuclearfacility> nuclearFacilityMap = (HashMap<String, GardsNuclearfacility>) redisUtil.get("nuclearFacilityMap");
@ -148,10 +148,10 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
result.setResult(nuclearfacility);
result.setSuccess(true);
}else {
result.error500("核设施下对应信息不存在");
result.error500("The corresponding information does not exist in the nuclear facility");
}
}else {
result.error500("当前类型不存在");
result.error500("The current type does not exist");
}
return result;
}
@ -233,7 +233,7 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
//获取传递的半径数据
Double radius = pointVo.getRadius();
if (Objects.isNull(radius)) {
result.error500("请传入半径");
result.error500("Please pass in radius");
}
try {
if (CollectionUtils.isNotEmpty(stationIds)){
@ -273,16 +273,16 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
//获取当前查询的纬度 圆心位置纬度信息
Double latitudeD = point.getLat();
if (Objects.isNull(longitudeD)) {
result.error500("请传入经度");
result.error500("Pass in longitude, please");
}
if (Objects.isNull(latitudeD)) {
result.error500("请传入纬度");
result.error500("Please pass in latitude");
}
if (!(longitudeD >= -180 && longitudeD <= 180)) {
result.error500("经度不合法");
result.error500("Longitude is not legal");
}
if (!(latitudeD >= -85.05112878 && latitudeD <= 85.05112878)) {
result.error500("纬度不合法");
result.error500("Latitude illegality");
}
// 1.获取外接正方形
Rectangle rectangle = getRectangle(radius, longitudeD, latitudeD);
@ -383,7 +383,7 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
}
}
if (StringUtils.isBlank(cacheTime)){
result.error500("缓存时间不能为空");
result.error500("The cache time cannot be empty");
return result;
}
//根据用户id查询出当前用户关注的台站信息

View File

@ -84,7 +84,7 @@ public class SysUserFocusStationServiceImpl extends ServiceImpl<SysUserFocusStat
//根据用户名称查询对应的用户信息
SysUser sysUser = cacheTimeService.findUserByName(username);
if (Objects.isNull(sysUser)){
result.error500("当前用户不存在!");
result.error500("The current user does not exist!");
return result;
}
//判断传递参数信息是否为空
@ -145,7 +145,7 @@ public class SysUserFocusStationServiceImpl extends ServiceImpl<SysUserFocusStat
//根据用户名称查询对应的用户信息
SysUser sysUser = cacheTimeService.findUserByName(username);
if (Objects.isNull(sysUser)){
result.error500("当前用户不存在!");
result.error500("The current user does not exist!");
return result;
}
LambdaQueryWrapper<SysUserFocusStationStation> queryWrapper = new LambdaQueryWrapper<>();

View File

@ -322,7 +322,7 @@ public class SysTaskServiceImpl extends ServiceImpl<SysTaskMapper, SysTaskSystem
this.baseMapper.deleteById(fromSysTask);
}
result.setSuccess(true);
result.success("交接完成");
result.success("Handover completed");
} catch (ParseException e) {
throw new RuntimeException(e);
}

View File

@ -49,12 +49,12 @@ public class AutoServiceImpl extends ServiceImpl<GardsAnalysesAutoMapper, GardsA
//获取redis中缓存的台站信息
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
if (Objects.isNull(startTime)){
result.error500("开始时间不能为空");
result.error500("The start time cannot be empty");
return result;
}
String startDate = DateUtils.formatDate(startTime, "yyyy-MM-dd") + " 00:00:00";
if (Objects.isNull(endTime)){
result.error500("结束时间不能为空");
result.error500("The end time cannot be empty");
return result;
}
String endDate = DateUtils.formatDate(endTime, "yyyy-MM-dd") + " 23:59:59";

View File

@ -40,11 +40,11 @@ public class GardsMetDataServiceImpl extends ServiceImpl<GardsMetDataMapper, Gar
return result;
}
if (Objects.isNull(startTime)){
result.error500("开始时间不能为空");
result.error500("The start time cannot be empty");
return result;
}
if (Objects.isNull(endTime)){
result.error500("结束时间不能为空");
result.error500("The end time cannot be empty");
return result;
}
Date startDate = DateUtils.parseDate(DateUtils.formatDate(startTime, "yyyy-MM-dd") + " 00:00:00", "yyyy-MM-dd HH:mm:ss");

View File

@ -47,11 +47,11 @@ public class GardsSohDataServiceImpl extends ServiceImpl<GardsSohDataMapper, Gar
return result;
}
if (Objects.isNull(startTime)){
result.error500("开始时间不能为空");
result.error500("The start time cannot be empty");
return result;
}
if (Objects.isNull(endTime)){
result.error500("结束时间不能为空");
result.error500("The end time cannot be empty");
return result;
}
Date startDate = DateUtils.parseDate(DateUtils.formatDate(startTime, "yyyy-MM-dd") + " 00:00:00", "yyyy-MM-dd HH:mm:ss");
@ -94,11 +94,11 @@ public class GardsSohDataServiceImpl extends ServiceImpl<GardsSohDataMapper, Gar
return result;
}
if (Objects.isNull(startTime)){
result.error500("开始时间不能为空");
result.error500("The start time cannot be empty");
return result;
}
if (Objects.isNull(endTime)){
result.error500("结束时间不能为空");
result.error500("The end time cannot be empty");
return result;
}
Date startDate = DateUtils.parseDate(DateUtils.formatDate(startTime, "yyyy-MM-dd") + " 00:00:00", "yyyy-MM-dd HH:mm:ss");

View File

@ -49,12 +49,12 @@ public class ReviewedServiceImpl extends ServiceImpl<GardsAnalysesManMapper, Gar
//获取redis中缓存的台站信息
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
if (Objects.isNull(startTime)){
result.error500("开始时间不能为空");
result.error500("The start time cannot be empty");
return result;
}
String startDate = DateUtils.formatDate(startTime, "yyyy-MM-dd") + " 00:00:00";
if (Objects.isNull(endTime)){
result.error500("结束时间不能为空");
result.error500("The end time cannot be empty");
return result;
}
String endDate = DateUtils.formatDate(endTime, "yyyy-MM-dd") + " 23:59:59";

View File

@ -71,7 +71,7 @@ public class JeecgAutoProcessApplication extends SpringBootServletInitializer im
System.loadLibrary("ReadPHDFile");
System.loadLibrary("GammaAnaly");
//根据配置文件配置邮件获取策略定义时间条件默认EmailReceivePolicy.HISTORY_ORDER_RECEIVE.getPolicy()
Date systemStartupTime = DateUtils.parseDate("1970-01-01 00:00:00","yyyy-MM-dd HH:mm:ss");
Date systemStartupTime = null;
if(EmailReceivePolicy.CURR_DATE_ORDER_RECEIVE.getPolicy().equals(taskProperties.getReceivePolicy())){
systemStartupTime = new Date();
}

View File

@ -16,3 +16,4 @@ spring:
import:
- optional:nacos:armd.yaml
- optional:nacos:armd-@profile.name@.yaml
- optional:nacos:armd-analysis-@profile.name@.yaml