Commit 78b6a712 authored by caotao's avatar caotao

固德威数据采集逆变器数据入库

parent 672698f3
...@@ -177,6 +177,7 @@ public class GoodWeConstant { ...@@ -177,6 +177,7 @@ public class GoodWeConstant {
public static String collectorDetailUrl = "/v1/api/collectorDetail"; public static String collectorDetailUrl = "/v1/api/collectorDetail";
public static String queryInventerUrl = "/api/OpenApi/QueryInventers"; public static String queryInventerUrl = "/api/OpenApi/QueryInventers";
public static String getInventersDatas = "/api/OpenApi/GetInventersDatas"; public static String getInventersDatas = "/api/OpenApi/GetInventersDatas";
public static String getinverterGenURl = "/api/OpenApi/GetInverterPower";
public static String inverterDetailUrl = "/v1/api/inverterDetail"; public static String inverterDetailUrl = "/v1/api/inverterDetail";
public static String alarmListUrl = "/api/OpenApi/GetPowerStationWariningInfoByMultiCondition"; public static String alarmListUrl = "/api/OpenApi/GetPowerStationWariningInfoByMultiCondition";
public static String stationDayGenUrl ="/v1/api/stationDayEnergyList"; public static String stationDayGenUrl ="/v1/api/stationDayEnergyList";
......
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.api.householdapi.controller; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.api.householdapi.controller;
import com.yeejoin.amos.api.householdapi.Utils.GoodWeRequestUtil; import com.yeejoin.amos.api.householdapi.Utils.GoodWeRequestUtil;
import com.yeejoin.amos.api.householdapi.Utils.HouseholdPvUtils; import com.yeejoin.amos.api.householdapi.Utils.HouseholdPvUtils;
import com.yeejoin.amos.api.householdapi.face.dto.GoodWEGenStation;
import com.yeejoin.amos.api.householdapi.face.service.*; import com.yeejoin.amos.api.householdapi.face.service.*;
import com.yeejoin.amos.api.householdapi.face.service.impl.ImasterDataServiceImpl; import com.yeejoin.amos.api.householdapi.face.service.impl.ImasterDataServiceImpl;
import com.yeejoin.amos.api.householdapi.face.service.impl.SofarDataAcquisitionServiceImpl; import com.yeejoin.amos.api.householdapi.face.service.impl.SofarDataAcquisitionServiceImpl;
...@@ -53,7 +54,14 @@ public class HouseholdTestController { ...@@ -53,7 +54,14 @@ public class HouseholdTestController {
public void goodweDemo() throws IOException { public void goodweDemo() throws IOException {
// goodWeDataAcquisitionService.stationList(); // goodWeDataAcquisitionService.stationList();
// goodWeDataAcquisitionService.stationDetail(); // goodWeDataAcquisitionService.stationDetail();
goodWeDataAcquisitionService.inverAlramInfo(); // goodWeDataAcquisitionService.inverAlramInfo();
// goodWeDataAcquisitionService.inverterList();
// goodWeDataAcquisitionService.inverterDetail();
// goodWeDataAcquisitionService.stationMonthGen();
// goodWeDataAcquisitionService.stationYearGen();
// goodWeDataAcquisitionService.inverterDetail();
goodWeDataAcquisitionService.inverterMonthGen();
goodWeDataAcquisitionService.inverterYearGen();
} }
/** /**
......
package com.yeejoin.amos.api.householdapi.face.dto; package com.yeejoin.amos.api.householdapi.face.dto;
import lombok.Data;
// 固德威实时数据 // 固德威实时数据
@Data
public class D { public class D {
public double vpv3; public double vpv3;
public double vpv2; public double vpv2;
......
...@@ -8,13 +8,16 @@ import com.alibaba.fastjson.JSONObject; ...@@ -8,13 +8,16 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.qiniu.util.Json;
import com.yeejoin.amos.api.householdapi.Utils.GoodWeRequestUtil; import com.yeejoin.amos.api.householdapi.Utils.GoodWeRequestUtil;
import com.yeejoin.amos.api.householdapi.constant.GoLangConstant; import com.yeejoin.amos.api.householdapi.constant.GoLangConstant;
import com.yeejoin.amos.api.householdapi.constant.GoodWeConstant; import com.yeejoin.amos.api.householdapi.constant.GoodWeConstant;
import com.yeejoin.amos.api.householdapi.face.dto.*; import com.yeejoin.amos.api.householdapi.face.dto.*;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpInverter; import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpInverter;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpInverterElectricity;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpStation; import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpStation;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.*; import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.*;
import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpInverterElectricityMapper;
import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpInverterMapper; import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpInverterMapper;
import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpStationMapper; import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpStationMapper;
import com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.*; import com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.*;
...@@ -27,6 +30,7 @@ import org.springframework.stereotype.Service; ...@@ -27,6 +30,7 @@ import org.springframework.stereotype.Service;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
...@@ -58,6 +62,14 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -58,6 +62,14 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
private HYGFJPInverterElecHistoryMapper hygfjpInverterElecHistoryMapper; private HYGFJPInverterElecHistoryMapper hygfjpInverterElecHistoryMapper;
//户用光伏日发电量 //户用光伏日发电量
@Autowired @Autowired
private JpInverterElectricityMapper jpInverterElectricityMapper;
@Autowired
private TdHYGFInverterDayGenerateMapper tdHYGFInverterDayGenerateMapper;
@Autowired
private TdHYGFInverterMonthGenerateMapper tdHYGFInverterMonthGenerateMapper;
@Autowired
private TdHYGFInverterYearGenerateMapper tdHYGFInverterYearGenerateMapper;
@Autowired
private HYGFJPDayPowerMapper hygfjpDayPowerMapper; private HYGFJPDayPowerMapper hygfjpDayPowerMapper;
@Autowired @Autowired
private TdHYGFStationDayGenerateMapper tdHYGFStationDayGenerateMapper; private TdHYGFStationDayGenerateMapper tdHYGFStationDayGenerateMapper;
...@@ -68,6 +80,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -68,6 +80,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
@Autowired @Autowired
private TdHYGFInverterTotalGenerateMapper tdHYGFInverterTotalGenerateMapper; private TdHYGFInverterTotalGenerateMapper tdHYGFInverterTotalGenerateMapper;
@Override @Override
public void stationList() { public void stationList() {
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
...@@ -76,15 +89,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -76,15 +89,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
String today = DateUtil.today(); String today = DateUtil.today();
String hour = new Date().getHours() + ":00"; String hour = new Date().getHours() + ":00";
List<GoodWeStationMonitorDto> goodWeStationLists =goodWeRequestUtil.getResPonse(GoodWeConstant.stationListStatusUrl, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data_list, GoodWeStationMonitorDto.class); List<GoodWeStationMonitorDto> goodWeStationLists = goodWeRequestUtil.getResPonse(GoodWeConstant.stationListStatusUrl, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data_list, GoodWeStationMonitorDto.class);
if(goodWeStationLists.size()>0){ if (goodWeStationLists.size() > 0) {
goodWeStationLists.forEach(goodWeStationMonitorDto -> { goodWeStationLists.forEach(goodWeStationMonitorDto -> {
GoodWeStationMonitorList goodWeStationList = new GoodWeStationMonitorList(); GoodWeStationMonitorList goodWeStationList = new GoodWeStationMonitorList();
BeanUtil.copyProperties(goodWeStationMonitorDto, goodWeStationList); BeanUtil.copyProperties(goodWeStationMonitorDto, goodWeStationList);
goodWeStationList.setCreatedTime(System.currentTimeMillis()); goodWeStationList.setCreatedTime(System.currentTimeMillis());
goodWeStationMonitorListMapper.insert(goodWeStationList); goodWeStationMonitorListMapper.insert(goodWeStationList);
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id",goodWeStationList.getPowerstation_id())); JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id", goodWeStationList.getPowerstation_id()));
if(ObjectUtils.isEmpty(jpStation)){ if (ObjectUtils.isEmpty(jpStation)) {
jpStation = new JpStation(); jpStation = new JpStation();
} }
jpStation.setThirdStationId(goodWeStationList.getPowerstation_id()); jpStation.setThirdStationId(goodWeStationList.getPowerstation_id());
...@@ -100,20 +113,20 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -100,20 +113,20 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
jpStation.setUserPhone(goodWeStationList.getOwner_phone()); jpStation.setUserPhone(goodWeStationList.getOwner_phone());
jpStation.setStationContact(goodWeStationList.getOwner_name()); jpStation.setStationContact(goodWeStationList.getOwner_name());
jpStation.setModuleCount(0); jpStation.setModuleCount(0);
jpStation.setRealTimePower(goodWeStationList.getPac()*GoodWeConstant.wToKw); jpStation.setRealTimePower(goodWeStationList.getPac() * GoodWeConstant.wToKw);
jpStation.setState(GoodWeConstant.stationStaus.get(goodWeStationList.getStatus())); jpStation.setState(GoodWeConstant.stationStaus.get(goodWeStationList.getStatus()));
jpStation.setDayGenerate(goodWeStationList.getEday()); jpStation.setDayGenerate(goodWeStationList.getEday());
jpStation.setDayIncome(goodWeStationList.getEday_income()); jpStation.setDayIncome(goodWeStationList.getEday_income());
jpStation.setAccumulatedPower(goodWeStationList.getEtotal()); jpStation.setAccumulatedPower(goodWeStationList.getEtotal());
jpStation.setCumulativeIncome(goodWeStationList.getEtotal_income()); jpStation.setCumulativeIncome(goodWeStationList.getEtotal_income());
if(ObjectUtils.isEmpty(jpStation.getSequenceNbr())){ if (ObjectUtils.isEmpty(jpStation.getSequenceNbr())) {
jpStation.setCreateTime(new Date(goodWeStationList.getCreatedTime())); jpStation.setCreateTime(new Date(goodWeStationList.getCreatedTime()));
if(ObjectUtils.isNotEmpty(goodWeStationList.getTurnon_time())){ if (ObjectUtils.isNotEmpty(goodWeStationList.getTurnon_time())) {
jpStation.setAccessTime(new Date(goodWeStationList.getTurnon_time())); jpStation.setAccessTime(new Date(goodWeStationList.getTurnon_time()));
} }
jpStationMapper.insert(jpStation); jpStationMapper.insert(jpStation);
}else { } else {
jpStationMapper.updateById(jpStation); jpStationMapper.updateById(jpStation);
} }
HYGFJPStationPowerHistory hygfjpStationPowerHistory = new HYGFJPStationPowerHistory(); HYGFJPStationPowerHistory hygfjpStationPowerHistory = new HYGFJPStationPowerHistory();
...@@ -175,7 +188,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -175,7 +188,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFStationMonthGenerate.setMonthTime(DateUtil.format(today1, "yyyy-MM")); tdHYGFStationMonthGenerate.setMonthTime(DateUtil.format(today1, "yyyy-MM"));
tdHYGFStationMonthGenerate.setYear(DateUtil.format(today1, "yyyy")); tdHYGFStationMonthGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFStationMonthGenerate.setGenerate(jpStation.getMonthGenerate()); tdHYGFStationMonthGenerate.setGenerate(jpStation.getMonthGenerate());
if(ObjectUtils.isNotEmpty(jpStation.getMonthGenerate())){ if (ObjectUtils.isNotEmpty(jpStation.getMonthGenerate())) {
tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity()); tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity());
} }
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome()); tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
...@@ -212,24 +225,24 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -212,24 +225,24 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
@Override @Override
public void stationDetail() { public void stationDetail() {
List<String> stationIds = goodWeStationMonitorListMapper.getStationIds(); List<String> stationIds = goodWeStationMonitorListMapper.getStationIds();
stationIds.forEach(stationId ->{ stationIds.forEach(stationId -> {
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
String apiurl = GoodWeConstant.stationDetailUrl+"?id="+stationId; String apiurl = GoodWeConstant.stationDetailUrl + "?id=" + stationId;
List<GoodWeStationDetail> goodWeStationDetails =goodWeRequestUtil.getResPonse(apiurl, GoodWeConstant.requestGet, requstParam, GoodWeConstant.resovleRule_data, GoodWeStationDetail.class); List<GoodWeStationDetail> goodWeStationDetails = goodWeRequestUtil.getResPonse(apiurl, GoodWeConstant.requestGet, requstParam, GoodWeConstant.resovleRule_data, GoodWeStationDetail.class);
if(goodWeStationDetails.size()>0){ if (goodWeStationDetails.size() > 0) {
goodWeStationDetails.forEach(goodWeStationDetail -> { goodWeStationDetails.forEach(goodWeStationDetail -> {
goodWeStationDetail.setCreatedTime(System.currentTimeMillis()); goodWeStationDetail.setCreatedTime(System.currentTimeMillis());
goodWeStationDetailMapper.insert(goodWeStationDetail); goodWeStationDetailMapper.insert(goodWeStationDetail);
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id",goodWeStationDetail.getPowerstation_id())); JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id", goodWeStationDetail.getPowerstation_id()));
if(ObjectUtils.isEmpty(jpStation)){ if (ObjectUtils.isEmpty(jpStation)) {
jpStation = new JpStation(); jpStation = new JpStation();
} }
jpStation.setUserName(goodWeStationDetail.getOwner_name()); jpStation.setUserName(goodWeStationDetail.getOwner_name());
jpStation.setUserPhone(goodWeStationDetail.getOwner_phone()); jpStation.setUserPhone(goodWeStationDetail.getOwner_phone());
jpStation.setStationContact(goodWeStationDetail.getOwner_name()); jpStation.setStationContact(goodWeStationDetail.getOwner_name());
jpStation.setAccessTime(DateUtil.parse(goodWeStationDetail.getTurnon_time(), DatePattern.NORM_DATETIME_PATTERN)); jpStation.setAccessTime(DateUtil.parse(goodWeStationDetail.getTurnon_time(), DatePattern.NORM_DATETIME_PATTERN));
if(!ObjectUtils.isEmpty(jpStation.getSequenceNbr())){ if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) {
jpStationMapper.updateById(jpStation); jpStationMapper.updateById(jpStation);
} }
}); });
...@@ -241,21 +254,21 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -241,21 +254,21 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
@Override @Override
public void stationMonthGen() { public void stationMonthGen() {
List<String> stationIds = goodWeStationMonitorListMapper.getStationIds(); List<String> stationIds = goodWeStationMonitorListMapper.getStationIds();
stationIds.forEach(stationId ->{ stationIds.forEach(stationId -> {
String currentMonth = DateUtil.format(new Date(),"yyyyMM"); String currentMonth = DateUtil.format(new Date(), "yyyyMM");
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("id",stationId); requestInfo.put("id", stationId);
requestInfo.put("date",DateUtil.today()); requestInfo.put("date", DateUtil.today());
requestInfo.put("count",0); requestInfo.put("count", 0);
requestInfo.put("type",1); requestInfo.put("type", 1);
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
List<GoodWEGenStation> goodWEGenStations =goodWeRequestUtil.getResPonse(GoodWeConstant.stationGenUrl, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class); List<GoodWEGenStation> goodWEGenStations = goodWeRequestUtil.getResPonse(GoodWeConstant.stationGenUrl, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class);
List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream().filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentMonth)).collect(Collectors.toList()); List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream().filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentMonth)).collect(Collectors.toList());
currentMonthGenStations.forEach(goodWEGenStation -> { currentMonthGenStations.forEach(goodWEGenStation -> {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id",stationId)); JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id", stationId));
if(ObjectUtils.isNotEmpty(jpStation)){ if (ObjectUtils.isNotEmpty(jpStation)) {
jpStation.setMonthGenerate(Double.parseDouble(goodWEGenStation.getPower())); jpStation.setMonthGenerate(Double.parseDouble(goodWEGenStation.getPower()));
jpStation.setMonthIncome(jpStation.getMonthGenerate()*0.42); jpStation.setMonthIncome(jpStation.getMonthGenerate() * 0.42);
jpStationMapper.updateById(jpStation); jpStationMapper.updateById(jpStation);
} }
}); });
...@@ -265,21 +278,21 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -265,21 +278,21 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
@Override @Override
public void stationYearGen() { public void stationYearGen() {
List<String> stationIds = goodWeStationMonitorListMapper.getStationIds(); List<String> stationIds = goodWeStationMonitorListMapper.getStationIds();
stationIds.forEach(stationId ->{ stationIds.forEach(stationId -> {
String currentYear = DateUtil.format(new Date(),"yyyy"); String currentYear = DateUtil.format(new Date(), "yyyy");
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("id",stationId); requestInfo.put("id", stationId);
requestInfo.put("date",DateUtil.today()); requestInfo.put("date", DateUtil.today());
requestInfo.put("count",0); requestInfo.put("count", 0);
requestInfo.put("type",2); requestInfo.put("type", 2);
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
List<GoodWEGenStation> goodWEGenStations =goodWeRequestUtil.getResPonse(GoodWeConstant.stationGenUrl, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class); List<GoodWEGenStation> goodWEGenStations = goodWeRequestUtil.getResPonse(GoodWeConstant.stationGenUrl, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class);
List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream().filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentYear)).collect(Collectors.toList()); List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream().filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentYear)).collect(Collectors.toList());
currentMonthGenStations.forEach(goodWEGenStation -> { currentMonthGenStations.forEach(goodWEGenStation -> {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id",stationId)); JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id", stationId));
if(ObjectUtils.isNotEmpty(jpStation)){ if (ObjectUtils.isNotEmpty(jpStation)) {
jpStation.setYearGenerate(Double.parseDouble(goodWEGenStation.getPower())); jpStation.setYearGenerate(Double.parseDouble(goodWEGenStation.getPower()));
jpStation.setYearIncome(jpStation.getYearGenerate()*0.42); jpStation.setYearIncome(jpStation.getYearGenerate() * 0.42);
jpStationMapper.updateById(jpStation); jpStationMapper.updateById(jpStation);
} }
}); });
...@@ -300,15 +313,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -300,15 +313,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
@Override @Override
public void inverterList() { public void inverterList() {
List<String> stationIds = goodWeStationMonitorListMapper.getStationIds(); List<String> stationIds = goodWeStationMonitorListMapper.getStationIds();
stationIds.stream().forEach(stationId ->{ stationIds.stream().forEach(stationId -> {
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("page_index", 1); requestInfo.put("page_index", 1);
requestInfo.put("page_size", 100); requestInfo.put("page_size", 100);
requestInfo.put("pw_id", stationId); requestInfo.put("pw_id", stationId);
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
List<GoodWeINverterDetailDto> inverterDetailDtoList = goodWeRequestUtil.getResPonse(GoodWeConstant.queryInventerUrl List<GoodWeINverterDetailDto> inverterDetailDtoList = goodWeRequestUtil.getResPonse(GoodWeConstant.queryInventerUrl
,GoodWeConstant.requestPost,requstParam,GoodWeConstant.resovleRule_data_list,GoodWeINverterDetailDto.class); , GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data_list, GoodWeINverterDetailDto.class);
inverterDetailDtoList.forEach(goodWeINverterDetailDto ->{ inverterDetailDtoList.forEach(goodWeINverterDetailDto -> {
// System.out.println(goodWeINverterDetailDto.getIt_sn()); // System.out.println(goodWeINverterDetailDto.getIt_sn());
JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>(). JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>().
eq("third_station_id", goodWeINverterDetailDto.getPw_id()). eq("third_station_id", goodWeINverterDetailDto.getPw_id()).
...@@ -337,27 +350,279 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -337,27 +350,279 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
@Override @Override
public void inverterDetail() { public void inverterDetail() {
List<String> goodweSnList = jpInverterMapper.getGoodWeSnCodes();; List<String> goodweSnList = jpInverterMapper.getGoodWeSnCodes();
List<List<String>> splitList = Lists.partition(goodweSnList, 50); List<List<String>> splitList = Lists.partition(goodweSnList, 50);
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
for (int i = 0; i < splitList.size(); i++) { for (int i = 0; i < splitList.size(); i++) {
String requestSns = splitList.get(i).stream().map(s-> "sns="+s).collect(Collectors.joining("&")); String requestSns = splitList.get(i).stream().map(s -> "sns=" + s).collect(Collectors.joining("&"));
String apiUrl = GoodWeConstant.getInventersDatas+"?"+requestSns; String apiUrl = GoodWeConstant.getInventersDatas + "?" + requestSns;
List<GoodWeInverterCurrentDataDto> list = goodWeRequestUtil.getResPonse(apiUrl,GoodWeConstant.requestGet,requstParam,GoodWeConstant.resovleRule_data_list, GoodWeInverterCurrentDataDto.class); List<GoodWeInverterCurrentDataDto> list = goodWeRequestUtil.getResPonse(apiUrl, GoodWeConstant.requestGet, requstParam, GoodWeConstant.resovleRule_data_list, GoodWeInverterCurrentDataDto.class);
list.forEach(goodWeInverterCurrentDataDto -> goodWeInverterCurrentDataDto.getD()); list.forEach(goodWeInverterCurrentDataDto -> {
JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>().
eq("third_code", PVProducerInfoEnum.GDW.getCode()).
eq("sn_code", goodWeInverterCurrentDataDto.getSn()));
jpInverter.setIgbtTemperature(String.valueOf(goodWeInverterCurrentDataDto.getTempperature()));
jpInverter.setDayPowerGeneration(goodWeInverterCurrentDataDto.getEday());
jpInverter.setCapacity(goodWeInverterCurrentDataDto.getCapacity());
jpInverterMapper.updateById(jpInverter);
JSONObject hanlderResult = JSONObject.parseObject(JSON.toJSONString(goodWeInverterCurrentDataDto.getD()));
for (int k = 1; k < 3; k++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>().
eq("sn_code", goodWeInverterCurrentDataDto.getSn()).
eq("type", "交流").
eq("name", "AC" + k)
);
if (org.springframework.util.ObjectUtils.isEmpty(jpInverterElectricity)) {
jpInverterElectricity = new JpInverterElectricity();
}
jpInverterElectricity.setInverterId(jpInverter.getId());
jpInverterElectricity.setSnCode(goodWeInverterCurrentDataDto.getSn());
jpInverterElectricity.setThirdCode(PVProducerInfoEnum.GDW.getCode());
jpInverterElectricity.setThirdStationId(jpInverter.getThirdStationId());
jpInverterElectricity.setType("交流");
jpInverterElectricity.setName("AC" + k);
jpInverterElectricity.setVoltage(Double.valueOf(hanlderResult.get("vac" + k).toString()));
jpInverterElectricity.setCurrent(Double.valueOf(hanlderResult.get("iac" + k).toString()));
if (org.springframework.util.ObjectUtils.isEmpty(jpInverterElectricity.getSequenceNbr())) {
jpInverterElectricityMapper.insert(jpInverterElectricity);
} else {
jpInverterElectricityMapper.updateById(jpInverterElectricity);
}
}
for (int k1 = 1; k1 < 4; k1++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>().
eq("sn_code", goodWeInverterCurrentDataDto.getSn()).
eq("type", "直流").
eq("name", "PV" + k1)
);
if (org.springframework.util.ObjectUtils.isEmpty(jpInverterElectricity)) {
jpInverterElectricity = new JpInverterElectricity();
}
jpInverterElectricity.setInverterId(jpInverter.getId());
jpInverterElectricity.setSnCode(goodWeInverterCurrentDataDto.getSn());
jpInverterElectricity.setThirdCode(PVProducerInfoEnum.GDW.getCode());
jpInverterElectricity.setThirdStationId(jpInverter.getThirdStationId());
jpInverterElectricity.setType("直流");
jpInverterElectricity.setName("PV" + k1);
jpInverterElectricity.setVoltage(Double.valueOf(hanlderResult.get("vpv" + k1).toString()));
jpInverterElectricity.setCurrent(Double.valueOf(hanlderResult.get("ipv" + k1).toString()));
// jpInverterElectricity.setPower(Double.valueOf(hanlderResult.get("pow" + k1).toString()));
if (org.springframework.util.ObjectUtils.isEmpty(jpInverterElectricity.getSequenceNbr())) {
jpInverterElectricityMapper.insert(jpInverterElectricity);
} else {
jpInverterElectricityMapper.updateById(jpInverterElectricity);
}
}
HYGFJPInverterElecHistory hygfjpInverterElecHistory = new HYGFJPInverterElecHistory();
hygfjpInverterElecHistory.setThirdStationId(jpInverter.getThirdStationId());
hygfjpInverterElecHistory.setCreatedTime(System.currentTimeMillis());
hygfjpInverterElecHistory.setSnCode(goodWeInverterCurrentDataDto.getSn());
hygfjpInverterElecHistory.setUAcCurrent(goodWeInverterCurrentDataDto.getD().getIac1());
hygfjpInverterElecHistory.setVAcCurrent(goodWeInverterCurrentDataDto.getD().getIac2());
hygfjpInverterElecHistory.setWAcCurrent(goodWeInverterCurrentDataDto.getD().getIac3());
hygfjpInverterElecHistory.setUAcVoltage(goodWeInverterCurrentDataDto.getD().getVac1());
hygfjpInverterElecHistory.setVAcVoltage(goodWeInverterCurrentDataDto.getD().getVac2());
hygfjpInverterElecHistory.setWAcVoltage(goodWeInverterCurrentDataDto.getD().getVac3());
hygfjpInverterElecHistory.setThirdCode(PVProducerInfoEnum.GDW.getCode());
hygfjpInverterElecHistory.setTime(System.currentTimeMillis());
hygfjpInverterElecHistoryMapper.insert(hygfjpInverterElecHistory);
// 逆变器历史
String today = DateUtil.today();
HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper.selectOne(new QueryWrapper<HYGFJPInverterHistory>()
.eq("sn_code", goodWeInverterCurrentDataDto.getSn())
.eq("date", today));
if (org.springframework.util.ObjectUtils.isEmpty(hygfjpInverterHistory)) {
hygfjpInverterHistory = new HYGFJPInverterHistory();
}
hygfjpInverterHistory.setDate(today);
hygfjpInverterHistory.setThirdStationId(jpInverter.getThirdStationId());
hygfjpInverterHistory.setInverterId(jpInverter.getId());
hygfjpInverterHistory.setSnCode(goodWeInverterCurrentDataDto.getSn());
hygfjpInverterHistory.setThirdCode(PVProducerInfoEnum.GDW.getCode());
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getDayPowerGeneration())){
hygfjpInverterHistory.setGenerationHours(jpInverter.getDayPowerGeneration()/jpInverter.getCapacity());
}
hygfjpInverterHistory.setPowerGeneration(goodWeInverterCurrentDataDto.getEday());
if (org.springframework.util.ObjectUtils.isEmpty(hygfjpInverterHistory.getCreatedTime())) {
hygfjpInverterHistory.setCreatedTime(System.currentTimeMillis());
hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory);
} else {
hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory);
}
//-----------------------户用光伏日报表----------------------
TdHYGFInverterDayGenerate tdHYGFInverterDayGenerate = new TdHYGFInverterDayGenerate();
tdHYGFInverterDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterDayGenerate.setName(jpInverter.getName());
tdHYGFInverterDayGenerate.setThirdStationId(String.valueOf(jpInverter.getThirdStationId()));
tdHYGFInverterDayGenerate.setSnCode(jpInverter.getSnCode().trim());
tdHYGFInverterDayGenerate.setWorkStatus(jpInverter.getState());
D d = goodWeInverterCurrentDataDto.getD();
//交流电压
tdHYGFInverterDayGenerate.setDcv1(d.getVac1());
tdHYGFInverterDayGenerate.setDcv2(d.getVac2());
tdHYGFInverterDayGenerate.setDcv3(d.getVac3());
//交流电流
// tdHYGFInverterDayGenerate.setDcv4(inverterDetailDto.getUAc4());
tdHYGFInverterDayGenerate.setDcc1(d.getIac1());
tdHYGFInverterDayGenerate.setDcc2(d.getIac2());
tdHYGFInverterDayGenerate.setDcc3(d.getIac3());
// tdHYGFInverterDayGenerate.setDcc4(inverterDetailDto.getIAc4());
//直流电压
tdHYGFInverterDayGenerate.setAcv1(d.getVpv1());
tdHYGFInverterDayGenerate.setAcv2(d.getVpv2());
tdHYGFInverterDayGenerate.setAcv3(d.getVpv3());
tdHYGFInverterDayGenerate.setAcv4(d.getVpv4());
//直流电流
tdHYGFInverterDayGenerate.setAcc1(d.getIpv1());
tdHYGFInverterDayGenerate.setAcc2(d.getIpv2());
tdHYGFInverterDayGenerate.setAcc3(d.getIpv3());
tdHYGFInverterDayGenerate.setAcc4(d.getIpv4());
//功率
// tdHYGFInverterDayGenerate.setPv1(inverterDetailDto.getPow1());
// tdHYGFInverterDayGenerate.setPv2(inverterDetailDto.getPow2());
// tdHYGFInverterDayGenerate.setPv3(inverterDetailDto.getPow3());
// tdHYGFInverterDayGenerate.setPv4(inverterDetailDto.getPow4());
// tdHYGFInverterDayGenerate.setTotalPower(inverterDetailDto.getPac());
// tdHYGFInverterDayGenerate.setFrequency(String.valueOf(inverterDetailDto.getFac()));
// tdHYGFInverterDayGenerate.setPowerFactor(inverterDetailDto.getPowerFactor());
tdHYGFInverterDayGenerate.setDayGen(jpInverter.getDayPowerGeneration());
tdHYGFInverterDayGenerate.setMonthGen(jpInverter.getMonthPowerGeneration());
tdHYGFInverterDayGenerate.setYearGen(jpInverter.getYearPowerGeneration());
tdHYGFInverterDayGenerate.setTotalGen(jpInverter.getTotalPowerGeneration());
tdHYGFInverterDayGenerate.setIgbtTemp(goodWeInverterCurrentDataDto.getTempperature());
tdHYGFInverterDayGenerate.setIncome(null);
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getDayPowerGeneration())){
tdHYGFInverterDayGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());}
tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate);
//户用场站月发电量
Date today1 = new Date();
TdHYGFInverterMonthGenerate tdHYGFInverterMonthGenerate = tdHYGFInverterMonthGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterMonthGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode())
.eq("day_time", DateUtil.format(today1, "yyyy-MM-dd"))
.eq("year_month", DateUtil.format(today1, "yyyy-MM")));
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFInverterMonthGenerate)) {
tdHYGFInverterMonthGenerate = new TdHYGFInverterMonthGenerate();
}
tdHYGFInverterMonthGenerate.setThirdStationId(jpInverter.getThirdStationId());
tdHYGFInverterMonthGenerate.setSnCode(jpInverter.getSnCode().trim());
tdHYGFInverterMonthGenerate.setName(jpInverter.getName());
tdHYGFInverterMonthGenerate.setDayTime(DateUtil.format(today1, "yyyy-MM-dd"));
tdHYGFInverterMonthGenerate.setYearMonth(DateUtil.format(today1, "yyyy-MM"));
tdHYGFInverterMonthGenerate.setGenerate(jpInverter.getDayPowerGeneration());
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getDayPowerGeneration())){
tdHYGFInverterMonthGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());}
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFInverterMonthGenerate.getCreatedTime())) {
tdHYGFInverterMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate);
} else {
tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate);
}
//户用场站年发电量
TdHYGFInverterYearGenerate tdHYGFInverterYearGenerate = tdHYGFInverterYearGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterYearGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode())
.eq("month_time", DateUtil.format(today1, "yyyy-MM"))
.eq("year", DateUtil.format(today1, "yyyy")));
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFInverterYearGenerate)) {
tdHYGFInverterYearGenerate = new TdHYGFInverterYearGenerate();
}
tdHYGFInverterYearGenerate.setThirdStationId(jpInverter.getThirdStationId());
tdHYGFInverterYearGenerate.setSnCode(jpInverter.getSnCode().trim());
tdHYGFInverterYearGenerate.setMonthTime(DateUtil.format(today1, "yyyy-MM"));
tdHYGFInverterYearGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFInverterYearGenerate.setGenerate(jpInverter.getMonthPowerGeneration());
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getMonthPowerGeneration())){
tdHYGFInverterYearGenerate.setFullhour(jpInverter.getMonthPowerGeneration() / jpInverter.getCapacity());
}
tdHYGFInverterYearGenerate.setName(jpInverter.getName());
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFInverterYearGenerate.getCreatedTime())) {
tdHYGFInverterYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
} else {
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
}
//户用场站年发电量
TdHYGFInverterTotalGenerate tdHYGFInverterTotalGenerate = tdHYGFInverterTotalGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterTotalGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode())
.eq("year_time", DateUtil.format(today1, "yyyy"))
.eq("year", DateUtil.format(today1, "yyyy")));
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate)) {
tdHYGFInverterTotalGenerate = new TdHYGFInverterTotalGenerate();
}
tdHYGFInverterTotalGenerate.setThirdStationId(jpInverter.getThirdStationId());
tdHYGFInverterTotalGenerate.setName(null == jpInverter.getName() ? null : jpInverter.getName());
tdHYGFInverterTotalGenerate.setSnCode(jpInverter.getSnCode().trim());
tdHYGFInverterTotalGenerate.setYearTime(DateUtil.format(today1, "yyyy"));
tdHYGFInverterTotalGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFInverterTotalGenerate.setGenerate(jpInverter.getYearPowerGeneration());
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getYearPowerGeneration())) {
tdHYGFInverterTotalGenerate.setFullhour(jpInverter.getYearPowerGeneration() / jpInverter.getCapacity());
}
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate.getCreatedTime())) {
tdHYGFInverterTotalGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterTotalGenerateMapper.insert(tdHYGFInverterTotalGenerate);
} else {
tdHYGFInverterTotalGenerateMapper.insert(tdHYGFInverterTotalGenerate);
}
});
} }
} }
@Override @Override
public void inverterMonthGen() { public void inverterMonthGen() {
List<String> sns =jpInverterMapper.getGoodWeSnCodes() ;
String currentMonth = DateUtil.format(new Date(), "yyyyMM");
sns.forEach(sn -> {
HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("sn", sn);
requestInfo.put("date", DateUtil.today());
requestInfo.put("count", 0);
requestInfo.put("type", 1);
String requstParam = JSON.toJSONString(requestInfo);
String apiUrl = GoodWeConstant.getinverterGenURl+"?sn="+sn+"&date="+DateUtil.today()+"&count=0&type=1";
List<GoodWEGenStation> goodWEGenStations = goodWeRequestUtil.getResPonse(apiUrl, GoodWeConstant.requestGet, requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class);
List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream().filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentMonth)).collect(Collectors.toList());
currentMonthGenStations.forEach(goodWEGenStation -> {
JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("sn_code", sn));
if (ObjectUtils.isNotEmpty(jpInverter)) {
jpInverter.setMonthPowerGeneration(Double.parseDouble(goodWEGenStation.getPower()));
jpInverterMapper.updateById(jpInverter);
}
});
});
} }
@Override @Override
public void inverterYearGen() { public void inverterYearGen() {
String currentYear = DateUtil.format(new Date(), "yyyy");
List<String> sns =jpInverterMapper.getGoodWeSnCodes() ;
sns.forEach(sn -> {
HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("sn", sn);
requestInfo.put("date", DateUtil.today());
requestInfo.put("count", 0);
requestInfo.put("type", 2);
String requstParam = JSON.toJSONString(requestInfo);
String apiUrl = GoodWeConstant.getinverterGenURl+"?sn="+sn+"&date="+DateUtil.today()+"&count=0&type=2";
List<GoodWEGenStation> goodWEGenStations = goodWeRequestUtil.getResPonse(apiUrl, GoodWeConstant.requestGet, requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class);
List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream().filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentYear)).collect(Collectors.toList());
currentMonthGenStations.forEach(goodWEGenStation -> {
JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("sn_code", sn));
if (ObjectUtils.isNotEmpty(jpInverter)) {
jpInverter.setYearPowerGeneration(Double.parseDouble(goodWEGenStation.getPower()));
jpInverterMapper.updateById(jpInverter);
}
});
});
} }
@Override @Override
...@@ -368,9 +633,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -368,9 +633,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo.put("page_size", 1000); requestInfo.put("page_size", 1000);
requestInfo.put("starttime", today + " 00:00:00"); requestInfo.put("starttime", today + " 00:00:00");
requestInfo.put("endtime", today + " 23:59:59"); requestInfo.put("endtime", today + " 23:59:59");
requestInfo.put("status",2); requestInfo.put("status", 2);
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
List<GoodWeAlarmDto> alarmList = goodWeRequestUtil.getResPonse(GoodWeConstant.alarmListUrl,GoodWeConstant.requestPost,requstParam,GoodWeConstant.resovleRule_data_list,GoodWeAlarmDto.class); List<GoodWeAlarmDto> alarmList = goodWeRequestUtil.getResPonse(GoodWeConstant.alarmListUrl, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data_list, GoodWeAlarmDto.class);
alarmList.forEach(goodWeAlarmDto -> { alarmList.forEach(goodWeAlarmDto -> {
if (!ObjectUtils.isEmpty(goodWeAlarmDto.getDevicesn())) { if (!ObjectUtils.isEmpty(goodWeAlarmDto.getDevicesn())) {
HYGFJPInverterWarn hygfjpInverterWarn = hygfjpInverterWarnMapper.selectOne(new QueryWrapper<HYGFJPInverterWarn>() HYGFJPInverterWarn hygfjpInverterWarn = hygfjpInverterWarnMapper.selectOne(new QueryWrapper<HYGFJPInverterWarn>()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment