无关风月
2024-10-23 b649aa3767a678bb4b7b12069464a2929503b9e2
2.0bug修改
2个文件已修改
137 ■■■■■ 已修改文件
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/PlatformController.java 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TSubsidyController.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/PlatformController.java
@@ -221,7 +221,10 @@
                        continue;
                    }
                    // 查询订单信息
                    TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(income.getIncomeId());
//                    TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(income.getIncomeId());
                    TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectOne(new EntityWrapper<TOrderPrivateCar>()
                            .eq("id", income.getIncomeId())
                            .between("insertTime", start, end));
                    if (tOrderPrivateCar==null){
                        continue;
                    }
@@ -289,7 +292,10 @@
                    }
                    // 小件物流
                    // 查询订单信息
                    TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(income.getIncomeId());
//                    TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(income.getIncomeId());
                    TOrderLogistics tOrderLogistics = orderLogisticsService.selectOne(new EntityWrapper<TOrderLogistics>()
                            .eq("id", income.getIncomeId())
                            .between("insertTime", start, end));
                    if (tOrderLogistics==null){
                        continue;
                    }
@@ -367,7 +373,10 @@
                case 1:
                    // 专车订单
                    TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(settlementDetail.getOrderId());
//                    TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(settlementDetail.getOrderId());
                    TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectOne(new EntityWrapper<TOrderPrivateCar>()
                            .eq("id", settlementDetail.getOrderId())
                            .between("insertTime", start, end));
                    if (tOrderPrivateCar==null){
                        continue;
                    }
@@ -415,7 +424,10 @@
                case 4:
                    // 小件物流
                    // 查询订单信息
                    TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(settlementDetail.getOrderId());
//                    TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(settlementDetail.getOrderId());
                    TOrderLogistics tOrderLogistics = orderLogisticsService.selectOne(new EntityWrapper<TOrderLogistics>()
                            .eq("id", settlementDetail.getOrderId())
                            .between("insertTime", start, end));
                    if (tOrderLogistics==null){
                        continue;
                    }
@@ -1921,7 +1933,11 @@
                        continue;
                    }
                    // 查询订单信息
                    TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(income.getIncomeId());
//                    TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(income.getIncomeId());
                    TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectOne(new EntityWrapper<TOrderPrivateCar>()
                            .eq("id", income.getIncomeId())
                            .between("insertTime", start, end));
                    if (tOrderPrivateCar==null){
                        continue;
                    }
@@ -1989,7 +2005,10 @@
                    }
                    // 小件物流
                    // 查询订单信息
                    TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(income.getIncomeId());
//                    TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(income.getIncomeId());
                    TOrderLogistics tOrderLogistics = orderLogisticsService.selectOne(new EntityWrapper<TOrderLogistics>()
                            .eq("id", income.getIncomeId())
                            .between("insertTime", start, end));
                    if (tOrderLogistics==null){
                        continue;
                    }
