|
@@ -1,17 +1,22 @@
|
|
|
package com.sooka.sponest.mobile.comprehensive.organizationAndInstitutionController;
|
|
|
|
|
|
import com.ruoyi.common.core.constant.HttpStatus;
|
|
|
+import com.ruoyi.common.core.domain.DictKeys;
|
|
|
import com.ruoyi.common.core.web.controller.BaseController;
|
|
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.web.page.PageDomain;
|
|
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
|
|
import com.ruoyi.common.core.web.page.TableSupport;
|
|
|
+import com.ruoyi.common.security.utils.DictUtils;
|
|
|
import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.domain.ComprehensiveTeam;
|
|
|
import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.service.RemoteTeamService;
|
|
|
+import org.apache.commons.collections4.MapUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 综治队伍
|
|
@@ -35,7 +40,24 @@ public class AppTeamController extends BaseController {
|
|
|
Integer pageNum = pageDomain.getPageNum();
|
|
|
Integer pageSize = pageDomain.getPageSize();
|
|
|
TableDataInfo tableDataInfo = remoteTeamService.selectComprehensiveTeamList(pageNum, pageSize,comprehensiveTeam.getName(),comprehensiveTeam.getInstitutionId(),comprehensiveTeam.getIdentityNumber() );
|
|
|
+ List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) tableDataInfo.getRows();
|
|
|
if(HttpStatus.SUCCESS == tableDataInfo.getCode()){
|
|
|
+ Map<String, Object> comprehensiveGenderLabel = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_SEX);
|
|
|
+ Map<String, Object> comprehensiveNationLabel = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_NATION);
|
|
|
+ Map<String, Object> comprehensivePoliticalOutlookLabel = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_POLITICAL_STATUS);
|
|
|
+ Map<String, Object> comprehensiveLevelLabel = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_PERSONNEL_LEVEL);
|
|
|
+ Map<String, Object> comprehensiveDutiesLabel = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_PERSONNEL_JOB);
|
|
|
+ Map<String, Object> comprehensiveEducationLabel = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND);
|
|
|
+ for (HashMap<String, Object> row:
|
|
|
+ rows ) {
|
|
|
+ row.put("GenderLabel",comprehensiveGenderLabel.get(row.get("Gender").toString()));
|
|
|
+ row.put("NationLabel",comprehensiveNationLabel.get(row.get("Nation").toString()));
|
|
|
+ row.put("PoliticalOutlookLabel",comprehensivePoliticalOutlookLabel.get(row.get("PoliticalOutlook").toString()));
|
|
|
+ row.put("LevelLabel",comprehensiveLevelLabel.get(row.get("Level").toString()));
|
|
|
+ row.put("DutiesLabel",comprehensiveDutiesLabel.get(row.get("Duties").toString()));
|
|
|
+ row.put("EducationLabel",comprehensiveEducationLabel.get(row.get("Education").toString()));
|
|
|
+
|
|
|
+ }
|
|
|
return AjaxResult.success(tableDataInfo.getRows());
|
|
|
}else{
|
|
|
return AjaxResult.error(tableDataInfo.getCode(),tableDataInfo.getMsg());
|
|
@@ -47,7 +69,19 @@ public class AppTeamController extends BaseController {
|
|
|
*/
|
|
|
@GetMapping("/comprehensiveTeam/edit")
|
|
|
public AjaxResult getInfo(String id) {
|
|
|
- return remoteTeamService.selectComprehensiveTeamById(id);
|
|
|
+ AjaxResult ajaxResult = remoteTeamService.selectComprehensiveTeamById(id);
|
|
|
+ if("200".equals(String.valueOf(ajaxResult.get("code")))){
|
|
|
+ HashMap<String,Object> comprehensiveTeam = (HashMap<String, Object>) ajaxResult.get("data");
|
|
|
+ comprehensiveTeam.put("GenderLabel",DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_SEX, MapUtils.getString(comprehensiveTeam,"Gender")));
|
|
|
+ comprehensiveTeam.put("NationLabel",DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_NATION, MapUtils.getString(comprehensiveTeam,"Nation")));
|
|
|
+ comprehensiveTeam.put("PoliticalOutlookLabel",DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_POLITICAL_STATUS, MapUtils.getString(comprehensiveTeam,"PoliticalOutlook")));
|
|
|
+ comprehensiveTeam.put("LevelLabel",DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_PERSONNEL_LEVEL, MapUtils.getString(comprehensiveTeam,"Level")));
|
|
|
+ comprehensiveTeam.put("DutiesLabel",DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_PERSONNEL_JOB,MapUtils.getString(comprehensiveTeam,"Duties")));
|
|
|
+ comprehensiveTeam.put("EducationLabel",DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND,MapUtils.getString(comprehensiveTeam,"Education")));
|
|
|
+ return AjaxResult.success(comprehensiveTeam);
|
|
|
+ }else{
|
|
|
+ return AjaxResult.error(ajaxResult.get("code").toString(), ajaxResult.get("msg"));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|