Commit 43b661ef7ec5a99bd87895005aadfcd3eee6254b
1 parent
6c4f886a07
Exists in
master
and in
1 other branch
提交代码
Showing 1 changed file with 25 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/CommonsHelper.java
View file @
43b661e
| ... | ... | @@ -48,6 +48,31 @@ |
| 48 | 48 | return sb.toString(); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | + public static String getResidence(String provinceId, | |
| 52 | + String cityId, | |
| 53 | + String areaId, | |
| 54 | + String streetId, | |
| 55 | + String address, BasicConfigService basicConfigService) { | |
| 56 | + StringBuilder sb = new StringBuilder(); | |
| 57 | + if (StringUtils.isNotEmpty(provinceId)) { | |
| 58 | + sb.append(getName1(provinceId,basicConfigService)); | |
| 59 | + } | |
| 60 | + if (StringUtils.isNotEmpty(cityId)) { | |
| 61 | + sb.append(getName1(cityId,basicConfigService)); | |
| 62 | + } | |
| 63 | + if (StringUtils.isNotEmpty(areaId)) { | |
| 64 | + sb.append(getName1(areaId,basicConfigService)); | |
| 65 | + } | |
| 66 | + if (StringUtils.isNotEmpty(streetId)){ | |
| 67 | + sb.append(getName(streetId,basicConfigService)); | |
| 68 | + } | |
| 69 | + if (StringUtils.isNotEmpty(address)) { | |
| 70 | + sb.append(address); | |
| 71 | + } | |
| 72 | + return sb.toString(); | |
| 73 | + } | |
| 74 | + | |
| 75 | + | |
| 51 | 76 | private static String getName1(String id, BasicConfigService basicConfigService) { |
| 52 | 77 | BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(id); |
| 53 | 78 | if (basicConfig != null) { |