浏览代码

查询所属开发区

zhaowenrui 1 年之前
父节点
当前提交
30be5ffb5a

+ 3 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteSystemBaseService.java

@@ -215,4 +215,7 @@ public interface RemoteSystemBaseService {
 
     @GetMapping("/dict/data/internetOfThings/{dictType}")
     AjaxResult getSortByTypeAndCount(@PathVariable("dictType") String dictType);
+
+    @PostMapping("/dept/getDeptsByDeptType")
+    AjaxResult getDeptsByDeptType(@RequestBody SysDept sysDept);
 }

+ 5 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/factory/RemoteSystemBaseServiceFallbackFactory.java

@@ -186,6 +186,11 @@ public class RemoteSystemBaseServiceFallbackFactory implements FallbackFactory<R
             public AjaxResult getSortByTypeAndCount(String dictType) {
                 return null;
             }
+
+            @Override
+            public AjaxResult getDeptsByDeptType(SysDept sysDept) {
+                return null;
+            }
         };
     }
 

+ 12 - 4
src/main/java/com/sooka/sponest/mobile/system/dept/DeptController.java

@@ -3,10 +3,7 @@ package com.sooka.sponest.mobile.system.dept;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.system.api.domain.SysDept;
 import com.sooka.sponest.mobile.remoteapi.RemoteSystemBaseService;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.util.ArrayList;
@@ -66,4 +63,15 @@ public class DeptController {
     public AjaxResult getChildren(@RequestParam("deptId") String deptId, @RequestParam("postId") String postId) {
         return remoteSystemBaseService.getChildren(deptId, postId);
     }
+
+    /**
+     * 查询所属开发区
+     * @param sysDept
+     * @return
+     */
+    @PostMapping("/getDeptsByDeptType")
+    public AjaxResult getDeptsByDeptType(@RequestBody SysDept sysDept){
+        sysDept.setDeptType("sys_dept_type_27");
+        return remoteSystemBaseService.getDeptsByDeptType(sysDept);
+    }
 }