|
@@ -1,17 +1,21 @@
|
|
|
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.ComprehensiveManagementCenter;
|
|
|
import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.service.ComprehensiveManagementCenterService;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @author zhaozhan
|
|
@@ -36,6 +40,13 @@ public class APPComprehensiveManagementCenterController extends BaseController {
|
|
|
Integer pageSize = pageDomain.getPageSize();
|
|
|
TableDataInfo tableDataInfo = comprehensiveManagementCenterService.list(pageNum, pageSize, comprehensiveManagementCenter.getCenterName(), comprehensiveManagementCenter.getPrincipalName(), comprehensiveManagementCenter.getLevel());
|
|
|
if(HttpStatus.SUCCESS == tableDataInfo.getCode()){
|
|
|
+ Map<String, Object> comprehensiveDictCacheToMap = DictUtils.getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);// 2260
|
|
|
+ Map<String, Object> levelsCacheToMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_LEVELS);// levels
|
|
|
+ for (Object row : tableDataInfo.getRows()) {
|
|
|
+ HashMap r = (HashMap) row;
|
|
|
+ r.put("placeLabel", comprehensiveDictCacheToMap.get(r.get("place").toString()));//所在地 2260
|
|
|
+ r.put("levelLabel", levelsCacheToMap.get(r.get("level").toString()));//levels
|
|
|
+ }
|
|
|
return AjaxResult.success(tableDataInfo.getRows());
|
|
|
}else{
|
|
|
return AjaxResult.error(tableDataInfo.getCode(),tableDataInfo.getMsg());
|
|
@@ -49,7 +60,15 @@ public class APPComprehensiveManagementCenterController extends BaseController {
|
|
|
*/
|
|
|
@GetMapping("/ComprehensiveManagementCenter/edit")
|
|
|
public AjaxResult edit(String id) {
|
|
|
- return comprehensiveManagementCenterService.edit(id);
|
|
|
+ AjaxResult info = comprehensiveManagementCenterService.edit(id);
|
|
|
+ if ("200".equals(info.get("code").toString())){
|
|
|
+ Map<String, Object> comprehensiveDictCacheToMap = DictUtils.getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);// 2260
|
|
|
+ Map<String, Object> levelsCacheToMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_LEVELS);// levels
|
|
|
+ Map<String, Object> data = (Map<String, Object>) info.get("data");
|
|
|
+ data.put("placeLabel", comprehensiveDictCacheToMap.get(data.get("place").toString()));//所在地 2260
|
|
|
+ data.put("levelLabel", levelsCacheToMap.get(data.get("level").toString()));//levels
|
|
|
+ }
|
|
|
+ return info;
|
|
|
}
|
|
|
|
|
|
/**
|