Commit 9e6849c9 authored by tangwei's avatar tangwei

增加td 电站数据

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