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

---
 DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 55 insertions(+), 1 deletions(-)

diff --git a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
index a9d5cac..19e7c69 100644
--- a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
+++ b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
@@ -87,6 +87,7 @@
         params.put("msg", jsonObject.toJSONString());
         params.put("id", uid);
         params.put("type", type);
+        params.put("bussinessType", "dache");
         post.form(params);
         HttpResponse execute = post.execute();
         if (200 != execute.getStatus()) {
@@ -108,7 +109,7 @@
      * @param orderId
      * @param orderType
      */
-    public void pushEndPush(Integer type, Integer uid, Integer orderId, Integer orderType) {
+    public void pushEndPush(Integer type, Integer uid, Integer orderId, Integer orderType, Integer state) {
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("code", 200);
         jsonObject.put("msg", "SUCCESS");
@@ -116,6 +117,7 @@
         Map<String, Object> map = new HashMap<>();
         map.put("orderId", orderId);
         map.put("orderType", orderType);
+        map.put("state", state);
         jsonObject.put("data", map);
 
         //调用推送
@@ -126,6 +128,7 @@
         params.put("msg", jsonObject.toJSONString());
         params.put("id", uid);
         params.put("type", type);
+        params.put("bussinessType", "dache");
         post.form(params);
         HttpResponse execute = post.execute();
         if (200 != execute.getStatus()) {
@@ -137,6 +140,51 @@
             }
         }
     }
+
+
+    /**
+     * 改派推单结束
+      * @param type
+     * @param uid
+     * @param orderId
+     * @param orderType
+     * @param state
+     */
+    public void pushReassignEndCancel(Integer type, Integer uid, Integer orderId, Integer orderType, Integer state) {
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("code", 200);
+        jsonObject.put("msg", "SUCCESS");
+        jsonObject.put("method", "REASSIGN_END_CANCEL");
+        Map<String, Object> map = new HashMap<>();
+        map.put("orderId", orderId);
+        map.put("orderType", orderType);
+        map.put("state", state);
+        jsonObject.put("data", map);
+
+        //调用推送
+        HttpRequest post = HttpUtil.createPost(socket_uri + "/netty/sendMsgToClient");
+        post.header("Content-Type", MediaType.APPLICATION_FORM_URLENCODED_VALUE);
+        //将请求头部和参数合成一个请求
+        Map<String, Object> params = new HashMap<>();
+        params.put("msg", jsonObject.toJSONString());
+        params.put("id", uid);
+        params.put("type", type);
+        params.put("bussinessType", "dache");
+        post.form(params);
+        HttpResponse execute = post.execute();
+        if (200 != execute.getStatus()) {
+            System.err.println("推送异常");
+        } else {
+            JSONObject jsonObject1 = JSON.parseObject(execute.body(), JSONObject.class);
+            if (jsonObject1.getIntValue("code") != 200) {
+                System.err.println(jsonObject1.getString("msg"));
+            }
+        }
+
+    }
+
+
+
     /**
      * 推送订单状态
      *
@@ -165,6 +213,7 @@
         params.put("msg", jsonObject.toJSONString());
         params.put("id", uid);
         params.put("type", type);
+        params.put("bussinessType", "dache");
         post.form(params);
         HttpResponse execute = post.execute();
         if (200 != execute.getStatus()) {
@@ -204,6 +253,7 @@
         params.put("msg", jsonObject.toJSONString());
         params.put("id", uid);
         params.put("type", type);
+        params.put("bussinessType", "dache");
         post.form(params);
         HttpResponse execute = post.execute();
         if (200 != execute.getStatus()) {
@@ -440,6 +490,7 @@
         params.put("msg", msg.toJSONString());
         params.put("id", jsonObject.getIntValue("id"));
         params.put("type", jsonObject.getIntValue("type"));
+        params.put("bussinessType", "dache");
         post.form(params);
         HttpResponse execute = post.execute();
         if (200 != execute.getStatus()) {
@@ -474,6 +525,7 @@
         params.put("msg", msg.toJSONString());
         params.put("id", id);
         params.put("type", type);
+        params.put("bussinessType", "dache");
         post.form(params);
         HttpResponse execute = post.execute();
         if (200 != execute.getStatus()) {
@@ -516,6 +568,7 @@
         params.put("msg", jsonObject.toJSONString());
         params.put("id", uid);
         params.put("type", type);
+        params.put("bussinessType", "dache");
         post.form(params);
         HttpResponse execute = post.execute();
         if (200 != execute.getStatus()) {
@@ -556,6 +609,7 @@
         params.put("msg", jsonObject.toJSONString());
         params.put("id", uid);
         params.put("type", type);
+        params.put("bussinessType", "dache");
         post.form(params);
         HttpResponse execute = post.execute();
         if (200 != execute.getStatus()) {

--
Gitblit v1.7.1