算法提交
This commit is contained in:
@@ -458,8 +458,34 @@ public class DeptController extends BaseController {
|
||||
}
|
||||
/*++++++++++++++++++++++++++++++++pms专用+++++++++++++++++++++++++++++++begin*/
|
||||
|
||||
/**
|
||||
* 根据单位集合查询对应部门
|
||||
* @param list code集合
|
||||
* @return
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||
@PostMapping("/getDeptByCodeList")
|
||||
@ApiOperation("根据单位集合查询对应部门")
|
||||
@ApiImplicitParam(name = "list", value = "code集合", required = true)
|
||||
public HttpResult<List<Dept>> getDeptByCodeList(@RequestBody List<String> list) {
|
||||
String methodDescribe = getMethodDescribe("getDeptByCodeList");
|
||||
List<Dept> result = deptService.getDeptByCodeList(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有的部门集合
|
||||
* @author xy
|
||||
* @date 2023/12/11
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||
@GetMapping("/getAllDept")
|
||||
@ApiOperation("获取所有单位")
|
||||
public HttpResult<List<Dept>> getAllDept() {
|
||||
String methodDescribe = getMethodDescribe("getAllDept");
|
||||
List<Dept> result = deptService.getAllDept();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
/*++++++++++++++++++++++++++++++++pms专用+++++++++++++++++++++++++++++++end*/
|
||||
|
||||
|
||||
@@ -226,4 +226,19 @@ public interface IDeptService extends IService<Dept> {
|
||||
* @Date: 2023/11/9 15:57
|
||||
*/
|
||||
List<String> getUpByDeptIds(String deptId);
|
||||
|
||||
/**
|
||||
* @Description: 根据单位集合查询对应部门
|
||||
* @param list code集合
|
||||
* @Author: xuyang
|
||||
* @Date: 2023/12/11 11:36
|
||||
*/
|
||||
List<Dept> getDeptByCodeList(List<String> list);
|
||||
|
||||
/**
|
||||
* @Description: 获取所有单位
|
||||
* @Author: xuyang
|
||||
* @Date: 2023/12/11 14:50
|
||||
*/
|
||||
List<Dept> getAllDept();
|
||||
}
|
||||
|
||||
@@ -468,4 +468,14 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
list.add(deptId);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Dept> getDeptByCodeList(List<String> list) {
|
||||
return this.lambdaQuery().in(Dept::getCode,list).eq(Dept::getState,DataStateEnum.ENABLE.getCode()).list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Dept> getAllDept() {
|
||||
return this.lambdaQuery().eq(Dept::getState,DataStateEnum.ENABLE.getCode()).list();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user