diff --git a/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/mapper/InfluxTestMapper.java b/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/mapper/InfluxTestMapper.java deleted file mode 100644 index 2672d8230..000000000 --- a/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/mapper/InfluxTestMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.njcn.prepare.harmonic.mapper; - -import com.njcn.harmonic.pojo.po.RStatDataVD; -import com.njcn.influx.base.InfluxDbBaseMapper; -import com.njcn.influx.query.InfluxQueryWrapper; -import com.njcn.prepare.harmonic.pojo.influxdb.po.DataVPO; - -import java.util.List; - -/** - *

- * Mapper 接口 - *

- * - * @author lxp - * @since 2023-03-16 - */ -public interface InfluxTestMapper extends InfluxDbBaseMapper { - - List selectData(InfluxQueryWrapper influxQueryWrapper); - -} diff --git a/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/service/mysql/Impl/line/DayDataServiceImpl.java b/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/service/mysql/Impl/line/DayDataServiceImpl.java index e98106909..2ac088a5f 100644 --- a/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/service/mysql/Impl/line/DayDataServiceImpl.java +++ b/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/service/mysql/Impl/line/DayDataServiceImpl.java @@ -2,11 +2,9 @@ package com.njcn.prepare.harmonic.service.mysql.Impl.line; import com.njcn.harmonic.pojo.po.*; import com.njcn.harmonic.pojo.po.day.*; -import com.njcn.influx.query.InfluxQueryWrapper; import com.njcn.influxdb.param.InfluxDBPublicParam; import com.njcn.influxdb.utils.InfluxDbUtils; import com.njcn.prepare.harmonic.constant.InfluxdbPOConverter; -import com.njcn.prepare.harmonic.mapper.InfluxTestMapper; import com.njcn.prepare.harmonic.pojo.influxdb.po.*; import com.njcn.prepare.harmonic.pojo.mysql.po.line.RMpFlickerReportDPO; import com.njcn.prepare.harmonic.pojo.mysql.po.line.RMpHarmonicPReportDPO; @@ -29,7 +27,6 @@ import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import java.beans.PropertyDescriptor; import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.Instant; @@ -566,240 +563,211 @@ public class DayDataServiceImpl implements DayDataService { List dataInHarmVPOList = new ArrayList<> (); List dataPltPOList = new ArrayList<> (); - - List dataV = getDataV("f3e221c3a75c140b348b1fdb619541f3", "2023-04-26 00:00:00", "2023-04-26 23:59:59"); - System.out.println("dataV==:" + dataV); - List list = test("f3e221c3a75c140b348b1fdb619541f3", "2023-04-26 00:00:00", "2023-04-26 23:59:59"); - System.out.println("list==:" + list); - - - - - - for (String lineIndex : indexLists) { -// /*生成dayV表*/ -// List dataV = getDataV(lineIndex, startTime, endTime); -// System.out.println("dataV==:" + dataV); -// List list = test(lineIndex,startTime,endTime); -// System.out.println("list==:" + list); - -// if (!CollectionUtils.isEmpty(dataV)) { -// for (DataVPO item : dataV) { -// RStatDataVDPO po1 = new RStatDataVDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataVPOList.add(po1); -// } -// } -// /*生成dayI表*/ -// List dataI = getDataI(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataI)) { -// for (DataIPO item : dataI) { -// RStatDataIDPO po1 = new RStatDataIDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataIPOList.add(po1); -// } -// } -// /*生成dayFlicker表*/ -// List dataFlickerPO = getDataFlicker(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataFlickerPO)) { -// for (DataFlickerPO item : dataFlickerPO) { -// RStatDataFlickerDPO po1 = new RStatDataFlickerDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataFlickerPOList.add(po1); -// } -// } -// /*生成dayFluc表*/ -// List dataFlucPO = getDataFluc(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataFlucPO)) { -// for (DataFlucPO item : dataFlucPO) { -// RStatDataFlucDPO po1 = new RStatDataFlucDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataFlucPOList.add(po1); -// } -// } -// /*生成dayHarmphasicI表*/ -// List dataHarmphasicIPO = getDataHarmphasicI(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataHarmphasicIPO)) { -// for (DataHarmPhasicIPO item : dataHarmphasicIPO) { -// RStatDataHarmphasicIDPO po1 = new RStatDataHarmphasicIDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataHarmPhasicIPOList.add(po1); -// } -// } -// /*生成dayHarmphasicV表*/ -// List dataHarmphasicVPO = getDataHarmphasicV(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataHarmphasicVPO)) { -// for (DataHarmPhasicVPO item : dataHarmphasicVPO) { -// RStatDataHarmphasicVDPO po1 = new RStatDataHarmphasicVDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataHarmPhasicVPOList.add(po1); -// } -// } -// /*生成dayHarmPowerP表*/ -// List dataHarmPowerPPO = getDataHarmPowerP(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataHarmPowerPPO)) { -// for (DataHarmPowerPPO item : dataHarmPowerPPO) { -// RStatDataHarmpowerPDPO po1 = new RStatDataHarmpowerPDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataHarmPowerPPOList.add(po1); -// } -// } -// /*生成dayHarmPowerQ表*/ -// List dataHarmPowerQPO = getDataHarmPowerQ(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataHarmPowerQPO)) { -// for (DataHarmPowerQPO item : dataHarmPowerQPO) { -// RStatDataHarmpowerQDPO po1 = new RStatDataHarmpowerQDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataHarmPowerQPOList.add(po1); -// } -// } -// /*生成dayHarmPowerS表*/ -// List dataHarmPowers = getDataHarmPowerS(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataHarmPowers)) { -// for (DataHarmPowerSPO item : dataHarmPowers) { -// RStatDataHarmpowerSDPO po1 = new RStatDataHarmpowerSDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataHarmPowerSPOList.add(po1); -// } -// } -// /*生成dayHarmRateI*/ -// List dataHarmRateI = getDataHarmRateI(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataHarmRateI)) { -// for (DataHarmRateIPO item : dataHarmRateI) { -// RStatDataHarmrateIDPO po1 = new RStatDataHarmrateIDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataHarmRateIPOList.add(po1); -// } -// } -// /*生成dayHarmRateV*/ -// List dataHarmRateVPO = getDataHarmRateV(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataHarmRateVPO)) { -// for (DataHarmRateVPO item : dataHarmRateVPO) { -// RStatDataHarmrateVDPO po1 = new RStatDataHarmrateVDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataHarmRateVPOList.add(po1); -// } -// } -// /*生成dayInHarmI*/ -// List dataInHarmIPO = getDataInHarmI(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataInHarmIPO)) { -// for (DataInHarmIPO item : dataInHarmIPO) { -// RStatDataInharmIDPO po1 = new RStatDataInharmIDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataInHarmIPOList.add(po1); -// } -// } -// /*生成dayInHarmV*/ -// List dataInHarmVPO = getDataInHarmV(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataInHarmVPO)) { -// for (DataInHarmVPO item : dataInHarmVPO) { -// RStatDataInharmVDPO po1 = new RStatDataInharmVDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataInHarmVPOList.add(po1); -// } -// } -// /*生成dayPlt*/ -// List dataPlt = getDataPlt(lineIndex, startTime, endTime); -// if (!CollectionUtils.isEmpty(dataPlt)) { -// for (DataPltPO item : dataPlt) { -// RStatDataPltDPO po1 = new RStatDataPltDPO(); -// BeanUtils.copyProperties(item,po1); -// po1.setTime(time); -// po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); -// dataPltPOList.add(po1); -// } -// } + /*生成dayV表*/ + List dataV = getDataV(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataV)) { + for (DataVPO item : dataV) { + RStatDataVDPO po1 = new RStatDataVDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataVPOList.add(po1); + } + } + /*生成dayI表*/ + List dataI = getDataI(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataI)) { + for (DataIPO item : dataI) { + RStatDataIDPO po1 = new RStatDataIDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataIPOList.add(po1); + } + } + /*生成dayFlicker表*/ + List dataFlickerPO = getDataFlicker(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataFlickerPO)) { + for (DataFlickerPO item : dataFlickerPO) { + RStatDataFlickerDPO po1 = new RStatDataFlickerDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataFlickerPOList.add(po1); + } + } + /*生成dayFluc表*/ + List dataFlucPO = getDataFluc(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataFlucPO)) { + for (DataFlucPO item : dataFlucPO) { + RStatDataFlucDPO po1 = new RStatDataFlucDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataFlucPOList.add(po1); + } + } + /*生成dayHarmphasicI表*/ + List dataHarmphasicIPO = getDataHarmphasicI(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataHarmphasicIPO)) { + for (DataHarmPhasicIPO item : dataHarmphasicIPO) { + RStatDataHarmphasicIDPO po1 = new RStatDataHarmphasicIDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataHarmPhasicIPOList.add(po1); + } + } + /*生成dayHarmphasicV表*/ + List dataHarmphasicVPO = getDataHarmphasicV(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataHarmphasicVPO)) { + for (DataHarmPhasicVPO item : dataHarmphasicVPO) { + RStatDataHarmphasicVDPO po1 = new RStatDataHarmphasicVDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataHarmPhasicVPOList.add(po1); + } + } + /*生成dayHarmPowerP表*/ + List dataHarmPowerPPO = getDataHarmPowerP(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataHarmPowerPPO)) { + for (DataHarmPowerPPO item : dataHarmPowerPPO) { + RStatDataHarmpowerPDPO po1 = new RStatDataHarmpowerPDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataHarmPowerPPOList.add(po1); + } + } + /*生成dayHarmPowerQ表*/ + List dataHarmPowerQPO = getDataHarmPowerQ(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataHarmPowerQPO)) { + for (DataHarmPowerQPO item : dataHarmPowerQPO) { + RStatDataHarmpowerQDPO po1 = new RStatDataHarmpowerQDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataHarmPowerQPOList.add(po1); + } + } + /*生成dayHarmPowerS表*/ + List dataHarmPowers = getDataHarmPowerS(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataHarmPowers)) { + for (DataHarmPowerSPO item : dataHarmPowers) { + RStatDataHarmpowerSDPO po1 = new RStatDataHarmpowerSDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataHarmPowerSPOList.add(po1); + } + } + /*生成dayHarmRateI*/ + List dataHarmRateI = getDataHarmRateI(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataHarmRateI)) { + for (DataHarmRateIPO item : dataHarmRateI) { + RStatDataHarmrateIDPO po1 = new RStatDataHarmrateIDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataHarmRateIPOList.add(po1); + } + } + /*生成dayHarmRateV*/ + List dataHarmRateVPO = getDataHarmRateV(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataHarmRateVPO)) { + for (DataHarmRateVPO item : dataHarmRateVPO) { + RStatDataHarmrateVDPO po1 = new RStatDataHarmrateVDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataHarmRateVPOList.add(po1); + } + } + /*生成dayInHarmI*/ + List dataInHarmIPO = getDataInHarmI(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataInHarmIPO)) { + for (DataInHarmIPO item : dataInHarmIPO) { + RStatDataInharmIDPO po1 = new RStatDataInharmIDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataInHarmIPOList.add(po1); + } + } + /*生成dayInHarmV*/ + List dataInHarmVPO = getDataInHarmV(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataInHarmVPO)) { + for (DataInHarmVPO item : dataInHarmVPO) { + RStatDataInharmVDPO po1 = new RStatDataInharmVDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataInHarmVPOList.add(po1); + } + } + /*生成dayPlt*/ + List dataPlt = getDataPlt(lineIndex, startTime, endTime); + if (!CollectionUtils.isEmpty(dataPlt)) { + for (DataPltPO item : dataPlt) { + RStatDataPltDPO po1 = new RStatDataPltDPO(); + BeanUtils.copyProperties(item,po1); + po1.setTime(time); + po1.setQualityFlag(Integer.parseInt(item.getQualityFlag())); + dataPltPOList.add(po1); + } + } } -// if (!CollectionUtils.isEmpty(dataVPOList)){ -// statDataVDService.insert(dataVPOList); -// } -// if (!CollectionUtils.isEmpty(dataIPOList)){ -// statDataIDService.insert(dataIPOList); -// } -// if (!CollectionUtils.isEmpty(dataFlickerPOList)){ -// statDataFlickerDService.insert(dataFlickerPOList); -// } -// if (!CollectionUtils.isEmpty(dataFlucPOList)){ -// statDataFlucDService.insert(dataFlucPOList); -// } -// if (!CollectionUtils.isEmpty(dataHarmPhasicIPOList)){ -// statDataHarmphasicIDService.insert(dataHarmPhasicIPOList); -// } -// if (!CollectionUtils.isEmpty(dataHarmPhasicVPOList)){ -// statDataHarmphasicVDService.insert(dataHarmPhasicVPOList); -// } -// if (!CollectionUtils.isEmpty(dataHarmPowerPPOList)){ -// statDataHarmpowerPDService.insert(dataHarmPowerPPOList); -// } -// if (!CollectionUtils.isEmpty(dataHarmPowerQPOList)){ -// statDataHarmpowerQDService.insert(dataHarmPowerQPOList); -// } -// if (!CollectionUtils.isEmpty(dataHarmPowerSPOList)){ -// statDataHarmpowerSDService.insert(dataHarmPowerSPOList); -// } -// if (!CollectionUtils.isEmpty(dataHarmRateIPOList)){ -// statDataHarmRateIDService.insert(dataHarmRateIPOList); -// } -// if (!CollectionUtils.isEmpty(dataHarmRateVPOList)){ -// statDataHarmRateVDService.insert(dataHarmRateVPOList); -// } -// if (!CollectionUtils.isEmpty(dataInHarmIPOList)){ -// statDataInharmIDService.insert(dataInHarmIPOList); -// } -// if (!CollectionUtils.isEmpty(dataInHarmVPOList)){ -// statDataInharmVDService.insert(dataInHarmVPOList); -// } -// if (!CollectionUtils.isEmpty(dataPltPOList)){ -// statDataPltDService.insert(dataPltPOList); -// } + if (!CollectionUtils.isEmpty(dataVPOList)){ + statDataVDService.insert(dataVPOList); + } + if (!CollectionUtils.isEmpty(dataIPOList)){ + statDataIDService.insert(dataIPOList); + } + if (!CollectionUtils.isEmpty(dataFlickerPOList)){ + statDataFlickerDService.insert(dataFlickerPOList); + } + if (!CollectionUtils.isEmpty(dataFlucPOList)){ + statDataFlucDService.insert(dataFlucPOList); + } + if (!CollectionUtils.isEmpty(dataHarmPhasicIPOList)){ + statDataHarmphasicIDService.insert(dataHarmPhasicIPOList); + } + if (!CollectionUtils.isEmpty(dataHarmPhasicVPOList)){ + statDataHarmphasicVDService.insert(dataHarmPhasicVPOList); + } + if (!CollectionUtils.isEmpty(dataHarmPowerPPOList)){ + statDataHarmpowerPDService.insert(dataHarmPowerPPOList); + } + if (!CollectionUtils.isEmpty(dataHarmPowerQPOList)){ + statDataHarmpowerQDService.insert(dataHarmPowerQPOList); + } + if (!CollectionUtils.isEmpty(dataHarmPowerSPOList)){ + statDataHarmpowerSDService.insert(dataHarmPowerSPOList); + } + if (!CollectionUtils.isEmpty(dataHarmRateIPOList)){ + statDataHarmRateIDService.insert(dataHarmRateIPOList); + } + if (!CollectionUtils.isEmpty(dataHarmRateVPOList)){ + statDataHarmRateVDService.insert(dataHarmRateVPOList); + } + if (!CollectionUtils.isEmpty(dataInHarmIPOList)){ + statDataInharmIDService.insert(dataInHarmIPOList); + } + if (!CollectionUtils.isEmpty(dataInHarmVPOList)){ + statDataInharmVDService.insert(dataInHarmVPOList); + } + if (!CollectionUtils.isEmpty(dataPltPOList)){ + statDataPltDService.insert(dataPltPOList); + } + + log.info(LocalDateTime.now()+"data表转day结束=====》"); } - private final InfluxTestMapper mapper; - - public List test(String lineId,String startTime, String endTime) { - InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataVPO.class, RStatDataVD.class); - influxQueryWrapper.max(DataVPO::getFreq); - influxQueryWrapper.eq(DataVPO::getLineId,lineId); - influxQueryWrapper.between(DataVPO::getTime,startTime,endTime); - List list = mapper.selectData(influxQueryWrapper); - return list; - } - - - - - - /** * 功能描述:获取dataV数据 * @author xy @@ -3121,12 +3089,12 @@ public class DayDataServiceImpl implements DayDataService { } /** - * @Description: 组装 RMpHarmonicVRateReportDPO - * @Param: [dataV, dataHarmRateVPO,PhaseType] dataV:16条datav数据 - * @return: com.njcn.prepare.harmonic.pojo.po.line.RMpHarmonicVRateReportDPO - * @Author: clam - * @Date: 2022/10/25 - */ + * @Description: 组装 RMpHarmonicVRateReportDPO + * @Param: [dataV, dataHarmRateVPO,PhaseType] dataV:16条datav数据 + * @return: com.njcn.prepare.harmonic.pojo.po.line.RMpHarmonicVRateReportDPO + * @Author: clam + * @Date: 2022/10/25 + */ private RMpHarmonicVRateReportD packageRMpHarmonicVRateReportDPO(List dataV,List dataHarmRateVPOList,String PhaseType,Instant instant){ RMpHarmonicVRateReportD result = null; @@ -3236,12 +3204,12 @@ public class DayDataServiceImpl implements DayDataService { return result ; } /** - * @Description: packageRMpFlickerReportDPOPO - * @Param: [dataFlickerPO, PhaseType] - * @return: com.njcn.prepare.harmonic.pojo.mysql.po.line.RMpFlickerReportDPO - * @Author: clam - * @Date: 2022/10/26 - */ + * @Description: packageRMpFlickerReportDPOPO + * @Param: [dataFlickerPO, PhaseType] + * @return: com.njcn.prepare.harmonic.pojo.mysql.po.line.RMpFlickerReportDPO + * @Author: clam + * @Date: 2022/10/26 + */ private RMpFlickerReportDPO packageRMpFlickerReportDPOPO(List dataFlickerPO, String PhaseType,Instant instant) { RMpFlickerReportDPO result = null; @@ -3327,12 +3295,12 @@ public class DayDataServiceImpl implements DayDataService { return result ; } /** - * @Description: packageRMpHarmonicIRateReportDPO - * @Param: [dataInHarmRateIPO, PhaseType] - * @return: com.njcn.prepare.harmonic.pojo.po.line.RMpHarmonicIRateReportDPO - * @Author: clam - * @Date: 2022/10/26 - */ + * @Description: packageRMpHarmonicIRateReportDPO + * @Param: [dataInHarmRateIPO, PhaseType] + * @return: com.njcn.prepare.harmonic.pojo.po.line.RMpHarmonicIRateReportDPO + * @Author: clam + * @Date: 2022/10/26 + */ private RMpHarmonicIRateReportD packageRMpHarmonicIRateReportDPO(List dataHarmRateIPOList, String PhaseType,Instant instant) { RMpHarmonicIRateReportD result =null; @@ -3373,12 +3341,12 @@ public class DayDataServiceImpl implements DayDataService { return result ; } /** - * @Description: packageRMpInharmonicIRateReportDPO - * @Param: [dataInHarmRateIPO, PhaseType] - * @return: com.njcn.prepare.harmonic.pojo.po.line.RMpInharmonicIRateReportDPO - * @Author: clam - * @Date: 2022/10/26 - */ + * @Description: packageRMpInharmonicIRateReportDPO + * @Param: [dataInHarmRateIPO, PhaseType] + * @return: com.njcn.prepare.harmonic.pojo.po.line.RMpInharmonicIRateReportDPO + * @Author: clam + * @Date: 2022/10/26 + */ private RMpInharmonicIRateReportD packageRMpInharmonicIRateReportDPO(List dataInHarmRateIPO, String PhaseType,Instant instant) { RMpInharmonicIRateReportD result = null; @@ -3393,38 +3361,38 @@ public class DayDataServiceImpl implements DayDataService { result.setMeasurementPointId (dataInHarmRateIPO.get (0).getLineId ()); result.setDataDate (Date.from (instant)); } - for (int j = 0; j < a.size ( ); j++) { - DataInHarmRateIPO temp = a.get (j); - if (Objects.equals (temp.getValueType ( ), "MIN")) { - covertBean = InfluxdbPOConverter.INFLUXDB_PO_CONVERTER.RMpInharmonicIRateReportDPOConverterMin (temp); - BeanUtils.copyProperties (covertBean, result, getNullPropertyNames (covertBean)); - } - if (Objects.equals (temp.getValueType ( ), "MAX")) { - covertBean = InfluxdbPOConverter.INFLUXDB_PO_CONVERTER.RMpInharmonicIRateReportDPOConverterMax (temp); - BeanUtils.copyProperties (covertBean, result, getNullPropertyNames (covertBean)); - } - if (Objects.equals (temp.getValueType ( ), "AVG")) { - covertBean = InfluxdbPOConverter.INFLUXDB_PO_CONVERTER.RMpInharmonicIRateReportDPOConverterAvg (temp); - BeanUtils.copyProperties (covertBean, result, getNullPropertyNames (covertBean)); - } - if (Objects.equals (temp.getValueType ( ), "CP95")) { - covertBean = InfluxdbPOConverter.INFLUXDB_PO_CONVERTER.RMpInharmonicIRateReportDPOConverter95 (temp); - BeanUtils.copyProperties (covertBean, result, getNullPropertyNames (covertBean)); - } + for (int j = 0; j < a.size ( ); j++) { + DataInHarmRateIPO temp = a.get (j); + if (Objects.equals (temp.getValueType ( ), "MIN")) { + covertBean = InfluxdbPOConverter.INFLUXDB_PO_CONVERTER.RMpInharmonicIRateReportDPOConverterMin (temp); + BeanUtils.copyProperties (covertBean, result, getNullPropertyNames (covertBean)); + } + if (Objects.equals (temp.getValueType ( ), "MAX")) { + covertBean = InfluxdbPOConverter.INFLUXDB_PO_CONVERTER.RMpInharmonicIRateReportDPOConverterMax (temp); + BeanUtils.copyProperties (covertBean, result, getNullPropertyNames (covertBean)); + } + if (Objects.equals (temp.getValueType ( ), "AVG")) { + covertBean = InfluxdbPOConverter.INFLUXDB_PO_CONVERTER.RMpInharmonicIRateReportDPOConverterAvg (temp); + BeanUtils.copyProperties (covertBean, result, getNullPropertyNames (covertBean)); + } + if (Objects.equals (temp.getValueType ( ), "CP95")) { + covertBean = InfluxdbPOConverter.INFLUXDB_PO_CONVERTER.RMpInharmonicIRateReportDPOConverter95 (temp); + BeanUtils.copyProperties (covertBean, result, getNullPropertyNames (covertBean)); } - - - return result; - } + + return result; + + } + /** - * @Description: packageRMpInharmonicIMagReportDPO - * @Param: [dataInHarmIPO, PhaseType] - * @return: com.njcn.prepare.harmonic.pojo.mysql.po.line.RMpInharmonicIMagReportDPO - * @Author: clam - * @Date: 2022/10/27 - */ + * @Description: packageRMpInharmonicIMagReportDPO + * @Param: [dataInHarmIPO, PhaseType] + * @return: com.njcn.prepare.harmonic.pojo.mysql.po.line.RMpInharmonicIMagReportDPO + * @Author: clam + * @Date: 2022/10/27 + */ private RMpInharmonicIMagReportDPO packageRMpInharmonicIMagReportDPO(List dataInHarmIPO, String PhaseType,Instant instant) { RMpInharmonicIMagReportDPO result = null; @@ -3466,12 +3434,12 @@ public class DayDataServiceImpl implements DayDataService { } /** - * @Description: packageRMpInharmonicVRateReportDPO - * @Param: [dataInHarmRateVPO, PhaseType] - * @return: com.njcn.prepare.harmonic.pojo.po.line.RMpInharmonicVRateReportDPO - * @Author: clam - * @Date: 2022/10/27 - */ + * @Description: packageRMpInharmonicVRateReportDPO + * @Param: [dataInHarmRateVPO, PhaseType] + * @return: com.njcn.prepare.harmonic.pojo.po.line.RMpInharmonicVRateReportDPO + * @Author: clam + * @Date: 2022/10/27 + */ private RMpInharmonicVRateReportD packageRMpInharmonicVRateReportDPO(List dataInHarmRateVPO, String PhaseType,Instant instant) { RMpInharmonicVRateReportD result = null ; @@ -3513,12 +3481,12 @@ public class DayDataServiceImpl implements DayDataService { } /** - * @Description: packageRMpHarmonicPReportDPO - * @Param: [dataHarmPowerPPO, dataHarmPowerQPO, PhaseType] - * @return: com.njcn.prepare.harmonic.pojo.mysql.po.line.RMpHarmonicPReportDPO - * @Author: clam - * @Date: 2022/10/28 - */ + * @Description: packageRMpHarmonicPReportDPO + * @Param: [dataHarmPowerPPO, dataHarmPowerQPO, PhaseType] + * @return: com.njcn.prepare.harmonic.pojo.mysql.po.line.RMpHarmonicPReportDPO + * @Author: clam + * @Date: 2022/10/28 + */ private RMpHarmonicPReportDPO packageRMpHarmonicPReportDPO(List dataHarmPowerPPO, List dataHarmPowerQPO, String PhaseType,Instant instant) { RMpHarmonicPReportDPO result = null ; @@ -3862,25 +3830,25 @@ public class DayDataServiceImpl implements DayDataService { } - /** - * 获取所有字段为null的属性名 - * @param source - * @return - */ - public String[] getNullPropertyNames (Object source) { - final BeanWrapper src = new BeanWrapperImpl (source); - PropertyDescriptor[] pds = src.getPropertyDescriptors ( ); + /** + * 获取所有字段为null的属性名 + * @param source + * @return + */ + public String[] getNullPropertyNames (Object source) { + final BeanWrapper src = new BeanWrapperImpl (source); + java.beans.PropertyDescriptor[] pds = src.getPropertyDescriptors ( ); - Set emptyNames = new HashSet ( ); - for (PropertyDescriptor pd : pds) { - Object srcValue = src.getPropertyValue (pd.getName ( )); - if (srcValue == null){ - emptyNames.add (pd.getName ( )); - } + Set emptyNames = new HashSet ( ); + for (java.beans.PropertyDescriptor pd : pds) { + Object srcValue = src.getPropertyValue (pd.getName ( )); + if (srcValue == null){ + emptyNames.add (pd.getName ( )); } - String[] result = new String[emptyNames.size ( )]; - return emptyNames.toArray (result); - } + String[] result = new String[emptyNames.size ( )]; + return emptyNames.toArray (result); + + } }