Commit efcab82c authored by chenzhao's avatar chenzhao

修改代码

parent b9868355
......@@ -461,7 +461,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
if (ObjectUtils.isEmpty(jpInverter)) {
jpInverter = new JpInverter();
}
jpInverter.setName(inverterDetailDto.getStationName());
jpInverter.setName(null == inverterDetailDto.getStationName()?null: inverterDetailDto.getStationName());
jpInverter.setSnCode(inverterDetailDto.getSn().trim());
jpInverter.setState(golangRequestUtil.getInverterState(inverterDetailDto.getCurrentState(), inverterDetailDto.getDataTimestamp()));
jpInverter.setCollectorId(String.valueOf(inverterDetailDto.getCollectorId()));
......@@ -681,7 +681,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFInverterTotalGenerate = new TdHYGFInverterTotalGenerate();
}
tdHYGFInverterTotalGenerate.setThirdStationId(jpInverter.getThirdStationId());
tdHYGFInverterTotalGenerate.setName(jpInverter.getName());
tdHYGFInverterTotalGenerate.setName(null == jpInverter.getName()? null :jpInverter.getName());
tdHYGFInverterTotalGenerate.setSnCode(jpInverter.getSnCode().trim());
tdHYGFInverterTotalGenerate.setYearTime(DateUtil.format(today1, "yyyy"));
tdHYGFInverterTotalGenerate.setYear(DateUtil.format(today1, "yyyy"));
......
......@@ -713,9 +713,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
like("sn_code", ksolarStationCollectData.getInverterId().trim())
.isNotNull("sn_code")
.orderByDesc("update_time"));
JpInverter jpInverter = new JpInverter();
if (!ObjectUtils.isEmpty(jpInverterList)) {
jpInverter =jpInverterList.get(0);
JpInverter jpInverter =jpInverterList.get(0);
if (ObjectUtils.isEmpty(jpInverter)) {
jpInverter = new JpInverter();
}
// 品牌
......
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