Jelajahi Sumber

群防群治队伍字典

lidongyu 1 tahun lalu
induk
melakukan
2b3e524cc1

+ 14 - 1
src/main/java/com/sooka/sponest/mobile/comprehensive/organizationAndInstitutioncontroller/APPComprehensiveTPreventionTeam.java

@@ -5,11 +5,16 @@ 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.ComprehensiveTPreventionTeam;
 import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.service.ComprehensiveTPreventionTeamService;
+import org.apache.commons.collections4.MapUtils;
 import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
+import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author zhaozhan
@@ -40,7 +45,15 @@ public class APPComprehensiveTPreventionTeam {
      */
     @GetMapping(value = "/preventionTeam/{id}")
     public AjaxResult getInfo(String id) {
-        return comprehensiveTPreventionTeamService.getInfo(id);
+        AjaxResult ajaxResult = comprehensiveTPreventionTeamService.getInfo(id);
+        if("200".equals(String.valueOf(ajaxResult.get("code")))){
+            HashMap<String,Object> comprehensiveTPreventionTeam = (HashMap<String, Object>) ajaxResult.get("data");
+            comprehensiveTPreventionTeam.put("specialityLabel",String.join(",",DictUtils.getDictDataListByValue("comprehensive_professional_expertise", (List<String>) comprehensiveTPreventionTeam.get("speciality"))));
+            return AjaxResult.success(comprehensiveTPreventionTeam);
+        }else{
+            return AjaxResult.error(ajaxResult.get("code").toString(), ajaxResult.get("msg"));
+        }
+
     }
     /**
      * 新增群防群治队伍