Commit 878bf5fe authored by ZWT's avatar ZWT

feat(零碳): 长庆演示系统新增功能

1.修改第三方日累计数据推送表表结构,增加日累计储能放电量字段,同时修改代码对应实体及mapper文件,修改相关接口增加储能日累计放电量接收逻辑;
2.修改首页井场收益分析模块接口,修改获取储能累计放电量逻辑;
3.设计并创建井口日用电趋势表,生成对应实体类及mapper文件;
4.统计分析模块,新增本月累计节电经济效益查询接口,添加线上接口文档并完成接口冒烟测试;
5.统计分析模块,新增本月累计减碳量查询接口,添加线上接口文档并完成接口冒烟测试;
6.统计分析模块,新增光伏发电趋势查询接口,添加线上接口文档并完成接口冒烟测试;
7.统计分析模块,新增月度总览查询接口,添加线上接口文档并完成接口冒烟测试;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 6da26dac
......@@ -3,6 +3,7 @@ package pps.core.task.job;
import cn.hutool.core.util.ObjectUtil;
import pps.cloud.base.service.IConfigOilFieldCloudService;
import pps.cloud.base.service.data.config_oil_field.GetConfigOilFieldOutput;
import pps.core.common.cache.TaskLockCache;
import pps.core.common.constant.BusinessConstant;
import xstartup.base.XContext;
import xstartup.data.XSingleResult;
......@@ -37,4 +38,17 @@ public class JobCommonService {
public boolean isClosed(GetConfigOilFieldOutput config) {
return ObjectUtil.hasNull(config, config.getApiTaskIsEnable()) || config.getApiTaskIsEnable().equals(BusinessConstant.ONE);
}
/**
* 设置缓存
*
* @param xContext x上下文
* @param key 钥匙
*/
public void setCache(XContext xContext, String key) {
TaskLockCache cache = new TaskLockCache();
cache.setRedisKey(key);
cache.setRedisValue(key);
TaskLockCache.set(xContext, cache);
}
}
\ No newline at end of file
......@@ -38,10 +38,7 @@ public class ThirdActivePowerJob extends JobCommonService implements XJob {
String key = TaskConstant.TASK_LOCK_KEY + "ThirdActivePowerJob";
TaskLockCache exist = TaskLockCache.exist(xContext, key);
if (ObjectUtil.isNull(exist)) {
TaskLockCache cache = new TaskLockCache();
cache.setRedisKey(key);
cache.setRedisValue(key);
TaskLockCache.set(xContext, cache);
this.setCache(xContext, key);
try {
IThirdDataAccessCloudService service = xContext.getBean(IThirdDataAccessCloudService.class);
XServiceResult result = service.thirdActivePowerJob(xContext);
......
......@@ -38,10 +38,7 @@ public class ThirdCurrentWellConditionJob extends JobCommonService implements XJ
String key = TaskConstant.TASK_LOCK_KEY + "ThirdCurrentWellConditionJob";
TaskLockCache exist = TaskLockCache.exist(xContext, key);
if (ObjectUtil.isNull(exist)) {
TaskLockCache cache = new TaskLockCache();
cache.setRedisKey(key);
cache.setRedisValue(key);
TaskLockCache.set(xContext, cache);
this.setCache(xContext, key);
try {
IThirdDataAccessCloudService service = xContext.getBean(IThirdDataAccessCloudService.class);
XServiceResult result = service.thirdCurrentWellConditionJob(xContext);
......
......@@ -38,10 +38,7 @@ public class ThirdDailyAccumulationJob extends JobCommonService implements XJob
String key = TaskConstant.TASK_LOCK_KEY + "ThirdDailyAccumulationJob";
TaskLockCache exist = TaskLockCache.exist(xContext, key);
if (ObjectUtil.isNull(exist)) {
TaskLockCache cache = new TaskLockCache();
cache.setRedisKey(key);
cache.setRedisValue(key);
TaskLockCache.set(xContext, cache);
this.setCache(xContext, key);
try {
IThirdDataAccessCloudService service = xContext.getBean(IThirdDataAccessCloudService.class);
XServiceResult result = service.thirdDailyAccumulationJob(xContext);
......
......@@ -38,10 +38,7 @@ public class ThirdPhotovoltaicPowerJob extends JobCommonService implements XJob
String key = TaskConstant.TASK_LOCK_KEY + "ThirdPhotovoltaicPowerJob";
TaskLockCache exist = TaskLockCache.exist(xContext, key);
if (ObjectUtil.isNull(exist)) {
TaskLockCache cache = new TaskLockCache();
cache.setRedisKey(key);
cache.setRedisValue(key);
TaskLockCache.set(xContext, cache);
this.setCache(xContext, key);
try {
IThirdDataAccessCloudService service = xContext.getBean(IThirdDataAccessCloudService.class);
XServiceResult result = service.thirdPhotovoltaicPowerJob(xContext);
......
......@@ -38,10 +38,7 @@ public class ThirdWellAvgActivePowerJob extends JobCommonService implements XJob
String key = TaskConstant.TASK_LOCK_KEY + "ThirdWellAvgActivePowerJob";
TaskLockCache exist = TaskLockCache.exist(xContext, key);
if (ObjectUtil.isNull(exist)) {
TaskLockCache cache = new TaskLockCache();
cache.setRedisKey(key);
cache.setRedisValue(key);
TaskLockCache.set(xContext, cache);
this.setCache(xContext, key);
try {
IThirdDataAccessCloudService service = xContext.getBean(IThirdDataAccessCloudService.class);
XServiceResult result = service.thirdWellAvgActivePowerJob(xContext);
......
......@@ -38,10 +38,7 @@ public class WeatherApiReceiveJob extends JobCommonService implements XJob {
String key = TaskConstant.TASK_LOCK_KEY + "WeatherApiReceiveJob";
TaskLockCache exist = TaskLockCache.exist(xContext, key);
if (ObjectUtil.isNull(exist)) {
TaskLockCache cache = new TaskLockCache();
cache.setRedisKey(key);
cache.setRedisValue(key);
TaskLockCache.set(xContext, cache);
this.setCache(xContext, key);
try {
IBaseWeatherCloudService service = xContext.getBean(IBaseWeatherCloudService.class);
XServiceResult result = service.weatherApiDataProcess(xContext);
......
......@@ -40,10 +40,7 @@ public class WeatherReceiveJob extends JobCommonService implements XJob {
xContext.getLogger().info("------ WeatherReceiveJob oilFieldCode is blank");
return XServiceResult.OK;
}
TaskLockCache cache = new TaskLockCache();
cache.setRedisKey(key);
cache.setRedisValue(key);
TaskLockCache.set(xContext, cache);
this.setCache(xContext, key);
try {
IBaseWeatherCloudService service = xContext.getBean(IBaseWeatherCloudService.class);
XServiceResult result = service.weatherDataProcess(xContext, oilFieldCode);
......
......@@ -38,10 +38,7 @@ public class WellTechDailyJob extends JobCommonService implements XJob {
String key = TaskConstant.TASK_LOCK_KEY + "WellTechDailyJob";
TaskLockCache exist = TaskLockCache.exist(xContext, key);
if (ObjectUtil.isNull(exist)) {
TaskLockCache cache = new TaskLockCache();
cache.setRedisKey(key);
cache.setRedisValue(key);
TaskLockCache.set(xContext, cache);
this.setCache(xContext, key);
try {
IPlantPredictedPowerCloudService service = xContext.getBean(IPlantPredictedPowerCloudService.class);
XServiceResult result = service.wellTechDailyJob(xContext);
......
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