Commit 82de31a1 authored by hezhuozhi's avatar hezhuozhi

优化代码

parent 45025407
......@@ -149,14 +149,14 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
Map<String,String> scaleMap = new HashMap<>();
if(CollectionUtil.isNotEmpty(hygfCommercialScaleList)){
for (Map<String, Object> stringStringMap : hygfCommercialScaleList) {
scaleMap.put(String.valueOf(stringStringMap.get("peasant_household_no")),StringUtils.isEmpty(String.valueOf(stringStringMap.get("scale"))) ? "" : String.valueOf(stringStringMap.get("scale")));
scaleMap.put(String.valueOf(stringStringMap.get("peasant_household_no")),Objects.isNull(stringStringMap.get("scale")) ? "" : String.valueOf(stringStringMap.get("scale")));
}
}
List<Map<String, Object>> realScaleByPeasantHouseholdNoList = powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNoList(powerStationCodeList);
Map<String,String> realScaleMap = new HashMap<>();
if(CollectionUtil.isNotEmpty(realScaleByPeasantHouseholdNoList)){
for (Map<String, Object> stringStringMap : realScaleByPeasantHouseholdNoList) {
realScaleMap.put(String.valueOf(stringStringMap.get("peasant_household_no")),StringUtils.isEmpty(String.valueOf(stringStringMap.get("realScale"))) ? "" : String.valueOf(stringStringMap.get("realScale")));
realScaleMap.put(String.valueOf(stringStringMap.get("peasant_household_no")),Objects.isNull(stringStringMap.get("realScale")) ? "" : String.valueOf(stringStringMap.get("realScale")));
}
}
records.forEach(e -> {
......
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