Commit 56df3788 authored by chenyuxi's avatar chenyuxi

feat: 获取删除的部门

parent ab0cc9fe
......@@ -311,4 +311,18 @@ public class DeptController {
return sysDeptService.cspUpdateDept(dept);
}
/**
* 客户服务平台——获取项目下已删除的部门
* @return R<String> 删除部门的ID集合
* @author chenyuxi
* @since 1.9.7
*/
@GetMapping(value = "/csp/getDelDeptIds")
public R<String> cspDelDeptIds(SysDeptVo dept) {
if(Common.isEmpty(dept.getProjectNo())){
return R.failed("项目编码不能为空");
}
return R.ok(sysDeptService.cspDelDeptIds(dept.getProjectNo()));
}
}
......@@ -97,4 +97,8 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
void batchUpdateSort(@Param("moveVos")List<DeptSortVo> moveVos);
List<SysDept> cspDelDeptIds(@Param("projectNo") String projectNo);
}
......@@ -144,4 +144,12 @@ public interface SysDeptService extends IService<SysDept> {
R<Boolean> cspUpdateDept(SysDeptMoveVo dept);
/**
* 客户服务平台——获取项目下已删除的部门
* @return R<String> 删除部门的ID集合
* @author chenyuxi
* @since 1.9.7
*/
String cspDelDeptIds(String projectNo);
}
......@@ -631,4 +631,27 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
}
return R.ok();
}
/**
* 客户服务平台——获取项目下已删除的部门
*
* @param projectNo
* @return R<String> 删除部门的ID集合
* @author chenyuxi
* @since 1.9.7
*/
@Override
public String cspDelDeptIds(String projectNo) {
String delDeptIds = "";
List<SysDept> deptList = baseMapper.cspDelDeptIds(projectNo);
if(Common.isNotNull(deptList)){
for(SysDept dept : deptList){
delDeptIds = delDeptIds.concat(",").concat(dept.getDeptId().toString());
}
}
if(delDeptIds.length()>0){
delDeptIds = delDeptIds.substring(1);
}
return delDeptIds;
}
}
......@@ -155,4 +155,8 @@
</foreach>
</update>
<select id="cspDelDeptIds" resultType="com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDept">
select dept_id from sys_dept where del_flag = '1' AND project_no = #{projectNo}
</select>
</mapper>
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