Commit 66f50370 authored by tangwei's avatar tangwei

增加所属电站信息

parent 70dc4643
......@@ -13,4 +13,12 @@ public class HYGFJPDayPower implements Serializable {
private String hour;
private String yearMonthDay;
private Double power;
private String stationName; //名称
private String regionalCompaniesCode; //区域公司code
private String amosCompanyCode; //经销商code
}
......@@ -23,4 +23,8 @@ public class HYGFJPInverterWarn implements Serializable {
private String state;
private String warnId;
private String handlerStatus;
private String stationName; //名称
private String regionalCompaniesCode; //区域公司code
private String amosCompanyCode; //经销商code
}
......@@ -14,4 +14,8 @@ public class HYGFJPStationPowerHistory implements Serializable {
private long time;
private String thirdStationId;
private String thirdCode;
private String stationName; //名称
private String regionalCompaniesCode; //区域公司code
private String amosCompanyCode; //经销商code
}
......@@ -143,5 +143,11 @@ public class TdHYGFInverterDayGenerate implements Serializable {
private Double income;
private Double fullhour;
private String name;
private String stationName; //名称
private String regionalCompaniesCode; //区域公司code
private String amosCompanyCode; //经销商code
}
......@@ -41,5 +41,10 @@ public class TdHYGFInverterMonthGenerate implements Serializable {
private Double fullhour;
private Double income;
private String name;
private String stationName; //名称
private String regionalCompaniesCode; //区域公司code
private String amosCompanyCode; //经销商code
}
......@@ -42,5 +42,11 @@ public class TdHYGFInverterTotalGenerate implements Serializable {
private Double fullhour;
private Double income;
private String name;
private String stationName; //名称
private String regionalCompaniesCode; //区域公司code
private String amosCompanyCode; //经销商code
}
......@@ -42,5 +42,10 @@ public class TdHYGFInverterYearGenerate implements Serializable {
private Double income;
private String name;
private String stationName; //名称
private String regionalCompaniesCode; //区域公司code
private String amosCompanyCode; //经销商code
}
......@@ -39,5 +39,10 @@ public class TdHYGFStationDayGenerate implements Serializable {
* 收益
*/
private Double income;
private String stationName; //名称
private String regionalCompaniesCode; //区域公司code
private String amosCompanyCode; //经销商code
}
......@@ -39,5 +39,10 @@ public class TdHYGFStationMonthGenerate implements Serializable {
* 收益
*/
private Double income;
private String stationName; //名称
private String regionalCompaniesCode; //区域公司code
private String amosCompanyCode; //经销商code
}
......@@ -39,5 +39,10 @@ public class TdHYGFStationYearGenerate implements Serializable {
* 收益
*/
private Double income;
private String stationName; //名称
private String regionalCompaniesCode; //区域公司code
private String amosCompanyCode; //经销商code
}
......@@ -209,33 +209,48 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
jpStationMapper.insert(jpStation);
}
//增加td 电站区域公司,经销商绑定表
TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
eq("third_code", PVProducerInfoEnum.JLY.getCode()).
eq("third_station_id", stationIds.get(i)));
//判断是否存在
if (ObjectUtils.isEmpty(tdJpStation)) {
tdJpStation = new TdJpStation();
}
tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId(stationIds.get(i));
tdJpStation.setThirdCode(PVProducerInfoEnum.JLY.getCode());
tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
tdJpStation.setStationName(jpStation.getName());
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.insert(tdJpStation);
} else {
tdJpStation.setCreatedTime(System.currentTimeMillis());
tdJpStationMapper.insert(tdJpStation);
}
// //增加td 电站区域公司,经销商绑定表
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code", PVProducerInfoEnum.JLY.getCode()).
// eq("third_station_id", stationIds.get(i)));
// //判断是否存在
// if (ObjectUtils.isEmpty(tdJpStation)) {
// tdJpStation = new TdJpStation();
// }
// tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
// tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
// tdJpStation.setThirdStationId(stationIds.get(i));
// tdJpStation.setThirdCode(PVProducerInfoEnum.JLY.getCode());
// tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
// tdJpStation.setStationName(jpStation.getName());
// if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
// tdJpStationMapper.insert(tdJpStation);
// } else {
// tdJpStation.setCreatedTime(System.currentTimeMillis());
// tdJpStationMapper.insert(tdJpStation);
// }
HYGFJPStationPowerHistory hygfjpStationPowerHistory = new HYGFJPStationPowerHistory();
hygfjpStationPowerHistory.setCreatedTime(System.currentTimeMillis());
hygfjpStationPowerHistory.setThirdStationId(jpStation.getThirdStationId());
hygfjpStationPowerHistory.setPower(golangStationDetail.getPower());
hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode());
hygfjpStationPowerHistory.setTime(System.currentTimeMillis());
//新加
hygfjpStationPowerHistory.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpStationPowerHistory.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpStationPowerHistory.setStationName(jpStation.getName());
hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory);
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(
new QueryWrapper<HYGFJPDayPower>().
eq("tation_id", stationIds.get(i)).
......@@ -249,6 +264,12 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(golangStationDetail.getPower());
//新加
hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpDayPower.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(hygfjpDayPower.getCreatedTime())) {
hygfjpDayPower.setCreatedTime(System.currentTimeMillis());
hygfjpDayPowerMapper.insert(hygfjpDayPower);
......@@ -270,6 +291,14 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFStationDayGenerate.setGenerate(jpStation.getDayGenerate());
tdHYGFStationDayGenerate.setFullhour(jpStation.getDayGenerate() / jpStation.getCapacity());
tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome());
//新加
tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationDayGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate.getCreatedTime())) {
tdHYGFStationDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
......@@ -290,6 +319,10 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFStationMonthGenerate.setGenerate(jpStation.getMonthGenerate());
tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity());
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
//新加
tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationMonthGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate.getCreatedTime())) {
tdHYGFStationMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
......@@ -310,6 +343,11 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate());
tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate() / jpStation.getCapacity());
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
//新加
tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationYearGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationYearGenerate.getCreatedTime())) {
tdHYGFStationYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationYearGenerateMapper.insert(tdHYGFStationYearGenerate);
......@@ -649,6 +687,24 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFInverterDayGenerate.setIgbtTemp(inverterDetailDto.getInverterTemperature());
tdHYGFInverterDayGenerate.setIncome(null);
tdHYGFInverterDayGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code",PVProducerInfoEnum.JLY.getCode()).
eq("third_station_id", String.valueOf(inverterDetailDto.getStationId())));
if(jpStation!=null){
tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterDayGenerate.setStationName(jpStation.getName());
}
tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate);
//户用场站月发电量
Date today1 = new Date();
......@@ -667,7 +723,13 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFInverterMonthGenerate.setYearMonth(DateUtil.format(today1, "yyyy-MM"));
tdHYGFInverterMonthGenerate.setGenerate(jpInverter.getDayPowerGeneration());
tdHYGFInverterMonthGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
//新加
if(jpStation!=null){
tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterMonthGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterMonthGenerate.getCreatedTime())) {
tdHYGFInverterMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate);
......@@ -690,6 +752,17 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFInverterYearGenerate.setGenerate(jpInverter.getMonthPowerGeneration());
tdHYGFInverterYearGenerate.setFullhour(jpInverter.getMonthPowerGeneration() / jpInverter.getCapacity());
tdHYGFInverterYearGenerate.setName(jpInverter.getName());
//新加
if(jpStation!=null){
tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterYearGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterYearGenerate.getCreatedTime())) {
tdHYGFInverterYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
......@@ -712,7 +785,12 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFInverterTotalGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFInverterTotalGenerate.setGenerate(jpInverter.getYearPowerGeneration());
tdHYGFInverterTotalGenerate.setFullhour(jpInverter.getYearPowerGeneration() / jpInverter.getCapacity());
//新加
if(jpStation!=null){
tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterTotalGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterTotalGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate.getCreatedTime())) {
tdHYGFInverterTotalGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterTotalGenerateMapper.insert(tdHYGFInverterTotalGenerate);
......@@ -766,6 +844,23 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpInverterWarn.setThirdCode(PVProducerInfoEnum.JLY.getCode());
hygfjpInverterWarn.setTreatment(alarmDto.getAdvice());
hygfjpInverterWarn.setStartTime(alarmDto.getAlarmBeginTime());
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code", PVProducerInfoEnum.JLY.getCode()).
eq("third_station_id", String.valueOf(String.valueOf(alarmDto.getStationId()))));
if(jpStation!=null){
hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpInverterWarn.setStationName(jpStation.getName());
}
hygfjpInverterWarn.setRecoverTime(null);
if (!ObjectUtils.isEmpty(alarmDto.getAlarmEndTime())) {
hygfjpInverterWarn.setRecoverTime(alarmDto.getAlarmEndTime());
......
......@@ -134,25 +134,25 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
//增加td 电站区域公司,经销商绑定表
TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
eq("third_code",PVProducerInfoEnum.GDW.getCode()).
eq("third_station_id", jpStation.getThirdStationId()));
//判断是否存在
if (org.springframework.util.ObjectUtils.isEmpty(tdJpStation)) {
tdJpStation = new TdJpStation();
}
tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( jpStation.getThirdStationId());
tdJpStation.setThirdCode(PVProducerInfoEnum.GDW.getCode());
tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
tdJpStation.setStationName(jpStation.getName());
if (!org.springframework.util.ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.insert(tdJpStation);
} else {
tdJpStation.setCreatedTime(System.currentTimeMillis());
tdJpStationMapper.insert(tdJpStation);
}
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code",PVProducerInfoEnum.GDW.getCode()).
// eq("third_station_id", jpStation.getThirdStationId()));
// //判断是否存在
// if (org.springframework.util.ObjectUtils.isEmpty(tdJpStation)) {
// tdJpStation = new TdJpStation();
// }
// tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
// tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
// tdJpStation.setThirdStationId( jpStation.getThirdStationId());
// tdJpStation.setThirdCode(PVProducerInfoEnum.GDW.getCode());
// tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
// tdJpStation.setStationName(jpStation.getName());
// if (!org.springframework.util.ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
// tdJpStationMapper.insert(tdJpStation);
// } else {
// tdJpStation.setCreatedTime(System.currentTimeMillis());
// tdJpStationMapper.insert(tdJpStation);
// }
......@@ -164,6 +164,13 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpStationPowerHistory.setPower(jpStation.getRealTimePower());
hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode());
hygfjpStationPowerHistory.setTime(System.currentTimeMillis());
//新加
hygfjpStationPowerHistory.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpStationPowerHistory.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpStationPowerHistory.setStationName(jpStation.getName());
hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory);
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(
new QueryWrapper<HYGFJPDayPower>().
......@@ -178,6 +185,12 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(jpStation.getRealTimePower());
//新加
hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpDayPower.setStationName(jpStation.getName());
if (org.springframework.util.ObjectUtils.isEmpty(hygfjpDayPower.getCreatedTime())) {
hygfjpDayPower.setCreatedTime(System.currentTimeMillis());
hygfjpDayPowerMapper.insert(hygfjpDayPower);
......@@ -199,6 +212,10 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFStationDayGenerate.setGenerate(jpStation.getDayGenerate());
tdHYGFStationDayGenerate.setFullhour(goodWeStationList.getTo_hour());
tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome());
//新加
tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationDayGenerate.setStationName(jpStation.getName());
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFStationDayGenerate.getCreatedTime())) {
tdHYGFStationDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
......@@ -221,6 +238,10 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity());
}
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
//新加
tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationMonthGenerate.setStationName(jpStation.getName());
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFStationMonthGenerate.getCreatedTime())) {
tdHYGFStationMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
......@@ -241,6 +262,10 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate());
tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate() / jpStation.getCapacity());
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
//新加
tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationYearGenerate.setStationName(jpStation.getName());
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFStationYearGenerate.getCreatedTime())) {
tdHYGFStationYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationYearGenerateMapper.insert(tdHYGFStationYearGenerate);
......@@ -526,6 +551,22 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterDayGenerate.setIncome(null);
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getDayPowerGeneration())){
tdHYGFInverterDayGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());}
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code",PVProducerInfoEnum.GDW.getCode()).
eq("third_station_id", String.valueOf(jpInverter.getThirdStationId())));
if(jpStation!=null){
tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterDayGenerate.setStationName(jpStation.getName());
}
tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate);
//户用场站月发电量
Date today1 = new Date();
......@@ -543,6 +584,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterMonthGenerate.setDayTime(DateUtil.format(today1, "yyyy-MM-dd"));
tdHYGFInverterMonthGenerate.setYearMonth(DateUtil.format(today1, "yyyy-MM"));
tdHYGFInverterMonthGenerate.setGenerate(jpInverter.getDayPowerGeneration());
//新加
if(jpStation!=null){
tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterMonthGenerate.setStationName(jpStation.getName());
}
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getDayPowerGeneration())){
tdHYGFInverterMonthGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());}
......@@ -570,6 +620,14 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterYearGenerate.setFullhour(jpInverter.getMonthPowerGeneration() / jpInverter.getCapacity());
}
tdHYGFInverterYearGenerate.setName(jpInverter.getName());
//新加
if(jpStation!=null){
tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterYearGenerate.setStationName(jpStation.getName());
}
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFInverterYearGenerate.getCreatedTime())) {
tdHYGFInverterYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
......@@ -594,7 +652,12 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getYearPowerGeneration())) {
tdHYGFInverterTotalGenerate.setFullhour(jpInverter.getYearPowerGeneration() / jpInverter.getCapacity());
}
//新加
if(jpStation!=null){
tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterTotalGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterTotalGenerate.setStationName(jpStation.getName());
}
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate.getCreatedTime())) {
tdHYGFInverterTotalGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterTotalGenerateMapper.insert(tdHYGFInverterTotalGenerate);
......@@ -683,6 +746,23 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpInverterWarn.setThirdCode(PVProducerInfoEnum.GDW.getCode());
hygfjpInverterWarn.setTreatment(GoodWeConstant.errorCodeMap.get(goodWeAlarmDto.getError_code()).get(2));
hygfjpInverterWarn.setStartTime(goodWeAlarmDto.getHappentime().getMillis());
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code", PVProducerInfoEnum.GDW.getCode()).
eq("third_station_id", String.valueOf(goodWeAlarmDto.getStationId())));
if(jpStation!=null){
hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpInverterWarn.setStationName(jpStation.getName());
}
hygfjpInverterWarn.setRecoverTime(null);
if (!ObjectUtils.isEmpty(goodWeAlarmDto.getRecoverytime())) {
hygfjpInverterWarn.setRecoverTime(goodWeAlarmDto.getRecoverytime().getMillis());
......
......@@ -303,25 +303,25 @@ public class ImasterDataServiceImpl implements ImasterDataService {
//增加td 电站区域公司,经销商绑定表
TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
eq("third_code",PVProducerInfoEnum.HUAWEI.getCode()).
eq("third_station_id", imasterStationList.getPlantCode()));
//判断是否存在
if (ObjectUtils.isEmpty(tdJpStation)) {
tdJpStation = new TdJpStation();
}
tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( imasterStationList.getPlantCode());
tdJpStation.setThirdCode(PVProducerInfoEnum.HUAWEI.getCode());
tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
tdJpStation.setStationName(jpStation.getName());
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.insert(tdJpStation);
} else {
tdJpStation.setCreatedTime(System.currentTimeMillis());
tdJpStationMapper.insert(tdJpStation);
}
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code",PVProducerInfoEnum.HUAWEI.getCode()).
// eq("third_station_id", imasterStationList.getPlantCode()));
// //判断是否存在
// if (ObjectUtils.isEmpty(tdJpStation)) {
// tdJpStation = new TdJpStation();
// }
// tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
// tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
// tdJpStation.setThirdStationId( imasterStationList.getPlantCode());
// tdJpStation.setThirdCode(PVProducerInfoEnum.HUAWEI.getCode());
// tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
// tdJpStation.setStationName(jpStation.getName());
// if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
// tdJpStationMapper.insert(tdJpStation);
// } else {
// tdJpStation.setCreatedTime(System.currentTimeMillis());
// tdJpStationMapper.insert(tdJpStation);
// }
......@@ -333,8 +333,21 @@ public class ImasterDataServiceImpl implements ImasterDataService {
hygfjpStationPowerHistory.setCreatedTime(System.currentTimeMillis());
hygfjpStationPowerHistory.setThirdStationId(jpStation.getThirdStationId());
// hygfjpStationPowerHistory.setPower(imasterStationDetail.getPower());
hygfjpStationPowerHistory.setPower(jpStation.getRealTimePower());
hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode());
hygfjpStationPowerHistory.setTime(System.currentTimeMillis());
//新加
hygfjpStationPowerHistory.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpStationPowerHistory.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpStationPowerHistory.setStationName(jpStation.getName());
hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory);
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(
new QueryWrapper<HYGFJPDayPower>().
......@@ -348,8 +361,11 @@ public class ImasterDataServiceImpl implements ImasterDataService {
hygfjpDayPower.setTationId(imasterStationList.getPlantCode());
hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(active_power);
//新加
hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpDayPower.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(hygfjpDayPower.getCreatedTime())) {
hygfjpDayPower.setCreatedTime(System.currentTimeMillis());
......@@ -372,6 +388,11 @@ public class ImasterDataServiceImpl implements ImasterDataService {
tdHYGFStationDayGenerate.setGenerate(jpStation.getDayGenerate());
tdHYGFStationDayGenerate.setFullhour(jpStation.getDayGenerate() / jpStation.getCapacity());
tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome());
//新加
tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationDayGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate.getCreatedTime())) {
tdHYGFStationDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
......@@ -392,6 +413,10 @@ public class ImasterDataServiceImpl implements ImasterDataService {
tdHYGFStationMonthGenerate.setGenerate(jpStation.getMonthGenerate());
tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity());
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
//新加
tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationMonthGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate.getCreatedTime())) {
tdHYGFStationMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
......@@ -412,6 +437,10 @@ public class ImasterDataServiceImpl implements ImasterDataService {
tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate());
tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate() / jpStation.getCapacity());
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
//新加
tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationYearGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationYearGenerate.getCreatedTime())) {
tdHYGFStationYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationYearGenerateMapper.insert(tdHYGFStationYearGenerate);
......@@ -860,6 +889,18 @@ public class ImasterDataServiceImpl implements ImasterDataService {
tdHYGFInverterDayGenerate.setIgbtTemp(inverterDetailDto.getTemperature());
tdHYGFInverterDayGenerate.setIncome(null);
tdHYGFInverterDayGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code",PVProducerInfoEnum.HUAWEI.getCode()).
eq("third_station_id", String.valueOf(jpInverter.getThirdStationId())));
if(jpStation!=null){
tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterDayGenerate.setStationName(jpStation.getName());
}
tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate);
//户用场站月发电量
Date today1 = new Date();
......@@ -878,6 +919,15 @@ public class ImasterDataServiceImpl implements ImasterDataService {
tdHYGFInverterMonthGenerate.setGenerate(jpInverter.getDayPowerGeneration());
tdHYGFInverterMonthGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
tdHYGFInverterMonthGenerate.setName(jpInverter.getName());
//新加
if(jpStation!=null){
tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterMonthGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterMonthGenerate.getCreatedTime())) {
tdHYGFInverterMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate);
......@@ -900,6 +950,14 @@ public class ImasterDataServiceImpl implements ImasterDataService {
tdHYGFInverterYearGenerate.setGenerate(jpInverter.getMonthPowerGeneration());
tdHYGFInverterYearGenerate.setFullhour(jpInverter.getMonthPowerGeneration() / jpInverter.getCapacity());
tdHYGFInverterYearGenerate.setName(jpInverter.getName());
//新加
if(jpStation!=null){
tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterYearGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterYearGenerate.getCreatedTime())) {
tdHYGFInverterYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
......@@ -922,7 +980,12 @@ public class ImasterDataServiceImpl implements ImasterDataService {
tdHYGFInverterTotalGenerate.setGenerate(jpInverter.getYearPowerGeneration());
tdHYGFInverterTotalGenerate.setFullhour(jpInverter.getYearPowerGeneration() / jpInverter.getCapacity());
tdHYGFInverterTotalGenerate.setName(jpInverter.getName());
//新加
if(jpStation!=null){
tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterTotalGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterTotalGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate.getCreatedTime())) {
tdHYGFInverterTotalGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterTotalGenerateMapper.insert(tdHYGFInverterTotalGenerate);
......@@ -985,6 +1048,21 @@ public class ImasterDataServiceImpl implements ImasterDataService {
hygfjpInverterWarn.setStartTime(alarmDto.getRaiseTime());
hygfjpInverterWarn.setRecoverTime(null);
hygfjpInverterWarn.setTimeLong(null);
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code", PVProducerInfoEnum.HUAWEI.getCode()).
eq("third_station_id", String.valueOf(alarmDto.getStationCode())));
if(jpStation!=null){
hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpInverterWarn.setStationName(jpStation.getName());
}
hygfjpInverterWarn.setState(ImasterConstant.alarmstatus.get(alarmDto.getStatus().toString()));
if (ObjectUtils.isEmpty(hygfjpInverterWarn.getCreatedTime())) {
hygfjpInverterWarn.setCreatedTime(System.currentTimeMillis());
......
......@@ -243,26 +243,26 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
//增加td 电站区域公司,经销商绑定表
TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
eq("third_code",PVProducerInfoEnum.KSOLAR.getCode()).
eq("third_station_id", ksolarStation.getStationId()));
//判断是否存在
if (ObjectUtils.isEmpty(tdJpStation)) {
tdJpStation = new TdJpStation();
}
tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( ksolarStation.getStationId());
tdJpStation.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode());
tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
tdJpStation.setStationName(jpStation.getName());
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.insert(tdJpStation);
} else {
tdJpStation.setCreatedTime(System.currentTimeMillis());
tdJpStationMapper.insert(tdJpStation);
}
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code",PVProducerInfoEnum.KSOLAR.getCode()).
// eq("third_station_id", ksolarStation.getStationId()));
// //判断是否存在
// if (ObjectUtils.isEmpty(tdJpStation)) {
// tdJpStation = new TdJpStation();
// }
// tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
// tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
// tdJpStation.setThirdStationId( ksolarStation.getStationId());
// tdJpStation.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode());
// tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
// tdJpStation.setStationName(jpStation.getName());
//
// if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
// tdJpStationMapper.insert(tdJpStation);
// } else {
// tdJpStation.setCreatedTime(System.currentTimeMillis());
// tdJpStationMapper.insert(tdJpStation);
// }
HYGFJPStationPowerHistory hygfjpStationPowerHistory = new HYGFJPStationPowerHistory();
hygfjpStationPowerHistory.setCreatedTime(System.currentTimeMillis());
......@@ -270,6 +270,14 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpStationPowerHistory.setPower(ksolarStation.getPowerInter());
hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode());
hygfjpStationPowerHistory.setTime(System.currentTimeMillis());
//新加
hygfjpStationPowerHistory.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpStationPowerHistory.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpStationPowerHistory.setStationName(jpStation.getName());
hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory);
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(
new QueryWrapper<HYGFJPDayPower>().
......@@ -284,6 +292,12 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(ksolarStation.getPowerInter());
//新加
hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpDayPower.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(hygfjpDayPower.getCreatedTime())) {
hygfjpDayPower.setCreatedTime(System.currentTimeMillis());
hygfjpDayPowerMapper.insert(hygfjpDayPower);
......@@ -308,6 +322,11 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFStationDayGenerate.setGenerate(jpStation.getDayGenerate());
tdHYGFStationDayGenerate.setFullhour(jpStation.getDayGenerate() / jpStation.getCapacity());
tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome());
//新加
tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationDayGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate.getCreatedTime())) {
tdHYGFStationDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
......@@ -328,6 +347,11 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFStationMonthGenerate.setGenerate(jpStation.getMonthGenerate());
tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity());
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
//新加
tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationMonthGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate.getCreatedTime())) {
tdHYGFStationMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
......@@ -348,6 +372,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate());
tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate() / jpStation.getCapacity());
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
//新加
tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationYearGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationYearGenerate.getCreatedTime())) {
tdHYGFStationYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationYearGenerateMapper.insert(tdHYGFStationYearGenerate);
......@@ -971,6 +999,21 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFInverterDayGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code",PVProducerInfoEnum.KSOLAR.getCode()).
eq("third_station_id", String.valueOf(jpInverter.getThirdStationId())));
if(jpStation!=null){
tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterDayGenerate.setStationName(jpStation.getName());
}
tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate);
//户用场站月发电量
Date today1 = new Date();
......@@ -990,6 +1033,14 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFInverterMonthGenerate.setName(jpInverter.getName());
tdHYGFInverterMonthGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
//新加
if(jpStation!=null){
tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterMonthGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterMonthGenerate.getCreatedTime())) {
tdHYGFInverterMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate);
......@@ -1014,6 +1065,14 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFInverterYearGenerate.setFullhour(jpInverter.getMonthPowerGeneration() / jpInverter.getCapacity());
//新加
if(jpStation!=null){
tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterYearGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterYearGenerate.getCreatedTime())) {
tdHYGFInverterYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
......@@ -1036,7 +1095,12 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFInverterTotalGenerate.setGenerate(jpInverter.getYearPowerGeneration());
tdHYGFInverterTotalGenerate.setFullhour(0.0d);
tdHYGFInverterTotalGenerate.setName(jpInverter.getName());
//新加
if(jpStation!=null){
tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterTotalGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterTotalGenerate.setStationName(jpStation.getName());
}
tdHYGFInverterTotalGenerate.setFullhour(jpInverter.getYearPowerGeneration() / jpInverter.getCapacity());
if (ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate.getCreatedTime())) {
tdHYGFInverterTotalGenerate.setCreatedTime(System.currentTimeMillis());
......@@ -1327,6 +1391,23 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpInverterWarn.setState(KSolarConstant.alarmstatus.get(ksolarAlarmDto.getStatus()));
hygfjpInverterWarn.setTimeLong(null);
hygfjpInverterWarn.setRecoverTime(null);
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code", PVProducerInfoEnum.KSOLAR.getCode()).
eq("third_station_id", ksolarAlarmDto.getStationId()));
if(jpStation!=null){
hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpInverterWarn.setStationName(jpStation.getName());
}
if (StringUtils.isNotBlank(ksolarAlarmDto.getRemoveTime())) {
hygfjpInverterWarn.setRecoverTime(DateUtil.parse(ksolarAlarmDto.getRemoveTime(), DatePattern.NORM_DATETIME_PATTERN).getTime());
}
......@@ -1340,6 +1421,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpInverterWarnMapper.insert(hygfjpInverterWarn);
}
}
}
}
}
......
......@@ -76,6 +76,10 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
private JpCollectorMapper jpCollectorMapper;
@Autowired
TdJpStationMapper tdJpStationMapper;
@Autowired
private HYGFJPDayPowerMapper hygfjpDayPowerMapper;
@Override
@Scheduled(cron = "${dataRequstScheduled.Sofar}")
public void stationList() {
......@@ -311,29 +315,54 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
jpStationMapper.insert(jpStation);
}
//增加td 电站区域公司,经销商绑定表
TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
eq("third_code",PVProducerInfoEnum.SH.getCode()).
eq("third_station_id", jpStation.getThirdStationId()));
//判断是否存在
if (ObjectUtils.isEmpty(tdJpStation)) {
tdJpStation = new TdJpStation();
String today = DateUtil.today();
String hour = new Date().getHours() + ":00";
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(
new QueryWrapper<HYGFJPDayPower>().
eq("tation_id", sunlightDto.getId().toString()).
eq("year_month_day", today).
eq("hour", hour)
);
if (ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower();
}
tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( jpStation.getThirdStationId());
tdJpStation.setThirdCode(PVProducerInfoEnum.SH.getCode());
tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
tdJpStation.setStationName(jpStation.getName());
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.insert(tdJpStation);
hygfjpDayPower.setTationId(sunlightDto.getId().toString());
hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(jpStation.getRealTimePower());
//新加
hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpDayPower.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(hygfjpDayPower.getCreatedTime())) {
hygfjpDayPower.setCreatedTime(System.currentTimeMillis());
hygfjpDayPowerMapper.insert(hygfjpDayPower);
} else {
tdJpStation.setCreatedTime(System.currentTimeMillis());
tdJpStationMapper.insert(tdJpStation);
hygfjpDayPowerMapper.insert(hygfjpDayPower);
}
//增加td 电站区域公司,经销商绑定表
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code",PVProducerInfoEnum.SH.getCode()).
// eq("third_station_id", jpStation.getThirdStationId()));
// //判断是否存在
// if (ObjectUtils.isEmpty(tdJpStation)) {
// tdJpStation = new TdJpStation();
// }
// tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
// tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
// tdJpStation.setThirdStationId( jpStation.getThirdStationId());
// tdJpStation.setThirdCode(PVProducerInfoEnum.SH.getCode());
// tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
// tdJpStation.setStationName(jpStation.getName());
// if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
// tdJpStationMapper.insert(tdJpStation);
// } else {
// tdJpStation.setCreatedTime(System.currentTimeMillis());
// tdJpStationMapper.insert(tdJpStation);
// }
//逆变器信信息
......@@ -347,6 +376,11 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
//电站报表
//户用场站日发电量
Date today1 = new Date();
......@@ -361,6 +395,12 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
tdHYGFStationDayGenerate.setDayTime(DateUtil.format(today1, "yyyy-MM-dd"));
tdHYGFStationDayGenerate.setYearMonth(DateUtil.format(today1, "yyyy-MM"));
tdHYGFStationDayGenerate.setGenerate(jpStation.getDayGenerate());
//新加
tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationDayGenerate.setStationName(jpStation.getName());
tdHYGFStationDayGenerate.setFullhour(
(jpStation.getDayGenerate()==null || jpStation.getCapacity()==null)?null:
......@@ -397,6 +437,11 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
);
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
//新加
tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationMonthGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate.getCreatedTime())) {
tdHYGFStationMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
......@@ -421,12 +466,21 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
(jpStation.getCapacity()<=0.0?null:jpStation.getYearGenerate()/jpStation.getCapacity())
);
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
//新加
tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationYearGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationYearGenerate.getCreatedTime())) {
tdHYGFStationYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationYearGenerateMapper.insert(tdHYGFStationYearGenerate);
} else {
tdHYGFStationYearGenerateMapper.insert(tdHYGFStationYearGenerate);
}
}
......@@ -569,7 +623,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
jpInverter.setYearPowerGeneration(jpStation.getYearGenerate());
jpInverter.setTotalPowerGeneration(jpStation.getAccumulatedPower());
jpInverter.setThirdStationId(jpStation.getThirdStationId());
jpInverter.setThirdCode(PVProducerInfoEnum.YG.getCode());
jpInverter.setThirdCode(PVProducerInfoEnum.SH.getCode());
jpInverter.setName(jpStation.getName());
jpInverter.setStationName(jpStation.getName());
jpInverter.setAddr(jpStation.getAddress());
......@@ -625,7 +679,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
}
jpInverterElectricity.setInverterId(jpInverter.getId());
jpInverterElectricity.setSnCode(jpInverter.getSnCode());
jpInverterElectricity.setThirdCode(PVProducerInfoEnum.YG.getCode());
jpInverterElectricity.setThirdCode(PVProducerInfoEnum.SH.getCode());
jpInverterElectricity.setThirdStationId(jpInverter.getThirdStationId());
if(i>2){
......@@ -773,6 +827,22 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
(jpInverter.getDayPowerGeneration()==null || jpInverter.getCapacity()==null)?null:
(jpInverter.getCapacity()<=0.0?null:jpInverter.getDayPowerGeneration()/jpInverter.getCapacity())
);
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code",PVProducerInfoEnum.SH.getCode()).
eq("third_station_id", String.valueOf(jpInverter.getThirdStationId())));
if(jpStation!=null){
tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterDayGenerate.setStationName(jpStation.getName());
}
tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate);
//户用场站月发电量
Date today1 = new Date();
......@@ -794,6 +864,15 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
(jpInverter.getDayPowerGeneration()==null || jpInverter.getCapacity()==null)?null:
(jpInverter.getCapacity()<=0.0?null:jpInverter.getDayPowerGeneration()/jpInverter.getCapacity())
);
//新加
if(jpStation!=null){
tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterMonthGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterMonthGenerate.getCreatedTime())) {
tdHYGFInverterMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate);
......@@ -820,6 +899,14 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
(jpInverter.getCapacity()<=0.0?null:jpInverter.getMonthPowerGeneration()/jpInverter.getCapacity())
);
//新加
if(jpStation!=null){
tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterYearGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterYearGenerate.getCreatedTime())) {
tdHYGFInverterYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
......
......@@ -87,7 +87,8 @@ public class SunlightServiceImpl implements SunlightService {
@Autowired
TdJpStationMapper tdJpStationMapper;
@Autowired
private HYGFJPDayPowerMapper hygfjpDayPowerMapper;
//td电站信息存储
@Override
@Scheduled(cron = "${dataRequstScheduled.Sunlight}")
......@@ -303,28 +304,56 @@ public class SunlightServiceImpl implements SunlightService {
jpStationMapper.insert(jpStation);
}
//增加td 电站区域公司,经销商绑定表
TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
eq("third_code", PVProducerInfoEnum.YG.getCode()).
eq("third_station_id", jpStation.getThirdStationId()));
//判断是否存在
if (ObjectUtils.isEmpty(tdJpStation)) {
tdJpStation = new TdJpStation();
String today = DateUtil.today();
String hour = new Date().getHours() + ":00";
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(
new QueryWrapper<HYGFJPDayPower>().
eq("tation_id",sunlightDto.getPs_id().toString()).
eq("year_month_day", today).
eq("hour", hour)
);
if (ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower();
}
tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( jpStation.getThirdStationId());
tdJpStation.setThirdCode( PVProducerInfoEnum.YG.getCode());
tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
tdJpStation.setStationName(jpStation.getName());
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.insert(tdJpStation);
hygfjpDayPower.setTationId(sunlightDto.getPs_id().toString());
hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(jpStation.getRealTimePower());
//新加
hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpDayPower.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(hygfjpDayPower.getCreatedTime())) {
hygfjpDayPower.setCreatedTime(System.currentTimeMillis());
hygfjpDayPowerMapper.insert(hygfjpDayPower);
} else {
tdJpStation.setCreatedTime(System.currentTimeMillis());
tdJpStationMapper.insert(tdJpStation);
hygfjpDayPowerMapper.insert(hygfjpDayPower);
}
//增加td 电站区域公司,经销商绑定表
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code", PVProducerInfoEnum.YG.getCode()).
// eq("third_station_id", jpStation.getThirdStationId()));
// //判断是否存在
// if (ObjectUtils.isEmpty(tdJpStation)) {
// tdJpStation = new TdJpStation();
// }
// tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
// tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
// tdJpStation.setThirdStationId( jpStation.getThirdStationId());
// tdJpStation.setThirdCode( PVProducerInfoEnum.YG.getCode());
// tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
// tdJpStation.setStationName(jpStation.getName());
// if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
// tdJpStationMapper.insert(tdJpStation);
// } else {
// tdJpStation.setCreatedTime(System.currentTimeMillis());
// tdJpStationMapper.insert(tdJpStation);
// }
this.setJpInverte(listd.get(0),jpStation);
}
......@@ -351,6 +380,11 @@ public class SunlightServiceImpl implements SunlightService {
);
tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome());
//新加
tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationDayGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate.getCreatedTime())) {
tdHYGFStationDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
......@@ -380,6 +414,16 @@ public class SunlightServiceImpl implements SunlightService {
);
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
//新加
tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationMonthGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate.getCreatedTime())) {
tdHYGFStationMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
......@@ -404,6 +448,10 @@ public class SunlightServiceImpl implements SunlightService {
(jpStation.getCapacity()<=0.0?null:jpStation.getYearGenerate()/jpStation.getCapacity())
);
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
//新加
tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationYearGenerate.setStationName(jpStation.getName());
if (ObjectUtils.isEmpty(tdHYGFStationYearGenerate.getCreatedTime())) {
tdHYGFStationYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationYearGenerateMapper.insert(tdHYGFStationYearGenerate);
......@@ -639,6 +687,19 @@ public class SunlightServiceImpl implements SunlightService {
(jpInverter.getDayPowerGeneration()==null || jpInverter.getCapacity()==null)?null:
(jpInverter.getCapacity()<=0.0?null:jpInverter.getDayPowerGeneration()/jpInverter.getCapacity())
);
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code",PVProducerInfoEnum.YG.getCode()).
eq("third_station_id", String.valueOf(jpInverter.getThirdStationId())));
if(jpStation!=null){
tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterDayGenerate.setStationName(jpStation.getName());
}
tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate);
//户用场站月发电量
Date today1 = new Date();
......@@ -660,6 +721,16 @@ public class SunlightServiceImpl implements SunlightService {
(jpInverter.getDayPowerGeneration()==null || jpInverter.getCapacity()==null)?null:
(jpInverter.getCapacity()<=0.0?null:jpInverter.getDayPowerGeneration()/jpInverter.getCapacity())
);
//新加
if(jpStation!=null){
tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterMonthGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterMonthGenerate.getCreatedTime())) {
tdHYGFInverterMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate);
......@@ -685,7 +756,12 @@ public class SunlightServiceImpl implements SunlightService {
(jpInverter.getMonthPowerGeneration()==null || jpInverter.getCapacity()==null)?null:
(jpInverter.getCapacity()<=0.0?null:jpInverter.getMonthPowerGeneration()/jpInverter.getCapacity())
);
//新加
if(jpStation!=null){
tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterYearGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterYearGenerate.getCreatedTime())) {
tdHYGFInverterYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
......@@ -712,6 +788,16 @@ public class SunlightServiceImpl implements SunlightService {
(jpInverter.getYearPowerGeneration()==null || jpInverter.getCapacity()==null)?null:
(jpInverter.getCapacity()<=0.0?null:jpInverter.getYearPowerGeneration()/jpInverter.getCapacity())
);
//新加
if(jpStation!=null){
tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterTotalGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterTotalGenerate.setStationName(jpStation.getName());
}
if (ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate.getCreatedTime())) {
tdHYGFInverterTotalGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterTotalGenerateMapper.insert(tdHYGFInverterTotalGenerate);
......@@ -790,6 +876,25 @@ public class SunlightServiceImpl implements SunlightService {
hygfjpInverterWarn.setRecoverTime(null);
hygfjpInverterWarn.setTimeLong(null);
hygfjpInverterWarn.setWarnId(sunlightWarm.getFault_code());
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code", PVProducerInfoEnum.YG.getCode()).
eq("third_station_id", sunlightWarm.getPs_id().toString()));
if(jpStation!=null){
hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpInverterWarn.setStationName(jpStation.getName());
}
try {
TimeUnit.MINUTES.sleep(1);
hygfjpInverterWarn.setCreatedTime(System.currentTimeMillis());
......
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