Browse Source

Merge branch '王立生' of sckj/mz-cloud into master

sckj 2 years ago
parent
commit
00f5457244

+ 33 - 0
ruoyi-modules/mz-portal/src/main/java/com/ruoyi/portal/controller/PortalSysDeptJlController.java

@@ -5,11 +5,16 @@ import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.system.api.domain.SysObjDictType;
+import com.ruoyi.system.db.DBExecResult;
+import com.ruoyi.system.db.DBFactory;
+import com.ruoyi.system.db.DBImpl;
 import com.ruoyi.system.domain.SysDeptJl;
 import com.ruoyi.system.service.ISysDeptJlService;
 import com.ruoyi.system.utils.OtherConstants;
 import com.ruoyi.system.utils.SubCodeUtil;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -56,4 +61,32 @@ public class PortalSysDeptJlController extends BaseController
         List<SysDeptJl> list = sysDeptJlService.selectSysDeptJlTree(sysDeptJl);
         return AjaxResult.success(list);
     }
+    @GetMapping("/gettreedata")
+    public AjaxResult gettreedata(@Validated SysObjDictType dictType)
+    {
+
+        String dicttype=dictType.getDictType();
+        String outtype=dictType.getOutType();
+        String userid="";
+        String userType="";
+        String userunit="";
+        String userJgId="";
+        String para1=dictType.getPara1();
+        String para2=dictType.getPara2();
+        String para3=dictType.getPara3();
+        String para4=dictType.getPara4();
+        String para5=dictType.getPara5();
+
+        DBImpl db1= DBFactory.getDBImpl("master") ;
+        String param[]=new String[]{dicttype,outtype,userid,userType,userunit,userJgId,para1,para2,para3,para4,para5};
+        String paramType[]=new String[]{"in","in","in","in","in","in","in","in","in","in","in"};
+        String paramDataType[]=new String[]{"0","0","0","0","0","0","0","0","0","0","0"};
+        DBExecResult ret= db1.exeProcedureWithRet("gettreedata",param,paramType,paramDataType);
+        if (ret.isSuccessed() && ret.dbResultsize>0)
+        {
+            return AjaxResult.success(ret.getDbResult());
+        }
+        else
+            return   AjaxResult.error("数据获取失败");
+    }
 }

+ 9 - 2
ruoyi-web/src/api/home.js

@@ -141,7 +141,14 @@ export const CountryDeptList = (query) => {
     params: query
   })
 }
-
+// Tree数据查询
+export function gettreedata(query) {
+  return request({
+    url: '/portal/jlDept/gettreedata',
+    method: 'get',
+    params: query
+  })
+}
 // 护理员查询接口
 export const hlyList = (query) => {
   return request({
@@ -230,4 +237,4 @@ export function getOrderOrgResult(query) {
     method: 'get',
     params: query
   })
-}
+}