forked from gzzfw/backEnd/gz-dyh

liyj
2024-10-14 94dae325bbe4e23d1a5ebc08788b7d5a7e39a029
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);
    }
}