Commit fcc0329b authored by litengwei's avatar litengwei

对接第三方北向数据

parent db86e30e
......@@ -114,8 +114,8 @@ public class HouseholdTestController {
@ApiOperation(httpMethod = "POST", value = "科士达", notes = "科士达")
public void ksolarnew() throws IOException {
// kSolarDataAcquisitionService.stationList();
kSolarDataAcquisitionService.stationDetail();
kSolarDataAcquisitionService.stationList();
kSolarDataAcquisitionService.stationDetail();
kSolarDataAcquisitionService.collectorList();
kSolarDataAcquisitionService.collectorDetail();
//// goLangDataAcquisitionService.inverterList();
......
......@@ -11,6 +11,7 @@ public class ImasterInverterList {
private Long id;
private String stationCode;
private String stationName;
private String addr;
private String collectorSnCode;
private String devName;
private String esnCode;
......
......@@ -211,8 +211,8 @@ public class ImasterDataServiceImpl implements ImasterDataService {
jpStation.setThirdCode(PVProducerInfoEnum.HUAWEI.getCode());
// jpStation.setRealTimePower(imasterStationDetail.getPower());
// jpStation.setOnGridType(GoLangConstant.intoNetWorkStatus.get(String.valueOf(imasterStationDetail.getStationtypenew())));
jpStation.setDayGenerate(imasterStationDetail.getDay_power() * ImasterConstant.kwhToMwh);
jpStation.setMonthGenerate(imasterStationDetail.getMonth_power() * ImasterConstant.kwhToMwh);
jpStation.setDayGenerate(imasterStationDetail.getDay_power() );
jpStation.setMonthGenerate(imasterStationDetail.getMonth_power() );
// jpStation.setMonthGenerate(imasterStationDetail.getMonthPower());
// jpStation.setYearGenerate(imasterStationDetail.getYearenergy());
......@@ -225,7 +225,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
for (ImasterStationDetailsYear imasterStationDetailsYear : result3
) {
if(imasterStationDetailsYear.getCollectTime().equals(String.valueOf(yearStart))) {
jpStation.setYearGenerate(imasterStationDetailsYear.getInverter_power() * ImasterConstant.kwhToMwh);
jpStation.setYearGenerate(imasterStationDetailsYear.getInverter_power());
jpStation.setYearIncome(imasterStationDetailsYear.getPower_profit());
imasterStationDetailsYear.setStationCode(imasterStationList.getPlantCode());
imasterStationDetailsYear.setCreatedTime(System.currentTimeMillis());
......@@ -246,7 +246,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
}
}
jpStation.setAccumulatedPower(imasterStationDetail.getTotal_power() * ImasterConstant.kwhToMwh);
jpStation.setAccumulatedPower(imasterStationDetail.getTotal_power());
jpStation.setDayIncome(imasterStationDetail.getDay_income());
jpStation.setCumulativeIncome(imasterStationDetail.getTotal_income());
jpStation.setState(ImasterConstant.stationStaus.get(String.valueOf(imasterStationDetail.getReal_health_state())));
......@@ -284,7 +284,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
hygfjpDayPower.setTationId(imasterStationList.getPlantCode());
hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today);
// hygfjpDayPower.setPower(imasterStationDetail.getPower());
// hygfjpDayPower.setPower(imasterStationDetail.getPower());
if (ObjectUtils.isEmpty(hygfjpDayPower.getCreatedTime())) {
hygfjpDayPower.setCreatedTime(System.currentTimeMillis());
hygfjpDayPowerMapper.insert(hygfjpDayPower);
......@@ -415,6 +415,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
ImasterInverterList imasterInverterList = result.get(j);
imasterInverterList.setStationName(imasterStationList.getPlantName());
imasterInverterList.setAddr(imasterStationList.getPlantAddress());
imasterInverterList.setCreatedTime(System.currentTimeMillis());
if(imasterInverterList.getDevTypeId() == ImasterConstant.devTypeI) {
imasterInverterListMapper.insert(imasterInverterList);
......@@ -485,11 +486,12 @@ public class ImasterDataServiceImpl implements ImasterDataService {
jpInverter = new JpInverter();
}
jpInverter.setSnCode(imasterInverterList.getEsnCode());
jpInverter.setAddr(imasterInverterList.getAddr());
jpInverter.setCollectorSnCode(collectorList.getEsnCode());
jpInverter.setCollectorId(String.valueOf(collectorList.getId()));
jpInverter.setDayPowerGeneration(inverterDetailDto.getDay_cap() * ImasterConstant.kwhToMwh);
jpInverter.setDayPowerGeneration(inverterDetailDto.getDay_cap() );
jpInverter.setState(ImasterConstant.inverterStaus.get(String.valueOf(inverterDetailDto.getRun_state())));
jpInverter.setTotalPowerGeneration(inverterDetailDto.getTotal_cap() * ImasterConstant.kwhToMwh);
jpInverter.setTotalPowerGeneration(inverterDetailDto.getTotal_cap());
Long currentTime = System.currentTimeMillis();
Long monthStart = CalendarAdjust.getMonthStartTime(currentTime, "GMT+8:00");
......@@ -500,7 +502,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
for (ImasterInverterYear imasterInverterYear : result3
) {
if(imasterInverterYear.getCollectTime().equals(String.valueOf(yearStart)) && inverterDetailDto.getInverterId().equals(imasterInverterYear.getInverterId())) {
jpInverter.setYearPowerGeneration(imasterInverterYear.getProduct_power() * ImasterConstant.kwhToMwh);
jpInverter.setYearPowerGeneration(imasterInverterYear.getProduct_power());
imasterInverterYear.setCreatedTime(System.currentTimeMillis());
imasterInverterYearMapper.insert(imasterInverterYear);
}
......@@ -512,7 +514,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
for (ImasterInverterMonth imasterInverterMonth: result2
) {
if(imasterInverterMonth.getCollectTime().equals(String.valueOf(monthStart)) && inverterDetailDto.getInverterId().equals(imasterInverterMonth.getInverterId())) {
jpInverter.setMonthPowerGeneration(imasterInverterMonth.getProduct_power() * ImasterConstant.kwhToMwh);
jpInverter.setMonthPowerGeneration(imasterInverterMonth.getProduct_power());
imasterInverterMonth.setCreatedTime(System.currentTimeMillis());
imasterInverterMonthMapper.insert(imasterInverterMonth);
}
......
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