|
|
@ -328,6 +328,7 @@ public class DepartmentServiceImpl implements DepartmentService { |
|
|
|
} |
|
|
|
//查不到工作人员就直接返回
|
|
|
|
if (null == userResult.getData()) { |
|
|
|
resultDTO.setType(true); |
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
|
|
|
@ -500,10 +501,11 @@ public class DepartmentServiceImpl implements DepartmentService { |
|
|
|
if (projectResult.getData().size() > NumConstant.ZERO) { |
|
|
|
String msg = String.format("当前%s下负责人存在未办结的项目,请先将待处理项目办结后再操作", ("party_unit".equals(formDTO.getDeptType()) ? "联建单位" : "社会自组织")); |
|
|
|
resultDTO.setMsg(msg); |
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
//2.无代办项目的则删除部门、工作人员信息、修改联建单位/社会自组织业务数据
|
|
|
|
//2-1.删除部门
|
|
|
|
customerDepartmentDao.deleteById(formDTO.getId()); |
|
|
|
customerDepartmentDao.deleteById(formDTO.getDeptId()); |
|
|
|
//2-2.删除部门人员关系数据
|
|
|
|
LambdaQueryWrapper<CustomerStaffDepartmentEntity> query = new LambdaQueryWrapper<>(); |
|
|
|
query.eq(CustomerStaffDepartmentEntity::getDepartmentId, formDTO.getDeptId()); |
|
|
@ -511,7 +513,6 @@ public class DepartmentServiceImpl implements DepartmentService { |
|
|
|
customerStaffDepartmentDao.delete(query); |
|
|
|
//2-3.删除人员注册关系数据
|
|
|
|
LambdaQueryWrapper<StaffOrgRelationEntity> StaffOrgRelation = new LambdaQueryWrapper<>(); |
|
|
|
StaffOrgRelation.eq(StaffOrgRelationEntity::getOrgId, formDTO.getDeptId()); |
|
|
|
StaffOrgRelation.eq(StaffOrgRelationEntity::getStaffId, formDTO.getDeptStaffId()); |
|
|
|
staffOrgRelationDao.delete(StaffOrgRelation); |
|
|
|
//2-4.删除工作人员数据
|
|
|
|