修改/device/detail/gongdianChart数据转换异常

This commit is contained in:
wyw 2024-09-10 20:56:57 +08:00
parent 26d56dd1f7
commit a29e547c4e

View File

@ -266,12 +266,13 @@ public class DeviceDetailServiceImpl implements IDeviceDetailService {
put("name", haiWeiPropertyVo.getNameCn());
}};
if(haiWeiPropertyVo.getNameEn().equals("三菱FX2N_1_MpptDown")){
hashMap.put("value", Float.parseFloat(haiWeiPropertyVo.getValue().toString()) == 1f?
"异常":"正常");
hashMap.put("value", NumberUtils.isNumeric(haiWeiPropertyVo.getValue().toString())?(
Float.parseFloat(haiWeiPropertyVo.getValue().toString()) == 1f?"正常":"异常"):"正常");
}
if(haiWeiPropertyVo.getNameEn().equals("三菱FX2N_1_市电状态")){
hashMap.put("value", Float.parseFloat(haiWeiPropertyVo.getValue().toString()) == 1f?
"市电":"太阳能");
hashMap.put("value", NumberUtils.isNumeric(haiWeiPropertyVo.getValue().toString())?(
Float.parseFloat(haiWeiPropertyVo.getValue().toString()) == 1f?"市电":"太阳能"):"市电");
}
list.add(hashMap);
}