Commit 2b233450 authored by tangwei's avatar tangwei

修改科士达逆变器采集

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