| | |
| | | // 查询站点的停车场id |
| | | if(Objects.nonNull(query.getSiteId())){ |
| | | Site site = siteMapper.selectById(query.getSiteId()); |
| | | List<TParkingLot> tParkingLots = parkingLotMapper.selectList(Wrappers.lambdaQuery(TParkingLot.class) |
| | | .eq(TParkingLot::getSiteId, site.getId())); |
| | | List<Integer> lotIds = tParkingLots.stream().map(TParkingLot::getId).collect(Collectors.toList()); |
| | | query.setLotIds(lotIds); |
| | | if (site!=null){ |
| | | List<TParkingLot> tParkingLots = parkingLotMapper.selectList(Wrappers.lambdaQuery(TParkingLot.class) |
| | | .eq(TParkingLot::getSiteId, site.getId())); |
| | | List<Integer> lotIds = tParkingLots.stream().map(TParkingLot::getId).collect(Collectors.toList()); |
| | | query.setLotIds(lotIds); |
| | | } |
| | | |
| | | } |
| | | PageInfo<TParkingRecordVO> pageInfo = new PageInfo<>(query.getPageCurr(),query.getPageSize()); |
| | | List<TParkingRecordVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | // 查询总数 |
| | | TParkingRecordPageInfoVO infoVO = this.baseMapper.getParkingRecordCount(query); |
| | | if (infoVO==null){ |
| | | infoVO = new TParkingRecordPageInfoVO(); |
| | | infoVO.setTimeoutAmountSum(new BigDecimal("0")); |
| | | infoVO.setOrderCount(0); |
| | | infoVO.setParkingDurationSum(0); |
| | | infoVO.setFeeDurationSum(0); |
| | | } |
| | | infoVO.setParkingRecordVOS(pageInfo); |
| | | return infoVO; |
| | | } |