@@ -2057,7 +2076,10 @@
            switch (settlementDetail.getOrderType()){
                case 1:
                    // 专车订单
                    TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(settlementDetail.getOrderId());
//                    TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(settlementDetail.getOrderId());
                    TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectOne(new EntityWrapper<TOrderPrivateCar>()
                            .eq("id", settlementDetail.getOrderId())
                            .between("insertTime", start, end));
                    if (tOrderPrivateCar==null){
                        continue;
                    }
@@ -2103,7 +2125,10 @@
                case 4:
                    // 小件物流
                    // 查询订单信息
                    TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(settlementDetail.getOrderId());
//                    TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(settlementDetail.getOrderId());
                    TOrderLogistics tOrderLogistics = orderLogisticsService.selectOne(new EntityWrapper<TOrderLogistics>()
                            .eq("id", settlementDetail.getOrderId())
                            .between("insertTime", start, end));
                    if (tOrderLogistics==null){
                        continue;
                    }
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TSubsidyController.java
@@ -211,34 +211,50 @@
            // 专车wrapper
            between = new EntityWrapper<TOrderPrivateCar>()
                    .isNotNull("activityId")
                    .isNotNull("discountMoney");
                    .isNotNull("discountMoney")
                    .between("insertTime", start, end);
            // 小件物流wrapper
            between1 = new EntityWrapper<TOrderLogistics>()
                    .isNotNull("activityId")
                    .isNotNull("discountMoney");
                    .isNotNull("discountMoney")
                    .between("insertTime", start, end);
            // 已使用优惠券记录wrapper
           between2 = new EntityWrapper<TOrderPrivateCar>()
                    .isNotNull("couponId")
                    .isNotNull("couponMoney");
                    .isNotNull("couponMoney")
                   .between("insertTime", start, end);
            between22 = new EntityWrapper<TOrderLogistics>()
                    .isNotNull("couponId")
                    .isNotNull("couponMoney");
                    .isNotNull("couponMoney")
                    .between("insertTime", start, end);
            // 已使用红包记录wrapper
            between3 = new EntityWrapper<TOrderPrivateCar>()
                    .isNotNull("redPacketId")
                    .isNotNull("redPacketMoney");
                    .isNotNull("redPacketMoney")
                    .between("insertTime", start, end);
            between33 = new EntityWrapper<TOrderLogistics>()
                    .isNotNull("redPacketId")
                    .isNotNull("redPacketMoney");
                    .isNotNull("redPacketMoney")
                    .between("insertTime", start, end);
            // 司机已消费金额
            between4 = new EntityWrapper<BalanceUsageRecord>()
                    .eq("type",1)
                    .ne("purpose", 6);
                    .ne("purpose", 6)
                    .between("insertTime", start, end);
            // 司机提现
            driverWrapper = new EntityWrapper<TPubWithdrawal>()
                    .eq("state", 2)
                    .eq("type",1)
                    .eq("userType", 2)
                    .between("insertTime", start, end);
            ;
        }else{
            driverWrapper = new EntityWrapper<TPubWithdrawal>()
@@ -370,12 +386,6 @@
            GrantVO grantVO = new GrantVO();
            grantVO.setInsertTime(format.format(userRedPacketRecord.getInsertTime()));
            grantVO.setType("红包");
//            JSONArray objects = JSONArray.parseArray(userRedPacketRecord.getRedPacketId());
//            BigDecimal temp = new BigDecimal(BigInteger.ZERO);
//            for (int i = 0; i < objects.size(); i++) {
//                String string = objects.getJSONObject(i).getString("money");
//                temp = temp.add(new BigDecimal(string));
//            }
            if (userRedPacketRecord.getRedPacketMoney()==null){
                continue;
            }
@@ -395,13 +405,13 @@
            GrantVO grantVO = new GrantVO();
            grantVO.setInsertTime(format.format(userRedPacketRecord.getInsertTime()));
            grantVO.setType("红包");
            JSONArray objects = JSONArray.parseArray(userRedPacketRecord.getRedPacketId());
            BigDecimal temp = new BigDecimal(BigInteger.ZERO);
            for (int i = 0; i < objects.size(); i++) {
                String string = objects.getJSONObject(i).getString("money");
                temp = temp.add(new BigDecimal(string));
            if (userRedPacketRecord.getRedPacketMoney()==null){
                continue;
            }
            grantVO.setAmount(temp.toString());
            if (userRedPacketRecord.getRedPacketMoney().compareTo(new BigDecimal("0"))==0){
                continue;
            }
            grantVO.setAmount(userRedPacketRecord.getRedPacketMoney().toString());
            TUser tUser = appUserService.selectById(userRedPacketRecord.getUserId());
            if (tUser!=null){
                grantVO.setName(tUser.getNickName());
@@ -607,34 +617,50 @@
            // 专车wrapper
            between = new EntityWrapper<TOrderPrivateCar>()
                    .isNotNull("activityId")
                    .isNotNull("discountMoney");
                    .isNotNull("discountMoney")
                    .between("insertTime", start, end);
            // 小件物流wrapper
            between1 = new EntityWrapper<TOrderLogistics>()
                    .isNotNull("activityId")
                    .isNotNull("discountMoney");
                    .isNotNull("discountMoney")
                    .between("insertTime", start, end);
            // 已使用优惠券记录wrapper
            between2 = new EntityWrapper<TOrderPrivateCar>()
                    .isNotNull("couponId")
                    .isNotNull("couponMoney");
                    .isNotNull("couponMoney")
                    .between("insertTime", start, end);
            between22 = new EntityWrapper<TOrderLogistics>()
                    .isNotNull("couponId")
                    .isNotNull("couponMoney");
                    .isNotNull("couponMoney")
                    .between("insertTime", start, end);
            // 已使用红包记录wrapper
            between3 = new EntityWrapper<TOrderPrivateCar>()
                    .isNotNull("redPacketId")
                    .isNotNull("redPacketMoney");
                    .isNotNull("redPacketMoney")
                    .between("insertTime", start, end);
            between33 = new EntityWrapper<TOrderLogistics>()
                    .isNotNull("redPacketId")
                    .isNotNull("redPacketMoney");
                    .isNotNull("redPacketMoney")
                    .between("insertTime", start, end);
            // 司机已消费金额
            between4 = new EntityWrapper<BalanceUsageRecord>()
                    .eq("type",1)
                    .ne("purpose", 6);
                    .ne("purpose", 6)
                    .between("insertTime", start, end);
            // 司机提现
            driverWrapper = new EntityWrapper<TPubWithdrawal>()
                    .eq("state", 2)
                    .eq("type",1)
                    .eq("userType", 2)
                    .between("insertTime", start, end);
            ;
        }else{
            driverWrapper = new EntityWrapper<TPubWithdrawal>()
@@ -785,19 +811,19 @@
            }
            grantVO.setRemark("订单号:"+userRedPacketRecord.getOrderNum());
            res.add(grantVO);
            redPackage = redPackage.add(new BigDecimal(userRedPacketRecord.getPayMoney().toString()));
            redPackage = redPackage.add(userRedPacketRecord.getRedPacketMoney());
        }
        for (TOrderLogistics userRedPacketRecord : userRedPacketRecords1) {
            GrantVO grantVO = new GrantVO();
            grantVO.setInsertTime(format.format(userRedPacketRecord.getInsertTime()));
            grantVO.setType("红包");
            JSONArray objects = JSONArray.parseArray(userRedPacketRecord.getRedPacketId());
            BigDecimal temp = new BigDecimal(BigInteger.ZERO);
            for (int i = 0; i < objects.size(); i++) {
                String string = objects.getJSONObject(i).getString("money");
                temp = temp.add(new BigDecimal(string));
            if (userRedPacketRecord.getRedPacketMoney()==null){
                continue;
            }
            grantVO.setAmount(temp.toString());
            if (userRedPacketRecord.getRedPacketMoney().compareTo(new BigDecimal("0"))==0){
                continue;
            }
            grantVO.setAmount(userRedPacketRecord.getRedPacketMoney().toString());
            TUser tUser = appUserService.selectById(userRedPacketRecord.getUserId());
            if (tUser!=null){
                grantVO.setName(tUser.getNickName());
@@ -882,12 +908,14 @@
            driverWithdrawal1 = driverWithdrawal1.add(new BigDecimal(balanceUsageRecord.getMoney().toString()));
            res.add(grantVO);
        }
        // 总额
        total = total.add(redPackage).add(coupon).add(discount).add(driverConsume).add(driverWithdrawal1);
        // 已使用司机奖励合计
        driver = driverConsume.add(driverWithdrawal1);
        UseMoneyVO useMoneyVO = new UseMoneyVO();
        useMoneyVO.setTotal(total.add(driver));
        useMoneyVO.setTotal(total);
        useMoneyVO.setDiscount(discount);
        useMoneyVO.setRedPackage(redPackage);
        useMoneyVO.setCoupon(coupon);