Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
| | |
| | | * 当前查询页 |
| | | */ |
| | | @Schema(description = "当前页", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "当前页不能为空") //不能为空也不能为null |
| | | public Integer pageCurr; |
| | | |
| | | /** |
| | | * 每页数据条数 |
| | | */ |
| | | @Schema(description = "每页记录数", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "每页记录数不能为空") //不能为空也不能为null |
| | | public Integer pageSize; |
| | | |
| | | /** |
| | |
| | | <!-- 多个组织,用编号区分,编号从1开始 --> |
| | | <org1 tag="ym" name="元谋"> |
| | | <districts> |
| | | <province name="云南省" num="53" level="1"> |
| | | <city name="楚雄彝族自治州" num="23" level="2"> |
| | | <country name="元谋县" num="28" level="3" /> |
| | | <province name="云南省" num="53" level="0"> |
| | | <city name="楚雄彝族自治州" num="23" level="1"> |
| | | <country name="元谋县" num="28" level="2" /> |
| | | </city> |
| | | </province> |
| | | </districts> |
| | |
| | | * 根据指定条件获取片区,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 |
| | | */ |
| | | public QueryResultVo<List<VoBlock>> getBlocks(QueryVo vo){ |
| | | vo.setPageCurr((vo.pageCurr -1) * vo.pageSize); |
| | | vo.setPageCurr((vo.getPageCurr() -1) * vo.getPageSize()); |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo) ; |
| | | Long itemTotal = this.dao.getBlocksCount(params) ; |
| | | |
| | |
| | | job_block.put("graphs", array_mapGraphs); |
| | | } |
| | | } |
| | | }else {//增加健壮性 |
| | | QueryResultVo<List<VoBlock>> rsVo = new QueryResultVo<>() ; |
| | | return rsVo ; |
| | | } |
| | | |
| | | QueryResultVo<List<VoBlock>> rsVo = new QueryResultVo<>() ; |
| | |
| | | @GetMapping(path = "all") |
| | | @SsoAop() |
| | | public BaseResponse<List<BaDistrict>> all() { |
| | | List<BaDistrict> list = this.sv.selectAllByLevel(DistrictLevel.City.code); |
| | | List<BaDistrict> list = this.sv.selectAllByLevel(DistrictLevel.Province.code); |
| | | return BaseResponseUtils.buildSuccess(list); |
| | | } |
| | | |