From b502ac4e96aca2ab29caa77187ab7673a853a797 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期二, 25 十一月 2025 15:20:38 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/JiaYiXing2025

---
 ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java |   53 +++++++++++++++++++++++++++++++----------------------
 1 files changed, 31 insertions(+), 22 deletions(-)

diff --git a/ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java b/ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java
index 3dec029..8406891 100644
--- a/ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java
+++ b/ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java
@@ -14,6 +14,7 @@
 import com.stylefeng.guns.core.util.WoUtil;
 import com.stylefeng.guns.modular.cloudPayment.example.AllocationExample;
 import com.stylefeng.guns.modular.cloudPayment.req.AllocationReq;
+import com.stylefeng.guns.modular.huifu.biz.FenZhangUtil;
 import com.stylefeng.guns.modular.system.controller.util.Base64Util;
 import com.stylefeng.guns.modular.system.dao.DriverPunishMapper;
 import com.stylefeng.guns.modular.system.dao.DriverTrainMapper;
@@ -2073,7 +2074,7 @@
     @Autowired
     private IUserWithdrawalService userWithdrawalService;
 
-    public String createAllocationReq(Integer companyId,Integer userId,int type,double money){
+    public String createAllocationReq(Integer companyId,Integer userId,int type,double money) throws Exception {
         List<TEnterpriseWithdrawal> tEnterpriseWithdrawals = tEnterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", companyId));
         TDriver tUser = tDriverService.selectById(userId);
         List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", tUser.getPhone()));
@@ -2081,33 +2082,41 @@
             return "error";
         }
 
-        AllocationReq allocationReq= new AllocationReq();
-        allocationReq.setOutOrderNo(ToolUtil.getRandomString(32));
+        //AllocationReq allocationReq= new AllocationReq();
+        //allocationReq.setOutOrderNo(ToolUtil.getRandomString(32));
+        Map<String, Object> result;
         if(type==1){
 
-            allocationReq.setPayBalanceAcctId(tEnterpriseWithdrawals.get(0).getBalanceAcctId());
-            allocationReq.setRecvBalanceAcctId(userWithdrawals.get(0).getBalanceAcctId());
-
-            allocationReq.setPassword(Base64Util.decode(tEnterpriseWithdrawals.get(0).getTransactionAuthorizationCode()));
+            //allocationReq.setPayBalanceAcctId(tEnterpriseWithdrawals.get(0).getBalanceAcctId());
+            //allocationReq.setRecvBalanceAcctId(userWithdrawals.get(0).getBalanceAcctId());
+            //
+            //allocationReq.setPassword(Base64Util.decode(tEnterpriseWithdrawals.get(0).getTransactionAuthorizationCode()));
+            result = FenZhangUtil.fenzhang(RequestSeqUtil.generate("TK"), DateUtil.formatDate(new Date(), "yyyyMMdd"), String.valueOf(money), userWithdrawals.get(0).getHuiFuId());
         }else {
-            allocationReq.setRecvBalanceAcctId(tEnterpriseWithdrawals.get(0).getBalanceAcctId());
-            allocationReq.setPayBalanceAcctId(userWithdrawals.get(0).getBalanceAcctId());
-            allocationReq.setPassword(Base64Util.decode(userWithdrawals.get(0).getTransactionAuthorizationCode()));
+            //allocationReq.setRecvBalanceAcctId(tEnterpriseWithdrawals.get(0).getBalanceAcctId());
+            //allocationReq.setPayBalanceAcctId(userWithdrawals.get(0).getBalanceAcctId());
+            //allocationReq.setPassword(Base64Util.decode(userWithdrawals.get(0).getTransactionAuthorizationCode()));
+            result = FenZhangUtil.payFromUser(RequestSeqUtil.generate("TK"), DateUtil.formatDate(new Date(), "yyyyMMdd"), String.valueOf(money), userWithdrawals.get(0).getHuiFuId());
         }
-        money=money*100;
-        allocationReq.setAmount((int)money);
-        allocationReq.setProductName("分账");
-        allocationReq.setProductCount(1);
-        allocationReq.setOrderNo(ToolUtil.getRandomString(32));
-        allocationReq.setOrderAmount(1l);
-        try {
-            AllocationResp allocationResp = AllocationExample.create(allocationReq);
-            System.out.println(allocationResp);
+        if ("00000000".equals(result.get("respCode").toString())) {
             return "ok";
-        } catch (UpyztException e) {
-            e.printStackTrace();
-            return e.getMessage();
+        } else {
+            return result.get("respDesc").toString();
         }
+        //money=money*100;
+        //allocationReq.setAmount((int)money);
+        //allocationReq.setProductName("分账");
+        //allocationReq.setProductCount(1);
+        //allocationReq.setOrderNo(ToolUtil.getRandomString(32));
+        //allocationReq.setOrderAmount(1l);
+        //try {
+        //    AllocationResp allocationResp = AllocationExample.create(allocationReq);
+        //    System.out.println(allocationResp);
+        //    return "ok";
+        //} catch (UpyztException e) {
+        //    e.printStackTrace();
+        //    return e.getMessage();
+        //}
 
     }
 }

--
Gitblit v1.7.1