|
@@ -18,6 +18,8 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
+import static com.ruoyi.common.security.utils.DictUtils.getComprehensiveDictCacheToMap;
|
|
|
+
|
|
|
/**
|
|
|
* 楼栋长管理
|
|
|
*
|
|
@@ -45,11 +47,13 @@ public class AppBuildingLeaderController extends BaseController {
|
|
|
Map<String, Object> maps = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_POLITICAL_STATUS);
|
|
|
Map<String, Object> maps1 = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_NATION);
|
|
|
Map<String, Object> maps2 = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_SEX);
|
|
|
+ Map<String, Object> maps3 = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND);
|
|
|
if (!rows.isEmpty()) {
|
|
|
for (HashMap<String, Object> row : rows) {
|
|
|
row.put("politicalOutlookLabel", maps.get(row.get("politicalOutlook")));
|
|
|
row.put("nationLabel", maps1.get(row.get("nation")));
|
|
|
row.put("genderLabel", maps2.get(row.get("gender")));
|
|
|
+ row.put("educationLabel", maps3.get(row.get("education")));
|
|
|
}
|
|
|
}
|
|
|
return AjaxResult.success(tableDataInfo.getRows());
|
|
@@ -60,7 +64,21 @@ public class AppBuildingLeaderController extends BaseController {
|
|
|
|
|
|
@GetMapping("/comprehensivebuildingleader/listAll")
|
|
|
public AjaxResult listAll(ComprehensiveBuildingLeader comprehensivebuildingleader) {
|
|
|
- return remoteBuildingLeaderService.listAll();
|
|
|
+ AjaxResult allUserInfo = remoteBuildingLeaderService.listAll();
|
|
|
+ if ("200".equals(allUserInfo.get("code").toString())){
|
|
|
+ Map<String, Object> maps = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_POLITICAL_STATUS);
|
|
|
+ Map<String, Object> maps1 = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_NATION);
|
|
|
+ Map<String, Object> maps2 = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_SEX);
|
|
|
+ Map<String, Object> maps3 = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND);
|
|
|
+ List<Map<String, Object>> data = (List<Map<String, Object>>) allUserInfo.get("data");
|
|
|
+ for (Map<String, Object> map : data) {
|
|
|
+ map.put("politicalOutlookLabel", maps.get(map.get("politicalOutlook")));
|
|
|
+ map.put("nationLabel", maps1.get(map.get("nation")));
|
|
|
+ map.put("genderLabel", maps2.get(map.get("gender")));
|
|
|
+ map.put("educationLabel", maps3.get(map.get("education")));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return allUserInfo;
|
|
|
}
|
|
|
|
|
|
/**
|