|
|
@ -727,6 +727,11 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
params.put("id",sourceId);
|
|
|
|
params.put("id",sourceId);
|
|
|
|
params.put("supsubcomid",targetId);
|
|
|
|
params.put("supsubcomid",targetId);
|
|
|
|
new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, params).sync();
|
|
|
|
new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, params).sync();
|
|
|
|
|
|
|
|
} else if ("c".equals(targetType)) {
|
|
|
|
|
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
|
|
|
|
|
params.put("id",sourceId);
|
|
|
|
|
|
|
|
params.put("supsubcomid","0");
|
|
|
|
|
|
|
|
new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, params).sync();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
//转移到部门下
|
|
|
|
//转移到部门下
|
|
|
|
List<DepartmentPO> deptListByPId = getDepartmentMapper().getDeptListByPId(Util.getIntValue(targetId));
|
|
|
|
List<DepartmentPO> deptListByPId = getDepartmentMapper().getDeptListByPId(Util.getIntValue(targetId));
|
|
|
@ -735,7 +740,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
if (CollectionUtils.isNotEmpty(deptListByPId)) {
|
|
|
|
if (CollectionUtils.isNotEmpty(deptListByPId)) {
|
|
|
|
addDisableIds(disableIds, deptListByPId);
|
|
|
|
addDisableIds(disableIds, deptListByPId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
OrganizationAssert.isFalse(disableIds.contains(Util.getIntValue(targetId)), "请勿选择当前部门本身及其子部门");
|
|
|
|
OrganizationAssert.isFalse( "d".equals(targetType)&&disableIds.contains(Util.getIntValue(targetId)), "请勿选择当前部门本身及其子部门");
|
|
|
|
deptById.setSupDepId(Util.getIntValue(targetId));
|
|
|
|
deptById.setSupDepId(Util.getIntValue(targetId));
|
|
|
|
DepartmentPO parentDepartment = getDepartmentMapper().getDeptById(Util.getIntValue(targetId));
|
|
|
|
DepartmentPO parentDepartment = getDepartmentMapper().getDeptById(Util.getIntValue(targetId));
|
|
|
|
deptById.setSubCompanyId1(parentDepartment.getSubCompanyId1());
|
|
|
|
deptById.setSubCompanyId1(parentDepartment.getSubCompanyId1());
|
|
|
|