|
|
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import org.apache.dubbo.config.annotation.DubboReference; |
|
|
import org.apache.dubbo.config.annotation.DubboReference; |
|
|
|
|
|
import org.dromara.common.core.utils.StreamUtils; |
|
|
import org.dromara.common.satoken.utils.LoginHelper; |
|
|
import org.dromara.common.satoken.utils.LoginHelper; |
|
|
import org.dromara.system.api.domain.vo.RemoteDeptVo; |
|
|
import org.dromara.system.api.domain.vo.RemoteDeptVo; |
|
|
import org.dromara.system.domain.SysDepartBoundary; |
|
|
import org.dromara.system.domain.SysDepartBoundary; |
|
|
@ -215,33 +216,20 @@ public class SysDepartBoundaryServiceImpl extends ServiceImpl<SysDepartBoundaryM |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<SysDepartBoundaryBo> listJson(SysDepartBoundary departBoundary) { |
|
|
public String listJson(SysDepartBoundary departBoundary) { |
|
|
|
|
|
|
|
|
SysDepartBoundaryBo result = new SysDepartBoundaryBo(); |
|
|
|
|
|
|
|
|
|
|
|
//获取当前人所属部门
|
|
|
//获取当前人所属部门
|
|
|
Long deptId = LoginHelper.getDeptId(); |
|
|
Long deptId = LoginHelper.getDeptId(); |
|
|
|
|
|
|
|
|
LambdaQueryWrapper<SysDepartBoundary> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
wrapper.eq(SysDepartBoundary::getDeptId, deptId); |
|
|
|
|
|
List<SysDepartBoundary> boundaryList = baseMapper.selectList(wrapper); |
|
|
|
|
|
|
|
|
|
|
|
if (ObjectUtil.isEmpty(boundaryList)) { |
|
|
|
|
|
return List.of(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Integer areaType = boundaryList.getFirst().getAreaType(); |
|
|
|
|
|
String deptName = boundaryList.getFirst().getDeptName(); |
|
|
|
|
|
|
|
|
|
|
|
//获取部门所属区域
|
|
|
//根据当前所属部门id查询下级部门,获取部门所属区域
|
|
|
String landCategories = this.baseMapper.listJson(String.valueOf(deptId)); |
|
|
// List<SysDeptVo> deptVoList = deptService.selectSecondByParentId(deptId);
|
|
|
|
|
|
//
|
|
|
|
|
|
// List<Long> secondDeptIdList = StreamUtils.toList(deptVoList, SysDeptVo::getDeptId);
|
|
|
|
|
|
// secondDeptIdList.add(deptId);
|
|
|
|
|
|
|
|
|
result.setDeptId(String.valueOf(deptId)); |
|
|
return this.baseMapper.listJson(List.of(deptId)); |
|
|
result.setDeptName(deptName); |
|
|
|
|
|
result.setAreaType(areaType); |
|
|
|
|
|
result.setLandCategoriesJson(landCategories); |
|
|
|
|
|
|
|
|
|
|
|
return List.of(result); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -259,7 +247,7 @@ public class SysDepartBoundaryServiceImpl extends ServiceImpl<SysDepartBoundaryM |
|
|
@Override |
|
|
@Override |
|
|
public String listUserJson() { |
|
|
public String listUserJson() { |
|
|
Long deptId = LoginHelper.getDeptId(); |
|
|
Long deptId = LoginHelper.getDeptId(); |
|
|
return this.baseMapper.listJson(String.valueOf(deptId)); |
|
|
return this.baseMapper.listJson(List.of(deptId)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
|