Commit 9e6849c9 authored by tangwei's avatar tangwei

增加td 电站数据

parent cf97c5f6
......@@ -80,7 +80,8 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
@Autowired
private TdHYGFInverterTotalGenerateMapper tdHYGFInverterTotalGenerateMapper;
@Autowired
TdJpStationMapper tdJpStationMapper;
@Override
public void stationList() {
HashMap<String, Object> requestInfo = new HashMap<>();
......@@ -129,6 +130,32 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} else {
jpStationMapper.updateById(jpStation);
}
//增加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.setCreatedTime(System.currentTimeMillis());
if (!org.springframework.util.ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.updateById(tdJpStation);
} else {
tdJpStationMapper.insert(tdJpStation);
}
HYGFJPStationPowerHistory hygfjpStationPowerHistory = new HYGFJPStationPowerHistory();
hygfjpStationPowerHistory.setCreatedTime(System.currentTimeMillis());
hygfjpStationPowerHistory.setThirdStationId(jpStation.getThirdStationId());
......
......@@ -313,7 +313,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( imasterStationList.getPlantCode());
tdJpStation.setThirdCode(PVProducerInfoEnum.JLY.getCode());
tdJpStation.setThirdCode(PVProducerInfoEnum.HUAWEI.getCode());
tdJpStation.setCreatedTime(System.currentTimeMillis());
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.updateById(tdJpStation);
......
......@@ -253,7 +253,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( ksolarStation.getStationId());
tdJpStation.setThirdCode(PVProducerInfoEnum.JLY.getCode());
tdJpStation.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode());
tdJpStation.setCreatedTime(System.currentTimeMillis());
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.updateById(tdJpStation);
......
......@@ -74,7 +74,8 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
@Autowired
private JpCollectorMapper jpCollectorMapper;
@Autowired
TdJpStationMapper tdJpStationMapper;
@Override
@Scheduled(cron = "${dataRequstScheduled.Sofar}")
public void stationList() {
......@@ -308,6 +309,29 @@ 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();
}
tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( jpStation.getThirdStationId());
tdJpStation.setThirdCode(PVProducerInfoEnum.SH.getCode());
tdJpStation.setCreatedTime(System.currentTimeMillis());
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.updateById(tdJpStation);
} else {
tdJpStationMapper.insert(tdJpStation);
}
//逆变器信信息
this.inverterList( jsonObject2.get(0), jpStation, maps);
}
......
......@@ -84,6 +84,10 @@ public class SunlightServiceImpl implements SunlightService {
private HYGFJPInverterWarnMapper hygfjpInverterWarnMapper;
@Autowired
SunlightUtil SunlightUtil;
@Autowired
TdJpStationMapper tdJpStationMapper;
//td电站信息存储
@Override
@Scheduled(cron = "${dataRequstScheduled.Sunlight}")
......@@ -297,6 +301,29 @@ 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();
}
tdJpStation.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( jpStation.getThirdStationId());
tdJpStation.setThirdCode( PVProducerInfoEnum.YG.getCode());
tdJpStation.setCreatedTime(System.currentTimeMillis());
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.updateById(tdJpStation);
} else {
tdJpStationMapper.insert(tdJpStation);
}
this.setJpInverte(listd.get(0),jpStation);
......
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