| | |
| | | count = fivePushTime / 3; |
| | | processPushOrder(quoteName, count, uid, split, orderNo, xpTradingStrategy, distance, duration, planRule); |
| | | |
| | | // 最终没找到车 |
| | | // redisService.popFirstElement(quoteName); |
| | | |
| | | // 取消订单 |
| | | R<XpOrder> xpOrderR = xpOrderClient.queryOrderById(Long.valueOf(orderId)); |
| | | if(xpOrderR.getCode()==200){ |
| | | if (xpOrderR.getData().getStatus()==1) { |
| | | if (xpOrderR.getCode() == 200) { |
| | | if (xpOrderR.getData().getStatus() == 1) { |
| | | xpOrderClient.cancelOrder(orderId); |
| | | |
| | | // 最终没找到车 |
| | | redisService.popFirstElement(quoteName); |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | @SneakyThrows |
| | | private void processPushOrder(String quoteName, int count, String uid, String[] split, String orderNo, XpTradingStrategy xpTradingStrategy, String distance, String duration, String planRule) { |
| | | // 卡住3秒 |
| | | Thread.sleep(3000); |
| | | System.out.println("进入推单环环节"); |
| | | if (count == 0) { |
| | | count = 1; |
| | |
| | | continue; |
| | | } |
| | | XpVehicle vehiclePosition = vehiclePositionR.getData(); |
| | | if (vehiclePosition.getStatus() != 1 || vehiclePosition.getState() != 0 || vehiclePosition.getVehicleType()==1) { |
| | | if (vehiclePosition.getStatus() != 1 || vehiclePosition.getState() != 0 || vehiclePosition.getVehicleType() == 1) { |
| | | lock.unlock(); |
| | | continue; |
| | | } |
| | |
| | | continue; |
| | | } |
| | | XpVehicle vehicleId1 = vehicleR.getData(); |
| | | if (vehicleId1.getStatus() != 1 || vehicleId1.getState() != 0 || vehicleId1.getVehicleType()==1) { |
| | | if (vehicleId1.getStatus() != 1 || vehicleId1.getState() != 0 || vehicleId1.getVehicleType() == 1) { |
| | | lock.unlock(); |
| | | continue; |
| | | } |