|
@@ -380,8 +380,8 @@ public class SysDeptController {
|
|
|
@GetMapping("/listDict")
|
|
|
public ResMsg listDict(SysDept filter) {
|
|
|
List<SysDept> resultList = sysDeptService.getListByFilter(filter);
|
|
|
- return ResMsg.newInstance(CodeEnum.OK, BeanQuery.select(
|
|
|
- "parentId as parentId", "deptId as id", "deptName as name").executeFrom(resultList));
|
|
|
+ List<Map<String, Object>> mapList = BeanQuery.select("parentId as parentId", "deptId as id", "deptName as name").executeFrom(resultList);
|
|
|
+ return ResMsg.newInstance(CodeEnum.OK, sysDeptService.lossOfAccuracy(mapList));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -391,10 +391,10 @@ public class SysDeptController {
|
|
|
* @return 应答结果对象,包含字典形式的数据集合。
|
|
|
*/
|
|
|
@PostMapping("/listDictByIds")
|
|
|
- public ResponseResult<List<Map<String, Object>>> listDictByIds(@MyRequestBody List<Long> dictIds) {
|
|
|
+ public ResponseResult<List<Map<String, String>>> listDictByIds(@MyRequestBody List<Long> dictIds) {
|
|
|
List<SysDept> resultList = sysDeptService.getInList(new HashSet<>(dictIds));
|
|
|
- return ResponseResult.success(BeanQuery.select(
|
|
|
- "parentId as parentId", "deptId as id", "deptName as name").executeFrom(resultList));
|
|
|
+ List<Map<String, Object>> mapList = BeanQuery.select("parentId as parentId", "deptId as id", "deptName as name").executeFrom(resultList);
|
|
|
+ return ResponseResult.success(sysDeptService.lossOfAccuracy(mapList));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -405,12 +405,13 @@ public class SysDeptController {
|
|
|
* @return 按照字典的形式返回下级数据列表。
|
|
|
*/
|
|
|
@GetMapping("/listDictByParentId")
|
|
|
- public ResponseResult<List<Map<String, Object>>> listDictByParentId(@RequestParam(required = false) Long parentId) {
|
|
|
+ public ResponseResult<List<Map<String, String>>> listDictByParentId(@RequestParam(required = false) Long parentId) {
|
|
|
List<SysDept> resultList = sysDeptService.getListByParentId("parentId", parentId);
|
|
|
- return ResponseResult.success(BeanQuery.select(
|
|
|
- "parentId as parentId", "deptId as id", "deptName as name").executeFrom(resultList));
|
|
|
+ List<Map<String, Object>> mapList = BeanQuery.select("parentId as parentId", "deptId as id", "deptName as name").executeFrom(resultList);
|
|
|
+ return ResponseResult.success(sysDeptService.lossOfAccuracy(mapList));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 根据父主键Id列表,获取当前部门Id及其所有下级部门Id列表。
|
|
|
* 白名单接口,登录用户均可访问。
|