From 44e87d7d9ba5850eb50f837903a0966b518335be Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 11 十月 2024 18:44:40 +0800 Subject: [PATCH] Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/IgoTravel into 2.0 --- ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TSubsidyController.java | 56 ++++++++++++++++++++------------------------------------ 1 files changed, 20 insertions(+), 36 deletions(-) diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TSubsidyController.java b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TSubsidyController.java index 8ff8b9d..16814ff 100644 --- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TSubsidyController.java +++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TSubsidyController.java @@ -232,6 +232,7 @@ .isNotNull("redPacketMoney"); // 司机已消费金额 between4 = new EntityWrapper<BalanceUsageRecord>() + .eq("type",1) .ne("purpose", 6); // 司机提现 driverWrapper = new EntityWrapper<TPubWithdrawal>() @@ -276,6 +277,7 @@ // 司机已消费金额 between4 = new EntityWrapper<BalanceUsageRecord>() .ne("purpose", 6) + .eq("type",1) .between("createTime", start, end); @@ -579,6 +581,7 @@ List<BalanceUsageRecord> balanceUsageRecords = new ArrayList<>(); // 司机提现 List<TPubWithdrawal> driverWithdrawal = new ArrayList<>(); + Wrapper<TPubWithdrawal> driverWrapper = new EntityWrapper<TPubWithdrawal>() ; // 专车wrapper @@ -600,14 +603,7 @@ // 司机已消费金额 Wrapper<BalanceUsageRecord> between4 = new EntityWrapper<BalanceUsageRecord>() ; - // 司机提现 - Wrapper<BalanceUsageRecord> between44 = new EntityWrapper<BalanceUsageRecord>() - ; if (time == 5 && !StringUtils.hasLength(insertTime)){ - driverWrapper = new EntityWrapper<TPubWithdrawal>() - .eq("state", 2) - .eq("type",1) - .eq("userType", 2); // 专车wrapper between = new EntityWrapper<TOrderPrivateCar>() .isNotNull("activityId") @@ -632,8 +628,14 @@ .isNotNull("redPacketMoney"); // 司机已消费金额 between4 = new EntityWrapper<BalanceUsageRecord>() + .eq("type",1) .ne("purpose", 6); - + // 司机提现 + driverWrapper = new EntityWrapper<TPubWithdrawal>() + .eq("state", 2) + .eq("type",1) + .eq("userType", 2) + ; }else{ driverWrapper = new EntityWrapper<TPubWithdrawal>() .eq("state", 2) @@ -671,9 +673,12 @@ // 司机已消费金额 between4 = new EntityWrapper<BalanceUsageRecord>() .ne("purpose", 6) + .eq("type",1) .between("createTime", start, end); - } + + } + // 司机提现wrapper if (type!=null){ switch (type){ case 1: @@ -689,8 +694,6 @@ case 3: // 司机消费记录 balanceUsageRecords = balanceUsageRecordService.selectList(between4); - - // 司机提现记录 driverWithdrawal = pubWithdrawalService.selectList(driverWrapper); break; case 4: @@ -733,9 +736,6 @@ BigDecimal driverWithdrawal1 = new BigDecimal("0"); // 查询已使用折扣总额 for (TOrderPrivateCar tOrderPrivateCar : tOrderPrivateCars) { - if (tOrderPrivateCar.getState() != 9 &&tOrderPrivateCar.getState() != 8){ - continue; - } discount = discount.add(new BigDecimal(tOrderPrivateCar.getDiscountMoney().toString())); GrantVO grantVO = new GrantVO(); grantVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); @@ -749,9 +749,6 @@ res.add(grantVO); } for (TOrderLogistics tOrderPrivateCar : tOrderLogistics) { - if (tOrderPrivateCar.getState() != 9 &&tOrderPrivateCar.getState() != 8){ - continue; - } discount = discount.add(new BigDecimal(tOrderPrivateCar.getDiscountMoney().toString())); GrantVO grantVO = new GrantVO(); grantVO.setInsertTime(format.format(tOrderPrivateCar.getInsertTime())); @@ -764,15 +761,12 @@ grantVO.setRemark("订单号:"+tOrderPrivateCar.getOrderNum()); res.add(grantVO); } - // 查询已领取红包总额 + // 查询已使用红包总额 for (TOrderPrivateCar userRedPacketRecord : userRedPacketRecords) { - if (userRedPacketRecord.getState() != 9 &&userRedPacketRecord.getState() != 8){ - continue; - } GrantVO grantVO = new GrantVO(); grantVO.setInsertTime(format.format(userRedPacketRecord.getInsertTime())); grantVO.setType("红包"); - JSONArray objects = JSONArray.parseArray(userRedPacketRecord.getRedPacketId()); +// 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"); @@ -791,12 +785,9 @@ } grantVO.setRemark("订单号:"+userRedPacketRecord.getOrderNum()); res.add(grantVO); - redPackage = redPackage.add(userRedPacketRecord.getRedPacketMoney()); + redPackage = redPackage.add(new BigDecimal(userRedPacketRecord.getPayMoney().toString())); } for (TOrderLogistics userRedPacketRecord : userRedPacketRecords1) { - if (userRedPacketRecord.getState() != 9 &&userRedPacketRecord.getState() != 8){ - continue; - } GrantVO grantVO = new GrantVO(); grantVO.setInsertTime(format.format(userRedPacketRecord.getInsertTime())); grantVO.setType("红包"); @@ -813,13 +804,10 @@ } grantVO.setRemark("订单号:"+userRedPacketRecord.getOrderNum()); res.add(grantVO); - redPackage = redPackage.add(new BigDecimal(temp.toString())); + redPackage = redPackage.add(new BigDecimal(userRedPacketRecord.getPayMoney().toString())); } // 查询已领取优惠券总额 for (TOrderPrivateCar userCouponRecord : userCouponRecords) { - if (userCouponRecord.getState() != 9 &&userCouponRecord.getState() != 8){ - continue; - } GrantVO grantVO = new GrantVO(); grantVO.setInsertTime(format.format(userCouponRecord.getInsertTime())); grantVO.setType("优惠券"); @@ -829,13 +817,10 @@ grantVO.setName(tUser.getNickName()); } grantVO.setRemark("订单号:"+userCouponRecord.getOrderNum()); - coupon = coupon.add(new BigDecimal(userCouponRecord.getCouponMoney().toString())); + coupon = coupon.add(new BigDecimal(userCouponRecord.getPayMoney().toString())); res.add(grantVO); } for (TOrderLogistics userCouponRecord : userCouponRecords1) { - if (userCouponRecord.getState() != 9 &&userCouponRecord.getState() != 8){ - continue; - } GrantVO grantVO = new GrantVO(); grantVO.setInsertTime(format.format(userCouponRecord.getInsertTime())); grantVO.setType("优惠券"); @@ -845,12 +830,11 @@ grantVO.setName(tUser.getNickName()); } grantVO.setRemark("订单号:"+userCouponRecord.getOrderNum()); - coupon = coupon.add(new BigDecimal(userCouponRecord.getCouponMoney().toString())); + coupon = coupon.add(new BigDecimal(userCouponRecord.getPayMoney().toString())); res.add(grantVO); } // 司机消费奖励 for (BalanceUsageRecord balanceUsageRecord : balanceUsageRecords) { - GrantVO grantVO = new GrantVO(); grantVO.setInsertTime(format.format(balanceUsageRecord.getCreateTime())); grantVO.setType("司机奖励"); -- Gitblit v1.7.1