无关风月
2024-07-17 c29b1d7c9d312466cdbac1add88ee5c728135095
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TSubsidyController.java
@@ -177,41 +177,29 @@
        Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>()
                .isNotNull("activityId")
                .isNotNull("discountMoney")
                .between("insertTime", start, end);
        // 小件物流wrapper
        Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>()
                .isNotNull("activityId")
                .isNotNull("discountMoney")
                .between("insertTime", start, end);
        // 已使用优惠券记录wrapper
        Wrapper<TOrderPrivateCar> between2 = new EntityWrapper<TOrderPrivateCar>()
                .isNotNull("couponId")
                .isNotNull("couponMoney")
                .between("insertTime", start, end);
        Wrapper<TOrderLogistics> between22 = new EntityWrapper<TOrderLogistics>()
                .isNotNull("couponId")
                .isNotNull("couponMoney")
                .between("insertTime", start, end);
        // 已使用红包记录wrapper
        Wrapper<TOrderPrivateCar> between3 = new EntityWrapper<TOrderPrivateCar>()
                .isNotNull("redPacketId")
                .isNotNull("redPacketMoney")
                .between("insertTime", start, end);
        Wrapper<TOrderLogistics> between33 = new EntityWrapper<TOrderLogistics>()
                .isNotNull("redPacketId")
                .isNotNull("redPacketMoney")
                .between("insertTime", start, end);
        // 司机已消费金额
        Wrapper<BalanceUsageRecord> between4 = new EntityWrapper<BalanceUsageRecord>()
@@ -280,9 +268,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()));
@@ -296,9 +281,6 @@
        }
        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()));
@@ -312,9 +294,6 @@
        }
        // 查询已领取红包总额
        for (TOrderPrivateCar userRedPacketRecord : userRedPacketRecords) {
            if (userRedPacketRecord.getState() != 9 &&userRedPacketRecord.getState() != 8){
                continue;
            }
            GrantVO grantVO = new GrantVO();
            grantVO.setInsertTime(format.format(userRedPacketRecord.getInsertTime()));
            grantVO.setType("红包");
@@ -328,9 +307,6 @@
            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("红包");
@@ -345,9 +321,6 @@
        }
        // 查询已领取优惠券总额
        for (TOrderPrivateCar userCouponRecord : userCouponRecords) {
            if (userCouponRecord.getState() != 9 &&userCouponRecord.getState() != 8){
                continue;
            }
            GrantVO grantVO = new GrantVO();
            grantVO.setInsertTime(format.format(userCouponRecord.getInsertTime()));
            grantVO.setType("优惠券");
@@ -361,9 +334,6 @@
            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("优惠券");
@@ -532,15 +502,12 @@
                .isNotNull("activityId")
                .isNotNull("discountMoney")
                .between("insertTime", start, end)
                ;
        // 已使用优惠券记录wrapper
        Wrapper<TOrderPrivateCar> between2 = new EntityWrapper<TOrderPrivateCar>()
                .isNotNull("couponId")
                .isNotNull("couponMoney")
                .between("insertTime", start, end)
                ;
        Wrapper<TOrderLogistics> between22 = new EntityWrapper<TOrderLogistics>()
                .isNotNull("couponId")
@@ -643,7 +610,7 @@
                grantVO.setName(tUser.getNickName());
            }
            grantVO.setRemark("订单号:"+tOrderPrivateCar.getOrderNum());
            res.add(grantVO);
        }
        for (TOrderLogistics tOrderPrivateCar : tOrderLogistics) {
            if (tOrderPrivateCar.getState() != 9 &&tOrderPrivateCar.getState() != 8){
@@ -659,6 +626,7 @@
                grantVO.setName(tUser.getNickName());
            }
            grantVO.setRemark("订单号:"+tOrderPrivateCar.getOrderNum());
            res.add(grantVO);
        }
        // 查询已领取红包总额
        for (TOrderPrivateCar userRedPacketRecord : userRedPacketRecords) {