From f72ae151cc12b219cb5f39eea3ec0ea089a6ef2a Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 27 八月 2025 23:53:05 +0800
Subject: [PATCH] 修改bug

---
 UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java b/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java
index f55402a..f01a2c4 100644
--- a/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java
+++ b/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java
@@ -1480,6 +1480,15 @@
 		if (null == orderCrossCity) {
 			return ResultUtil.error("获取数据失败,订单信息有误");
 		}
+		if (orderCrossCity.getState() == 5) {
+			return ResultUtil.error("订单已开始服务,不能取消订单");
+		}
+		if (orderCrossCity.getState() == 6 || orderCrossCity.getState() == 8 || orderCrossCity.getState() == 9) {
+			return ResultUtil.error("订单已完成,不能取消订单");
+		}
+		if (orderCrossCity.getState() == 10) {
+			return ResultUtil.error("订单已被取消,不能重复操作");
+		}
 		OpenCity openCity = openCityService.openCity1(orderCrossCity.getStartLon().toString(), orderCrossCity.getStartLat().toString());
 		double amount = 0;
 		CancleOrder query = cancleOrderService.query(1, 3, openCity.getId());
@@ -1516,7 +1525,7 @@
 			return ResultUtil.error("取消订单失败,订单信息有误", "");
 		}
 		if (orderCrossCity.getState() != 12) {
-			return ResultUtil.error("取消订单失败,不合法的操作", "");
+			return ResultUtil.error("订单已取消,请刷新页面", "");
 		}
 		OrderCancel orderCancel = null;
 		if (null == cancleId) {
@@ -1978,7 +1987,7 @@
 			return ResultUtil.error("取消订单失败,订单信息有误");
 		}
 		if (orderCrossCity.getState() >= 5 && orderCrossCity.getState() != 7 && orderCrossCity.getState() != 11) {
-			return ResultUtil.error("取消订单失败,不合法的操作");
+			return ResultUtil.error("订单已取消,请刷新页面");
 		}
 		
 		//还原座位
@@ -2459,6 +2468,14 @@
 								if (state != 1) {
 									//关闭其他推送线程
 									Set<String> keySet = threadMap.keySet();
+									datas.forEach(e->{
+										threadMap.get(orderId + "_1");
+
+
+									});
+
+
+
 									for (String key : keySet) {
 										if (!key.equals(orderId + "_1")) {
 											Thread thread1 = threadMap.get(key);//中断线程
@@ -2509,7 +2526,7 @@
 								//所有推送完后的处理
 								Boolean b = pushEndMap.get(orderPrivateCar.getCrossCityOrderId());
 								if (i == querys.size() + 15 && state == 1 && (null != b && !b.booleanValue())) {
-									pushUtil.pushEndPush(1, orderPrivateCar.getUserId(), orderPrivateCar.getId(), 1);
+									pushUtil.pushEndPush(1, orderPrivateCar.getUserId(), orderPrivateCar.getId(), 1, 1);
 									OrderPrivateCarServiceImpl.orderIds.remove(orderPrivateCar.getId());
 									pushEndMap.put(orderPrivateCar.getCrossCityOrderId(), Boolean.TRUE);//推送后添加标识
 									break;
@@ -2579,7 +2596,7 @@
 								//所有推送完后的处理
 								Boolean b = pushEndMap.get(orderTaxi.getCrossCityOrderId());
 								if (i == querys.size() + 15 && state == 1 && (null != b && !b.booleanValue())) {
-									pushUtil.pushEndPush(1, orderTaxi.getUserId(), orderTaxi.getId(), 2);
+									pushUtil.pushEndPush(1, orderTaxi.getUserId(), orderTaxi.getId(), 2, 1);
 									OrderTaxiServiceImpl.orderIds.remove(orderTaxi.getId());
 									pushEndMap.put(orderTaxi.getCrossCityOrderId(), Boolean.TRUE);//推送后添加标识
 								}

--
Gitblit v1.7.1