| | |
| | | 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.PartnerClient; |
| | | import com.ruoyi.chargingPile.api.feignClient.SiteClient; |
| | | import com.ruoyi.chargingPile.api.model.TParkingLot; |
| | | import com.ruoyi.chargingPile.api.model.TParkingRecord; |
| | |
| | | import com.ruoyi.order.api.query.TOrderInvoiceQuery; |
| | | import com.ruoyi.order.api.vo.TCharingUserEquimentVO; |
| | | import com.ruoyi.order.api.vo.TOrderInvoiceVO; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | private SiteClient siteClient; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private PartnerClient partnerClient; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | @RequiresPermissions(value = {"/parkingRecord"}, logical = Logical.OR) |
| | | @ApiOperation(tags = {"后台-订单管理-停车记录"},value = "列表") |
| | | @PostMapping(value = "/page") |
| | |
| | | for (GetSiteListDTO datum : data) { |
| | | siteIds.add(datum.getId()); |
| | | } |
| | | List<TParkingLot> list = parkingLotService.lambdaQuery().in(!siteIds.isEmpty(), TParkingLot::getSiteId, siteIds).list(); |
| | | if (siteIds.isEmpty()){ |
| | | siteIds.add(-1); |
| | | } |
| | | List<TParkingLot> list = parkingLotService.lambdaQuery().in( TParkingLot::getSiteId, siteIds).list(); |
| | | List<Integer> ids = new ArrayList<>(); |
| | | for (TParkingLot tParkingLot : list) { |
| | | ids.add(tParkingLot.getId()); |
| | |
| | | .between(query.getTimePeriod()!=null,TParkingRecord::getOutParkingTime,s1,s2) |
| | | .orderByDesc(TParkingRecord::getCreateTime) |
| | | .page(Page.of(query.getPageCurr(), query.getPageSize())); |
| | | |
| | | SysUser sysUser = sysUserClient.getSysUser(tokenService.getLoginUser().getUserid()).getData(); |
| | | Integer roleType = sysUser.getRoleType(); |
| | | for (TParkingRecord record : page.getRecords()) { |
| | | TParkingLot byId = parkingLotService.getById(record.getParkingLotId()); |
| | | record.setUid(record.getId().toString()); |
| | | if (byId!=null) { |
| | | record.setParkName(byId.getName()); |
| | | if (roleType==2){ |
| | | List<Boolean> data1 = partnerClient.parkingRecordListMenu(sysUser.getObjectId(), byId.getSiteId()).getData(); |
| | | record.setAuthInfo(data1.get(0)); |
| | | record.setAuthInfo(data1.get(1)); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(page); |