Commit 041553cf authored by tangwei's avatar tangwei

曾加td 电站信息

parent 0d6e553a
...@@ -221,7 +221,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -221,7 +221,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId(stationIds.get(i)); tdJpStation.setThirdStationId(stationIds.get(i));
tdJpStation.setThirdCode(PVProducerInfoEnum.JLY.getCode()); tdJpStation.setThirdCode(PVProducerInfoEnum.JLY.getCode());
tdJpStation.setIsDelete(jpStation.isDelete?0:1); tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) { if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.insert(tdJpStation); tdJpStationMapper.insert(tdJpStation);
......
...@@ -145,7 +145,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -145,7 +145,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( jpStation.getThirdStationId()); tdJpStation.setThirdStationId( jpStation.getThirdStationId());
tdJpStation.setThirdCode(PVProducerInfoEnum.GDW.getCode()); tdJpStation.setThirdCode(PVProducerInfoEnum.GDW.getCode());
tdJpStation.setIsDelete(jpStation.isDelete?0:1); tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
if (!org.springframework.util.ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) { if (!org.springframework.util.ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.insert(tdJpStation); tdJpStationMapper.insert(tdJpStation);
......
...@@ -314,7 +314,7 @@ public class ImasterDataServiceImpl implements ImasterDataService { ...@@ -314,7 +314,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( imasterStationList.getPlantCode()); tdJpStation.setThirdStationId( imasterStationList.getPlantCode());
tdJpStation.setThirdCode(PVProducerInfoEnum.HUAWEI.getCode()); tdJpStation.setThirdCode(PVProducerInfoEnum.HUAWEI.getCode());
tdJpStation.setIsDelete(jpStation.getIsDelete()?0:1); tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) { if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.insert(tdJpStation); tdJpStationMapper.insert(tdJpStation);
......
...@@ -254,7 +254,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -254,7 +254,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( ksolarStation.getStationId()); tdJpStation.setThirdStationId( ksolarStation.getStationId());
tdJpStation.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode()); tdJpStation.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode());
tdJpStation.setIsDelete(jpStation.getIsDelete()?0:1); tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) { if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
......
...@@ -142,7 +142,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ ...@@ -142,7 +142,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
// 并网类型 // 并网类型
jpStation.setOnGridType(SofarRequestUtil.intoNetWorkStatus.get(sunlightDto.getGridInterconnectionType())); jpStation.setOnGridType(SofarRequestUtil.intoNetWorkStatus.get(sunlightDto.getGridInterconnectionType()));
//第三方厂商标识 //第三方厂商标识
jpStation.setThirdCode(PVProducerInfoEnum.YG.getCode()); // jpStation.setThirdCode(PVProducerInfoEnum.YG.getCode());
jpStation.setRecDate(new Date()); jpStation.setRecDate(new Date());
//获取单个电站详情 //获取单个电站详情
...@@ -325,7 +325,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ ...@@ -325,7 +325,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( jpStation.getThirdStationId()); tdJpStation.setThirdStationId( jpStation.getThirdStationId());
tdJpStation.setThirdCode(PVProducerInfoEnum.SH.getCode()); tdJpStation.setThirdCode(PVProducerInfoEnum.SH.getCode());
tdJpStation.setIsDelete(jpStation.getIsDelete()?0:1); tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) { if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.insert(tdJpStation); tdJpStationMapper.insert(tdJpStation);
......
...@@ -259,9 +259,9 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -259,9 +259,9 @@ public class SunlightServiceImpl implements SunlightService {
JSONObject jsonObject22 = JSONUtil.parseObj(jsonObject1nb.get(listd.get(0).getPs_key()), true); JSONObject jsonObject22 = JSONUtil.parseObj(jsonObject1nb.get(listd.get(0).getPs_key()), true);
List<Map> js= JSONArray.parseArray(JSON.toJSONString(jsonObject22.get("p1")),Map.class); List<Map> js= JSONArray.parseArray(JSON.toJSONString(jsonObject22.get("p1")),Map.class);
// 月发电量 // 月发电量
jpStation.setMonthGenerate(js.get(0).get("4")!=null?Double.valueOf(js.get(0).get("4")+"")/1000:null); jpStation.setMonthGenerate(js!=null&&js.get(0).get("4")!=null?Double.valueOf(js.get(0).get("4")+"")/1000:null);
// 月收益 // 月收益
jpStation.setMonthIncome(js.get(0).get("4")!=null?Double.valueOf(js.get(0).get("4")+"")/1000:null); jpStation.setMonthIncome(js!=null&&js.get(0).get("4")!=null?Double.valueOf(js.get(0).get("4")+"")/1000:null);
} }
...@@ -294,9 +294,9 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -294,9 +294,9 @@ public class SunlightServiceImpl implements SunlightService {
List<Map> js= JSONArray.parseArray(JSON.toJSONString(jsonObject23.get("p1")),Map.class); List<Map> js= JSONArray.parseArray(JSON.toJSONString(jsonObject23.get("p1")),Map.class);
// 年发电量 // 年发电量
jpStation.setYearGenerate(Double.valueOf(js.get(0).get("4")+"")/1000); jpStation.setYearGenerate(js!=null?Double.valueOf(js.get(0).get("4")+"")/1000:null);
// 年收益 // 年收益
jpStation.setYearIncome(Double.valueOf(js.get(0).get("4")+"")/1000); jpStation.setYearIncome(js!=null?Double.valueOf(js.get(0).get("4")+"")/1000:null);
if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) { if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) {
jpStationMapper.updateById(jpStation); jpStationMapper.updateById(jpStation);
} else { } else {
...@@ -317,19 +317,14 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -317,19 +317,14 @@ public class SunlightServiceImpl implements SunlightService {
tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdJpStation.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdJpStation.setThirdStationId( jpStation.getThirdStationId()); tdJpStation.setThirdStationId( jpStation.getThirdStationId());
tdJpStation.setThirdCode( PVProducerInfoEnum.YG.getCode()); tdJpStation.setThirdCode( PVProducerInfoEnum.YG.getCode());
tdJpStation.setIsDelete(jpStation.getIsDelete()?0:1); tdJpStation.setIsDelete(jpStation.getIsDelete()?1:0);
if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) { if (!ObjectUtils.isEmpty(tdJpStation.getCreatedTime())) {
tdJpStationMapper.insert(tdJpStation); tdJpStationMapper.insert(tdJpStation);
} else { } else {
tdJpStation.setCreatedTime(System.currentTimeMillis()); tdJpStation.setCreatedTime(System.currentTimeMillis());
tdJpStationMapper.insert(tdJpStation); 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