| | |
| | | import com.boying.service.OutParkService; |
| | | import com.boying.service.ParkService; |
| | | import com.boying.service.UserService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | @RestController |
| | | @RequestMapping("orderrecord") |
| | | @RequestMapping("ffzf/orderrecord") |
| | | @RequiredArgsConstructor |
| | | public class OrderRecordController { |
| | | |
| | |
| | | private final ParkService parkService; |
| | | private final UserService userService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param page 分页对象 |
| | | * @param orderRecord 订单表 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "分页查询", notes = "分页查询") |
| | | @PostMapping("/findPage" ) |
| | | public R getOrderRecordPage(Page page, OrderRecord orderRecord) { |
| | | QueryWrapper<OrderRecord> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda() |
| | | .eq(OrderRecord::getType,orderRecord.getType()) |
| | | .eq(OrderRecord::getStatus,1) |
| | | .eq(StringUtils.isNotBlank(orderRecord.getCarNo()),OrderRecord::getCarNo,orderRecord.getCarNo()) |
| | | .isNotNull(OrderRecord::getPayCode) |
| | | .orderByDesc(OrderRecord::getCreateTime); |
| | | Page page1 = orderRecordService.page(page, wrapper); |
| | | List<OrderRecord> records = page1.getRecords(); |
| | | for (OrderRecord record : records) { |
| | | if(record.getImgInId() != null){ |
| | | record.setImgInPath("/ffzf/fileinfo/showImgById/"+record.getImgInId()); |
| | | } |
| | | if(record.getImgOutId() != null){ |
| | | record.setImgOutPath("/ffzf/fileinfo/showImgById/"+record.getImgOutId()); |
| | | } |
| | | } |
| | | page1.setRecords(records); |
| | | return R.ok(page1); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/getByCarNo") |
| | | public Object getByCarNo(Page page,String carNo,String month,String phone) { |
| | | List<OrderRecordVo> recordVos = new ArrayList<>(); |