cvt算法
This commit is contained in:
@@ -7,7 +7,7 @@ import com.njcn.dataProcess.api.DataVFeignClient;
|
||||
import com.njcn.dataProcess.constant.InfluxDBTableConstant;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataVCvt;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDTO;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import com.njcn.device.pq.api.CvtRelationFeignClient;
|
||||
import com.njcn.device.pq.pojo.dto.CvtHarmonicCorrectionFactorsDTO;
|
||||
@@ -51,27 +51,23 @@ public class DataVCvtServiceImpl implements IDataVCvtService {
|
||||
lineCountEvaluateParam.setLineId(calculatedParam.getIdList());
|
||||
lineCountEvaluateParam.setEndTime(calculatedParam.getDataDate()+ InfluxDBTableConstant.END_TIME);
|
||||
lineCountEvaluateParam.setStartTime(calculatedParam.getDataDate()+ InfluxDBTableConstant.START_TIME);
|
||||
List<DataVCvt> data = dataVCvtFeignClient.getRawData(lineCountEvaluateParam).getData();
|
||||
Map<String, List<DataVCvt>> collect = data.stream().collect(Collectors.groupingBy(DataVCvt::getLineId));
|
||||
List<DataVCvtDTO> result = new ArrayList<>();
|
||||
List<DataVCvtDto> data = dataVCvtFeignClient.getRawData(lineCountEvaluateParam).getData();
|
||||
Map<String, List<DataVCvtDto>> collect = data.stream().collect(Collectors.groupingBy(DataVCvtDto::getLineId));
|
||||
List<DataVCvtDto> result = new ArrayList<>();
|
||||
collect.forEach((k,v)->{
|
||||
CvtHarmonicCorrectionFactorsDTO cvtHarmonicCorrectionFactorsDTO = cvtRelationFeignClient.queryByLineId(k).getData();
|
||||
if(Objects.nonNull(cvtHarmonicCorrectionFactorsDTO)&&
|
||||
StringUtils.isNotEmpty(cvtHarmonicCorrectionFactorsDTO.getId())){
|
||||
v = cvtChange(v,cvtHarmonicCorrectionFactorsDTO);
|
||||
}
|
||||
List<DataVCvtDTO> dataVCvtDTOList = v.stream().map(temp -> {
|
||||
DataVCvtDTO dataVCvtDTO = new DataVCvtDTO();
|
||||
BeanUtils.copyProperties(temp, dataVCvtDTO);
|
||||
return dataVCvtDTO;
|
||||
}).collect(Collectors.toList());
|
||||
result.addAll(dataVCvtDTOList);
|
||||
|
||||
result.addAll(v);
|
||||
});
|
||||
dataVFeignClient.batchInsertionCvtDTO(result);
|
||||
|
||||
}
|
||||
|
||||
private List<DataVCvt> cvtChange(List<DataVCvt> v, CvtHarmonicCorrectionFactorsDTO cvtHarmonicCorrectionFactorsDTO) {
|
||||
private List<DataVCvtDto> cvtChange(List<DataVCvtDto> v, CvtHarmonicCorrectionFactorsDTO cvtHarmonicCorrectionFactorsDTO) {
|
||||
v.stream().forEach(temp->{
|
||||
//目前知道的只有v2到v50乘以系数
|
||||
// temp.setLineId();
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.njcn.dataProcess.dto.DataVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataVCvt;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -24,7 +25,7 @@ public interface DataVCvtFeignClient {
|
||||
|
||||
//获取原始数据
|
||||
@PostMapping("/getRawData")
|
||||
HttpResult<List<DataVCvt>> getRawData(@RequestBody LineCountEvaluateParam lineParam);
|
||||
HttpResult<List<DataVCvtDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,9 +6,8 @@ import com.njcn.dataProcess.api.fallback.DataVFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.dto.DataVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDTO;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -48,6 +47,6 @@ public interface DataVFeignClient {
|
||||
HttpResult<String> addInfluxDbList(@RequestBody List<DataVDto> list);
|
||||
|
||||
@PostMapping("/batchInsertionCvtDTO")
|
||||
HttpResult<String> batchInsertionCvtDTO(@RequestBody List<DataVCvtDTO> cvtDTOList);
|
||||
HttpResult<String> batchInsertionCvtDTO(@RequestBody List<DataVCvtDto> cvtDTOList);
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.njcn.dataProcess.dto.DataVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataVCvt;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
@@ -45,7 +46,7 @@ public class DataVCvtFeignClientFallbackFactory implements FallbackFactory<DataV
|
||||
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DataVCvt>> getRawData(LineCountEvaluateParam lineParam) {
|
||||
public HttpResult<List<DataVCvtDto>> getRawData(LineCountEvaluateParam lineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取原始数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@@ -6,9 +6,8 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.dataProcess.api.DataVFeignClient;
|
||||
import com.njcn.dataProcess.dto.DataVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataV;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDTO;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
@@ -80,7 +79,7 @@ public class DataVFeignClientFallbackFactory implements FallbackFactory<DataVFei
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<String> batchInsertionCvtDTO(List<DataVCvtDTO> cvtDTOList) {
|
||||
public HttpResult<String> batchInsertionCvtDTO(List<DataVCvtDto> cvtDTOList) {
|
||||
log.error("{}异常,降级处理,异常为:{}","cvt数据插入DataV",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,209 @@ import java.util.stream.Stream;
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_v_cvt")
|
||||
public class DataVCvt extends DataV{
|
||||
public class DataVCvt {
|
||||
@TimeColumn
|
||||
@Column(name = "time", tag = true)
|
||||
@JsonSerialize(using = InstantDateSerializer.class)
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "line_id", tag = true)
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type", tag = true)
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "value_type", tag = true)
|
||||
private String valueType;
|
||||
|
||||
@Column(name = "quality_flag", tag = true)
|
||||
private String qualityFlag="0";
|
||||
|
||||
//是否是异常指标数据,0否1是
|
||||
@Column(name = "abnormal_flag")
|
||||
private Integer abnormalFlag;
|
||||
|
||||
@Column(name = "freq")
|
||||
private Double freq;
|
||||
|
||||
@Column(name = "freq_dev")
|
||||
private Double freqDev;
|
||||
|
||||
@Column(name = "rms")
|
||||
private Double rms;
|
||||
|
||||
@Column(name = "rms_lvr")
|
||||
private Double rmsLvr;
|
||||
|
||||
@Column(name = "vl_dev")
|
||||
private Double vlDev;
|
||||
|
||||
@Column(name = "vu_dev")
|
||||
private Double vuDev;
|
||||
|
||||
@Column(name = "v_neg")
|
||||
private Double vNeg;
|
||||
|
||||
@Column(name = "v_pos")
|
||||
private Double vPos;
|
||||
|
||||
@Column(name = "v_thd")
|
||||
private Double vThd;
|
||||
|
||||
@Column(name = "v_unbalance")
|
||||
private Double vUnbalance;
|
||||
|
||||
@Column(name = "v_zero")
|
||||
private Double vZero;
|
||||
|
||||
@Column(name = "v_1")
|
||||
private Double v1;
|
||||
|
||||
@Column(name = "v_2")
|
||||
private Double v2;
|
||||
|
||||
@Column(name = "v_3")
|
||||
private Double v3;
|
||||
|
||||
@Column(name = "v_4")
|
||||
private Double v4;
|
||||
|
||||
@Column(name = "v_5")
|
||||
private Double v5;
|
||||
|
||||
@Column(name = "v_6")
|
||||
private Double v6;
|
||||
|
||||
@Column(name = "v_7")
|
||||
private Double v7;
|
||||
|
||||
@Column(name = "v_8")
|
||||
private Double v8;
|
||||
|
||||
@Column(name = "v_9")
|
||||
private Double v9;
|
||||
|
||||
@Column(name = "v_10")
|
||||
private Double v10;
|
||||
|
||||
@Column(name = "v_11")
|
||||
private Double v11;
|
||||
|
||||
@Column(name = "v_12")
|
||||
private Double v12;
|
||||
|
||||
@Column(name = "v_13")
|
||||
private Double v13;
|
||||
|
||||
@Column(name = "v_14")
|
||||
private Double v14;
|
||||
|
||||
@Column(name = "v_15")
|
||||
private Double v15;
|
||||
|
||||
@Column(name = "v_16")
|
||||
private Double v16;
|
||||
|
||||
@Column(name = "v_17")
|
||||
private Double v17;
|
||||
|
||||
@Column(name = "v_18")
|
||||
private Double v18;
|
||||
|
||||
@Column(name = "v_19")
|
||||
private Double v19;
|
||||
|
||||
@Column(name = "v_20")
|
||||
private Double v20;
|
||||
|
||||
@Column(name = "v_21")
|
||||
private Double v21;
|
||||
|
||||
@Column(name = "v_22")
|
||||
private Double v22;
|
||||
|
||||
@Column(name = "v_23")
|
||||
private Double v23;
|
||||
|
||||
@Column(name = "v_24")
|
||||
private Double v24;
|
||||
|
||||
@Column(name = "v_25")
|
||||
private Double v25;
|
||||
|
||||
@Column(name = "v_26")
|
||||
private Double v26;
|
||||
|
||||
@Column(name = "v_27")
|
||||
private Double v27;
|
||||
|
||||
@Column(name = "v_28")
|
||||
private Double v28;
|
||||
|
||||
@Column(name = "v_29")
|
||||
private Double v29;
|
||||
|
||||
@Column(name = "v_30")
|
||||
private Double v30;
|
||||
|
||||
@Column(name = "v_31")
|
||||
private Double v31;
|
||||
|
||||
@Column(name = "v_32")
|
||||
private Double v32;
|
||||
|
||||
@Column(name = "v_33")
|
||||
private Double v33;
|
||||
|
||||
@Column(name = "v_34")
|
||||
private Double v34;
|
||||
|
||||
@Column(name = "v_35")
|
||||
private Double v35;
|
||||
|
||||
@Column(name = "v_36")
|
||||
private Double v36;
|
||||
|
||||
@Column(name = "v_37")
|
||||
private Double v37;
|
||||
|
||||
@Column(name = "v_38")
|
||||
private Double v38;
|
||||
|
||||
@Column(name = "v_39")
|
||||
private Double v39;
|
||||
|
||||
@Column(name = "v_40")
|
||||
private Double v40;
|
||||
|
||||
@Column(name = "v_41")
|
||||
private Double v41;
|
||||
|
||||
@Column(name = "v_42")
|
||||
private Double v42;
|
||||
|
||||
@Column(name = "v_43")
|
||||
private Double v43;
|
||||
|
||||
@Column(name = "v_44")
|
||||
private Double v44;
|
||||
|
||||
@Column(name = "v_45")
|
||||
private Double v45;
|
||||
|
||||
@Column(name = "v_46")
|
||||
private Double v46;
|
||||
|
||||
@Column(name = "v_47")
|
||||
private Double v47;
|
||||
|
||||
@Column(name = "v_48")
|
||||
private Double v48;
|
||||
|
||||
@Column(name = "v_49")
|
||||
private Double v49;
|
||||
|
||||
@Column(name = "v_50")
|
||||
private Double v50;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
package com.njcn.dataProcess.pojo.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.njcn.influx.utils.InstantDateSerializer;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.TimeColumn;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
@@ -16,9 +11,13 @@ import java.time.Instant;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class DataVCvtDTO {
|
||||
public class DataVCvtDto {
|
||||
|
||||
private Instant time;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private String time;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String minTime;
|
||||
|
||||
|
||||
private String lineId;
|
||||
@@ -12,7 +12,7 @@ import com.njcn.dataProcess.dto.DataVDTO;
|
||||
import com.njcn.dataProcess.dto.DataVFiveItemDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDTO;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||
import com.njcn.dataProcess.service.IDataV;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -69,7 +69,7 @@ public class DataVController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@PostMapping("/batchInsertionCvtDTO")
|
||||
@ApiOperation("批量插入cvtDto")
|
||||
public HttpResult<String> batchInsertionCvtDTO(@RequestBody List<DataVCvtDTO> cvtDTOList) {
|
||||
public HttpResult<String> batchInsertionCvtDTO(@RequestBody List<DataVCvtDto> cvtDTOList) {
|
||||
String methodDescribe = getMethodDescribe("batchInsertion");
|
||||
|
||||
dataVInsert.batchInsertionCvtDTO(cvtDTOList);
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.njcn.dataProcess.dto.DataVFiveItemDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataVCvt;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||
import com.njcn.dataProcess.service.IDataV;
|
||||
import com.njcn.dataProcess.service.IDataVCvt;
|
||||
@@ -53,9 +54,9 @@ public class DataVCvtController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.QUERY)
|
||||
@PostMapping("/getRawData")
|
||||
@ApiOperation("获取原始数据")
|
||||
public HttpResult<List<DataVCvt>> getRawData(@RequestBody LineCountEvaluateParam lineParam) {
|
||||
public HttpResult<List<DataVCvtDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam) {
|
||||
String methodDescribe = getMethodDescribe("getRawData");
|
||||
List<DataVCvt> data = dataVCvtQuery.getRawData(lineParam);
|
||||
List<DataVCvtDto> data = dataVCvtQuery.getRawData(lineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.njcn.dataProcess.dto.DataVDTO;
|
||||
import com.njcn.dataProcess.dto.DataVFiveItemDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDTO;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataVD;
|
||||
|
||||
@@ -51,5 +51,5 @@ public interface IDataV extends IMppService<RStatDataVD> {
|
||||
|
||||
void addInfluxDbList(List<DataVDto> dataVList);
|
||||
|
||||
void batchInsertionCvtDTO(List<DataVCvtDTO> cvtDTOList);
|
||||
void batchInsertionCvtDTO(List<DataVCvtDto> cvtDTOList);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.njcn.dataProcess.dto.DataVFiveItemDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataVCvt;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataVD;
|
||||
|
||||
@@ -21,5 +22,5 @@ import java.util.Map;
|
||||
public interface IDataVCvt {
|
||||
|
||||
|
||||
List<DataVCvt> getRawData(LineCountEvaluateParam lineParam);
|
||||
List<DataVCvtDto> getRawData(LineCountEvaluateParam lineParam);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.njcn.dataProcess.dto.DataVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataV;
|
||||
import com.njcn.dataProcess.po.influx.DataVCvt;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||
import com.njcn.dataProcess.service.IDataVCvt;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -16,6 +18,7 @@ import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -32,7 +35,8 @@ import java.util.stream.Collectors;
|
||||
public class InfluxdbDataVCvtImpl implements IDataVCvt {
|
||||
@Resource
|
||||
private DataVCvtMapper dataVCvtMapper;
|
||||
|
||||
private final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.systemDefault());
|
||||
|
||||
/**
|
||||
* @Description: 获取时间段内的数据
|
||||
* @Param:
|
||||
@@ -41,7 +45,7 @@ public class InfluxdbDataVCvtImpl implements IDataVCvt {
|
||||
* @Date: 2025/02/24
|
||||
*/
|
||||
@Override
|
||||
public List<DataVCvt> getRawData(LineCountEvaluateParam lineParam) {
|
||||
public List<DataVCvtDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataVCvt.class);
|
||||
|
||||
@@ -49,8 +53,15 @@ public class InfluxdbDataVCvtImpl implements IDataVCvt {
|
||||
|
||||
List<DataVCvt> dataVCvts = dataVCvtMapper.selectByQueryWrapper(influxQueryWrapper);
|
||||
|
||||
List<DataVCvtDto> result = new ArrayList<>();
|
||||
|
||||
dataVCvts.forEach(item->{
|
||||
DataVCvtDto dto = new DataVCvtDto();
|
||||
BeanUtils.copyProperties(item,dto);
|
||||
dto.setMinTime(DATE_TIME_FORMATTER.format(item.getTime()));
|
||||
result.add(dto);
|
||||
});
|
||||
|
||||
return dataVCvts;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.njcn.dataProcess.service.impl.influxdb;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.common.utils.HarmonicTimesUtil;
|
||||
import com.njcn.dataProcess.constant.InfluxDBTableConstant;
|
||||
@@ -15,7 +14,7 @@ import com.njcn.dataProcess.dto.LineDataVFiveItemDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataV;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDTO;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataVD;
|
||||
import com.njcn.dataProcess.service.IDataV;
|
||||
@@ -31,7 +30,6 @@ import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -268,7 +266,7 @@ public class InfluxdbDataVImpl extends MppServiceImpl<RStatDataVRelationMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchInsertionCvtDTO(List<DataVCvtDTO> cvtDTOList) {
|
||||
public void batchInsertionCvtDTO(List<DataVCvtDto> cvtDTOList) {
|
||||
int totalCount = cvtDTOList.size();
|
||||
if(totalCount<=0){
|
||||
return;
|
||||
@@ -277,6 +275,8 @@ public class InfluxdbDataVImpl extends MppServiceImpl<RStatDataVRelationMapper,
|
||||
{
|
||||
DataV dataV = new DataV();
|
||||
BeanUtils.copyProperties(temp,dataV);
|
||||
dataV.setTime(LocalDateTime.parse(temp.getMinTime(), DATE_TIME_FORMATTER).atZone(ZoneId.systemDefault()).toInstant());
|
||||
|
||||
return dataV;
|
||||
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.njcn.dataProcess.service.impl.relation;
|
||||
import com.njcn.dataProcess.dto.DataVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.influx.DataVCvt;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.service.IDataVCvt;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -20,7 +21,7 @@ import java.util.List;
|
||||
@RequiredArgsConstructor
|
||||
public class RelationDataVCvtImpl implements IDataVCvt {
|
||||
@Override
|
||||
public List<DataVCvt> getRawData(LineCountEvaluateParam lineParam) {
|
||||
public List<DataVCvtDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.njcn.dataProcess.service.impl.relation;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.annotation.InsertBean;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.DataVRelationMapper;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatDataVRelationMapper;
|
||||
import com.njcn.dataProcess.dto.DataVDTO;
|
||||
@@ -10,7 +9,7 @@ import com.njcn.dataProcess.dto.DataVFiveItemDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.po.relation.DataV;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDTO;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatDataVD;
|
||||
import com.njcn.dataProcess.service.IDataV;
|
||||
@@ -22,7 +21,6 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.Field;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -118,7 +116,7 @@ public class RelationDataVImpl extends MppServiceImpl<RStatDataVRelationMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchInsertionCvtDTO(List<DataVCvtDTO> cvtDTOList) {
|
||||
public void batchInsertionCvtDTO(List<DataVCvtDto> cvtDTOList) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user