Commit a68fe145 authored by 刘林's avatar 刘林

fix:(jg) 安装告知报错修复

parent 889a3068
......@@ -351,15 +351,15 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
installationInfo.put("projectContraptionNo", projectContraption.getProjectContraptionNo());
installationInfo.put("projectContraption", projectContraption.getProjectContraption());
equipListMaps = projectContraptionService.getBaseMapper().selectEquipList(projectContraptionId);
equipListMaps.forEach(item ->
item.put("deviceLevel", Optional.ofNullable(dataDictionaryMapper.selectById(String.valueOf(item.get("deviceLevel"))))
.map(DataDictionary::getName)
.orElse("")));
} else {
List<String> ids = jgInstallationNoticeEqs.stream().map(JgInstallationNoticeEq::getEquId).collect(Collectors.toList());
Iterable<ESEquipmentCategoryDto> equips = esEquipmentCategory.findAllById(ids);
equipListMaps = getEquipListMaps(equips);
}
equipListMaps.forEach(item -> {
String deviceLevel = String.valueOf(item.get("deviceLevel"));
item.put("deviceLevel", dataDictionaryMapper.selectById(deviceLevel).getName());
});
}
// Map<String, Object> detail = equipmentInfos.get(0);
......
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