Commit f7700935 authored by hezhuozhi's avatar hezhuozhi

修复电站配置

parent c918c5f6
...@@ -869,7 +869,7 @@ ...@@ -869,7 +869,7 @@
</select> </select>
<select id="queryUnitInfo" resultType="java.util.Map"> <select id="queryUnitInfo" resultType="java.util.Map">
SELECT amos_company_code value, name SELECT amos_company_code , name
FROM hygf_unit_info FROM hygf_unit_info
WHERE is_delete = 0 and amos_company_code is not null WHERE is_delete = 0 and amos_company_code is not null
</select> </select>
......
...@@ -1112,9 +1112,8 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J ...@@ -1112,9 +1112,8 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
if(CollectionUtil.isNotEmpty(maps)){ if(CollectionUtil.isNotEmpty(maps)){
for (Map<String, String> map : maps) { for (Map<String, String> map : maps) {
Map<String, String> newMap = new HashMap<>(); Map<String, String> newMap = new HashMap<>();
String orgCode = map.get("ORG_CODE"); newMap.put("value",map.get("ORG_CODE"));
String companyName = map.get("COMPANY_NAME"); newMap.put("name",map.get("COMPANY_NAME"));
newMap.put(orgCode,companyName);
result.add(newMap); result.add(newMap);
} }
} }
...@@ -1130,6 +1129,16 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J ...@@ -1130,6 +1129,16 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
} }
public List<Map<String, String>> queryUnitInfo() { public List<Map<String, String>> queryUnitInfo() {
return jpStationMapper.queryUnitInfo(); List<Map<String, String>> maps = jpStationMapper.queryUnitInfo();
List<Map<String, String>> result=new ArrayList<>();
if(CollectionUtil.isNotEmpty(maps)){
for (Map<String, String> map : maps) {
Map<String, String> newMap = new HashMap<>();
newMap.put("value",map.get("amos_company_code"));
newMap.put("name",map.get("name"));
result.add(newMap);
}
}
return result;
} }
} }
\ No newline at end of file
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