Commit 2b233450 authored by tangwei's avatar tangwei

修改科士达逆变器采集

parent 15811d9e
...@@ -66,6 +66,7 @@ public class HouseholdTestController { ...@@ -66,6 +66,7 @@ public class HouseholdTestController {
// goLangDataAcquisitionService.collectorDetail(); // goLangDataAcquisitionService.collectorDetail();
goLangDataAcquisitionService.inverterDetail(); goLangDataAcquisitionService.inverterDetail();
// goLangDataAcquisitionService.inverAlramInfo(); // goLangDataAcquisitionService.inverAlramInfo();
} }
/** /**
...@@ -120,8 +121,9 @@ public class HouseholdTestController { ...@@ -120,8 +121,9 @@ public class HouseholdTestController {
// kSolarDataAcquisitionService.collectorDetail(); // kSolarDataAcquisitionService.collectorDetail();
//// goLangDataAcquisitionService.inverterList(); //// goLangDataAcquisitionService.inverterList();
// goLangDataAcquisitionService.collectorDetail(); // goLangDataAcquisitionService.collectorDetail();
goLangDataAcquisitionService.inverterDetail(); // goLangDataAcquisitionService.inverterDetail();
// goLangDataAcquisitionService.inverAlramInfo(); // goLangDataAcquisitionService.inverAlramInfo();
kSolarDataAcquisitionService.collectorList();
} }
...@@ -135,10 +137,11 @@ public class HouseholdTestController { ...@@ -135,10 +137,11 @@ public class HouseholdTestController {
@PostMapping(value = "/imasterNew") @PostMapping(value = "/imasterNew")
@ApiOperation(httpMethod = "POST", value = "北向", notes = "北向") @ApiOperation(httpMethod = "POST", value = "北向", notes = "北向")
public void imasterNew() throws IOException { public void imasterNew() throws IOException {
imasterDataService.stationList(); // imasterDataService.stationList();
imasterDataService.stationDetail(); // imasterDataService.stationDetail();
imasterDataService.collectorList(); // imasterDataService.collectorList();
imasterDataService.inverterList(null); // imasterDataService.inverterList(null);
// imasterDataService.inverterDetail(null); // imasterDataService.inverterDetail(null);
kSolarDataAcquisitionService.collectorDetail();
} }
} }
...@@ -71,7 +71,7 @@ public class JpInverter implements Serializable { ...@@ -71,7 +71,7 @@ public class JpInverter implements Serializable {
/** /**
* 实时功率 * 实时功率
*/ */
@TableField("current_power") @TableField(value="current_power",updateStrategy =FieldStrategy.IGNORED)
private Double currentPower; private Double currentPower;
/** /**
......
...@@ -563,13 +563,16 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -563,13 +563,16 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
if (!ObjectUtils.isEmpty(jpInverter.getSequenceNbr())) { if (!ObjectUtils.isEmpty(jpInverter.getSequenceNbr())) {
jpInverterMapper.updateById(jpInverter); jpInverterMapper.updateById(jpInverter);
} else { } else {
if(StringUtils.isNotEmpty(jpInverter.getSnCode())){
jpInverterMapper.insert(jpInverter); jpInverterMapper.insert(jpInverter);
} }
}
for (int k1 = 1; k1 < 13; k1++) { for (int k1 = 1; k1 < 13; k1++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>().
like("sn_code", jpInverter.getSnCode().trim()). eq("sn_code", jpInverter.getSnCode().trim()).
eq("type", "直流"). eq("type", "直流").
eq("name", "PV" + k1) eq("name", "PV" + k1)
); );
...@@ -593,7 +596,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -593,7 +596,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
JpInverterElectricity jpInverterElectricityR = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricityR = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>().
like("sn_code", jpInverter.getSnCode().trim()). eq("sn_code", jpInverter.getSnCode().trim()).
eq("type", "交流"). eq("type", "交流").
eq("name", "RS") eq("name", "RS")
); );
...@@ -616,7 +619,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -616,7 +619,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
JpInverterElectricity jpInverterElectricityS = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricityS = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>().
like("sn_code", jpInverter.getSnCode().trim()). eq("sn_code", jpInverter.getSnCode().trim()).
eq("type", "交流"). eq("type", "交流").
eq("name", "ST") eq("name", "ST")
); );
...@@ -639,7 +642,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -639,7 +642,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
JpInverterElectricity jpInverterElectricityT = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricityT = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>().
like("sn_code", jpInverter.getSnCode().trim()). eq("sn_code", jpInverter.getSnCode().trim()).
eq("type", "交流"). eq("type", "交流").
eq("name", "TR") eq("name", "TR")
); );
...@@ -679,7 +682,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -679,7 +682,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// 逆变器历史 // 逆变器历史
String today = DateUtil.today(); String today = DateUtil.today();
HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper.selectOne( HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper.selectOne(
new QueryWrapper<HYGFJPInverterHistory>().eq("sn_code", jpInverter.getSnCode()).eq("date", today)); new QueryWrapper<HYGFJPInverterHistory>().eq("sn_code", jpInverter.getSnCode().trim()).eq("date", today));
if (ObjectUtils.isEmpty(hygfjpInverterHistory)) { if (ObjectUtils.isEmpty(hygfjpInverterHistory)) {
hygfjpInverterHistory = new HYGFJPInverterHistory(); hygfjpInverterHistory = new HYGFJPInverterHistory();
} }
...@@ -751,8 +754,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -751,8 +754,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
if (!ObjectUtils.isEmpty(jpInverter.getSequenceNbr())) { if (!ObjectUtils.isEmpty(jpInverter.getSequenceNbr())) {
jpInverterMapper.updateById(jpInverter); jpInverterMapper.updateById(jpInverter);
} else { } else {
if(StringUtils.isNotEmpty(jpInverter.getSnCode())){
jpInverterMapper.insert(jpInverter); jpInverterMapper.insert(jpInverter);
} }
}
String jsonString = JSON.toJSONString(ksolarStationCollectData); String jsonString = JSON.toJSONString(ksolarStationCollectData);
...@@ -760,7 +765,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -760,7 +765,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
for (int k1 = 1; k1 < 13; k1++) { for (int k1 = 1; k1 < 13; k1++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>().
like("sn_code", ksolarStationCollectData.getInverterId().trim()). eq("sn_code", ksolarStationCollectData.getInverterId().trim()).
eq("type", "直流"). eq("type", "直流").
eq("name", "PV" + k1) eq("name", "PV" + k1)
); );
...@@ -784,7 +789,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -784,7 +789,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
JpInverterElectricity jpInverterElectricityR = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricityR = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>().
like("sn_code", ksolarStationCollectData.getInverterId().trim()). eq("sn_code", ksolarStationCollectData.getInverterId().trim()).
eq("type", "交流"). eq("type", "交流").
eq("name", "RS") eq("name", "RS")
); );
...@@ -807,7 +812,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -807,7 +812,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
JpInverterElectricity jpInverterElectricityS = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricityS = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>().
like("sn_code", ksolarStationCollectData.getInverterId().trim()). eq("sn_code", ksolarStationCollectData.getInverterId().trim()).
eq("type", "交流"). eq("type", "交流").
eq("name", "ST") eq("name", "ST")
); );
...@@ -830,7 +835,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -830,7 +835,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
JpInverterElectricity jpInverterElectricityT = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricityT = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>().
like("sn_code", ksolarStationCollectData.getInverterId().trim()). eq("sn_code", ksolarStationCollectData.getInverterId().trim()).
eq("type", "交流"). eq("type", "交流").
eq("name", "TR") eq("name", "TR")
); );
......
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