From 5e1aa7b9e87b3a913718f2284817b7e7025eb5f4 Mon Sep 17 00:00:00 2001
From: zhouxiantao <1026371446@qq.com>
Date: Mon, 21 Oct 2024 16:16:49 +0800
Subject: [PATCH] fix:解纷态势-错误代码修改
---
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java | 9 ++++++++-
1 files changed, 8 insertions(+), 1 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 1595bb1..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;
@@ -655,9 +656,11 @@
*/
public CtUnitDTO getParentZzzx(String unitId){
try{
- CtUnit loginCtUnit = mapper.selectById(unitId);
// 查询当前单位的上级综治中心
QueryWrapper<CtUnit> ctUnitQueryWrapper = new QueryWrapper<>();
+ ctUnitQueryWrapper.eq("id", unitId).select("parent_id");
+ CtUnit loginCtUnit = mapper.selectOne(ctUnitQueryWrapper);
+ ctUnitQueryWrapper.clear();
ctUnitQueryWrapper.eq("id", loginCtUnit.getParentId()).eq("unit_type", UserBaseConsts.UNIT_TYPE_1);
CtUnit zzzxCtUnit = mapper.selectOne(ctUnitQueryWrapper);
CtUnitDTO ctUnitDTO = new CtUnitDTO();
@@ -694,4 +697,8 @@
throw new ServiceException("CtUnitService.getParentZzzx", e);
}
}
+
+ public CtUnit selectUnitByGridId(String gridUnitId){
+ return mapper.selectUnitByGridId(gridUnitId);
+ }
}
--
Gitblit v1.8.0