Commit 48cbd9100bbb44b0b68d0d8a2864dc014b544410
1 parent
9c44aec3
tijiao
Showing
1 changed file
with
8 additions
and
10 deletions
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/BerthsStatisticController.java
| ... | ... | @@ -470,29 +470,27 @@ public class BerthsStatisticController extends BizController { |
| 470 | 470 | @ApiOperation("获取停车场信息统计和今日收益") |
| 471 | 471 | @PostMapping("getParkStaticsticAndTodayAmount") |
| 472 | 472 | public BizResultVO<List<ParkStaticsticAndTodayAmountVO>> getParkStaticsticAndTodayAmount(@RequestBody QueryTodayOrderRequest request) throws Exception{ |
| 473 | - // 1.调用接口查询当前登录人管辖的停车场名称 | |
| 474 | - UserInfo userInfo = sessionCommUtil.getUserInfo(); | |
| 475 | - List<String> plNos=Lists.newArrayList(); | |
| 476 | - if(null != userInfo){ | |
| 477 | - plNos= userInfo.getOrgIds(); | |
| 478 | - } | |
| 473 | + if(CollectionUtils.isEmpty(request.getPlNos())){ | |
| 474 | + throw new BizException(ErrorType.PARAMM_NULL, "入参不能为空!"); | |
| 475 | + } | |
| 476 | + | |
| 479 | 477 | //今日收益 |
| 480 | 478 | List<ParkStaticsticAndTodayAmountVO> listVO= new ArrayList<ParkStaticsticAndTodayAmountVO>(); |
| 481 | 479 | BizResult<Map<String, BigDecimal>> result = tdBOrderService.queryTodayAmountSumByPlno(request); |
| 482 | 480 | Map<String, BigDecimal> mapAmount=ResultUtils.getBizResultData(result); |
| 483 | 481 | //空闲车位数 |
| 484 | 482 | ParkFreeBerthGetByPlnoRequest parkFreeBerthGetByPlnoRequest = new ParkFreeBerthGetByPlnoRequest(); |
| 485 | - request.setPlNos(plNos); | |
| 486 | - request.setSysCode(sysCode); | |
| 483 | + parkFreeBerthGetByPlnoRequest.setPlNos(request.getPlNos()); | |
| 484 | + parkFreeBerthGetByPlnoRequest.setSysCode(request.getSysCode()); | |
| 487 | 485 | BizResult<Map<String, Integer>> freeBerthsNumBizResult = parkFreeBerthService.getParkFreeBerthByPlno(parkFreeBerthGetByPlnoRequest); |
| 488 | 486 | Map<String, Integer> freeBerthsNumMap = ResultUtils.getBizResultData(freeBerthsNumBizResult); |
| 489 | - for (String plNo : plNos) { | |
| 487 | + for (String plNo : request.getPlNos()) { | |
| 490 | 488 | //先查询缓存 |
| 491 | 489 | ParkingLotDTO lotDTO = ParkingLotCacheUtil.getParkLotByPlNo(plNo); |
| 492 | 490 | if(lotDTO == null){ |
| 493 | 491 | //查询数据库 |
| 494 | 492 | QueryParkLotInfoByPkNoRequest request1 = new QueryParkLotInfoByPkNoRequest(); |
| 495 | - request1.setSysCode(sysCode); | |
| 493 | + request1.setSysCode(request.getSysCode()); | |
| 496 | 494 | request1.setPklNo(plNo); |
| 497 | 495 | BizResult<ParkingLotDTO> bizResult2 = parkingLotQueryService.QueryParkingLotByPkNo(request1); |
| 498 | 496 | lotDTO = ResultUtils.getBizResultData(bizResult2); | ... | ... |