修改获取设备基础信息数据转换异常

This commit is contained in:
wyw 2024-09-10 20:35:05 +08:00
parent 81c0fd6bae
commit 9fb8de3e33

View File

@ -534,9 +534,13 @@ public class DeviceDetailServiceImpl implements IDeviceDetailService {
List<HaiWeiPropertyVo> propertyList = checkedData.getPropertyList(); List<HaiWeiPropertyVo> propertyList = checkedData.getPropertyList();
for (HaiWeiPropertyVo haiWeiPropertyVo : propertyList) { for (HaiWeiPropertyVo haiWeiPropertyVo : propertyList) {
if (haiWeiPropertyVo.getNameEn().equals("三菱FX2N_1_市电状态")) { if (haiWeiPropertyVo.getNameEn().equals("三菱FX2N_1_市电状态")) {
try{
if(Float.parseFloat(haiWeiPropertyVo.getValue().toString()) == 0){ if(Float.parseFloat(haiWeiPropertyVo.getValue().toString()) == 0){
deviceDetailVo.setGongDianType("太阳能"); deviceDetailVo.setGongDianType("太阳能");
} }
}catch (Exception e){
}
}else if(haiWeiPropertyVo.getNameEn().equals("三菱FX2N_1_bat")){ }else if(haiWeiPropertyVo.getNameEn().equals("三菱FX2N_1_bat")){
deviceDetailVo.setPowerDianliang(haiWeiPropertyVo.getValueAndUnit()); deviceDetailVo.setPowerDianliang(haiWeiPropertyVo.getValueAndUnit());
}else if(haiWeiPropertyVo.getNameEn().equals("三菱FX2N_1_batVolt")){ }else if(haiWeiPropertyVo.getNameEn().equals("三菱FX2N_1_batVolt")){