From e4d5edc13431e3777d4463df4864c6116dc79744 Mon Sep 17 00:00:00 2001
From: zhouxiantao <1026371446@qq.com>
Date: Thu, 17 Oct 2024 19:51:01 +0800
Subject: [PATCH] fix:流转办理已经修改不生效问题,纠纷态势区域权限限制,纠纷态势纠纷类型二级接口
---
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java
index 787bcb9..36af820 100644
--- a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java
@@ -23,6 +23,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.annotations.Param;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -670,4 +671,34 @@
throw new ServiceException("CtUnitService.getParentZzzx", e);
}
}
+
+ /**
+ * 获取本级综治中心
+ * @param unitId 当前单位编号
+ * @return
+ */
+ public CtUnitDTO getBjZzzx(String unitId){
+ try{
+ CtUnitDTO ctUnitDTO = new CtUnitDTO();
+ // 查询自己是否是综治中心
+ CtUnit loginCtUnit = mapper.selectById(unitId);
+ if (UserBaseConsts.UNIT_TYPE_1 == loginCtUnit.getUnitType()){
+ BeanUtils.copyProperties(loginCtUnit, ctUnitDTO);
+ }else {
+ // 查询当前单位的上级综治中心
+ QueryWrapper<CtUnit> ctUnitQueryWrapper = new QueryWrapper<>();
+ ctUnitQueryWrapper.eq("id", loginCtUnit.getParentId()).eq("unit_type", UserBaseConsts.UNIT_TYPE_1);
+ CtUnit zzzxCtUnit = mapper.selectOne(ctUnitQueryWrapper);
+ BeanUtils.copyProperties(zzzxCtUnit, ctUnitDTO);
+ }
+ return ctUnitDTO;
+ }catch (Exception e){
+ log.error("[CtUnitService.getParentZzzx]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUnitService.getParentZzzx", e);
+ }
+ }
+
+ public CtUnit selectUnitByGridId(String gridUnitId){
+ return mapper.selectUnitByGridId(gridUnitId);
+ }
}
--
Gitblit v1.8.0