|
@@ -39,9 +39,11 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
try {
|
|
try {
|
|
Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
|
|
Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
|
|
|
|
+ //未输入上级部门 或者 输入的上级部门id存在且为同一公司时
|
|
if (superiorId == null || departmentMapper.selectCount(new QueryWrapper<Department>()
|
|
if (superiorId == null || departmentMapper.selectCount(new QueryWrapper<Department>()
|
|
.eq("department_id", superiorId)
|
|
.eq("department_id", superiorId)
|
|
.eq("company_id", companyId)) == 1) {
|
|
.eq("company_id", companyId)) == 1) {
|
|
|
|
+// String
|
|
Department department = new Department()
|
|
Department department = new Department()
|
|
.setDepartmentName(departmentName)
|
|
.setDepartmentName(departmentName)
|
|
.setSuperiorId(superiorId)
|
|
.setSuperiorId(superiorId)
|