From d98ef630d16e5e8838fd8fa87680c8abfe13be31 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期一, 13 一月 2025 09:21:17 +0800
Subject: [PATCH] 补充

---
 ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/taxi/TOrderTaxiController.java |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 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..d7f3ada 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
@@ -41,6 +41,8 @@
 
     @Autowired
     private ITOrderTaxiService tOrderTaxiService;
+    @Autowired
+    private ITPubTransactionDetailsService pubTransactionDetailsService;
 
     @Autowired
     private ITOrderPositionService tOrderPositionService;
@@ -103,6 +105,32 @@
     public String tOrderTaxiUpdate(@PathVariable Integer tOrderTaxiId, Model model) {
         Map<String, Object> tOrderTaxi = tOrderTaxiService.getTaxiOrderDetailById(tOrderTaxiId);
         model.addAttribute("item",tOrderTaxi);
+        // 查询司机扣款
+        TPubTransactionDetails tPubTransactionDetails = pubTransactionDetailsService.selectOne(new EntityWrapper<TPubTransactionDetails>()
+                .eq("userId", tOrderTaxi.get("driverId"))
+                .eq("state", 2)
+                .eq("type", 1)
+                .eq("userType", 6)
+                .eq("payState", 2)
+                .last("LIMIT 1"));
+        if (tPubTransactionDetails==null){
+            model.addAttribute("companyMoney","");
+            model.addAttribute("driverMoney","");
+
+        }else{
+            model.addAttribute("companyMoney",tPubTransactionDetails.getMoney());
+            model.addAttribute("driverMoney",new BigDecimal(tOrderTaxi.get("payMoney").toString()).subtract(tPubTransactionDetails.getMoney()));
+
+
+        }
+        if (tOrderTaxi.get("payManner")!=null){
+            if(tOrderTaxi.get("payManner").equals("1")){
+                model.addAttribute("payMannerStr","线上收款");
+            }else {
+                model.addAttribute("payMannerStr","计费打表");
+            }
+        }
+
         LogObjectHolder.me().set(tOrderTaxi);
         return PREFIX + "tOrderTaxi_edit.html";
     }
@@ -416,15 +444,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 +468,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);//设置等待时间

--
Gitblit v1.7.1