From 9b540b646aa7171d3d3ba707457b86445dc71dc7 Mon Sep 17 00:00:00 2001
From: liyj <1003249715@qq.com>
Date: Mon, 09 Sep 2024 20:04:23 +0800
Subject: [PATCH] 1、事件流转相关接口优化

---
 dyh-service/dyh-mediate/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java
index 1907587..879c4c5 100644
--- a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java
+++ b/dyh-service/dyh-mediate/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 cn.huge.module.mediate.dto.WechatBindCaseDTO;
@@ -86,8 +87,6 @@
         }
     }
 
-
-
     /**
      * 当事人-获取登录用户-所有信息
      * @param userId 用户编号
@@ -128,4 +127,26 @@
         }
         return userId;
     }
+
+    /**
+     * 根据id查询组织信息
+     * @url {ctx}/api/client/ctUnit/getUnitById
+     * @param unitId 组织编号
+     * @return Object
+     */
+    public CtUnitDTO getUnitById(String unitId){
+        try{
+            ReturnBO returnBo = custClient.getUnitById(unitId);
+            if (ReturnConsts.OK == returnBo.getCode()){
+                CtUnitDTO ctUnitDTO = objectMapper.convertValue(returnBo.getData(), CtUnitDTO.class);
+                return ctUnitDTO;
+            }else{
+                log.error("Client外服务接口[CustClientImpl.getUnitById]请求异常:" + returnBo.getMsg(), returnBo.getMsg());
+                throw new ClientException("CustClientImpl.getUnitById", returnBo.getMsg());
+            }
+        }catch (Exception e){
+            log.error("service方法[CustClientImpl.getUnitById]调用异常:"+e, e);
+            throw new ServiceException("CustClientImpl.getUnitById", e);
+        }
+    }
 }

--
Gitblit v1.8.0