From ad0628ca91e2df00d817ba87a0e613c43de471ef Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期三, 25 十二月 2024 17:09:37 +0800 Subject: [PATCH] 管理后台 --- ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushURL.java | 6 +++--- ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/taxi/TOrderTaxiController.java | 9 +++++++++ ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/taxi/TOrderTaxiController.java b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/taxi/TOrderTaxiController.java index bf7ec19..257d891 100644 --- a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/taxi/TOrderTaxiController.java +++ b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/taxi/TOrderTaxiController.java @@ -416,15 +416,22 @@ TSysPushOrder pushOrder = pushOrderService.querys(i, 2, query.getId()).get(0); //获取空闲司机 List<TDriver> list = driverService.queryIdleDriver(2, orderTaxi.getStartLon(), orderTaxi.getStartLat(), pushOrder.getPushDistance(), null);//所有附近空闲司机 + System.out.println("空闲司机1"+list); if(list.size() > 0){ double driverProportion = pushOrder.getDriverProportion() / 100;//推送占比计算成小数 + System.out.println("空闲司机2"+driverProportion); + int lastIndex = Double.valueOf(list.size() * driverProportion).intValue();//计算占比转成整数(下标截取) + System.out.println("空闲司机3"+lastIndex); lastIndex = lastIndex == 0 ? list.size() : lastIndex; list = list.subList(0, lastIndex);//获取空闲司机中占比数据 + System.out.println("空闲司机4"+list); for(TDriver driver : list){//开始进行推送 //查询是否在限制推单范围内 boolean bo = false; + System.out.println("integers"+integers); for(Integer integer : integers){ + System.out.println("距离"+integer); if(integer.compareTo(driver.getId()) == 0){ bo = true; break; @@ -433,7 +440,9 @@ if(bo){ continue; } + System.out.println("推送1"); pushUtil.pushOrderState(2, driver.getId(), orderTaxi.getId(), 2, orderTaxi.getState(), pushOrder.getPushTime()); + System.out.println("推送2"); } } Thread.sleep(pushOrder.getPushTime() * 1000);//设置等待时间 diff --git a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushURL.java b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushURL.java index 09f830a..eda2b72 100644 --- a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushURL.java +++ b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushURL.java @@ -1,14 +1,14 @@ package com.stylefeng.guns.modular.system.util; public class PushURL { - public static String zull_user_url = "https://ziangchuxing.com"; + public static String zull_user_url = "https://xn95128.cn"; public static String order_push_url = zull_user_url + "/driver/base/order/pushOrderState"; public static String driver_auth_url = zull_user_url + "/driver/base/driver/sendsms"; public static String withdraw_auth_url = zull_user_url + "/driver/base/withdrawal/withdrawalAudit"; public static String cancel_order_url = zull_user_url + "/user/base/order/sendOrderState"; public static String freeze_user_url = zull_user_url + "/user/base/user/freeze"; - public static String ministry_of_transport_data = "http://120.77.11.218:8868/ministryOfTransport"; - public static String ministry_of_transport_ftp = "http://120.77.11.218:8868/ftp"; + public static String ministry_of_transport_data = "http://36.134.221.234:8868/ministryOfTransport"; + public static String ministry_of_transport_ftp = "http://36.134.221.234:8868/ftp"; // public static String zull_user_url = "http://127.0.0.1:80"; diff --git a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java index 95b5a63..f92a764 100644 --- a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java +++ b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java @@ -69,6 +69,7 @@ map.put("orderType", orderType); map.put("state", state); map.put("time", time); + map.put("audioLinkUrl", ""); jsonObject.put("data", map); //调用推送 -- Gitblit v1.7.1