Commit 142c549e authored by ZWT's avatar ZWT

feat(零碳): 长庆

1.对接第三方接口,接入第三方数据,完成Token接口验证,抽取公用方法封装调用工具类;
2.对接第三方接口,完成获取日耗电日产液等信息接口调用,创建数据表,同时生成对应代码,开发定时任务及对外接口,完成第三方数据接入及系统展示功能,添加线上接口文档并完成接口及定时任务冒烟测试;
3.对接第三方接口,完成获取有功功率数据信息接口调用,创建数据表,同时生成对应代码,开发定时任务及对外接口,完成第三方数据接入及系统展示功能,添加线上接口文档并完成接口及定时任务冒烟测试;
4.对接第三方接口,完成获取甘特图数据接口调用,创建数据表,同时生成对应代码,开发定时任务及对外接口,完成第三方数据接入及系统展示功能,添加线上接口文档并完成接口及定时任务冒烟测试;
5.对接第三方接口,完成本日累计数据接口调用,创建数据表,同时生成对应代码,开发定时任务及对外接口,完成第三方数据接入及系统展示功能,添加线上接口文档并完成接口及定时任务冒烟测试;
6.对接第三方接口,完成光伏发电量接口调用,创建数据表,同时生成对应代码,开发定时任务及对外接口,完成第三方数据接入及系统展示功能,添加线上接口文档并完成接口及定时任务冒烟测试;
7.对接第三方接口,完成三叠登录接口调用,添加线上接口文档并完成接口及定时任务冒烟测试;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent afc5480a
......@@ -45,19 +45,9 @@ public class SpaceOptimizeLongCloudServiceImpl extends SpaceOptimizeBaseService
//取生效中的基础间开
List<SpaceInstitutionDetailEnt> detailEntList = super.getEffectiveSpaceInstitution(context, date.toString(BusinessConstant.DATE_FORMAT_DAY));
SpaceOptimizeLineRelation relation = super.getOptimizeLineRelation(context, detailEntList);
//取年份
int year = date.year();
//月份要加一
int monthIndex = date.month();
int monthNum = monthIndex + 1;
int lastMonthNum = monthIndex;
int lastYear = year;
if (monthIndex == 0) {
lastMonthNum = 12;
lastYear = year - 1;
}
String month = BaseUtils.getMonthString(monthNum);
String lastMonth = BaseUtils.getMonthString(lastMonthNum);
List<SpaceOptimizePeriodDTO> periodDTOList = new ArrayList<>(32);
List<SpaceOptimizeWellheadDTO> wellheadDTOList = new ArrayList<>(64);
List<SpaceOptimizeDurationDTO> durationDTOList = new ArrayList<>(128);
......@@ -78,8 +68,8 @@ public class SpaceOptimizeLongCloudServiceImpl extends SpaceOptimizeBaseService
relation.getWellheadsByInstitutionIdIdMap().get(detail.getId()), detail, monthNum, periodId,
DynamicQueryPlantPredictedPowerInput.builder()
.plantIds(relation.getPlantIdsByLineIdMap().get(detail.getLineId()))
.yearTime(String.valueOf(year))
.monthTime(month)
.startTime(date.toString(BusinessConstant.DATE_FORMAT_DAY))
.endTime(optimizeDeadline.toString(BusinessConstant.DATE_FORMAT_DAY))
.dateType(BusinessConstant.ZERO)
.build());
break;
......@@ -89,13 +79,13 @@ public class SpaceOptimizeLongCloudServiceImpl extends SpaceOptimizeBaseService
relation.getStorageAvgMap(), detail, periodId,
DynamicQueryStoragePredictedPowerInput.builder()
.storageIds(relation.getStorageIdsByLineIdMap().get(detail.getLineId()))
.yearTime(String.valueOf(lastYear))
.monthTime(lastMonth)
.startTime(DateUtil.offsetDay(date, -10).toString(BusinessConstant.DATE_FORMAT_DAY))
.endTime(DateUtil.offsetDay(optimizeDeadline, -10).toString(BusinessConstant.DATE_FORMAT_DAY))
.build(),
DynamicQueryPlantPredictedPowerInput.builder()
.plantIds(relation.getPlantIdsByLineIdMap().get(detail.getLineId()))
.yearTime(String.valueOf(year))
.monthTime(month)
.startTime(date.toString(BusinessConstant.DATE_FORMAT_DAY))
.endTime(optimizeDeadline.toString(BusinessConstant.DATE_FORMAT_DAY))
.dateType(BusinessConstant.ZERO)
.build());
break;
......
......@@ -16,9 +16,11 @@ import pps.core.auth.HttpRequestClient;
import pps.core.prediction.constant.ThirdPartyApiConstant;
import pps.core.prediction.entity.PlantPredictedPowerDataEnt;
import pps.core.prediction.entity.PlantPredictedPowerLongTermDataEnt;
import pps.core.prediction.entity.PlantPredictedPowerMidTermEnt;
import pps.core.prediction.entity.WellheadDailyProductionSituationView;
import pps.core.prediction.mapper.PlantPredictedPowerDataMapper;
import pps.core.prediction.mapper.PlantPredictedPowerLongTermDataMapper;
import pps.core.prediction.mapper.PlantPredictedPowerMidTermMapper;
import pps.core.prediction.mapper.WellheadDailyProductionSituationViewMapper;
import pps.core.prediction.service.data.wellhead_daily_production_situation.WellheadDailyProductionSituationJob;
import pps.core.prediction.utils.ServiceUtil;
......@@ -65,22 +67,16 @@ public class PlantPredictedPowerCloudServiceImpl implements IPlantPredictedPower
if (CollUtil.isNotEmpty(plantIds)) {
switch (dateType) {
case 0:
PlantPredictedPowerLongTermDataMapper longTermDataMapper = context.getBean(PlantPredictedPowerLongTermDataMapper.class);
list = longTermDataMapper.selectList(
new QueryWrapper<PlantPredictedPowerLongTermDataEnt>()
.select("hour_time",
"min_time",
"IFNULL( AVG( power ), 0 ) AS power",
"STR_TO_DATE( CONCAT( hour_time, ':', min_time ), '%H:%i:%s' ) AS create_time")
PlantPredictedPowerMidTermMapper longTermDataMapper = context.getBean(PlantPredictedPowerMidTermMapper.class);
longTermDataMapper.selectList(
new QueryWrapper<PlantPredictedPowerMidTermEnt>()
.select("power",
"data_date AS create_time")
.lambda()
.eq(StringUtils.isNotBlank(plantId), PlantPredictedPowerLongTermDataEnt::getPlantId, plantId)
.in(PlantPredictedPowerLongTermDataEnt::getPlantId, plantIds)
.eq(StringUtils.isNotBlank(yearTime), PlantPredictedPowerLongTermDataEnt::getYearTime, yearTime)
.eq(StringUtils.isNotBlank(monthTime), PlantPredictedPowerLongTermDataEnt::getMonthTime, monthTime)
.between(!StringUtils.isAnyBlank(startTime, endTime), PlantPredictedPowerLongTermDataEnt::getDataDate, startTime, endTime)
.groupBy(PlantPredictedPowerLongTermDataEnt::getHourTime,
PlantPredictedPowerLongTermDataEnt::getMinTime)
.orderByAsc(PlantPredictedPowerLongTermDataEnt::getHourTime, PlantPredictedPowerLongTermDataEnt::getMinTime)
.eq(StringUtils.isNotBlank(plantId), PlantPredictedPowerMidTermEnt::getPlantId, plantId)
.in(PlantPredictedPowerMidTermEnt::getPlantId, plantIds)
.between(!StringUtils.isAnyBlank(startTime, endTime), PlantPredictedPowerMidTermEnt::getDataDate, startTime, endTime)
.orderByAsc(PlantPredictedPowerMidTermEnt::getDataDate)
);
break;
case 1:
......@@ -90,7 +86,7 @@ public class PlantPredictedPowerCloudServiceImpl implements IPlantPredictedPower
.select("hour_time",
"min_time",
"IFNULL( AVG( power ), 0 ) AS power",
"STR_TO_DATE( CONCAT( hour_time, ':', min_time ), '%H:%i:%s' ) AS create_time")
"data_date AS create_time")
.lambda()
.eq(StringUtils.isNotBlank(plantId), PlantPredictedPowerDataEnt::getPlantId, plantId)
.in(PlantPredictedPowerDataEnt::getPlantId, plantIds)
......
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