Commit 38a37ecf authored by suhuiguang's avatar suhuiguang

fix(jg):bug修改

1.空指针异常处理
parent 4f6b41e8
......@@ -2047,7 +2047,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
List<Map<String, Object>> deviceList = projectContraptionService.getBaseMapper().selectEquipList(projectContraptionSeq);
deviceList.forEach(device -> {
String deviceLevel = String.valueOf(device.get("deviceLevel"));
device.put("deviceLevel", dataDictionaryMapper.getByCode(deviceLevel, projectContraption.getEquCategory()).getName());
device.put("deviceLevel", Optional.ofNullable(dataDictionaryMapper.getByCode(deviceLevel, projectContraption.getEquCategory())).map(DataDictionary::getName).orElse(deviceLevel));
device.put("sequenceNbr", projectContraptionSeq);
device.put("equListName", projectContraption.getEquListName());
});
......
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