From e79d8c8f9679839bf983341fe2cf3212e1bb3001 Mon Sep 17 00:00:00 2001
From: wangwh <2397901735@qq.com>
Date: Mon, 28 Oct 2024 14:44:33 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/gzdyh_test' into gzdyh_test

---
 dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java |   92 ++++++++-------------------------------------
 1 files changed, 17 insertions(+), 75 deletions(-)

diff --git a/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java b/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java
index cf056ca..9451d26 100644
--- a/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java
+++ b/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java
@@ -6,6 +6,7 @@
 import cn.huge.base.common.exception.ClientException;
 import cn.huge.base.common.exception.ServiceException;
 import cn.huge.module.client.api.CustClient;
+import cn.huge.module.cust.dto.CtUnitDTO;
 import cn.huge.module.cust.dto.CtUserDTO;
 import cn.huge.module.cust.dto.PaUserDTO;
 import com.alibaba.fastjson.JSON;
@@ -90,99 +91,40 @@
      * @param userId 用户编号
      * @return
      */
-    public PaUserDTO paclientGetUser(String userId){
+    public PaUserDTO paClientGetUserAll(String userId){
         try{
-            ReturnBO returnBo = custClient.paclientGetUser(userId);
+            ReturnBO returnBo = custClient.paClientGetUserAll(userId);
             if (ReturnConsts.OK == returnBo.getCode()){
                 PaUserDTO loginUser = objectMapper.convertValue(returnBo.getData(), PaUserDTO.class);
                 return loginUser;
             }else{
-                log.error("Client外服务接口[CustClientImpl.paclientGetUser]请求异常:" + returnBo.getMsg(), returnBo.getMsg());
-                throw new ClientException("CustClientImpl.paclientGetUser", returnBo.getMsg());
+                log.error("Client外服务接口[CustClientImpl.paClientGetUserAll]请求异常:" + returnBo.getMsg(), returnBo.getMsg());
+                throw new ClientException("CustClientImpl.paClientGetUserAll", returnBo.getMsg());
             }
         }catch (Exception e){
-            log.error("service方法[CustClientImpl.paclientGetUser]调用异常:"+e, e);
-            throw new ServiceException("CustClientImpl.paclientGetUser", e);
+            log.error("service方法[CustClientImpl.paClientGetUserAll]调用异常:"+e, e);
+            throw new ServiceException("CustClientImpl.paClientGetUserAll", e);
         }
     }
 
     /**
-     * 根据组织和角色查询
-     * @return unitId 组织编号
-     * @return roleCode 角色代码
-     * @return Object
-     */
-    public List<CtUserDTO> listUserByUnitRole(@RequestParam(value = "unitId") String unitId, @RequestParam(value = "roleCode") String roleCode) {
-        List<CtUserDTO> ctUserDTOList = new ArrayList<>();
-        try{
-            ReturnBO returnBo = custClient.listUserByUnitRole(unitId, roleCode);
-            if (ReturnConsts.OK == returnBo.getCode()){
-                List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData();
-                for (LinkedHashMap map : list) {
-                    CtUserDTO ctUserDTO = JSON.parseObject(JSON.toJSONString(map), CtUserDTO.class);
-                    ctUserDTOList.add(ctUserDTO);
-                }
-                return ctUserDTOList;
-            }else{
-                log.error("Client外服务接口[CustClientImpl.listUserByUnitRole]请求异常:" + returnBo.getMsg(), returnBo.getMsg());
-                throw new ClientException("CustClientImpl.listUserByUnitRole", returnBo.getMsg());
-            }
-        }catch (Exception e){
-            log.error("service方法[CustClientImpl.listUserByUnitRole]调用异常:"+e, e);
-            throw new ServiceException("CustClientImpl.listUserByUnitRole", e);
-        }
-    }
-
-    /**
-     * 根据部门和角色查询
-     * @return deptId 部门编号
-     * @return roleCode 角色代码
-     * @return Object
-     */
-    public List<CtUserDTO> listUserByDeptRole(@RequestParam(value = "deptId") String deptId, @RequestParam(value = "roleCode") String roleCode) {
-        List<CtUserDTO> ctUserDTOList = new ArrayList<>();
-        try{
-            ReturnBO returnBo = custClient.listUserByDeptRole(deptId, roleCode);
-            if (ReturnConsts.OK == returnBo.getCode()){
-                List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData();
-                for (LinkedHashMap map : list) {
-                    CtUserDTO ctUserDTO = JSON.parseObject(JSON.toJSONString(map), CtUserDTO.class);
-                    ctUserDTOList.add(ctUserDTO);
-                }
-                return ctUserDTOList;
-            }else{
-                log.error("Client外服务接口[CustClientImpl.listUserByDeptRole]请求异常:" + returnBo.getMsg(), returnBo.getMsg());
-                throw new ClientException("CustClientImpl.listUserByDeptRole", returnBo.getMsg());
-            }
-        }catch (Exception e){
-            log.error("service方法[CustClientImpl.listUserByDeptRole]调用异常:"+e, e);
-            throw new ServiceException("CustClientImpl.listUserByDeptRole", e);
-        }
-    }
-
-    /**
-     * 查询客户下的法院
-     * @param userId
+     * 当事人-获取登录用户
+     * @param userId 用户编号
      * @return
      */
-    public List<SelectTermDTO> listCourt1(String userId){
-        List<SelectTermDTO> selectTermDTOList = new ArrayList<>();
+    public CtUnitDTO getUnitByUserId(String userId){
         try{
-            ReturnBO returnBo = custClient.listCourt1(userId);
+            ReturnBO returnBo = custClient.getUnitByUserId(userId);
             if (ReturnConsts.OK == returnBo.getCode()){
-                List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData();
-                for (LinkedHashMap map : list) {
-                    SelectTermDTO selectTermDTO = JSON.parseObject(JSON.toJSONString(map), SelectTermDTO.class);
-                    selectTermDTOList.add(selectTermDTO);
-                }
-                return selectTermDTOList;
+                CtUnitDTO loginUser = objectMapper.convertValue(returnBo.getData(), CtUnitDTO.class);
+                return loginUser;
             }else{
-                log.error("Client外服务接口[CustClientImpl.listCourt1]请求异常:" + returnBo.getMsg(), returnBo.getMsg());
-                throw new ClientException("CustClientImpl.listCourt1", returnBo.getMsg());
+                log.error("Client外服务接口[CustClientImpl.getUnitByUserId]请求异常:" + returnBo.getMsg(), returnBo.getMsg());
+                throw new ClientException("CustClientImpl.getUnitByUserId", returnBo.getMsg());
             }
         }catch (Exception e){
-            log.error("service方法[CustClientImpl.listCourt1]调用异常:"+e, e);
-            throw new ServiceException("CustClientImpl.listCourt1", e);
+            log.error("service方法[CustClientImpl.getUnitByUserId]调用异常:"+e, e);
+            throw new ServiceException("CustClientImpl.getUnitByUserId", e);
         }
     }
 }

--
Gitblit v1.8.0