Commit 6f1a54927c15c4749fa467b7300e39707a6c77df
Merge branch 'branch_0808' of http://192.168.1.195:9998/ZTEITS-Developers/zteits…
…-bcp-portal.git into branch_0808
Showing
1 changed file
with
29 additions
and
0 deletions
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/areamanage/AreaManageController.java
| ... | ... | @@ -9,8 +9,12 @@ import com.clouds.common.web.vo.BizResultVO; |
| 9 | 9 | import com.clouds.common.web.vo.EasyUIDataGridVO; |
| 10 | 10 | import com.zteits.clouds.api.apibase.bean.BaseRequest; |
| 11 | 11 | import com.zteits.clouds.api.apibase.bean.BizResult; |
| 12 | +import com.zteits.clouds.api.dto.park.param.ParkInfoByAreaBlockIdsRequest; | |
| 12 | 13 | import com.zteits.clouds.api.dto.sys.AreaTreeDTO; |
| 14 | +import com.zteits.clouds.api.dto.sys.TbAreaDTO; | |
| 13 | 15 | import com.zteits.clouds.api.dto.sys.param.AreaBlockByOrgIdQueryRequest; |
| 16 | +import com.zteits.clouds.api.dto.sys.param.AreaBlockQueryByParentIdRequest; | |
| 17 | +import com.zteits.clouds.api.service.park.ParkingLotService; | |
| 14 | 18 | import com.zteits.clouds.api.service.sys.TbAreaService; |
| 15 | 19 | import io.swagger.annotations.Api; |
| 16 | 20 | import io.swagger.annotations.ApiOperation; |
| ... | ... | @@ -45,6 +49,9 @@ public class AreaManageController { |
| 45 | 49 | @Autowired |
| 46 | 50 | private TbAreaService tbAreaService; |
| 47 | 51 | |
| 52 | + @Autowired | |
| 53 | + private ParkingLotService parkingLotService; | |
| 54 | + | |
| 48 | 55 | @ApiOperation("根据归属组织ID查询区域与区块树") |
| 49 | 56 | @PostMapping("/queryAreaAndBlockTree") |
| 50 | 57 | public BizResultVO<EasyUIDataGridVO<AreaTreeDTO>> queryAreaAndBlockTree(@RequestBody BaseRequest baseRequest) { |
| ... | ... | @@ -68,4 +75,26 @@ public class AreaManageController { |
| 68 | 75 | return resultVO; |
| 69 | 76 | } |
| 70 | 77 | |
| 78 | + @ApiOperation("根据区块ID查询区块下停车场数量") | |
| 79 | + @PostMapping("/queryParkInfoNumByAreaBlockIds") | |
| 80 | + public BizResultVO<Integer> queryParkInfoNumByAreaBlockIds(@RequestBody ParkInfoByAreaBlockIdsRequest request){ | |
| 81 | + BizResult<List<AreaTreeDTO>> bizResult = parkingLotService.queryParkInfoByAreaBlockIds(request); | |
| 82 | + BizResultVO<Integer> bizResultVO = new BizResultVO<>(); | |
| 83 | + Integer num; | |
| 84 | + if(ResultUtils.isSuccess(bizResult)){ | |
| 85 | + List<AreaTreeDTO> list = bizResult.getData(); | |
| 86 | + if(list != null){ | |
| 87 | + num = list.size(); | |
| 88 | + }else { | |
| 89 | + num = 0; | |
| 90 | + } | |
| 91 | + bizResultVO.setData(num); | |
| 92 | + }else{ | |
| 93 | + bizResultVO.setCode(bizResult.getErrCode().getCode()); | |
| 94 | + bizResultVO.setMsg(bizResult.getErrMsg()); | |
| 95 | + } | |
| 96 | + | |
| 97 | + return bizResultVO; | |
| 98 | + } | |
| 99 | + | |
| 71 | 100 | } | ... | ... |