Commit 1ab29b48 by qwmqiuwenmin

fix

parent 1e3bfb3d
......@@ -206,6 +206,22 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
public HaobanResponse recycle(String departmentId) {
HaobanResponse hr = new HaobanResponse();
hr.setErrorCode(1);
List<TabHaobanDepartment> list = departmentService.listByParentId(departmentId);
logger.info("【部门删除】list.size={}",list.size());
if(!list.isEmpty()) {
hr.setErrorCode(0);
hr.setMessage("存在子部门,删除部门失败");
return hr;
}
List<TabHaobanStaffDepartmentRelated> staffList = staffDepartmentService.listByDepartmentId(departmentId);
logger.info("【部门删除】staffList.size={}",staffList.size());
if(!staffList.isEmpty()) {
hr.setErrorCode(0);
hr.setMessage("存在成员,删除部门失败");
return hr;
}
//调微信的新增接口
TabHaobanDepartment department = departmentService.selectById(departmentId);
WxEnterpriseDTO enterpriseDTO = wxEnterpriseService.selectById(department.getWxEnterpriseId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment