|
|
|
@ -29,6 +29,7 @@ import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.dromara.common.satoken.utils.LoginHelper; |
|
|
|
import org.dromara.system.domain.SysDept; |
|
|
|
import org.dromara.system.domain.SysUser; |
|
|
|
import org.dromara.system.domain.vo.SysDeptVo; |
|
|
|
import org.dromara.system.domain.vo.SysDictDataVo; |
|
|
|
import org.dromara.system.mapper.SysDeptMapper; |
|
|
|
import org.dromara.system.mapper.SysUserMapper; |
|
|
|
@ -642,7 +643,7 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat |
|
|
|
|
|
|
|
if(StrUtil.isNotEmpty(bo.getBureauDeptId())){ |
|
|
|
//查询人员所在区
|
|
|
|
SysDept sysDept = iterationDeptParentRegion(bo.getBureauDeptId()); |
|
|
|
SysDeptVo sysDept = iterationDeptParentRegion(bo.getBureauDeptId()); |
|
|
|
//存储数据产生的所在行政区
|
|
|
|
bo.setRegion(null!=sysDept?sysDept.getDeptName():""); |
|
|
|
bo.setRegionId(null!=sysDept?sysDept.getDeptId():""); |
|
|
|
@ -665,9 +666,9 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public SysDept iterationDeptParentRegion(String deptId) { |
|
|
|
public SysDeptVo iterationDeptParentRegion(String deptId) { |
|
|
|
|
|
|
|
SysDept dept = sysDeptMapper.electDeptById(deptId); |
|
|
|
SysDeptVo dept = sysDeptMapper.selectDeptById(deptId); |
|
|
|
Optional op =Optional.ofNullable(dept); |
|
|
|
if(!op.isPresent() || deptId == null)return null; // 防止admin这种没有部门的进来后造成死循环
|
|
|
|
if (StringUtils.isNotEmpty(dept.getDeptType())) { |
|
|
|
|