| | |
| | | import cn.afterturn.easypoi.excel.entity.ExportParams; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.chargingPile.api.dto.GetSiteListDTO; |
| | | import com.ruoyi.chargingPile.api.feignClient.SiteClient; |
| | | import com.ruoyi.chargingPile.api.model.TParkingLot; |
| | | import com.ruoyi.chargingPile.api.model.TParkingRecord; |
| | | import com.ruoyi.chargingPile.api.query.ParkingRecordQuery; |
| | |
| | | import com.ruoyi.common.log.annotation.Log; |
| | | import com.ruoyi.common.log.enums.BusinessType; |
| | | import com.ruoyi.common.log.enums.OperatorType; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.common.security.annotation.Logical; |
| | | import com.ruoyi.common.security.annotation.RequiresPermissions; |
| | | import com.ruoyi.order.api.query.TOrderInvoiceQuery; |
| | |
| | | private TParkingRecordService parkingRecordService; |
| | | @Resource |
| | | private TParkingLotService parkingLotService; |
| | | @Resource |
| | | private SiteClient siteClient; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/parkingRecord"}, logical = Logical.OR) |
| | | @ApiOperation(tags = {"后台-订单管理-停车记录"},value = "列表") |
| | | @PostMapping(value = "/page") |
| | | public R<Page<TParkingRecord>> page(@RequestBody ParkingRecordPageQuery query) { |
| | | Long userid = tokenService.getLoginUser().getUserid(); |
| | | List<Integer> siteIds = new ArrayList<>(); |
| | | |
| | | List<GetSiteListDTO> data = siteClient.getSiteListByUserId(userid).getData(); |
| | | for (GetSiteListDTO datum : data) { |
| | | siteIds.add(datum.getId()); |
| | | } |
| | | List<TParkingLot> list = parkingLotService.lambdaQuery().in(!siteIds.isEmpty(), TParkingLot::getSiteId, siteIds).list(); |
| | | List<Integer> ids = new ArrayList<>(); |
| | | for (TParkingLot tParkingLot : list) { |
| | | ids.add(tParkingLot.getId()); |
| | | } |
| | | |
| | | String s1 = ""; |
| | | String s2 = ""; |
| | | if (query.getTimePeriod()!=null){ |