Commit cb0f82d6e1143972ef00925209bd45763ee472b3
1 parent
095422ea96
Exists in
master
and in
1 other branch
platform permission
机构地址信息完整显示
Showing 3 changed files with 43 additions and 0 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/CommunityConfig.java
View file @
cb0f82d
... | ... | @@ -17,12 +17,21 @@ |
17 | 17 | private Integer yn; |
18 | 18 | private String gxxq; //管辖小区 |
19 | 19 | private List<String> areas; |
20 | + private List<BasicConfig> areasObj; | |
20 | 21 | private String areaNames; |
21 | 22 | |
22 | 23 | private String publishName; |
23 | 24 | private String publishId; |
24 | 25 | private Long createDate; |
25 | 26 | private Long modifiedDate; |
27 | + | |
28 | + public List<BasicConfig> getAreasObj() { | |
29 | + return areasObj; | |
30 | + } | |
31 | + | |
32 | + public void setAreasObj(List<BasicConfig> areasObj) { | |
33 | + this.areasObj = areasObj; | |
34 | + } | |
26 | 35 | |
27 | 36 | public String getPublishName() { |
28 | 37 | return publishName; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CommunityConfigController.java
View file @
cb0f82d
... | ... | @@ -108,11 +108,15 @@ |
108 | 108 | communityQuery.setId(null); |
109 | 109 | } |
110 | 110 | List<CommunityConfig> communityConfigList = communityConfigService.queryCommunity(communityQuery); |
111 | + List<BasicConfig> basicConfigs = null; | |
112 | + | |
111 | 113 | if(null != communityConfigList) { |
112 | 114 | for(CommunityConfig communityConfig : communityConfigList) { |
113 | 115 | String areaNames = ""; |
116 | + basicConfigs = new ArrayList<>(); | |
114 | 117 | for(String s : communityConfig.getAreas()) { |
115 | 118 | config = basicConfigService.getOneBasicConfigById(s); |
119 | + basicConfigs.add(config); | |
116 | 120 | if(null != config) { |
117 | 121 | areaNames += config.getName() + ", "; |
118 | 122 | } |
... | ... | @@ -120,6 +124,7 @@ |
120 | 124 | if(2 < areaNames.length()) { |
121 | 125 | communityConfig.setAreaNames(areaNames.substring(0, areaNames.length()-2)); |
122 | 126 | } |
127 | + communityConfig.setAreasObj(basicConfigs); | |
123 | 128 | } |
124 | 129 | |
125 | 130 | return FrontEndResult.ini().setData(communityConfigList).setPageInfo(communityQuery.getPageInfo()).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java
View file @
cb0f82d
... | ... | @@ -256,6 +256,35 @@ |
256 | 256 | List<Object> data = new ArrayList<>(); |
257 | 257 | boolean falg =StringUtils.isNotEmpty(f); |
258 | 258 | for(Organization organization : organizations) { |
259 | + if(null == organization.getAddress()) { | |
260 | + organization.setAddress(""); | |
261 | + } else { | |
262 | + organization.setAddress(", " + organization.getAddress()); | |
263 | + } | |
264 | + if(null != organization.getStreetId()) { | |
265 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(organization.getStreetId()); | |
266 | + if(null != basicConfig) { | |
267 | + organization.setAddress(basicConfig.getName() + organization.getAddress()); | |
268 | + } | |
269 | + } | |
270 | + if(null != organization.getAreaId()) { | |
271 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(organization.getAreaId()); | |
272 | + if(null != basicConfig) { | |
273 | + organization.setAddress(basicConfig.getName() + organization.getAddress()); | |
274 | + } | |
275 | + } | |
276 | + if(null != organization.getCityId()) { | |
277 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(organization.getCityId()); | |
278 | + if(null != basicConfig) { | |
279 | + organization.setAddress(basicConfig.getName() + organization.getAddress()); | |
280 | + } | |
281 | + } | |
282 | + if(null != organization.getProvinceId()) { | |
283 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(organization.getProvinceId()); | |
284 | + if(null != basicConfig) { | |
285 | + organization.setAddress(basicConfig.getName() + organization.getAddress()); | |
286 | + } | |
287 | + } | |
259 | 288 | organization.setTypeObj(OrganizationLevelEnum.getById(organization.getLevel())); |
260 | 289 | organization.setLevelObj(OrganizationTypeEnum.getById(organization.getType())); |
261 | 290 | if(null != organization.getProvinceId()) { |