Commit 8e9c1ce2 authored by maoying's avatar maoying

修改全景监控查询设备详情空指针异常

parent 65e14dae
...@@ -249,9 +249,11 @@ public class EquipmentDetailController extends AbstractBaseController { ...@@ -249,9 +249,11 @@ public class EquipmentDetailController extends AbstractBaseController {
@RequestParam(required = false) Long stockDetailId) { @RequestParam(required = false) Long stockDetailId) {
EquipmentDate equipmentDate = new EquipmentDate(); EquipmentDate equipmentDate = new EquipmentDate();
EquipmentSpecific equipmentSpecific = equipmentSpecificMapper.getEquipSpecificEntityByCode(code); EquipmentSpecific equipmentSpecific = equipmentSpecificMapper.getEquipSpecificEntityByCode(code);
EquipmentIndex equipmentIndex = equipmentIndexService.getById(equipmentSpecific.getRealtimeIotIndexId()); if(!ObjectUtils.isEmpty(equipmentSpecific.getRealtimeIotIndexId())){
equipmentSpecific.setIsTrend(equipmentIndex.getIsTrend()); EquipmentIndex equipmentIndex = equipmentIndexService.getById(equipmentSpecific.getRealtimeIotIndexId());
equipmentSpecific.setUnit(equipmentIndex.getUnit()); equipmentSpecific.setIsTrend(equipmentIndex.getIsTrend());
equipmentSpecific.setUnit(equipmentIndex.getUnit());
}
FireFightingSystemEntity fightingSystemEntity = new FireFightingSystemEntity(); FireFightingSystemEntity fightingSystemEntity = new FireFightingSystemEntity();
if(!ObjectUtils.isEmpty(equipmentSpecific.getSystemId())){ if(!ObjectUtils.isEmpty(equipmentSpecific.getSystemId())){
fightingSystemEntity = fireFightingSystemService.getOneById(Long.valueOf(equipmentSpecific.getSystemId())); fightingSystemEntity = fireFightingSystemService.getOneById(Long.valueOf(equipmentSpecific.getSystemId()));
......
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