添加自动补招数据外部接口
This commit is contained in:
@@ -43,6 +43,12 @@
|
||||
<artifactId>influxdb-springboot-starter</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn.platform</groupId>
|
||||
<artifactId>message-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.dataProcess.api;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.dataProcess.api.fallback.DataIFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.api.fallback.DataRecallFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.dto.DataIDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
||||
import com.njcn.message.message.RecallMessage;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @version 1.0.0
|
||||
* @date 2022年01月05日 15:11
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/data", fallbackFactory = DataRecallFeignClientFallbackFactory.class, contextId = "data")
|
||||
public interface DataRecallFeignClient {
|
||||
|
||||
@PostMapping("/recall")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("数据补招")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<List<String>> recall(@RequestBody RecallMessage param);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.njcn.dataProcess.api.fallback;
|
||||
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.dataProcess.api.DataRecallFeignClient;
|
||||
|
||||
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||
import com.njcn.message.message.RecallMessage;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2025/07/25 下午 3:21【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DataRecallFeignClientFallbackFactory implements FallbackFactory<DataRecallFeignClient> {
|
||||
/**
|
||||
* 输出远程请求接口异常日志
|
||||
* @param cause RPC请求异常
|
||||
*/
|
||||
@Override
|
||||
public DataRecallFeignClient create(Throwable cause) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if(cause.getCause() instanceof BusinessException){
|
||||
BusinessException businessException = (BusinessException) cause.getCause();
|
||||
exceptionEnum = DataProcessingEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new DataRecallFeignClient() {
|
||||
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> recall(RecallMessage param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","补招接口调用异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.dataProcess.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/11/7 15:05【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class FullRecallMessage {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime reCallStartTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime reCallEndTime;
|
||||
|
||||
private List<String> monitorId;
|
||||
|
||||
}
|
||||
@@ -6,10 +6,12 @@ import cn.hutool.core.util.IdUtil;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
|
||||
import com.njcn.dataProcess.annotation.QueryBean;
|
||||
import com.njcn.dataProcess.param.FullRecallMessage;
|
||||
import com.njcn.dataProcess.service.IDataV;
|
||||
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
||||
@@ -55,10 +57,59 @@ public class DataRecallController extends BaseController {
|
||||
private final DeviceFeignClient deviceFeignClient;
|
||||
|
||||
|
||||
//页面补招按时间段带小时的全部补招不查datav数据去筛选
|
||||
@PostMapping("/FullRecall")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("数据全量补招")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<List<String>> recall(@RequestBody FullRecallMessage param) {
|
||||
String methodDescribe = getMethodDescribe("recall");
|
||||
List<String> guidList = new ArrayList<>();
|
||||
List<String> runMonitorIds = new ArrayList<>();
|
||||
List<RecallMessage.RecallDTO> recallDTOList = new ArrayList<>();
|
||||
|
||||
if(CollectionUtils.isEmpty(param.getMonitorId())){
|
||||
throw new BusinessException("请选择监测点");
|
||||
}else {
|
||||
runMonitorIds = param.getMonitorId();
|
||||
}
|
||||
runMonitorIds.forEach(temp->{
|
||||
LineDevGetDTO data = commTerminalGeneralClient.getMonitorDetail(temp).getData();
|
||||
//后续根据不同前置下的测点发送补招密令
|
||||
DeviceDTO data2 = deviceFeignClient.getDeviceInfo(data.getDevId()).getData();
|
||||
|
||||
|
||||
//暂态补招
|
||||
RecallMessage.RecallDTO recallDTO = new RecallMessage.RecallDTO();
|
||||
//不设置dataType暂态稳态全部补招
|
||||
// recallDTO2.setDataType("1");
|
||||
recallDTO.setMonitorId(Stream.of(temp).collect(Collectors.toList()));
|
||||
String eventTime = formatInterval(param.getReCallStartTime(),param.getReCallEndTime());
|
||||
recallDTO.setTimeInterval(Stream.of(eventTime).collect(Collectors.toList()));
|
||||
recallDTO.setNodeId(data2.getNodeId());
|
||||
recallDTOList.add(recallDTO);
|
||||
|
||||
});
|
||||
if(!CollectionUtils.isEmpty(recallDTOList)){
|
||||
Map<String, List<RecallMessage.RecallDTO>> collect = recallDTOList.stream().collect(Collectors.groupingBy(RecallMessage.RecallDTO::getNodeId));
|
||||
|
||||
collect.forEach((k,v)->{
|
||||
RecallMessage message = new RecallMessage();
|
||||
message.setNodeId(k);
|
||||
message.setData(v);
|
||||
String guid = IdUtil.simpleUUID();
|
||||
message.setGuid(guid);
|
||||
produceFeignClient.recall(message);
|
||||
guidList.add(guid);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, guidList, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 算法保存
|
||||
*/
|
||||
@PostMapping("/recall")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("数据补招")
|
||||
@@ -97,6 +148,15 @@ public class DataRecallController extends BaseController {
|
||||
recallDTO.setNodeId(data2.getNodeId());
|
||||
recallDTOList.add(recallDTO);
|
||||
}
|
||||
//暂态补招
|
||||
RecallMessage.RecallDTO recallDTO2 = new RecallMessage.RecallDTO();
|
||||
recallDTO2.setDataType("1");
|
||||
recallDTO2.setMonitorId(Stream.of(temp).collect(Collectors.toList()));
|
||||
String eventTime = formatInterval(LocalDateTimeUtil.beginOfDay(finalCurrentDate.atStartOfDay()), LocalDateTimeUtil.endOfDay(finalCurrentDate.atStartOfDay()));
|
||||
recallDTO2.setTimeInterval(Stream.of(eventTime).collect(Collectors.toList()));
|
||||
recallDTO2.setNodeId(data2.getNodeId());
|
||||
recallDTOList.add(recallDTO2);
|
||||
|
||||
});
|
||||
currentDate = currentDate.plusDays(1);
|
||||
}
|
||||
@@ -117,6 +177,8 @@ public class DataRecallController extends BaseController {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}else {
|
||||
Map<String, List<RecallMessage.RecallDTO>> collect = param.getData().stream().collect(Collectors.groupingBy(RecallMessage.RecallDTO::getNodeId));
|
||||
|
||||
|
||||
@@ -1,13 +1,23 @@
|
||||
package com.njcn.dataProcess.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
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.dto.LnDataDTO;
|
||||
import com.njcn.dataProcess.dto.*;
|
||||
import com.njcn.dataProcess.service.LnDataDealService;
|
||||
import com.njcn.message.enums.DataTypeEnum;
|
||||
import com.njcn.message.messagedto.MessageDataDTO;
|
||||
import com.njcn.stat.messagedto.MessageHarmonicDataSet;
|
||||
import com.njcn.stat.messagedto.MessageI;
|
||||
import com.njcn.stat.messagedto.MessageP;
|
||||
import com.njcn.stat.messagedto.MessageV;
|
||||
import com.njcn.stat.utils.BeanIConverter;
|
||||
import com.njcn.stat.utils.BeanPConverter;
|
||||
import com.njcn.stat.utils.BeanVConverter;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -15,10 +25,12 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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 org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
@@ -47,4 +59,334 @@ public class LnDataDealController extends BaseController {
|
||||
lnDataDealService.batchInsertion(lnDataDTO);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@PostMapping("/test")
|
||||
@ApiOperation("批量插入")
|
||||
public HttpResult<String> test(@RequestParam String docContent) {
|
||||
String methodDescribe = getMethodDescribe("batchInsertion");
|
||||
MessageDataDTO messageDataDTO = JSONObject.parseObject(docContent,MessageDataDTO.class);
|
||||
|
||||
List<DataVDTO> dataVList = new ArrayList<>();
|
||||
List<DataHarmphasicVDTO> dataHarmphasicVDTOList = new ArrayList<>();
|
||||
List<DataHarmrateVDTO> dataHarmrateVDTOList = new ArrayList<>();
|
||||
List<DataInharmVDTO> dataInharmVDTOList = new ArrayList<>();
|
||||
List<DataIDTO> dataIDTOList = new ArrayList<>();
|
||||
List<DataHarmphasicIDTO> dataHarmphasicIDTOList = new ArrayList<>();
|
||||
List<DataInharmIDTO> dataInharmIDTOList = new ArrayList<>();
|
||||
List<DataHarmpowerPDTO> dataHarmpowerPDTOList = new ArrayList<>();
|
||||
List<DataHarmpowerSDTO> dataHarmpowerSDTOList = new ArrayList<>();
|
||||
List<DataHarmpowerQDTO> dataHarmpowerQDTOList = new ArrayList<>();
|
||||
List<DataFlucDTO> dataFlucDTOList = new ArrayList<>();
|
||||
List<DataPltDTO> dataPltDTOList = new ArrayList<>();
|
||||
List<DataFlickerDTO> dataFlickerDTOList = new ArrayList<>();
|
||||
Integer dataType = messageDataDTO.getDataType();
|
||||
String lineId = messageDataDTO.getMonitor();
|
||||
String value = messageDataDTO.getValue();
|
||||
if(Objects.equals(DataTypeEnum.HARMONIC.getCode(),dataType)) {
|
||||
MessageHarmonicDataSet messageHarmonicDataSet = JSONObject.parseObject(value, MessageHarmonicDataSet.class);
|
||||
LocalDateTime localDateTime = messageHarmonicDataSet.getTIME();
|
||||
|
||||
Integer flag = messageHarmonicDataSet.getFLAG();
|
||||
MessageP pq = messageHarmonicDataSet.getPQ();
|
||||
MessageV v = messageHarmonicDataSet.getV();
|
||||
MessageI i = messageHarmonicDataSet.getI();
|
||||
//解析出电压数据ABCT
|
||||
if (Objects.nonNull(v)) {
|
||||
DataVDTO dataVa = BeanVConverter.messageDataVTODataV(v.getA());
|
||||
DataVDTO dataVb = BeanVConverter.messageDataVTODataV(v.getB());
|
||||
DataVDTO dataVc = BeanVConverter.messageDataVTODataV(v.getC());
|
||||
DataVDTO dataVt = BeanVConverter.messageDataVTODataV(v.getT(), v.getA(), v.getB(), v.getC());
|
||||
dataVa.setTimeid(localDateTime);
|
||||
dataVa.setLineid(lineId);
|
||||
dataVa.setPhasicType("A");
|
||||
dataVa.setQualityflag(flag);
|
||||
|
||||
dataVb.setTimeid(localDateTime);
|
||||
dataVb.setLineid(lineId);
|
||||
dataVb.setPhasicType("B");
|
||||
dataVb.setQualityflag(flag);
|
||||
|
||||
dataVc.setTimeid(localDateTime);
|
||||
dataVc.setLineid(lineId);
|
||||
dataVc.setPhasicType("C");
|
||||
dataVc.setQualityflag(flag);
|
||||
|
||||
dataVt.setTimeid(localDateTime);
|
||||
dataVt.setLineid(lineId);
|
||||
dataVt.setPhasicType("T");
|
||||
dataVt.setQualityflag(flag);
|
||||
|
||||
DataHarmphasicVDTO dataHarmphasicVa = BeanVConverter.messageDataVTODataHarmphasicV(v.getA());
|
||||
DataHarmphasicVDTO dataHarmphasicVb = BeanVConverter.messageDataVTODataHarmphasicV(v.getB());
|
||||
DataHarmphasicVDTO dataHarmphasicVc = BeanVConverter.messageDataVTODataHarmphasicV(v.getC());
|
||||
|
||||
dataHarmphasicVa.setTimeid(localDateTime);
|
||||
dataHarmphasicVa.setLineid(lineId);
|
||||
dataHarmphasicVa.setPhasicType("A");
|
||||
dataHarmphasicVa.setQualityflag(flag);
|
||||
|
||||
dataHarmphasicVb.setTimeid(localDateTime);
|
||||
dataHarmphasicVb.setLineid(lineId);
|
||||
dataHarmphasicVb.setPhasicType("B");
|
||||
dataHarmphasicVb.setQualityflag(flag);
|
||||
|
||||
dataHarmphasicVc.setTimeid(localDateTime);
|
||||
dataHarmphasicVc.setLineid(lineId);
|
||||
dataHarmphasicVc.setPhasicType("C");
|
||||
dataHarmphasicVc.setQualityflag(flag);
|
||||
|
||||
dataHarmphasicVDTOList.add(dataHarmphasicVa);
|
||||
dataHarmphasicVDTOList.add(dataHarmphasicVb);
|
||||
dataHarmphasicVDTOList.add(dataHarmphasicVc);
|
||||
|
||||
|
||||
DataInharmVDTO dataInharmVa = BeanVConverter.messageDataVTODataInharmV(v.getA());
|
||||
DataInharmVDTO dataInharmVb = BeanVConverter.messageDataVTODataInharmV(v.getB());
|
||||
DataInharmVDTO dataInharmVc = BeanVConverter.messageDataVTODataInharmV(v.getC());
|
||||
|
||||
dataInharmVa.setTimeid(localDateTime);
|
||||
dataInharmVa.setLineid(lineId);
|
||||
dataInharmVa.setPhasicType("A");
|
||||
dataInharmVa.setQualityflag(flag);
|
||||
|
||||
dataInharmVb.setTimeid(localDateTime);
|
||||
dataInharmVb.setLineid(lineId);
|
||||
dataInharmVb.setPhasicType("B");
|
||||
dataInharmVb.setQualityflag(flag);
|
||||
|
||||
dataInharmVc.setTimeid(localDateTime);
|
||||
dataInharmVc.setLineid(lineId);
|
||||
dataInharmVc.setPhasicType("C");
|
||||
dataInharmVc.setQualityflag(flag);
|
||||
|
||||
DataHarmrateVDTO dataHarmrateVDTOa = BeanVConverter.messageDataVTODataHarmprateV(v.getA());
|
||||
DataHarmrateVDTO dataHarmrateVDTOb = BeanVConverter.messageDataVTODataHarmprateV(v.getB());
|
||||
DataHarmrateVDTO dataHarmrateVDTOc = BeanVConverter.messageDataVTODataHarmprateV(v.getC());
|
||||
dataHarmrateVDTOa.setTimeid(localDateTime);
|
||||
dataHarmrateVDTOa.setLineid(lineId);
|
||||
dataHarmrateVDTOa.setPhasicType("A");
|
||||
dataHarmrateVDTOa.setQualityflag(flag);
|
||||
|
||||
dataHarmrateVDTOb.setTimeid(localDateTime);
|
||||
dataHarmrateVDTOb.setLineid(lineId);
|
||||
dataHarmrateVDTOb.setPhasicType("B");
|
||||
dataHarmrateVDTOb.setQualityflag(flag);
|
||||
|
||||
dataHarmrateVDTOc.setTimeid(localDateTime);
|
||||
dataHarmrateVDTOc.setLineid(lineId);
|
||||
dataHarmrateVDTOc.setPhasicType("C");
|
||||
dataHarmrateVDTOc.setQualityflag(flag);
|
||||
|
||||
dataInharmVDTOList.add(dataInharmVa);
|
||||
dataInharmVDTOList.add(dataInharmVb);
|
||||
dataInharmVDTOList.add(dataInharmVc);
|
||||
dataVList.add(dataVa);
|
||||
dataVList.add(dataVb);
|
||||
dataVList.add(dataVc);
|
||||
dataVList.add(dataVt);
|
||||
dataHarmrateVDTOList.add(dataHarmrateVDTOa);
|
||||
dataHarmrateVDTOList.add(dataHarmrateVDTOb);
|
||||
dataHarmrateVDTOList.add(dataHarmrateVDTOc);
|
||||
|
||||
|
||||
}
|
||||
//解析出电流数据ABCT
|
||||
if (Objects.nonNull(i)) {
|
||||
|
||||
|
||||
DataIDTO dataIa = BeanIConverter.messageDataITODataI(i.getA());
|
||||
DataIDTO dataIb = BeanIConverter.messageDataITODataI(i.getB());
|
||||
DataIDTO dataIc = BeanIConverter.messageDataITODataI(i.getC());
|
||||
DataIDTO dataIt = BeanIConverter.messageDataITODataI(i.getT());
|
||||
|
||||
dataIa.setTimeid(localDateTime);
|
||||
dataIa.setLineid(lineId);
|
||||
dataIa.setPhasicType("A");
|
||||
dataIa.setQualityflag(flag);
|
||||
|
||||
dataIb.setTimeid(localDateTime);
|
||||
dataIb.setLineid(lineId);
|
||||
dataIb.setPhasicType("B");
|
||||
dataIb.setQualityflag(flag);
|
||||
|
||||
dataIc.setTimeid(localDateTime);
|
||||
dataIc.setLineid(lineId);
|
||||
dataIc.setPhasicType("C");
|
||||
dataIc.setQualityflag(flag);
|
||||
|
||||
dataIt.setTimeid(localDateTime);
|
||||
dataIt.setLineid(lineId);
|
||||
dataIt.setPhasicType("T");
|
||||
dataIt.setQualityflag(flag);
|
||||
|
||||
dataIDTOList.add(dataIa);
|
||||
dataIDTOList.add(dataIb);
|
||||
dataIDTOList.add(dataIc);
|
||||
dataIDTOList.add(dataIt);
|
||||
|
||||
DataHarmphasicIDTO dataHarmphasicIa = BeanIConverter.messageDataITODataHarmphasicI(i.getA());
|
||||
DataHarmphasicIDTO dataHarmphasicIb = BeanIConverter.messageDataITODataHarmphasicI(i.getB());
|
||||
DataHarmphasicIDTO dataHarmphasicIc = BeanIConverter.messageDataITODataHarmphasicI(i.getC());
|
||||
|
||||
dataHarmphasicIa.setTimeid(localDateTime);
|
||||
dataHarmphasicIa.setLineid(lineId);
|
||||
dataHarmphasicIa.setPhasicType("A");
|
||||
dataHarmphasicIa.setQualityflag(flag);
|
||||
|
||||
dataHarmphasicIb.setTimeid(localDateTime);
|
||||
dataHarmphasicIb.setLineid(lineId);
|
||||
dataHarmphasicIb.setPhasicType("B");
|
||||
dataHarmphasicIb.setQualityflag(flag);
|
||||
|
||||
dataHarmphasicIc.setTimeid(localDateTime);
|
||||
dataHarmphasicIc.setLineid(lineId);
|
||||
dataHarmphasicIc.setPhasicType("C");
|
||||
dataHarmphasicIc.setQualityflag(flag);
|
||||
|
||||
dataHarmphasicIDTOList.add(dataHarmphasicIa);
|
||||
dataHarmphasicIDTOList.add(dataHarmphasicIb);
|
||||
dataHarmphasicIDTOList.add(dataHarmphasicIc);
|
||||
|
||||
DataInharmIDTO dataInharmIa = BeanIConverter.messageDataITODataInharmI(i.getA());
|
||||
DataInharmIDTO dataInharmIb = BeanIConverter.messageDataITODataInharmI(i.getB());
|
||||
DataInharmIDTO dataInharmIc = BeanIConverter.messageDataITODataInharmI(i.getC());
|
||||
|
||||
|
||||
dataInharmIa.setTimeid(localDateTime);
|
||||
dataInharmIa.setLineid(lineId);
|
||||
dataInharmIa.setPhasicType("A");
|
||||
dataInharmIa.setQualityflag(flag);
|
||||
|
||||
dataInharmIb.setTimeid(localDateTime);
|
||||
dataInharmIb.setLineid(lineId);
|
||||
dataInharmIb.setPhasicType("B");
|
||||
dataInharmIb.setQualityflag(flag);
|
||||
|
||||
dataInharmIc.setTimeid(localDateTime);
|
||||
dataInharmIc.setLineid(lineId);
|
||||
dataInharmIc.setPhasicType("C");
|
||||
dataInharmIc.setQualityflag(flag);
|
||||
|
||||
|
||||
dataInharmIDTOList.add(dataInharmIa);
|
||||
dataInharmIDTOList.add(dataInharmIb);
|
||||
dataInharmIDTOList.add(dataInharmIc);
|
||||
|
||||
|
||||
}
|
||||
//解析出功率数据ABC
|
||||
if (Objects.nonNull(pq)) {
|
||||
DataHarmpowerPDTO dataHarmpowerPa = BeanPConverter.messageDataPTODataHarmpowerP(pq.getA());
|
||||
DataHarmpowerPDTO dataHarmpowerPb = BeanPConverter.messageDataPTODataHarmpowerP(pq.getB());
|
||||
DataHarmpowerPDTO dataHarmpowerPc = BeanPConverter.messageDataPTODataHarmpowerP(pq.getC());
|
||||
DataHarmpowerPDTO dataHarmpowerPt = BeanPConverter.messageDataPTODataHarmpowerP(pq.getT());
|
||||
|
||||
dataHarmpowerPa.setTimeid(localDateTime);
|
||||
dataHarmpowerPa.setLineid(lineId);
|
||||
dataHarmpowerPa.setPhasicType("A");
|
||||
dataHarmpowerPa.setQualityflag(flag);
|
||||
|
||||
dataHarmpowerPb.setTimeid(localDateTime);
|
||||
dataHarmpowerPb.setLineid(lineId);
|
||||
dataHarmpowerPb.setPhasicType("B");
|
||||
dataHarmpowerPb.setQualityflag(flag);
|
||||
|
||||
dataHarmpowerPc.setTimeid(localDateTime);
|
||||
dataHarmpowerPc.setLineid(lineId);
|
||||
dataHarmpowerPc.setPhasicType("C");
|
||||
dataHarmpowerPc.setQualityflag(flag);
|
||||
|
||||
dataHarmpowerPt.setTimeid(localDateTime);
|
||||
dataHarmpowerPt.setLineid(lineId);
|
||||
dataHarmpowerPt.setPhasicType("T");
|
||||
dataHarmpowerPt.setQualityflag(flag);
|
||||
|
||||
dataHarmpowerPDTOList.add(dataHarmpowerPa);
|
||||
dataHarmpowerPDTOList.add(dataHarmpowerPb);
|
||||
dataHarmpowerPDTOList.add(dataHarmpowerPc);
|
||||
dataHarmpowerPDTOList.add(dataHarmpowerPt);
|
||||
|
||||
DataHarmpowerSDTO dataHarmpowerSa = BeanPConverter.messageDataPTODataHarmpowerS(pq.getA());
|
||||
DataHarmpowerSDTO dataHarmpowerSb = BeanPConverter.messageDataPTODataHarmpowerS(pq.getB());
|
||||
DataHarmpowerSDTO dataHarmpowerSc = BeanPConverter.messageDataPTODataHarmpowerS(pq.getC());
|
||||
DataHarmpowerSDTO dataHarmpowerSt = BeanPConverter.messageDataPTODataHarmpowerS(pq.getT());
|
||||
|
||||
|
||||
dataHarmpowerSa.setTimeid(localDateTime);
|
||||
dataHarmpowerSa.setLineid(lineId);
|
||||
dataHarmpowerSa.setPhasicType("A");
|
||||
dataHarmpowerSa.setQualityflag(flag);
|
||||
|
||||
dataHarmpowerSb.setTimeid(localDateTime);
|
||||
dataHarmpowerSb.setLineid(lineId);
|
||||
dataHarmpowerSb.setPhasicType("B");
|
||||
dataHarmpowerSb.setQualityflag(flag);
|
||||
|
||||
dataHarmpowerSc.setTimeid(localDateTime);
|
||||
dataHarmpowerSc.setLineid(lineId);
|
||||
dataHarmpowerSc.setPhasicType("C");
|
||||
dataHarmpowerSc.setQualityflag(flag);
|
||||
|
||||
dataHarmpowerSt.setTimeid(localDateTime);
|
||||
dataHarmpowerSt.setLineid(lineId);
|
||||
dataHarmpowerSt.setPhasicType("T");
|
||||
dataHarmpowerSt.setQualityflag(flag);
|
||||
dataHarmpowerSDTOList.add(dataHarmpowerSa);
|
||||
dataHarmpowerSDTOList.add(dataHarmpowerSb);
|
||||
dataHarmpowerSDTOList.add(dataHarmpowerSc);
|
||||
dataHarmpowerSDTOList.add(dataHarmpowerSt);
|
||||
|
||||
DataHarmpowerQDTO dataHarmpowerQa = BeanPConverter.messageDataPTODataHarmpowerQ(pq.getA());
|
||||
DataHarmpowerQDTO dataHarmpowerQb = BeanPConverter.messageDataPTODataHarmpowerQ(pq.getB());
|
||||
DataHarmpowerQDTO dataHarmpowerQc = BeanPConverter.messageDataPTODataHarmpowerQ(pq.getC());
|
||||
DataHarmpowerQDTO dataHarmpowerQt = BeanPConverter.messageDataPTODataHarmpowerQ(pq.getT());
|
||||
|
||||
|
||||
dataHarmpowerQa.setTimeid(localDateTime);
|
||||
dataHarmpowerQa.setLineid(lineId);
|
||||
dataHarmpowerQa.setPhasicType("A");
|
||||
dataHarmpowerQa.setQualityflag(flag);
|
||||
|
||||
dataHarmpowerQb.setTimeid(localDateTime);
|
||||
dataHarmpowerQb.setLineid(lineId);
|
||||
dataHarmpowerQb.setPhasicType("B");
|
||||
dataHarmpowerQb.setQualityflag(flag);
|
||||
|
||||
dataHarmpowerQc.setTimeid(localDateTime);
|
||||
dataHarmpowerQc.setLineid(lineId);
|
||||
dataHarmpowerQc.setPhasicType("C");
|
||||
dataHarmpowerQc.setQualityflag(flag);
|
||||
dataHarmpowerQt.setTimeid(localDateTime);
|
||||
dataHarmpowerQt.setLineid(lineId);
|
||||
dataHarmpowerQt.setPhasicType("T");
|
||||
dataHarmpowerQt.setQualityflag(flag);
|
||||
|
||||
dataHarmpowerQDTOList.add(dataHarmpowerQa);
|
||||
dataHarmpowerQDTOList.add(dataHarmpowerQb);
|
||||
dataHarmpowerQDTOList.add(dataHarmpowerQc);
|
||||
dataHarmpowerQDTOList.add(dataHarmpowerQt);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
LnDataDTO lnDataDTO = new LnDataDTO();
|
||||
lnDataDTO.setDataVList(dataVList);
|
||||
lnDataDTO.setDataHarmrateVDTOList(dataHarmrateVDTOList);
|
||||
lnDataDTO.setDataHarmphasicVDTOList(dataHarmphasicVDTOList);
|
||||
lnDataDTO.setDataInharmVDTOList(dataInharmVDTOList);
|
||||
lnDataDTO.setDataIDTOList(dataIDTOList);
|
||||
lnDataDTO.setDataHarmphasicIDTOList(dataHarmphasicIDTOList);
|
||||
lnDataDTO.setDataInharmIDTOList(dataInharmIDTOList);
|
||||
lnDataDTO.setDataHarmpowerPDTOList(dataHarmpowerPDTOList);
|
||||
lnDataDTO.setDataHarmpowerSDTOList(dataHarmpowerSDTOList);
|
||||
lnDataDTO.setDataHarmpowerQDTOList(dataHarmpowerQDTOList);
|
||||
lnDataDTO.setDataFlucDTOList(dataFlucDTOList);
|
||||
lnDataDTO.setDataPltDTOList(dataPltDTOList);
|
||||
lnDataDTO.setDataFlickerDTOList(dataFlickerDTOList);
|
||||
lnDataDealService.batchInsertion(lnDataDTO);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user