查询部门增加code
This commit is contained in:
parent
6764e848c2
commit
cec8d658ce
@ -43,10 +43,10 @@ public class DepartmentsController {
|
||||
// @RequiresPermissions("staff:structure:list")
|
||||
@ApiOperation("获取全部有效部门树列表")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = DepartmentsDto.class)})
|
||||
public List<DepartmentsDto> deplist(@RequestParam @ApiParam(value = "请求类型0 请求部门不包含人员列表,1同时返回人员列表") int type) {
|
||||
public R deplist(@RequestParam @ApiParam(value = "请求类型0 请求部门不包含人员列表,1同时返回人员列表") int type) {
|
||||
List<DepartmentsDto> departmentList = departmentsService.getDepartmentTree(type);
|
||||
|
||||
return departmentList;
|
||||
return R.ok().put("data", departmentList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -44,5 +44,5 @@ public interface StaffRoleDepartmentMapper extends BaseMapper<StaffRoleDepartmen
|
||||
|
||||
List<StaffRoleDepartment> selectStaffRoleDepartmentByStaffRoleIdDepartments(@Param("staffRoleId") Long staffRoleId, @Param("departments") List<String> departments);
|
||||
|
||||
List<DepartmentsSimpleDto> selectDepartmentSimpleInfos(@Param("ids") List<Long> ids);
|
||||
List<DepartmentsSimpleDto> selectDepartmentSimpleInfos(@Param("ids") List<String> ids);
|
||||
}
|
||||
@ -41,5 +41,5 @@ public interface StaffRoleDepartmentService extends IService<StaffRoleDepartment
|
||||
|
||||
void deleteStaffRoleDepartment(Long id);
|
||||
|
||||
List<DepartmentsSimpleDto> selectDepartmentSimpleInfos(List<Long> ids);
|
||||
List<DepartmentsSimpleDto> selectDepartmentSimpleInfos(List<String> ids);
|
||||
}
|
||||
@ -82,7 +82,7 @@ public class StaffRoleDepartmentServiceImpl extends ServiceImpl<StaffRoleDepartm
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentsSimpleDto> selectDepartmentSimpleInfos(List<Long> ids){
|
||||
public List<DepartmentsSimpleDto> selectDepartmentSimpleInfos(List<String> ids){
|
||||
return staffRoleDepartmentMapper.selectDepartmentSimpleInfos(ids);
|
||||
}
|
||||
|
||||
|
||||
@ -60,10 +60,10 @@ public class EvaluationGroupController {
|
||||
EvaluationGroupDto evaluationGroupDto = new EvaluationGroupDto();
|
||||
if(evaluationGroup.getDepIds() != null && evaluationGroup.getDepIds().length() > 0){
|
||||
|
||||
List<Long> ids = Arrays.stream(evaluationGroup.getDepIds().split(",")).map(new Function<String, Long>() {
|
||||
List<String> ids = Arrays.stream(evaluationGroup.getDepIds().split(",")).map(new Function<String, String>() {
|
||||
@Override
|
||||
public Long apply(String s) {
|
||||
return Long.parseLong(s);
|
||||
public String apply(String s) {
|
||||
return s;
|
||||
}
|
||||
}).collect(Collectors.toList());
|
||||
List<DepartmentsSimpleDto> departmentsSimpleDtos = staffRoleDepartmentService.selectDepartmentSimpleInfos(ids);
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
<select id="selectDepartmentSimpleInfos"
|
||||
resultType="com.lz.modules.app.dto.DepartmentsSimpleDto">
|
||||
select id, member_count, department_name from lz_departments where is_delete = 0
|
||||
and id in
|
||||
and department_id in
|
||||
<foreach collection="ids" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user