完成综合评估算法

This commit is contained in:
wr
2025-03-19 16:31:03 +08:00
parent a72c956921
commit 0f54dc5199
74 changed files with 3580 additions and 249 deletions

View File

@@ -0,0 +1,55 @@
package com.njcn.dataProcess.controller;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.constant.OperateType;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.dataProcess.annotation.InsertBean;
import com.njcn.dataProcess.annotation.QueryBean;
import com.njcn.dataProcess.pojo.dto.DataComassesDPO;
import com.njcn.dataProcess.service.IDataComAss;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @author hongawen
* @version 1.0
* @data 2024/11/6 19:48
*/
@Validated
@Slf4j
@Controller
@RestController
@RequestMapping("/dataComAss")
@Api(tags = "综合评估数据")
public class DataComAssController extends BaseController {
@QueryBean
private IDataComAss dataComAssQuery;
@InsertBean
private IDataComAss dataComAssInsert;
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
@PostMapping("/batchInsertion")
@ApiOperation("批量插入")
public HttpResult<String> batchInsertion(@RequestBody List<DataComassesDPO> dataVDTOList) {
String methodDescribe = getMethodDescribe("batchInsertion");
dataComAssInsert.batchInsertion(dataVDTOList);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
}

View File

@@ -0,0 +1,58 @@
package com.njcn.dataProcess.controller;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.constant.OperateType;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.dataProcess.annotation.InsertBean;
import com.njcn.dataProcess.annotation.QueryBean;
import com.njcn.dataProcess.pojo.dto.DataPollutionD;
import com.njcn.dataProcess.service.IDataPollution;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author hongawen
* @version 1.0
* @data 2024/11/6 19:48
*/
@Validated
@Slf4j
@Controller
@RestController
@RequestMapping("/dataPollution")
@Api(tags = "污区图数据")
public class DataPollutionController extends BaseController {
@QueryBean
private IDataPollution dataPollutionQuery;
@InsertBean
private IDataPollution dataPollutionInsert;
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
@PostMapping("/batchInsertion")
@ApiOperation("批量插入")
public HttpResult<String> batchInsertion(@RequestBody List<DataPollutionD> dataIDTOList) {
String methodDescribe = getMethodDescribe("batchInsertion");
dataPollutionInsert.batchInsertion(dataIDTOList);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
}

View File

@@ -0,0 +1,15 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.njcn.dataProcess.pojo.po.RMpPollutionD;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
/**
* @Description: 监测点污区图统计日表 Mapper 接口
* @Author: wr
* @Date: 2025/3/19 14:30
*/
public interface RMpPollutionDMapper extends MppBaseMapper<RMpPollutionD> {
}

View File

@@ -0,0 +1,16 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RStatComassesDPO;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataComAssMapper extends MppBaseMapper<RStatComassesDPO> {
}

View File

@@ -0,0 +1,15 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgD;
/**
* @Description: 单位污区图统计日表 Mapper 接口
* @Author: wr
* @Date: 2025/3/19 14:30
*/
public interface RStatPollutionOrgDMapper extends MppBaseMapper<RStatPollutionOrgD> {
}

View File

@@ -0,0 +1,13 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgM;
/**
* @Description: 单位污区图统计月表 Mapper 接口
* @Author: wr
* @Date: 2025/3/19 14:30
*/
public interface RStatPollutionOrgMMapper extends MppBaseMapper<RStatPollutionOrgM> {
}

View File

@@ -0,0 +1,14 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgQ;
/**
* @Description: 单位污区图统计季表 Mapper 接口
* @Author: wr
* @Date: 2025/3/19 14:31
*/
public interface RStatPollutionOrgQMapper extends MppBaseMapper<RStatPollutionOrgQ> {
}

View File

@@ -0,0 +1,13 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgY;
/**
* @Description: 单位污区图统计年表 Mapper 接口
* @Author: wr
* @Date: 2025/3/19 14:31
*/
public interface RStatPollutionOrgYMapper extends MppBaseMapper<RStatPollutionOrgY> {
}

View File

@@ -0,0 +1,14 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationD;
/**
* @Description: 变电站污区图统计日表 Mapper 接口
* @Author: wr
* @Date: 2025/3/19 14:31
*/
public interface RStatPollutionSubstationDMapper extends MppBaseMapper<RStatPollutionSubstationD> {
}

View File

@@ -0,0 +1,14 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationM;
/**
* @Description: 变电站污区图统计月表 Mapper 接口
* @Author: wr
* @Date: 2025/3/19 14:31
*/
public interface RStatPollutionSubstationMMapper extends MppBaseMapper<RStatPollutionSubstationM> {
}

View File

@@ -0,0 +1,13 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationQ;
/**
* @Description: 变电站污区图统计季表 Mapper 接口
* @Author: wr
* @Date: 2025/3/19 14:31
*/
public interface RStatPollutionSubstationQMapper extends MppBaseMapper<RStatPollutionSubstationQ> {
}

View File

@@ -0,0 +1,13 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationY;
/**
* @Description: 变电站污区图统计年表 Mapper 接口
* @Author: wr
* @Date: 2025/3/19 14:31
*/
public interface RStatPollutionSubstationYMapper extends MppBaseMapper<RStatPollutionSubstationY> {
}

View File

@@ -0,0 +1,23 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.dto.DataPollutionD;
import com.njcn.dataProcess.pojo.po.RMpPollutionD;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:40
*/
public interface IDataPollution extends IMppService<RMpPollutionD> {
/**
* 批量插入数据
* @param pollutionList
*/
void batchInsertion(List<DataPollutionD> pollutionList);
}

View File

@@ -0,0 +1,14 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgD;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:40
*/
public interface IDataPollutionOrgD extends IMppService<RStatPollutionOrgD> {
}

View File

@@ -0,0 +1,14 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgM;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:40
*/
public interface IDataPollutionOrgM extends IMppService<RStatPollutionOrgM> {
}

View File

@@ -0,0 +1,14 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgQ;
/**
* @author hongawen
* @version 1.0
* @data 2024/11/7 10:54
*/
public interface IDataPollutionOrgQ extends IMppService<RStatPollutionOrgQ> {
}

View File

@@ -0,0 +1,14 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgY;
/**
* @author hongawen
* @version 1.0
* @data 2024/11/7 10:54
*/
public interface IDataPollutionOrgY extends IMppService<RStatPollutionOrgY> {
}

View File

@@ -0,0 +1,14 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationD;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:41
*/
public interface IDataPollutionSubstationD extends IMppService<RStatPollutionSubstationD> {
}

View File

@@ -0,0 +1,14 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationM;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:41
*/
public interface IDataPollutionSubstationM extends IMppService<RStatPollutionSubstationM> {
}

View File

@@ -0,0 +1,14 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationQ;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:41
*/
public interface IDataPollutionSubstationQ extends IMppService<RStatPollutionSubstationQ> {
}

View File

@@ -0,0 +1,14 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationY;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:41
*/
public interface IDataPollutionSubstationY extends IMppService<RStatPollutionSubstationY> {
}

View File

@@ -2,7 +2,6 @@ package com.njcn.dataProcess.service;
import com.njcn.dataProcess.dto.RmpEventDetailDTO;
import com.njcn.dataProcess.param.LineCountEvaluateParam;
import com.njcn.dataProcess.pojo.dto.PqsCommunicateDto;
import java.util.List;

View File

@@ -0,0 +1,26 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatDataComAssMapper;
import com.njcn.dataProcess.pojo.dto.DataComassesDPO;
import com.njcn.dataProcess.pojo.po.RStatComassesDPO;
import com.njcn.dataProcess.service.IDataComAss;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author hongawen
* @version 1.0
* @data 2024/11/7 11:02
*/
@Service("InfluxdbDataComAssImpl")
public class InfluxdbDataComAssImpl extends MppServiceImpl<RStatDataComAssMapper, RStatComassesDPO> implements IDataComAss {
@Override
public void batchInsertion(List<DataComassesDPO> limitQualifiedList) {
}
}

View File

@@ -48,7 +48,7 @@ public class InfluxdbDataFlickerImpl extends MppServiceImpl<RStatDataFlickerRela
@Override
public void batchInsertion(List<DataFlickerDTO> dataFlickerDTOList) {
int totalCount = dataFlickerDTOList.size();
if(totalCount<=0){
if (totalCount <= 0) {
return;
}
@@ -68,9 +68,9 @@ public class InfluxdbDataFlickerImpl extends MppServiceImpl<RStatDataFlickerRela
public List<DataFlickerDto> getRawData(LineCountEvaluateParam lineParam) {
List<DataFlickerDto> result = new ArrayList<>();
List<DataFlicker> list = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(), lineParam.getAbnormalTime());
list.forEach(item->{
list.forEach(item -> {
DataFlickerDto dto = new DataFlickerDto();
BeanUtils.copyProperties(item,dto);
BeanUtils.copyProperties(item, dto);
dto.setMinTime(DATE_TIME_FORMATTER.format(item.getTime()));
result.add(dto);
});
@@ -80,20 +80,20 @@ public class InfluxdbDataFlickerImpl extends MppServiceImpl<RStatDataFlickerRela
@Override
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
List<CommonMinuteDto> result = new ArrayList<>();
List<DataFlicker> dataIList = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
List<DataFlicker> dataIList = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(), lineParam.getAbnormalTime());
if (CollectionUtil.isNotEmpty(dataIList)) {
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
//以监测点分组
Map<String,List<DataFlicker>> lineMap = dataIList.stream().collect(Collectors.groupingBy(DataFlicker::getLineId));
lineMap.forEach((line,lineList)->{
Map<String, List<DataFlicker>> lineMap = dataIList.stream().collect(Collectors.groupingBy(DataFlicker::getLineId));
lineMap.forEach((line, lineList) -> {
CommonMinuteDto dto = new CommonMinuteDto();
dto.setLineId(line);
dto.setTime(time);
dto.setQualityFlag(lineList.get(0).getQualityFlag());
//以相别分组
Map<String,List<DataFlicker>> phasicTypeMap = lineList.stream().collect(Collectors.groupingBy(DataFlicker::getPhasicType));
Map<String, List<DataFlicker>> phasicTypeMap = lineList.stream().collect(Collectors.groupingBy(DataFlicker::getPhasicType));
List<CommonMinuteDto.PhasicType> phasicTypes = new ArrayList<>();
phasicTypeMap.forEach((phasicType,phasicTypeList)->{
phasicTypeMap.forEach((phasicType, phasicTypeList) -> {
CommonMinuteDto.PhasicType type = new CommonMinuteDto.PhasicType();
type.setPhasicType(phasicType);
@@ -106,7 +106,7 @@ public class InfluxdbDataFlickerImpl extends MppServiceImpl<RStatDataFlickerRela
List<Double> data2 = phasicTypeList.stream().map(DataFlicker::getPlt).collect(Collectors.toList());
List<Double> data3 = phasicTypeList.stream().map(DataFlicker::getPst).collect(Collectors.toList());
List<List<Double>> lists = Arrays.asList(data1,data2,data3);
List<List<Double>> lists = Arrays.asList(data1, data2, data3);
value.setValueList(lists);
valueTypes.add(value);
@@ -139,10 +139,10 @@ public class InfluxdbDataFlickerImpl extends MppServiceImpl<RStatDataFlickerRela
influxQueryWrapper.regular(DataFlicker::getPhasicType, lineParam.getPhasicType());
}
if (ObjectUtil.isNotEmpty(lineParam.getGe())) {
influxQueryWrapper.ge(lineParam.getColumnName(), lineParam.getGe());
influxQueryWrapper.ge(lineParam.getColumnName(), Double.parseDouble(lineParam.getGe()));
}
if (ObjectUtil.isNotEmpty(lineParam.getLt())) {
influxQueryWrapper.lt(lineParam.getColumnName(), lineParam.getLt());
influxQueryWrapper.lt(lineParam.getColumnName(), Double.parseDouble(lineParam.getLt()));
}
List<DataFlicker> dataFlickers = dataFlickerMapper.selectByQueryWrapper(influxQueryWrapper);
return dataFlickers.size();
@@ -156,7 +156,7 @@ public class InfluxdbDataFlickerImpl extends MppServiceImpl<RStatDataFlickerRela
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
*/
public List<DataFlicker> getMinuteData(List<String> lineList, String startTime, String endTime, Map<String,List<String>> timeMap) {
public List<DataFlicker> getMinuteData(List<String> lineList, String startTime, String endTime, Map<String, List<String>> timeMap) {
List<DataFlicker> result = new ArrayList<>();
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataFlicker.class);
influxQueryWrapper.regular(DataFlicker::getLineId, lineList)
@@ -167,12 +167,12 @@ public class InfluxdbDataFlickerImpl extends MppServiceImpl<RStatDataFlickerRela
.select(DataFlicker::getPlt)
.select(DataFlicker::getQualityFlag)
.between(DataFlicker::getTime, startTime, endTime)
.eq(DataFlicker::getQualityFlag,"0");
.eq(DataFlicker::getQualityFlag, "0");
List<DataFlicker> list = dataFlickerMapper.selectByQueryWrapper(influxQueryWrapper);
Map<String,List<DataFlicker>> lineMap = list.stream().collect(Collectors.groupingBy(DataFlicker::getLineId));
Map<String, List<DataFlicker>> lineMap = list.stream().collect(Collectors.groupingBy(DataFlicker::getLineId));
//有异常数据
if (CollectionUtil.isNotEmpty(timeMap)) {
lineMap.forEach((k,v)->{
lineMap.forEach((k, v) -> {
List<String> timeList = timeMap.get(k);
//有异常数据,当前监测点自身的异常数据
if (CollectionUtil.isNotEmpty(timeList)) {

View File

@@ -0,0 +1,28 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RMpPollutionDMapper;
import com.njcn.dataProcess.pojo.dto.DataPollutionD;
import com.njcn.dataProcess.pojo.po.RMpPollutionD;
import com.njcn.dataProcess.service.IDataPollution;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("InfluxdbDataPollutionImpl")
@RequiredArgsConstructor
public class InfluxdbDataPollutionImpl extends MppServiceImpl<RMpPollutionDMapper, RMpPollutionD> implements IDataPollution {
@Override
public void batchInsertion(List<DataPollutionD> pollutionList) {
}
}

View File

@@ -0,0 +1,23 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionOrgDMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgD;
import com.njcn.dataProcess.service.IDataPollutionOrgD;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("InfluxdbDataPollutionOrgDImpl")
@RequiredArgsConstructor
public class InfluxdbDataPollutionOrgDImpl extends MppServiceImpl<RStatPollutionOrgDMapper, RStatPollutionOrgD> implements IDataPollutionOrgD {
}

View File

@@ -0,0 +1,23 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionOrgMMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgM;
import com.njcn.dataProcess.service.IDataPollutionOrgM;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("InfluxdbDataPollutionOrgMImpl")
@RequiredArgsConstructor
public class InfluxdbDataPollutionOrgMImpl extends MppServiceImpl<RStatPollutionOrgMMapper, RStatPollutionOrgM> implements IDataPollutionOrgM {
}

View File

@@ -0,0 +1,23 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionOrgQMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgQ;
import com.njcn.dataProcess.service.IDataPollutionOrgQ;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("InfluxdbDataPollutionOrgQImpl")
@RequiredArgsConstructor
public class InfluxdbDataPollutionOrgQImpl extends MppServiceImpl<RStatPollutionOrgQMapper, RStatPollutionOrgQ> implements IDataPollutionOrgQ {
}

View File

@@ -0,0 +1,23 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionOrgYMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgY;
import com.njcn.dataProcess.service.IDataPollutionOrgY;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("InfluxdbDataPollutionOrgYImpl")
@RequiredArgsConstructor
public class InfluxdbDataPollutionOrgYImpl extends MppServiceImpl<RStatPollutionOrgYMapper, RStatPollutionOrgY> implements IDataPollutionOrgY {
}

View File

@@ -0,0 +1,22 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionSubstationDMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationD;
import com.njcn.dataProcess.service.IDataPollutionSubstationD;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("InfluxdbDataPollutionSubstationDImpl")
@RequiredArgsConstructor
public class InfluxdbDataPollutionSubstationDImpl extends MppServiceImpl<RStatPollutionSubstationDMapper, RStatPollutionSubstationD> implements IDataPollutionSubstationD {
}

View File

@@ -0,0 +1,22 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionSubstationMMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationM;
import com.njcn.dataProcess.service.IDataPollutionSubstationM;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("InfluxdbDataPollutionSubstationMImpl")
@RequiredArgsConstructor
public class InfluxdbDataPollutionSubstationMImpl extends MppServiceImpl<RStatPollutionSubstationMMapper, RStatPollutionSubstationM> implements IDataPollutionSubstationM {
}

View File

@@ -0,0 +1,22 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionSubstationQMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationQ;
import com.njcn.dataProcess.service.IDataPollutionSubstationQ;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("InfluxdbDataPollutionSubstationQImpl")
@RequiredArgsConstructor
public class InfluxdbDataPollutionSubstationQImpl extends MppServiceImpl<RStatPollutionSubstationQMapper, RStatPollutionSubstationQ> implements IDataPollutionSubstationQ {
}

View File

@@ -0,0 +1,22 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionSubstationYMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationY;
import com.njcn.dataProcess.service.IDataPollutionSubstationY;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("InfluxdbDataPollutionSubstationYImpl")
@RequiredArgsConstructor
public class InfluxdbDataPollutionSubstationYImpl extends MppServiceImpl<RStatPollutionSubstationYMapper, RStatPollutionSubstationY> implements IDataPollutionSubstationY {
}

View File

@@ -186,10 +186,10 @@ public class InfluxdbDataVImpl extends MppServiceImpl<RStatDataVRelationMapper,
influxQueryWrapper.regular(DataV::getValueType, lineParam.getValueType());
}
if (ObjectUtil.isNotEmpty(lineParam.getGe())) {
influxQueryWrapper.ge(lineParam.getColumnName(), lineParam.getGe());
influxQueryWrapper.ge(lineParam.getColumnName(), Double.parseDouble(lineParam.getGe()));
}
if (ObjectUtil.isNotEmpty(lineParam.getLt())) {
influxQueryWrapper.lt(lineParam.getColumnName(), lineParam.getLt());
influxQueryWrapper.lt(lineParam.getColumnName(), Double.parseDouble(lineParam.getLt()));
}
List<DataV> dataVS = dataVMapper.selectByQueryWrapper(influxQueryWrapper);
return dataVS.size();

View File

@@ -0,0 +1,36 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatDataComAssMapper;
import com.njcn.dataProcess.pojo.dto.DataComassesDPO;
import com.njcn.dataProcess.pojo.po.RStatComassesDPO;
import com.njcn.dataProcess.pojo.po.RStatLimitRateDetailD;
import com.njcn.dataProcess.service.IDataComAss;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 10:15
*/
@Service("RelationDataComAssImpl")
@RequiredArgsConstructor
public class RelationDataComAssImpl extends MppServiceImpl<RStatDataComAssMapper, RStatComassesDPO> implements IDataComAss {
@Override
public void batchInsertion(List<DataComassesDPO> limitQualifiedList) {
List<RStatComassesDPO> result = new ArrayList<>();
limitQualifiedList.forEach(item->{
RStatComassesDPO limitRate = new RStatComassesDPO();
BeanUtils.copyProperties(item, limitRate);
result.add(limitRate);
});
this.saveOrUpdateBatchByMultiId(result);
}
}

View File

@@ -0,0 +1,37 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RMpPollutionDMapper;
import com.njcn.dataProcess.pojo.dto.DataPollutionD;
import com.njcn.dataProcess.pojo.po.RMpPollutionD;
import com.njcn.dataProcess.pojo.po.RStatLimitRateD;
import com.njcn.dataProcess.service.IDataPollution;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("RelationDataPollutionImpl")
@RequiredArgsConstructor
public class RelationDataPollutionImpl extends MppServiceImpl<RMpPollutionDMapper, RMpPollutionD> implements IDataPollution {
@Override
public void batchInsertion(List<DataPollutionD> pollutionList) {
List<RMpPollutionD> result = new ArrayList<>();
pollutionList.forEach(item->{
RMpPollutionD limitRate = new RMpPollutionD();
BeanUtils.copyProperties(item, limitRate);
result.add(limitRate);
});
this.saveOrUpdateBatchByMultiId(result);
}
}

View File

@@ -0,0 +1,23 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionOrgDMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgD;
import com.njcn.dataProcess.service.IDataPollutionOrgD;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("RelationDataPollutionOrgDImpl")
@RequiredArgsConstructor
public class RelationDataPollutionOrgDImpl extends MppServiceImpl<RStatPollutionOrgDMapper, RStatPollutionOrgD> implements IDataPollutionOrgD {
}

View File

@@ -0,0 +1,23 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionOrgMMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgM;
import com.njcn.dataProcess.service.IDataPollutionOrgM;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("RelationDataPollutionOrgMImpl")
@RequiredArgsConstructor
public class RelationDataPollutionOrgMImpl extends MppServiceImpl<RStatPollutionOrgMMapper, RStatPollutionOrgM> implements IDataPollutionOrgM {
}

View File

@@ -0,0 +1,23 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionOrgQMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgQ;
import com.njcn.dataProcess.service.IDataPollutionOrgQ;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("RelationDataPollutionOrgQImpl")
@RequiredArgsConstructor
public class RelationDataPollutionOrgQImpl extends MppServiceImpl<RStatPollutionOrgQMapper, RStatPollutionOrgQ> implements IDataPollutionOrgQ {
}

View File

@@ -0,0 +1,23 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionOrgYMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionOrgY;
import com.njcn.dataProcess.service.IDataPollutionOrgY;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("RelationDataPollutionOrgYImpl")
@RequiredArgsConstructor
public class RelationDataPollutionOrgYImpl extends MppServiceImpl<RStatPollutionOrgYMapper, RStatPollutionOrgY> implements IDataPollutionOrgY {
}

View File

@@ -0,0 +1,22 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionSubstationDMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationD;
import com.njcn.dataProcess.service.IDataPollutionSubstationD;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("RelationDataPollutionSubstationDImpl")
@RequiredArgsConstructor
public class RelationDataPollutionSubstationDImpl extends MppServiceImpl<RStatPollutionSubstationDMapper, RStatPollutionSubstationD> implements IDataPollutionSubstationD {
}

View File

@@ -0,0 +1,22 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionSubstationMMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationM;
import com.njcn.dataProcess.service.IDataPollutionSubstationM;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("RelationDataPollutionSubstationMImpl")
@RequiredArgsConstructor
public class RelationDataPollutionSubstationMImpl extends MppServiceImpl<RStatPollutionSubstationMMapper, RStatPollutionSubstationM> implements IDataPollutionSubstationM {
}

View File

@@ -0,0 +1,22 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionSubstationQMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationQ;
import com.njcn.dataProcess.service.IDataPollutionSubstationQ;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("RelationDataPollutionSubstationQImpl")
@RequiredArgsConstructor
public class RelationDataPollutionSubstationQImpl extends MppServiceImpl<RStatPollutionSubstationQMapper, RStatPollutionSubstationQ> implements IDataPollutionSubstationQ {
}

View File

@@ -0,0 +1,22 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RStatPollutionSubstationYMapper;
import com.njcn.dataProcess.pojo.po.RStatPollutionSubstationY;
import com.njcn.dataProcess.service.IDataPollutionSubstationY;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/19 14:44
*/
@Service("RelationDataPollutionSubstationYImpl")
@RequiredArgsConstructor
public class RelationDataPollutionSubstationYImpl extends MppServiceImpl<RStatPollutionSubstationYMapper, RStatPollutionSubstationY> implements IDataPollutionSubstationY {
}