1.调整河北pms国网上送主配网逻辑
2.技术监督调整
This commit is contained in:
@@ -142,7 +142,7 @@ public class SubStationExecutor extends BaseExecutor{
|
||||
String tag = bindCmp.getTag();
|
||||
CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
|
||||
if (tag.equalsIgnoreCase("r_upload_substation_statistical_data_d")) {
|
||||
//日表
|
||||
//月表
|
||||
rUploadSubstationStatisticalDataDService.insertSubStatisticalDataDay(bindCmp.getRequestData());
|
||||
} else if (tag.equalsIgnoreCase("r_upload_substation_statistical_data_m")) {
|
||||
//数据补招不执行非日表算法
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
//import com.njcn.common.pojo.response.HttpResult;
|
||||
//import com.njcn.common.utils.HttpResultUtil;
|
||||
//import com.njcn.prepare.harmonic.pojo.param.SuperviseParam;
|
||||
//import com.njcn.process.pojo.param.SuperviseParam;
|
||||
//
|
||||
//import com.njcn.web.controller.BaseController;
|
||||
//import io.swagger.annotations.Api;
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
round(avg(coverage_rate),4) coverageRate,
|
||||
case when avg(run_substation_num) = 0 then 0 else round(avg(monitor_substaion_num)/avg(run_substation_num)*100,4) end monitoringRate,
|
||||
#{monthDate} statisticalDate,
|
||||
'02' statisticalType,
|
||||
#{monthDate} statisticalMonth,
|
||||
'01' statisticalType,
|
||||
0 uploadStatus
|
||||
from
|
||||
r_upload_substation_statistical_data_d
|
||||
@@ -33,4 +34,4 @@
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -1,71 +1,70 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.line;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.line.ThsOverRunLogMapper;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.line.ThsSuperviseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.param.SuperviseParam;
|
||||
import com.njcn.prepare.harmonic.pojo.po.ThsOverRunLog;
|
||||
import com.njcn.prepare.harmonic.pojo.po.ThsSupervise;
|
||||
import com.njcn.prepare.harmonic.pojo.vo.SuperviceRunLogVo;
|
||||
import com.njcn.prepare.harmonic.service.mysql.line.ThsOverRunLogService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 告警/预警监测点列表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author lxp
|
||||
* @since 2023-03-16
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
@DS("process")
|
||||
public class ThsOverRunLogServiceImpl extends ServiceImpl<ThsOverRunLogMapper, ThsOverRunLog> implements ThsOverRunLogService {
|
||||
@Autowired
|
||||
private ThsOverRunLogMapper thsOverRunLogMapper;
|
||||
@Autowired
|
||||
private ThsSuperviseMapper thsSuperviseMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveOverRunLog(SuperviseParam superviseParam) {
|
||||
this.saveBatch(superviseParam.getOverRunLog());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuperviceRunLogVo superviseDetail(String supIndex) {
|
||||
ThsSupervise thsSupervise = thsSuperviseMapper.selectOne(new LambdaQueryWrapper<ThsSupervise>().eq(ThsSupervise::getSupIndex, supIndex));
|
||||
List<ThsOverRunLog> thsOverRunLogs = thsOverRunLogMapper.selectList(new LambdaQueryWrapper<ThsOverRunLog>().eq(ThsOverRunLog::getSupIndex, supIndex));
|
||||
SuperviceRunLogVo superviceRunLogVo = new SuperviceRunLogVo();
|
||||
superviceRunLogVo.setThsSupervise(thsSupervise);
|
||||
superviceRunLogVo.setOverRunLog(thsOverRunLogs);
|
||||
return superviceRunLogVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult updateSupervise(SuperviseParam superviseParam) {
|
||||
List<ThsOverRunLog> overRunLog = superviseParam.getOverRunLog();
|
||||
if (CollectionUtil.isEmpty(overRunLog)) {
|
||||
HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, "监测点不能为空", null);
|
||||
}
|
||||
List<ThsOverRunLog> thsOverRunLogs = thsOverRunLogMapper.selectList(new LambdaQueryWrapper<ThsOverRunLog>().eq(ThsOverRunLog::getSupIndex, superviseParam.getSupIndex()));
|
||||
List<String> saveIds = superviseParam.getOverRunLog().stream().map(ThsOverRunLog::getId).collect(Collectors.toList());
|
||||
List<String> allIds = thsOverRunLogs.stream().map(ThsOverRunLog::getId).collect(Collectors.toList());
|
||||
allIds.removeAll(saveIds);
|
||||
thsOverRunLogMapper.delete(new LambdaQueryWrapper<ThsOverRunLog>().in(ThsOverRunLog::getId, allIds));
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, null);
|
||||
}
|
||||
}
|
||||
//package com.njcn.prepare.harmonic.service.mysql.Impl.line;
|
||||
//
|
||||
//import cn.hutool.core.collection.CollectionUtil;
|
||||
//import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
//import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
//import com.njcn.common.pojo.response.HttpResult;
|
||||
//import com.njcn.common.utils.HttpResultUtil;
|
||||
//import com.njcn.prepare.harmonic.mapper.mysql.line.ThsOverRunLogMapper;
|
||||
//import com.njcn.prepare.harmonic.mapper.mysql.line.ThsSuperviseMapper;
|
||||
//import com.njcn.process.pojo.param.SuperviseParam;
|
||||
//import com.njcn.process.pojo.po.ThsOverRunLog;
|
||||
//import com.njcn.process.pojo.po.ThsSupervise;
|
||||
//import com.njcn.prepare.harmonic.service.mysql.line.ThsOverRunLogService;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//import org.springframework.transaction.annotation.Transactional;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
///**
|
||||
// * <p>
|
||||
// * 告警/预警监测点列表 服务实现类
|
||||
// * </p>
|
||||
// *
|
||||
// * @author lxp
|
||||
// * @since 2023-03-16
|
||||
// */
|
||||
//@Service
|
||||
//@Slf4j
|
||||
//@DS("process")
|
||||
//public class ThsOverRunLogServiceImpl extends ServiceImpl<ThsOverRunLogMapper, ThsOverRunLog> implements ThsOverRunLogService {
|
||||
// @Autowired
|
||||
// private ThsOverRunLogMapper thsOverRunLogMapper;
|
||||
// @Autowired
|
||||
// private ThsSuperviseMapper thsSuperviseMapper;
|
||||
//
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public void saveOverRunLog(SuperviseParam superviseParam) {
|
||||
// this.saveBatch(superviseParam.getOverRunLog());
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public SuperviceRunLogVo superviseDetail(String supIndex) {
|
||||
// ThsSupervise thsSupervise = thsSuperviseMapper.selectOne(new LambdaQueryWrapper<ThsSupervise>().eq(ThsSupervise::getSupIndex, supIndex));
|
||||
// List<ThsOverRunLog> thsOverRunLogs = thsOverRunLogMapper.selectList(new LambdaQueryWrapper<ThsOverRunLog>().eq(ThsOverRunLog::getSupIndex, supIndex));
|
||||
// SuperviceRunLogVo superviceRunLogVo = new SuperviceRunLogVo();
|
||||
// superviceRunLogVo.setThsSupervise(thsSupervise);
|
||||
// superviceRunLogVo.setOverRunLog(thsOverRunLogs);
|
||||
// return superviceRunLogVo;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public HttpResult updateSupervise(SuperviseParam superviseParam) {
|
||||
// List<ThsOverRunLog> overRunLog = superviseParam.getOverRunLog();
|
||||
// if (CollectionUtil.isEmpty(overRunLog)) {
|
||||
// HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, "监测点不能为空", null);
|
||||
// }
|
||||
// List<ThsOverRunLog> thsOverRunLogs = thsOverRunLogMapper.selectList(new LambdaQueryWrapper<ThsOverRunLog>().eq(ThsOverRunLog::getSupIndex, superviseParam.getSupIndex()));
|
||||
// List<String> saveIds = superviseParam.getOverRunLog().stream().map(ThsOverRunLog::getId).collect(Collectors.toList());
|
||||
// List<String> allIds = thsOverRunLogs.stream().map(ThsOverRunLog::getId).collect(Collectors.toList());
|
||||
// allIds.removeAll(saveIds);
|
||||
// thsOverRunLogMapper.delete(new LambdaQueryWrapper<ThsOverRunLog>().in(ThsOverRunLog::getId, allIds));
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, null);
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
//import com.njcn.oss.utils.FileStorageUtil;
|
||||
//import com.njcn.prepare.enums.*;
|
||||
//import com.njcn.prepare.harmonic.mapper.mysql.line.*;
|
||||
//import com.njcn.prepare.harmonic.pojo.param.SuperviseParam;
|
||||
//import com.njcn.prepare.harmonic.pojo.po.ThsOverRunLog;
|
||||
//import com.njcn.prepare.harmonic.pojo.po.ThsSupervise;
|
||||
//import com.njcn.process.pojo.param.SuperviseParam;
|
||||
//import com.njcn.process.pojo.po.ThsOverRunLog;
|
||||
//import com.njcn.process.pojo.po.ThsSupervise;
|
||||
//import com.njcn.prepare.harmonic.pojo.vo.SuperviceRunLogVo;
|
||||
//import com.njcn.prepare.harmonic.service.mysql.day.IRStatLimitRateDService;
|
||||
//import com.njcn.prepare.harmonic.service.mysql.line.ThsSuperviseService;
|
||||
|
||||
@@ -63,9 +63,9 @@ public class StationBusBarReportServiceImpl extends MppServiceImpl<StationBusBar
|
||||
Map<String, List<RStatDataVDPO>> vMap = rStatDataVDPOList.stream().collect(Collectors.groupingBy(RStatDataVDPO::getValueType));
|
||||
if (vMap.containsKey("MAX")) {
|
||||
List<RStatDataVDPO> maxList = vMap.get("MAX");
|
||||
Double rms = maxList.stream().filter(item -> !item.getPhasicType().equals("T")).map(RStatDataVDPO::getRms).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double thd = maxList.stream().filter(item -> item.getPhasicType().equals("T")).map(RStatDataVDPO::getVThd).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double un = maxList.stream().filter(item -> item.getPhasicType().equals("T")).map(RStatDataVDPO::getVUnbalance).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double rms = maxList.stream().filter(item -> !item.getPhasicType().equals("A")).map(RStatDataVDPO::getRms).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double thd = maxList.stream().filter(item -> item.getPhasicType().equals("A")).map(RStatDataVDPO::getVThd).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double un = maxList.stream().filter(item -> item.getPhasicType().equals("A")).map(RStatDataVDPO::getVUnbalance).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
rStatBusbarHarmonicYPO.setVEffectiveMax(rms);
|
||||
rStatBusbarHarmonicYPO.setVThdMax(thd);
|
||||
rStatBusbarHarmonicYPO.setUnbalanceMax(un);
|
||||
@@ -77,9 +77,9 @@ public class StationBusBarReportServiceImpl extends MppServiceImpl<StationBusBar
|
||||
|
||||
if (vMap.containsKey("MIN")) {
|
||||
List<RStatDataVDPO> maxList = vMap.get("MIN");
|
||||
Double rms = maxList.stream().filter(item -> !item.getPhasicType().equals("T")).map(RStatDataVDPO::getRms).min(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double thd = maxList.stream().filter(item -> item.getPhasicType().equals("T")).map(RStatDataVDPO::getVThd).min(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double un = maxList.stream().filter(item -> item.getPhasicType().equals("T")).map(RStatDataVDPO::getVUnbalance).min(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double rms = maxList.stream().filter(item -> !item.getPhasicType().equals("A")).map(RStatDataVDPO::getRms).min(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double thd = maxList.stream().filter(item -> item.getPhasicType().equals("A")).map(RStatDataVDPO::getVThd).min(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double un = maxList.stream().filter(item -> item.getPhasicType().equals("A")).map(RStatDataVDPO::getVUnbalance).min(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
rStatBusbarHarmonicYPO.setVEffectiveMin(rms);
|
||||
rStatBusbarHarmonicYPO.setVThdMin(thd);
|
||||
rStatBusbarHarmonicYPO.setUnbalanceMin(un);
|
||||
@@ -91,9 +91,9 @@ public class StationBusBarReportServiceImpl extends MppServiceImpl<StationBusBar
|
||||
|
||||
if (vMap.containsKey("AVG")) {
|
||||
List<RStatDataVDPO> maxList = vMap.get("AVG");
|
||||
Double rms = maxList.stream().filter(item -> !item.getPhasicType().equals("T")).mapToDouble(RStatDataVDPO::getRms).average().orElse(3.14159);
|
||||
Double thd = maxList.stream().filter(item -> item.getPhasicType().equals("T")).mapToDouble(RStatDataVDPO::getVThd).average().orElse(3.14159);
|
||||
Double un = maxList.stream().filter(item -> item.getPhasicType().equals("T")).mapToDouble(RStatDataVDPO::getVUnbalance).average().orElse(3.14159);
|
||||
Double rms = maxList.stream().filter(item -> !item.getPhasicType().equals("A")).mapToDouble(RStatDataVDPO::getRms).average().orElse(3.14159);
|
||||
Double thd = maxList.stream().filter(item -> item.getPhasicType().equals("A")).mapToDouble(RStatDataVDPO::getVThd).average().orElse(3.14159);
|
||||
Double un = maxList.stream().filter(item -> item.getPhasicType().equals("A")).mapToDouble(RStatDataVDPO::getVUnbalance).average().orElse(3.14159);
|
||||
rStatBusbarHarmonicYPO.setVEffectiveAvg(rms);
|
||||
rStatBusbarHarmonicYPO.setVThdAvg(thd);
|
||||
rStatBusbarHarmonicYPO.setUnbalanceAvg(un);
|
||||
@@ -105,9 +105,9 @@ public class StationBusBarReportServiceImpl extends MppServiceImpl<StationBusBar
|
||||
|
||||
if (vMap.containsKey("CP95")) {
|
||||
List<RStatDataVDPO> cp95List = vMap.get("CP95");
|
||||
Double rms = cp95List.stream().filter(item -> !item.getPhasicType().equals("T")).map(RStatDataVDPO::getRms).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double thd = cp95List.stream().filter(item -> item.getPhasicType().equals("T")).map(RStatDataVDPO::getVThd).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double un = cp95List.stream().filter(item -> item.getPhasicType().equals("T")).map(RStatDataVDPO::getVUnbalance).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double rms = cp95List.stream().filter(item -> !item.getPhasicType().equals("A")).map(RStatDataVDPO::getRms).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double thd = cp95List.stream().filter(item -> item.getPhasicType().equals("A")).map(RStatDataVDPO::getVThd).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double un = cp95List.stream().filter(item -> item.getPhasicType().equals("A")).map(RStatDataVDPO::getVUnbalance).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
rStatBusbarHarmonicYPO.setVEffective95(rms);
|
||||
rStatBusbarHarmonicYPO.setVThd95(thd);
|
||||
rStatBusbarHarmonicYPO.setUnbalance95(un);
|
||||
|
||||
@@ -1,43 +1,40 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.line;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.prepare.harmonic.pojo.param.SuperviseParam;
|
||||
import com.njcn.prepare.harmonic.pojo.po.ThsOverRunLog;
|
||||
import com.njcn.prepare.harmonic.pojo.vo.SuperviceRunLogVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 告警/预警监测点列表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author lxp
|
||||
* @since 2023-03-16
|
||||
*/
|
||||
public interface ThsOverRunLogService extends IService<ThsOverRunLog> {
|
||||
|
||||
/**
|
||||
* 保存技术监督监测点
|
||||
*
|
||||
* @param superviseParam
|
||||
* @return
|
||||
*/
|
||||
void saveOverRunLog(SuperviseParam superviseParam);
|
||||
|
||||
/**
|
||||
* 查询技术监督监测点集合
|
||||
*
|
||||
* @param supIndex
|
||||
* @return
|
||||
*/
|
||||
SuperviceRunLogVo superviseDetail(String supIndex);
|
||||
|
||||
/**
|
||||
* 更新技术监督
|
||||
*
|
||||
* @param superviseParam
|
||||
*/
|
||||
HttpResult updateSupervise(SuperviseParam superviseParam);
|
||||
}
|
||||
//package com.njcn.prepare.harmonic.service.mysql.line;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.extension.service.IService;
|
||||
//import com.njcn.common.pojo.response.HttpResult;
|
||||
//import com.njcn.process.pojo.param.SuperviseParam;
|
||||
//import com.njcn.process.pojo.po.ThsOverRunLog;
|
||||
//
|
||||
///**
|
||||
// * <p>
|
||||
// * 告警/预警监测点列表 服务类
|
||||
// * </p>
|
||||
// *
|
||||
// * @author lxp
|
||||
// * @since 2023-03-16
|
||||
// */
|
||||
//public interface ThsOverRunLogService extends IService<ThsOverRunLog> {
|
||||
//
|
||||
// /**
|
||||
// * 保存技术监督监测点
|
||||
// *
|
||||
// * @param superviseParam
|
||||
// * @return
|
||||
// */
|
||||
// void saveOverRunLog(SuperviseParam superviseParam);
|
||||
//
|
||||
// /**
|
||||
// * 查询技术监督监测点集合
|
||||
// *
|
||||
// * @param supIndex
|
||||
// * @return
|
||||
// */
|
||||
// SuperviceRunLogVo superviseDetail(String supIndex);
|
||||
//
|
||||
// /**
|
||||
// * 更新技术监督
|
||||
// *
|
||||
// * @param superviseParam
|
||||
// */
|
||||
// HttpResult updateSupervise(SuperviseParam superviseParam);
|
||||
//}
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
//import com.njcn.harmonic.pojo.vo.SourceSteadyIndicator;
|
||||
//import com.njcn.harmonic.pojo.vo.ThsStrategyVo;
|
||||
//import com.njcn.prepare.enums.TypeEnum;
|
||||
//import com.njcn.prepare.harmonic.pojo.param.SuperviseParam;
|
||||
//import com.njcn.prepare.harmonic.pojo.po.ThsOverRunLog;
|
||||
//import com.njcn.prepare.harmonic.pojo.po.ThsSupervise;
|
||||
//import com.njcn.process.pojo.param.SuperviseParam;
|
||||
//import com.njcn.process.pojo.po.ThsOverRunLog;
|
||||
//import com.njcn.process.pojo.po.ThsSupervise;
|
||||
//import com.njcn.process.pojo.po.ThsWarnStrategyAss;
|
||||
//import com.njcn.user.pojo.po.Dept;
|
||||
//
|
||||
|
||||
@@ -69,7 +69,7 @@ public class RStatLoadTypeServiceImpl implements RStatLoadTypeService {
|
||||
LocalDate localDate = LocalDateTimeUtil.parseDate(calculatedParam.getDataDate(), DatePattern.NORM_DATE_PATTERN);
|
||||
List<RStatLoadTypeDPO> result = new ArrayList<>();
|
||||
List<DictData> dataList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.MONITORING_LABELS.getCode()).getData();
|
||||
//过滤监测对象类型(陆上风电、分布式光伏、电气化铁路、其他非线性负荷)
|
||||
//过滤监测对象类型(陆上风电、光伏电站、电气化铁路、其他非线性负荷)
|
||||
Map<String, DictData> collect = dataList.stream().filter(temp -> Objects.equals(temp.getLevel(), 1)).collect(Collectors.toMap(DictData::getId, dictData -> dictData));
|
||||
|
||||
List<DictData> dataTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DATA_TYPE.getCode()).getData();
|
||||
|
||||
@@ -78,7 +78,7 @@ public class RUploadSubstationStatisticalDataDServiceImpl extends MppServiceImpl
|
||||
if (list.size() > 1){
|
||||
RUploadSubstationStatisticalDataD rUploadSubstationStatisticalDataD = new RUploadSubstationStatisticalDataD();
|
||||
rUploadSubstationStatisticalDataD.setId(IdUtil.simpleUUID());
|
||||
rUploadSubstationStatisticalDataD.setStatisticalDate(calculatedParam.getDataDate());
|
||||
rUploadSubstationStatisticalDataD.setStatisticalDate(DateUtil.format(DateUtil.parse(calculatedParam.getDataDate()),DatePattern.NORM_MONTH_PATTERN));
|
||||
rUploadSubstationStatisticalDataD.setStatisticalType(UploadEnum.STATISTICAL_TYPE_02.getCode());
|
||||
rUploadSubstationStatisticalDataD.setProvinceId(dept.getCode());
|
||||
rUploadSubstationStatisticalDataD.setProvinceName(dept.getName());
|
||||
@@ -116,11 +116,14 @@ public class RUploadSubstationStatisticalDataDServiceImpl extends MppServiceImpl
|
||||
//开始月份
|
||||
String beginMonth = DateUtil.format(DateUtil.beginOfMonth(DateUtil.parse(calculatedParam.getDataDate(), DatePattern.NORM_MONTH_PATTERN)), DatePattern.NORM_MONTH_PATTERN);
|
||||
//起始时间
|
||||
String startTime = DateUtil.format(DateUtil.beginOfMonth(DateUtil.parse(calculatedParam.getDataDate(), DatePattern.NORM_DATE_PATTERN)), DatePattern.NORM_DATE_PATTERN);
|
||||
String startTime = DateUtil.format(DateUtil.beginOfYear(DateUtil.parse(calculatedParam.getDataDate(), DatePattern.NORM_DATE_PATTERN)), DatePattern.NORM_DATE_PATTERN);
|
||||
//结束时间
|
||||
String endTime = DateUtil.format(DateUtil.endOfMonth(DateUtil.parse(calculatedParam.getDataDate(), DatePattern.NORM_DATE_PATTERN)), DatePattern.NORM_DATE_PATTERN);
|
||||
String endTime = DateUtil.format(DateUtil.endOfYear(DateUtil.parse(calculatedParam.getDataDate(), DatePattern.NORM_DATE_PATTERN)), DatePattern.NORM_DATE_PATTERN);
|
||||
//数据集
|
||||
List<RUploadSubstationStatisticalDataD> list = this.baseMapper.substationStatisticalMonthData(beginMonth,startTime,endTime);
|
||||
|
||||
|
||||
|
||||
if (CollUtil.isNotEmpty(list)){
|
||||
list.forEach(item->{
|
||||
item.setId(IdUtil.simpleUUID());
|
||||
|
||||
Reference in New Issue
Block a user