| | |
| | | private static final ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor(); |
| | | |
| | | static { |
| | | threadPoolTaskExecutor.setCorePoolSize(5); |
| | | threadPoolTaskExecutor.setMaxPoolSize(10); |
| | | threadPoolTaskExecutor.setCorePoolSize(50); |
| | | threadPoolTaskExecutor.setMaxPoolSize(100); |
| | | threadPoolTaskExecutor.setQueueCapacity(20); |
| | | threadPoolTaskExecutor.setKeepAliveSeconds(60); |
| | | threadPoolTaskExecutor.setThreadNamePrefix("taskOrder-"); |
| | |
| | | XpElectronicFence xpElectronicFence = xpElectronicFenceMapper.selectById(electronicId); |
| | | |
| | | for (int i = 0; i < count; i++) { |
| | | |
| | | System.out.println("进入找车环节"); |
| | | // 根据距离找车 |
| | | // 车多则根据配置找具体车数量 根据距离最近 |
| | | // 更改 暂不限制数量 |
| | | |
| | | List<VehiclePosition> positionList = vehiclePositionService.findAvailableVehiclesNearby(Double.parseDouble(split[0]), Double.parseDouble(split[1]), xpTradingStrategy.getOnePushDistance(), xpTradingStrategy.getSimultaneouslyOrderCount()); |
| | | log.info("根据距离找车 {}", positionList); |
| | | log.info("根据距离找车 距离 {}KM 经度 {} 维度 {} 查找结果 {}", xpTradingStrategy.getOnePushDistance(), split[0], split[1], positionList); |
| | | // 获取车辆的区域信息 |
| | | if (positionList.isEmpty()) { |
| | | continue; |