Commit 7e4d152f authored by ZWT's avatar ZWT

feat(能源管理系统): 邮件接收

1.添加天气数据邮件方式接收定时任务;
2.修改配置文件,增加新建定时任务,同时增加自定义参数;
3.创建天气邮件数据接收处理实现类,同时验证获取自定义参数方法;
4.添加收件工具类,验证是否能正常接收邮件;
5.天气邮件数据接收定时任务增加获取未读天气数据逻辑,增加附件文件临时存储方法并验证是否能正常读取文件数据同时转换为json数据;
6.增加查询运行中电站列表方法;
7.增加数据插入方法并进行结果验证;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent df8b7d4b
...@@ -15,6 +15,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -15,6 +15,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.sun.mail.imap.IMAPFolder; import com.sun.mail.imap.IMAPFolder;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.web.client.RestTemplate;
import pps.cloud.base.service.IBaseWeatherCloudService; import pps.cloud.base.service.IBaseWeatherCloudService;
import pps.core.base.entity.BasePhotovoltaicPlantView; import pps.core.base.entity.BasePhotovoltaicPlantView;
import pps.core.base.entity.PlantPredictedPowerDataEnt; import pps.core.base.entity.PlantPredictedPowerDataEnt;
...@@ -23,7 +24,6 @@ import pps.core.base.mapper.BasePhotovoltaicPlantViewMapper; ...@@ -23,7 +24,6 @@ import pps.core.base.mapper.BasePhotovoltaicPlantViewMapper;
import pps.core.base.mapper.PlantPredictedPowerDataMapper; import pps.core.base.mapper.PlantPredictedPowerDataMapper;
import pps.core.base.mapper.PlantPredictedPowerDataViewMapper; import pps.core.base.mapper.PlantPredictedPowerDataViewMapper;
import pps.core.base.service.data.DailyData; import pps.core.base.service.data.DailyData;
import pps.core.base.utils.HttpUtils;
import pps.core.common.constant.BusinessConstant; import pps.core.common.constant.BusinessConstant;
import pps.core.common.utils.BaseUtils; import pps.core.common.utils.BaseUtils;
import xstartup.annotation.XService; import xstartup.annotation.XService;
...@@ -289,7 +289,9 @@ public class BaseWeatherCloudServiceImpl implements IBaseWeatherCloudService { ...@@ -289,7 +289,9 @@ public class BaseWeatherCloudServiceImpl implements IBaseWeatherCloudService {
XThreadHelper.async(() -> { XThreadHelper.async(() -> {
try { try {
logger.info("------ weatherDataProcess http prediction plantId: {} ", plantId); logger.info("------ weatherDataProcess http prediction plantId: {} ", plantId);
HttpUtils.send2("http://127.0.0.1:10098/aiprediction/xgbreason?plantId=" + plantId, ""); RestTemplate restTemplate = context.getBean(RestTemplate.class);
String forObject = restTemplate.getForObject("http://127.0.0.1:10098/aiprediction/xgbreason?plantId=" + plantId, String.class);
logger.info("------ weatherDataProcess http prediction res: {} ", forObject);
} catch (Exception e) { } catch (Exception e) {
logger.error("------ weatherDataProcess Exception", e); logger.error("------ weatherDataProcess Exception", e);
throw new XServiceException(e); throw new XServiceException(e);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment