liujie
2025-11-26 fd1d2fdc8a7a3746c8cfd494a222e29a69593d12
update
2个文件已修改
28 ■■■■■ 已修改文件
ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderCrossCityController.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCompanyServiceImpl.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderCrossCityController.java
@@ -298,7 +298,7 @@
                    if ("00000000".equals(refund.get("resp_code")) && "S".equals(refund.get("trans_stat"))) {
                        orderCrossCity.setState(10);
                    }else if (!"00000000".equals(refund.get("resp_code"))) {
                        return ResultUtil.error("订单取消失败:" + refund.get("resp_desc").toString());
                        return ResultUtil.error("订单取消:" + refund.get("resp_desc").toString());
                    }
                    tOrderCrossCityService.updateById(orderCrossCity);
                }else if(query.getPayType()==4){
@@ -331,7 +331,7 @@
                    if ("00000000".equals(refund.get("resp_code")) && "S".equals(refund.get("trans_stat"))) {
                        orderCrossCity.setState(10);
                    }else if (!"00000000".equals(refund.get("resp_code"))) {
                        return ResultUtil.error("订单取消失败:" + refund.get("resp_desc").toString());
                        return ResultUtil.error("订单取消:" + refund.get("resp_desc").toString());
                    }
                    tOrderCrossCityService.updateById(orderCrossCity);
                    //添加交易明细
ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCompanyServiceImpl.java
@@ -279,12 +279,12 @@
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
        // 平台
        TCompany company1 = baseMapper.selectList(new EntityWrapper<TCompany>().eq("type", 1)).get(0);
        TEnterpriseWithdrawal enterpriseWithdrawal = enterpriseWithdrawalMapper.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", company1.getId())).get(0);
//        TCompany company1 = baseMapper.selectList(new EntityWrapper<TCompany>().eq("type", 1)).get(0);
//        TEnterpriseWithdrawal enterpriseWithdrawal = enterpriseWithdrawalMapper.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", company1.getId())).get(0);
        // 转出 电子账簿id
        String balanceAcctId = enterpriseWithdrawal.getBalanceAcctId();
        String code = enterpriseWithdrawal.getTransactionAuthorizationCode();
        code = Base64Util.decode(code);
//        String balanceAcctId = enterpriseWithdrawal.getBalanceAcctId();
//        String code = enterpriseWithdrawal.getTransactionAuthorizationCode();
//        code = Base64Util.decode(code);
        // 获取分公司分账时间
@@ -305,7 +305,7 @@
                // 开始分账
                System.out.println("-----------分公司开始分账----------");
                // 获取当前收入电子账簿id
                List<TEnterpriseWithdrawal> enterpriseWithdrawal1 = enterpriseWithdrawalMapper.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", company.getId()));
                List<TEnterpriseWithdrawal> enterpriseWithdrawal1 = enterpriseWithdrawalMapper.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("type",1).eq("companyId", company.getId()));
                if (enterpriseWithdrawal1.size() > 0) {
                    // 获取当前公司未分账的金额
                    Double sum = state.stream().filter(e -> e.getUserType() == 1 && company.getId().equals(e.getObjectId())).mapToDouble(Income::getMoney).sum();
@@ -316,7 +316,7 @@
                    }
//                    Double v = sum * 100;
//                    int money = v.intValue();
//                    TEnterpriseWithdrawal enterpriseWithdrawal2 = enterpriseWithdrawal1.get(0);
                    TEnterpriseWithdrawal enterpriseWithdrawal2 = enterpriseWithdrawal1.get(0);
//                    String balanceAcctId1 = enterpriseWithdrawal2.getBalanceAcctId();
//                    AllocationReq allocationReq = new AllocationReq();
//                    allocationReq.setOutOrderNo(ToolUtil.getRandomString(32));
@@ -332,7 +332,7 @@
                    String seq_date = simpleDateFormat.format(new Date());
                    try {
//                        AllocationResp allocationResp = AllocationExample.create(allocationReq);
                        Map<String, Object> fenzhang = FenZhangUtil.fenzhang(req_seq_id, seq_date, String.valueOf(sum), "1");
                        Map<String, Object> fenzhang = FenZhangUtil.fenzhang(req_seq_id, seq_date, String.valueOf(sum), enterpriseWithdrawal2.getHuifuId());
                        String resp_code = fenzhang.get("resp_code").toString();
                        if(!"00000000".equals(resp_code)){
                            continue;
@@ -362,7 +362,7 @@
        }
        // 司机分账
        List<Integer> collect2 = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("applicationStatus", "succeeded")).stream().map(e -> e.getUserId()).collect(Collectors.toList());
        List<Integer> collect2 = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("type", 1)).stream().map(e -> e.getUserId()).collect(Collectors.toList());
        if (collect2.size() == 0) {
            collect2.add(0);
        }
@@ -384,7 +384,7 @@
                List<TDriver> collect = tDrivers.stream().filter(e -> e.getCompanyId() == tDriverPayDay.getCompanyId()).collect(Collectors.toList());
                for (TDriver tDriver : collect) {
                    // 获取司机的电子账簿
                    List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("userType", 2).eq("userId", tDriver.getId()).eq("applicationStatus", "succeeded"));
                    List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("type", 1).eq("phone", tDriver.getPhone()));
                    if (userWithdrawals.size() > 0) {
                        // 当前司机分账金额
                        Double sum = state.stream().filter(e -> (e.getUserType() == 2 && tDriver.getId().equals(e.getObjectId()))).mapToDouble(Income::getMoney).sum();
@@ -394,7 +394,7 @@
                        String req_seq_id = ToolUtil.getRandomString(32);
                        String seq_date = simpleDateFormat.format(new Date());
//                        UserWithdrawal userWithdrawal = userWithdrawals.get(0);
                        UserWithdrawal userWithdrawal = userWithdrawals.get(0);
//                        String balanceAcctId1 = userWithdrawal.getBalanceAcctId();
//                        AllocationReq allocationReq = new AllocationReq();
//                        allocationReq.setOutOrderNo();
@@ -407,7 +407,7 @@
//                        allocationReq.setOrderAmount(1l);
//                        allocationReq.setPassword(code);
                        try {
                            Map<String, Object> fenzhang = FenZhangUtil.fenzhang(req_seq_id, seq_date, String.valueOf(sum), "1");
                            Map<String, Object> fenzhang = FenZhangUtil.fenzhang(req_seq_id, seq_date, String.valueOf(sum), userWithdrawal.getHuiFuId());
//                            AllocationResp allocationResp = AllocationExample.create(allocationReq);
                            System.out.println(tDriver.getId() + "::" + tDriver.getName() + "-----分账状态" + fenzhang.toString() + "--------------");
                            String resp_code = fenzhang.get("resp_code").toString();