| | |
| | | * 根据指定条件获取片区,2024-08-14新增,替换原来的片区分页查询 |
| | | * |
| | | * @param qo |
| | | * @param bindingResult |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "/some") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoBlock>>> getBlocks(@Valid QueryVo qo, BindingResult bindingResult) { |
| | | if (bindingResult != null && bindingResult.hasErrors()) { |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | public BaseResponse<QueryResultVo<List<VoBlock>>> getBlocks(QueryVo qo) { |
| | | try { |
| | | return BaseResponseUtils.buildSuccess(this.sv.getBlocks(qo)); |
| | | } catch (Exception e) { |
| | |
| | | |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | |
| | | /** |
| | | * 获取片区、分水房联动视图,添加农户时使用 |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "/block_divides") |
| | | @SsoAop() |
| | | public BaseResponse<JSONArray> getBlockDivides() { |
| | | try { |
| | | return BaseResponseUtils.buildSuccess(this.sv.getBlockDivides()); |
| | | } catch (Exception e) { |
| | | log.error("获取开卡记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |
| | | } |