车辆筛选

This commit is contained in:
PC 2026-02-02 15:37:26 +08:00
parent d3a2882c99
commit f7602978be
3 changed files with 8 additions and 4 deletions

View File

@ -283,8 +283,8 @@ public class EbikeBikeOrderController {
* @return 操作结果 * @return 操作结果
*/ */
@GetMapping("bikeList") @GetMapping("bikeList")
public JsonResult<List<EbikeOrderBikeListDto>> bikeList(@RequestParam("regionId") Long regionId,String bikeCode,Integer bikeStatus,Boolean acceptOrder) throws IOException { public JsonResult<List<EbikeOrderBikeListDto>> bikeList(@RequestParam("regionId") Long regionId,String bikeCode,Integer bikeStatus,Boolean acceptOrder,Integer orderType) throws IOException {
List<EbikeOrderBikeListDto> list = ebikeBikeOrderService.bikeList(regionId,bikeCode,bikeStatus,acceptOrder); List<EbikeOrderBikeListDto> list = ebikeBikeOrderService.bikeList(regionId,bikeCode,bikeStatus,acceptOrder,orderType);
return JsonResult.success(list); return JsonResult.success(list);
} }

View File

@ -102,7 +102,7 @@ public interface EbikeBikeOrderService extends IService<EbikeBikeOrder> {
* @param regionId 运营区ID * @param regionId 运营区ID
* @return 列表 * @return 列表
*/ */
List<EbikeOrderBikeListDto> bikeList(Long regionId,String bikeCode,Integer bikeStatus,Boolean acceptOrder) throws IOException; List<EbikeOrderBikeListDto> bikeList(Long regionId,String bikeCode,Integer bikeStatus,Boolean acceptOrder,Integer orderType) throws IOException;
/** /**
* 完成调度 * 完成调度

View File

@ -506,7 +506,7 @@ public class EbikeBikeOrderServiceImpl extends ServiceImpl<EbikeBikeOrderMapper,
} }
@Override @Override
public List<EbikeOrderBikeListDto> bikeList(Long regionId,String bikeCode,Integer bikeStatus,Boolean acceptOrder) throws IOException { public List<EbikeOrderBikeListDto> bikeList(Long regionId,String bikeCode,Integer bikeStatus,Boolean acceptOrder,Integer orderType) throws IOException {
QueryWrapper queryWrapper = QueryWrapper.create() QueryWrapper queryWrapper = QueryWrapper.create()
.select( .select(
@ -593,6 +593,10 @@ public class EbikeBikeOrderServiceImpl extends ServiceImpl<EbikeBikeOrderMapper,
queryWrapper.leftJoin(EBIKE_BIKE_ORDER).on(EBIKE_BIKE_ORDER.BIKE_CODE.eq(EBIKE_BIKE_INFO.BIKE_CODE)) queryWrapper.leftJoin(EBIKE_BIKE_ORDER).on(EBIKE_BIKE_ORDER.BIKE_CODE.eq(EBIKE_BIKE_INFO.BIKE_CODE))
.where(EBIKE_BIKE_ORDER.HANDLE_STATE.eq(OrderHandleState.UNPROCESSED).or(EBIKE_BIKE_ORDER.HANDLE_STATE.eq(OrderHandleState.ACCEPTED))) .where(EBIKE_BIKE_ORDER.HANDLE_STATE.eq(OrderHandleState.UNPROCESSED).or(EBIKE_BIKE_ORDER.HANDLE_STATE.eq(OrderHandleState.ACCEPTED)))
.where(EBIKE_BIKE_ORDER.RECEIVER_ID.eq(StpUtil.getLoginIdAsLong())); .where(EBIKE_BIKE_ORDER.RECEIVER_ID.eq(StpUtil.getLoginIdAsLong()));
} else if (orderType!=null) {
queryWrapper.leftJoin(EBIKE_BIKE_ORDER).on(EBIKE_BIKE_ORDER.BIKE_CODE.eq(EBIKE_BIKE_INFO.BIKE_CODE))
.where(EBIKE_BIKE_ORDER.HANDLE_STATE.eq(OrderHandleState.UNPROCESSED).or(EBIKE_BIKE_ORDER.HANDLE_STATE.eq(OrderHandleState.ACCEPTED)))
.where(EBIKE_BIKE_ORDER.ORDER_TYPE.eq(orderType));
} }
List<EbikeOrderBikeListDto> list = bikeInfoMapper.selectListByQueryAs(queryWrapper, EbikeOrderBikeListDto.class); List<EbikeOrderBikeListDto> list = bikeInfoMapper.selectListByQueryAs(queryWrapper, EbikeOrderBikeListDto.class);
List<String> snList = list.stream().map(EbikeOrderBikeListDto::getEcuSn).toList(); List<String> snList = list.stream().map(EbikeOrderBikeListDto::getEcuSn).toList();