|
@@ -5,19 +5,25 @@ import cn.hutool.core.lang.tree.Tree;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
+import com.jzg.commons.core.base.BaseController;
|
|
|
import com.jzg.commons.core.page.HttpResult;
|
|
import com.jzg.commons.core.page.HttpResult;
|
|
|
import com.jzg.commons.exception.SystemException;
|
|
import com.jzg.commons.exception.SystemException;
|
|
|
|
|
+import com.jzg.commons.util.idgen.IdGenerate;
|
|
|
import com.jzg.organization.entity.po.SysDept;
|
|
import com.jzg.organization.entity.po.SysDept;
|
|
|
|
|
+import com.jzg.organization.entity.po.SysSystem;
|
|
|
|
|
+import com.jzg.organization.entity.po.SysUser;
|
|
|
import com.jzg.organization.entity.vo.SysDeptVo;
|
|
import com.jzg.organization.entity.vo.SysDeptVo;
|
|
|
|
|
+import com.jzg.organization.entity.vo.SysUserVo;
|
|
|
import com.jzg.organization.mapper.SysDeptMapper;
|
|
import com.jzg.organization.mapper.SysDeptMapper;
|
|
|
import com.jzg.organization.service.SysDeptService;
|
|
import com.jzg.organization.service.SysDeptService;
|
|
|
import com.jzg.commons.util.AssertionUtils;
|
|
import com.jzg.commons.util.AssertionUtils;
|
|
|
import com.jzg.commons.util.TreeBuildUtils;
|
|
import com.jzg.commons.util.TreeBuildUtils;
|
|
|
|
|
+import com.jzg.organization.service.SysSystemService;
|
|
|
|
|
+import com.jzg.organization.service.SysUserService;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@@ -28,106 +34,36 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private SysDeptMapper sysDeptMapper;
|
|
private SysDeptMapper sysDeptMapper;
|
|
|
|
|
|
|
|
- @Override
|
|
|
|
|
- public int test() {
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private SysSystemService sysSystemService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private BaseController baseController;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private SysUserService userService;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public SysDeptVo addDept(SysDeptVo sysDeptVo) {
|
|
public SysDeptVo addDept(SysDeptVo sysDeptVo) {
|
|
|
SysDept sysDept = new SysDept();
|
|
SysDept sysDept = new SysDept();
|
|
|
BeanUtils.copyProperties(sysDeptVo, sysDept);
|
|
BeanUtils.copyProperties(sysDeptVo, sysDept);
|
|
|
- String comlevel = ObjectUtils.isEmpty(sysDept.getComLevel()) ? "" : sysDept.getComLevel();
|
|
|
|
|
|
|
+ sysDept.setId(IdGenerate.nextId());
|
|
|
|
|
+ //获取父级id
|
|
|
String parentId = sysDept.getParentId();
|
|
String parentId = sysDept.getParentId();
|
|
|
|
|
|
|
|
- String number;
|
|
|
|
|
- if (comlevel.equals("2")) {
|
|
|
|
|
- AssertionUtils.isStringEmpty(sysDept.getProvince(), "二级机构省份必填");
|
|
|
|
|
- number = sysDept.getProvince().substring(0, 2);
|
|
|
|
|
- } else if (comlevel.equals("3")) {
|
|
|
|
|
- AssertionUtils.isStringEmpty(sysDept.getCity(), "三级机构市必填");
|
|
|
|
|
- number = sysDept.getCity().substring(0, 4);
|
|
|
|
|
- String maxId = sysDeptMapper.getMaxId(parentId, sysDeptVo.getDeptType(), comlevel);
|
|
|
|
|
- if (!maxId.equals("0")) {
|
|
|
|
|
- String substring = maxId.substring(sysDept.getParentId().length() + 1);
|
|
|
|
|
- int i = Integer.parseInt("1" + substring) + 1;
|
|
|
|
|
- number = String.valueOf(i);
|
|
|
|
|
- } else {
|
|
|
|
|
- number = "101";
|
|
|
|
|
- }
|
|
|
|
|
- } else if (comlevel.equals("4")) {
|
|
|
|
|
- AssertionUtils.isStringEmpty(sysDept.getArea(), "四级机构区必填");
|
|
|
|
|
- number = sysDept.getArea().substring(0, 6);
|
|
|
|
|
- String maxId = sysDeptMapper.getMaxId(parentId, sysDeptVo.getDeptType(), comlevel);
|
|
|
|
|
- if (!maxId.equals("0")) {
|
|
|
|
|
- String substring = maxId.substring(sysDept.getParentId().length() + 1);
|
|
|
|
|
- int i = Integer.parseInt("1" + substring) + 1;
|
|
|
|
|
- number = String.valueOf(i);
|
|
|
|
|
- } else {
|
|
|
|
|
- number = "101";
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- String deptType = sysDeptVo.getDeptType();
|
|
|
|
|
-
|
|
|
|
|
- if ("C".equals(sysDept.getDeptType()) && comlevel.equals("5")) {
|
|
|
|
|
- sysDeptVo.setDeptType("M");
|
|
|
|
|
- } else if ("D".equals(sysDept.getDeptType())) {
|
|
|
|
|
- sysDeptVo.setDeptType("D");
|
|
|
|
|
- deptType = "M";
|
|
|
|
|
|
|
+ //设置机构路径
|
|
|
|
|
+ if(!parentId.equals("0")){
|
|
|
|
|
+ SysDept parentSysDept = baseMapper.selectById(parentId);
|
|
|
|
|
+ if(!Objects.isNull(parentSysDept)){
|
|
|
|
|
+ sysDept.setRoute(parentSysDept.getRoute() + "-" + sysDept.getId());
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- String maxId = sysDeptMapper.getMaxId(parentId, deptType, comlevel);
|
|
|
|
|
- if (!maxId.equals("0")) {
|
|
|
|
|
- String substring = maxId.substring(sysDept.getParentId().length() + 1);
|
|
|
|
|
- int i = Integer.parseInt("1" + substring) + 1;
|
|
|
|
|
- number = String.valueOf(i);
|
|
|
|
|
- } else {
|
|
|
|
|
- number = "101";
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- String substring = number.substring(number.length() - 2);
|
|
|
|
|
- String serialNumber;
|
|
|
|
|
- if ("M,D".contains(sysDeptVo.getDeptType())) {
|
|
|
|
|
- serialNumber = parentId + sysDeptVo.getDeptType() + substring;
|
|
|
|
|
- } else {
|
|
|
|
|
- serialNumber = parentId + substring;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- sysDept.setId(serialNumber);
|
|
|
|
|
-
|
|
|
|
|
- SysDept dept = getById(sysDept.getId());
|
|
|
|
|
- if (!ObjectUtils.isEmpty(dept)) {
|
|
|
|
|
- throw new SystemException("机构编号为:" + dept.getId() + " " + dept.getName() + "已被占用");
|
|
|
|
|
|
|
+ }else{
|
|
|
|
|
+ sysDept.setRoute(sysDept.getId());
|
|
|
}
|
|
}
|
|
|
- SysDept parentDept = sysDeptMapper.selectById(sysDept.getParentId());
|
|
|
|
|
-
|
|
|
|
|
- if (parentDept.getComLevel().equals("5")) {
|
|
|
|
|
- sysDept.setManagementSource(parentDept.getManagementSource());
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 查询当前部门序号是否存在
|
|
|
|
|
- LambdaQueryWrapper<SysDept> qw = new LambdaQueryWrapper<>();
|
|
|
|
|
- qw.eq(SysDept::getDelFlag, 0); // 删除标志为未删除
|
|
|
|
|
- qw.eq(SysDept::getParentId, sysDept.getParentId()); // 父级部门ID相同
|
|
|
|
|
- qw.eq(SysDept::getOrderNum, sysDept.getOrderNum()); // 排序号相同
|
|
|
|
|
- boolean exists = sysDeptMapper.exists(qw);
|
|
|
|
|
|
|
|
|
|
- if (exists) {
|
|
|
|
|
- // 如果存在,查询该父级部门下排序号大于当前部门的部门列表
|
|
|
|
|
- LambdaQueryWrapper<SysDept> lqw = new LambdaQueryWrapper<>();
|
|
|
|
|
- lqw.eq(SysDept::getDelFlag, 0); // 删除标志为未删除
|
|
|
|
|
- lqw.eq(SysDept::getParentId, sysDept.getParentId()); // 父级部门ID相同
|
|
|
|
|
- lqw.ge(SysDept::getOrderNum, sysDept.getOrderNum()); // 排序号大于等于当前部门
|
|
|
|
|
- List<SysDept> sysDeptList = list(lqw);
|
|
|
|
|
- // 更新这些部门的排序号
|
|
|
|
|
- sysDeptList.forEach(i -> {
|
|
|
|
|
- i.setOrderNum(i.getOrderNum() + 1);
|
|
|
|
|
- updateById(i);
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- boolean b = save(sysDept);
|
|
|
|
|
|
|
+ boolean b = this.save(sysDept);
|
|
|
AssertionUtils.isSucceed(b, "删除失败");
|
|
AssertionUtils.isSucceed(b, "删除失败");
|
|
|
sysDeptVo.setId(sysDept.getId());
|
|
sysDeptVo.setId(sysDept.getId());
|
|
|
return sysDeptVo;
|
|
return sysDeptVo;
|
|
@@ -138,60 +74,18 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|
|
public HttpResult updateDept(SysDept sysDeptVo) {
|
|
public HttpResult updateDept(SysDept sysDeptVo) {
|
|
|
// 查询修改的序号是否存在
|
|
// 查询修改的序号是否存在
|
|
|
LambdaQueryWrapper<SysDept> qw = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<SysDept> qw = new LambdaQueryWrapper<>();
|
|
|
- qw.eq(SysDept::getDelFlag, 0); // 删除标志为未删除
|
|
|
|
|
qw.eq(SysDept::getParentId, sysDeptVo.getParentId()); // 父级部门ID相同
|
|
qw.eq(SysDept::getParentId, sysDeptVo.getParentId()); // 父级部门ID相同
|
|
|
- qw.eq(SysDept::getOrderNum, sysDeptVo.getOrderNum()); // 排序号相同
|
|
|
|
|
|
|
+ String route = "";
|
|
|
boolean exists = sysDeptMapper.exists(qw);
|
|
boolean exists = sysDeptMapper.exists(qw);
|
|
|
//不存在则直接修改
|
|
//不存在则直接修改
|
|
|
if (!exists) {
|
|
if (!exists) {
|
|
|
sysDeptMapper.updateById(sysDeptVo);
|
|
sysDeptMapper.updateById(sysDeptVo);
|
|
|
return HttpResult.ok();
|
|
return HttpResult.ok();
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //查询机构
|
|
|
|
|
- SysDept sysDept = getById(sysDeptVo.getId());
|
|
|
|
|
- //原本的序号
|
|
|
|
|
- Integer orderNum = sysDept.getOrderNum();
|
|
|
|
|
- //本次修改的序号
|
|
|
|
|
- Integer newOrderNum = sysDeptVo.getOrderNum();
|
|
|
|
|
- // 向上换位
|
|
|
|
|
- if (newOrderNum < orderNum) {
|
|
|
|
|
- // 查询该父级部门下排序号大于当前部门的部门列表
|
|
|
|
|
- LambdaQueryWrapper<SysDept> lqw = new LambdaQueryWrapper<>();
|
|
|
|
|
- lqw.eq(SysDept::getDelFlag, 0); // 删除标志为未删除
|
|
|
|
|
- lqw.eq(SysDept::getParentId, sysDeptVo.getParentId()); // 父级部门ID相同
|
|
|
|
|
- lqw.ge(SysDept::getOrderNum, sysDeptVo.getOrderNum()); // 排序号大于等于当前部门
|
|
|
|
|
- List<SysDept> sysDeptList = list(lqw);
|
|
|
|
|
- sysDeptList.sort(Comparator.comparing(SysDept::getOrderNum));
|
|
|
|
|
- for (SysDept dept : sysDeptList) {
|
|
|
|
|
- dept.setOrderNum(dept.getOrderNum() + 1);
|
|
|
|
|
- updateById(dept);
|
|
|
|
|
- if (dept.getOrderNum().equals(orderNum)) {
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- sysDeptMapper.updateById(sysDeptVo);
|
|
|
|
|
- }
|
|
|
|
|
- //向下换位
|
|
|
|
|
- if (newOrderNum > orderNum) {
|
|
|
|
|
- // 查询该父级部门下排序号小于当前部门的部门列表
|
|
|
|
|
- LambdaQueryWrapper<SysDept> lqw = new LambdaQueryWrapper<>();
|
|
|
|
|
- lqw.eq(SysDept::getDelFlag, 0); // 删除标志为未删除
|
|
|
|
|
- lqw.eq(SysDept::getParentId, sysDeptVo.getParentId()); // 父级部门ID相同
|
|
|
|
|
- lqw.le(SysDept::getOrderNum, sysDeptVo.getOrderNum()); // 排序号大于等于当前部门
|
|
|
|
|
- List<SysDept> sysDeptList = list(lqw);
|
|
|
|
|
- sysDeptList.sort(Comparator.comparing(SysDept::getOrderNum).reversed());
|
|
|
|
|
- for (SysDept dept : sysDeptList) {
|
|
|
|
|
- dept.setOrderNum(dept.getOrderNum() - 1);
|
|
|
|
|
- updateById(dept);
|
|
|
|
|
- if (dept.getOrderNum().equals(orderNum)) {
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- sysDeptMapper.updateById(sysDeptVo);
|
|
|
|
|
- }
|
|
|
|
|
- if (newOrderNum.equals(orderNum)) {
|
|
|
|
|
- sysDeptMapper.updateById(sysDeptVo);
|
|
|
|
|
|
|
+ }else{
|
|
|
|
|
+ //则修改路径
|
|
|
|
|
+ SysDept parentDept = sysDeptMapper.selectById(sysDeptVo.getParentId());
|
|
|
|
|
+ route = parentDept.getRoute() + "-" + sysDeptVo.getId();
|
|
|
|
|
+ sysDeptVo.setRoute(parentDept.getRoute() + "-" + sysDeptVo.getId());
|
|
|
}
|
|
}
|
|
|
return HttpResult.ok();
|
|
return HttpResult.ok();
|
|
|
}
|
|
}
|
|
@@ -219,58 +113,63 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|
|
throw new SystemException("机构不存在");
|
|
throw new SystemException("机构不存在");
|
|
|
}
|
|
}
|
|
|
List<SysDept> deptList = lambdaQuery().eq(SysDept::getParentId, sysDept.getId()).list();
|
|
List<SysDept> deptList = lambdaQuery().eq(SysDept::getParentId, sysDept.getId()).list();
|
|
|
-// List<SysUser> userList = userService.lambdaQuery().eq(SysUser::getDeptId, sysDept.getId()).list();
|
|
|
|
|
if (!deptList.isEmpty()) {
|
|
if (!deptList.isEmpty()) {
|
|
|
throw new SystemException(sysDept.getName() + "机构下还有其他隶属机构请将这些子机构删除后,再进行删除");
|
|
throw new SystemException(sysDept.getName() + "机构下还有其他隶属机构请将这些子机构删除后,再进行删除");
|
|
|
}
|
|
}
|
|
|
-// if (!userList.isEmpty()) {
|
|
|
|
|
-// throw new SystemException(sysDept.getName() + "机构下还有其他用户请将这些用户删除后,再进行删除");
|
|
|
|
|
-// }
|
|
|
|
|
- sysDept.setDelFlag(1);
|
|
|
|
|
- sysDeptMapper.updateById(sysDept);
|
|
|
|
|
|
|
+ SysUserVo vo = new SysUserVo();
|
|
|
|
|
+ vo.setDeptId(sysDept.getId());
|
|
|
|
|
+ List<SysUserVo> userInfo = userService.getUserInfo(vo);
|
|
|
|
|
+ if (userInfo.stream().count() > 0) {
|
|
|
|
|
+ throw new SystemException(sysDept.getName() + "机构下还有其他用户请将这些用户删除后,再进行删除");
|
|
|
|
|
+ }
|
|
|
|
|
+ sysDeptMapper.deleteById(sysDeptVo.getId());
|
|
|
return HttpResult.ok("删除机构成功");
|
|
return HttpResult.ok("删除机构成功");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional
|
|
@Transactional
|
|
|
public HttpResult batchDeleteDept(SysDeptVo sysDeptVo) {
|
|
public HttpResult batchDeleteDept(SysDeptVo sysDeptVo) {
|
|
|
- // 更新每个部门的负责人
|
|
|
|
|
- for (String id : sysDeptVo.getDeptIds()) {
|
|
|
|
|
- SysDept sysDept = getById(id);
|
|
|
|
|
- if (sysDept == null) {
|
|
|
|
|
- throw new SystemException("机构不存在");
|
|
|
|
|
- }
|
|
|
|
|
- List<SysDept> deptList = lambdaQuery().eq(SysDept::getParentId, sysDept.getId()).list();
|
|
|
|
|
-// List<SysUser> userList = userService.lambdaQuery().eq(SysUser::getDeptId, sysDept.getId()).list();
|
|
|
|
|
- if (!deptList.isEmpty()) {
|
|
|
|
|
- throw new SystemException(sysDept.getName() + "机构下还有其他隶属机构请将这些子机构删除后,再进行删除");
|
|
|
|
|
- }
|
|
|
|
|
-// if (!userList.isEmpty()) {
|
|
|
|
|
-// throw new SystemException(sysDept.getName() + "机构下还有其他用户请将这些用户删除后,再进行删除");
|
|
|
|
|
-// }
|
|
|
|
|
- sysDept.setDelFlag(1);
|
|
|
|
|
- sysDeptMapper.updateById(sysDept);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ sysDeptVo.getDeptIds().forEach(id->{
|
|
|
|
|
+ SysDeptVo vo = new SysDeptVo();
|
|
|
|
|
+ vo.setId(id);
|
|
|
|
|
+ this.deleteDept(vo);
|
|
|
|
|
+ });
|
|
|
return HttpResult.ok("批量删除机构成功");
|
|
return HttpResult.ok("批量删除机构成功");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public List<SysDept> getDeptTree(String deptId) {
|
|
public List<SysDept> getDeptTree(String deptId) {
|
|
|
|
|
+ String userSystemCode = baseController.getUserSystemCode();
|
|
|
|
|
+ SysSystem bySysCode = sysSystemService.getBySysCode(userSystemCode);
|
|
|
|
|
+ List<SysDept> sysDepts = new ArrayList<>();
|
|
|
SysDept sysDept = getById(deptId);
|
|
SysDept sysDept = getById(deptId);
|
|
|
LambdaQueryWrapper<SysDept> lqw = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<SysDept> lqw = new LambdaQueryWrapper<>();
|
|
|
- lqw.eq(SysDept::getDelFlag, 0);
|
|
|
|
|
- lqw.likeRight(SysDept::getId, deptId);
|
|
|
|
|
|
|
+ if(!deptId.equals("")) {
|
|
|
|
|
+ lqw.likeRight(SysDept::getRoute, deptId);
|
|
|
|
|
+ }
|
|
|
List<SysDept> sysDeptList = list(lqw);
|
|
List<SysDept> sysDeptList = list(lqw);
|
|
|
Map<String, List<SysDept>> map = sysDeptList.stream().collect(Collectors.groupingBy(SysDept::getParentId));
|
|
Map<String, List<SysDept>> map = sysDeptList.stream().collect(Collectors.groupingBy(SysDept::getParentId));
|
|
|
sysDeptList.forEach(i -> i.setChildren(map.getOrDefault(i.getId(), new ArrayList<>())));
|
|
sysDeptList.forEach(i -> i.setChildren(map.getOrDefault(i.getId(), new ArrayList<>())));
|
|
|
- return map.get(sysDept.getParentId());
|
|
|
|
|
|
|
+ if(!Objects.isNull(sysDept)) {
|
|
|
|
|
+ sysDepts = map.get(sysDept.getParentId());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ sysDepts = map.get("0");
|
|
|
|
|
+ }
|
|
|
|
|
+ List<SysDept> newResultDept = new ArrayList<>();
|
|
|
|
|
+ SysDept baseDept = new SysDept();
|
|
|
|
|
+ baseDept.setId("0");
|
|
|
|
|
+ baseDept.setName(bySysCode.getSysName());
|
|
|
|
|
+ baseDept.setChildren(sysDepts);
|
|
|
|
|
+ newResultDept.add(baseDept);
|
|
|
|
|
+ return newResultDept;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public List<Tree<String>> selectDeptTreeList(String systemCode) {
|
|
public List<Tree<String>> selectDeptTreeList(String systemCode) {
|
|
|
LambdaQueryWrapper<SysDept> lqw = buildQueryWrapper(systemCode);
|
|
LambdaQueryWrapper<SysDept> lqw = buildQueryWrapper(systemCode);
|
|
|
List<SysDept> depts = sysDeptMapper.selectDeptList(lqw);
|
|
List<SysDept> depts = sysDeptMapper.selectDeptList(lqw);
|
|
|
- return buildDeptTreeSelect(depts);
|
|
|
|
|
|
|
+ List<Tree<String>> trees = buildDeptTreeSelect(depts);
|
|
|
|
|
+ return trees;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -294,7 +193,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|
|
private LambdaQueryWrapper<SysDept> buildQueryWrapper(String systemCode) {
|
|
private LambdaQueryWrapper<SysDept> buildQueryWrapper(String systemCode) {
|
|
|
LambdaQueryWrapper<SysDept> lqw = Wrappers.lambdaQuery();
|
|
LambdaQueryWrapper<SysDept> lqw = Wrappers.lambdaQuery();
|
|
|
lqw.eq(SysDept::getSystemCode, systemCode);
|
|
lqw.eq(SysDept::getSystemCode, systemCode);
|
|
|
- lqw.eq(SysDept::getDelFlag, 0);
|
|
|
|
|
lqw.orderByAsc(SysDept::getParentId);
|
|
lqw.orderByAsc(SysDept::getParentId);
|
|
|
lqw.orderByAsc(SysDept::getOrderNum);
|
|
lqw.orderByAsc(SysDept::getOrderNum);
|
|
|
return lqw;
|
|
return lqw;
|