提交 18e7df65 authored 作者: Matrix's avatar Matrix

fix(核查模块): 修正了错误的/unit单位显示接口

上级 b6bdf044
...@@ -136,7 +136,9 @@ public class DeviceCheckController { ...@@ -136,7 +136,9 @@ public class DeviceCheckController {
@GetMapping("/unit") @GetMapping("/unit")
@ApiOperation(value = "查询默认的可以被核查单位的清单(省本直,省直属,市局)") @ApiOperation(value = "查询默认的可以被核查单位的清单(省本直,省直属,市局)")
public ResponseEntity findDefaultUnits() { public ResponseEntity findDefaultUnits() {
return ResponseEntity.ok(new ResultObj<>(unitsRepo.findAllByTypeNotInAndLevelIn(Lists.newArrayList(3), Lists.newArrayList(0, 1, 2)))); return ResponseEntity.ok(new ResultObj<>(unitsRepo.findAllByTypeInOrLevelIn(
Lists.newArrayList(2),
Lists.newArrayList(1, 2))));
} }
/** /**
......
...@@ -22,6 +22,8 @@ public interface UnitsDao extends JpaRepository<Units, Integer>, JpaSpecificatio ...@@ -22,6 +22,8 @@ public interface UnitsDao extends JpaRepository<Units, Integer>, JpaSpecificatio
List<Units> findAllByTypeNotInAndLevelIn(List<Integer> ids,List<Integer> levels); List<Units> findAllByTypeNotInAndLevelIn(List<Integer> ids,List<Integer> levels);
List<Units> findAllByTypeInOrLevelIn(List<Integer> typeIds, List<Integer> levelIds);
List<Units> findByAreaIdIn(List<Integer> areaIds); List<Units> findByAreaIdIn(List<Integer> areaIds);
List<Units> findAllByAreaIdIn(List<Integer> ids); List<Units> findAllByAreaIdIn(List<Integer> ids);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论