Pu Zhibing
2025-02-14 de3858253f29abe18c76dd7dcdaa7db4c1fd372e
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TSubsidyController.java
@@ -48,10 +48,12 @@
    public String index( Model model) {
        return PREFIX + "grant.html";
    }
    @RequestMapping("/use")
    public String watter( Model model) {
        return PREFIX + "use.html";
    }
    @Autowired
    private IIncomeService tIncomeService;
    @Autowired
@@ -103,6 +105,7 @@
        }
        System.err.println(temp1);
    }
    /**
     * 使用补贴统计
     */
@@ -186,27 +189,19 @@
        // 司机提现
        List<TPubWithdrawal> driverWithdrawal = new ArrayList<>();
        Wrapper<TPubWithdrawal> driverWrapper = new EntityWrapper<TPubWithdrawal>()
                ;
      Wrapper<TPubWithdrawal> driverWrapper = new EntityWrapper<TPubWithdrawal>();
        // 专车wrapper
        Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>()
                ;
      Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>();
        // 小件物流wrapper
        Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>()
                ;
      Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>();
        // 已使用优惠券记录wrapper
        Wrapper<TOrderPrivateCar> between2 = new EntityWrapper<TOrderPrivateCar>()
                ;
        Wrapper<TOrderLogistics> between22 = new EntityWrapper<TOrderLogistics>()
                ;
      Wrapper<TOrderPrivateCar> between2 = new EntityWrapper<TOrderPrivateCar>();
      Wrapper<TOrderLogistics> between22 = new EntityWrapper<TOrderLogistics>();
        // 已使用红包记录wrapper
        Wrapper<TOrderPrivateCar> between3 = new EntityWrapper<TOrderPrivateCar>()
                ;
        Wrapper<TOrderLogistics> between33 = new EntityWrapper<TOrderLogistics>()
                ;
      Wrapper<TOrderPrivateCar> between3 = new EntityWrapper<TOrderPrivateCar>();
      Wrapper<TOrderLogistics> between33 = new EntityWrapper<TOrderLogistics>();
        // 司机已消费金额
        Wrapper<BalanceUsageRecord> between4 = new EntityWrapper<BalanceUsageRecord>()
                ;
      Wrapper<BalanceUsageRecord> between4 = new EntityWrapper<BalanceUsageRecord>();
        if (time == 5 && !StringUtils.hasLength(insertTime)){
            // 专车wrapper
            between = new EntityWrapper<TOrderPrivateCar>()
@@ -432,7 +427,19 @@
        for (TOrderPrivateCar userCouponRecord : userCouponRecords) {
            GrantVO grantVO = new GrantVO();
            grantVO.setInsertTime(format.format(userCouponRecord.getInsertTime()));
            grantVO.setType("优惠券");
         UserCouponRecord userCouponRecord1 = userCouponRecordService.selectById(userCouponRecord.getCouponId());
         switch (userCouponRecord1.getCouponUseType()){
            case 0:
               grantVO.setType(userCouponRecord1.getCouponType() == 1 ? "通用 抵扣券" : "通用 满减券");
               break;
            case 1:
               grantVO.setType(userCouponRecord1.getCouponType() == 1 ? "打车 抵扣券" : "打车 满减券");
               break;
            case 4:
               grantVO.setType(userCouponRecord1.getCouponType() == 1 ? "包裹 抵扣券" : "包裹 满减券");
               break;
         }
            grantVO.setAmount(userCouponRecord.getCouponMoney().toString());
            TUser tUser = userMap.get(userCouponRecord.getUserId());
            if (tUser != null) {
@@ -445,7 +452,20 @@
        for (TOrderLogistics userCouponRecord : userCouponRecords1) {
            GrantVO grantVO = new GrantVO();
            grantVO.setInsertTime(format.format(userCouponRecord.getInsertTime()));
            grantVO.setType("优惠券");
         UserCouponRecord userCouponRecord1 = userCouponRecordService.selectById(userCouponRecord.getCouponId());
         switch (userCouponRecord1.getCouponUseType()){
            case 0:
               grantVO.setType(userCouponRecord1.getCouponType() == 1 ? "通用 抵扣券" : "通用 满减券");
               break;
            case 1:
               grantVO.setType(userCouponRecord1.getCouponType() == 1 ? "打车 抵扣券" : "打车 满减券");
               break;
            case 4:
               grantVO.setType(userCouponRecord1.getCouponType() == 1 ? "包裹 抵扣券" : "包裹 满减券");
               break;
         }
            grantVO.setAmount(userCouponRecord.getCouponMoney().toString());
            TUser tUser = userMap.get(userCouponRecord.getUserId());
            if (tUser!=null){
@@ -601,27 +621,19 @@
        // 司机提现
        List<TPubWithdrawal> driverWithdrawal = new ArrayList<>();
        Wrapper<TPubWithdrawal> driverWrapper = new EntityWrapper<TPubWithdrawal>()
                ;
      Wrapper<TPubWithdrawal> driverWrapper = new EntityWrapper<TPubWithdrawal>();
        // 专车wrapper
        Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>()
                ;
      Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>();
        // 小件物流wrapper
        Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>()
                ;
      Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>();
        // 已使用优惠券记录wrapper
        Wrapper<TOrderPrivateCar> between2 = new EntityWrapper<TOrderPrivateCar>()
                ;
        Wrapper<TOrderLogistics> between22 = new EntityWrapper<TOrderLogistics>()
                ;
      Wrapper<TOrderPrivateCar> between2 = new EntityWrapper<TOrderPrivateCar>();
      Wrapper<TOrderLogistics> between22 = new EntityWrapper<TOrderLogistics>();
        // 已使用红包记录wrapper
        Wrapper<TOrderPrivateCar> between3 = new EntityWrapper<TOrderPrivateCar>()
                ;
        Wrapper<TOrderLogistics> between33 = new EntityWrapper<TOrderLogistics>()
                ;
      Wrapper<TOrderPrivateCar> between3 = new EntityWrapper<TOrderPrivateCar>();
      Wrapper<TOrderLogistics> between33 = new EntityWrapper<TOrderLogistics>();
        // 司机已消费金额
        Wrapper<BalanceUsageRecord> between4 = new EntityWrapper<BalanceUsageRecord>()
                ;
      Wrapper<BalanceUsageRecord> between4 = new EntityWrapper<BalanceUsageRecord>();
        if (time == 5 && !StringUtils.hasLength(insertTime)){
            // 专车wrapper
            between = new EntityWrapper<TOrderPrivateCar>()
@@ -945,6 +957,7 @@
    @Autowired
    private ISysRedPacketRecordService sysRedPacketRecordService;
    /**
     * 发放补贴统计
     */
@@ -1025,22 +1038,15 @@
        List<DriverActivityHistory> driverActivityHistories = new ArrayList<>();
        // 专车wrapper
        Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>()
                ;
      Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>();
        // 小件物流wrapper
        Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>()
                ;
      Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>();
        // 优惠券领取记录wrapper
        Wrapper<UserCouponRecord> between2 = new EntityWrapper<UserCouponRecord>()
                ;
      Wrapper<UserCouponRecord> between2 = new EntityWrapper<UserCouponRecord>();
        // 红包领取记录wrapper
        Wrapper<UserRedPacketRecord> between3 = new EntityWrapper<UserRedPacketRecord>()
                ;
      Wrapper<UserRedPacketRecord> between3 = new EntityWrapper<UserRedPacketRecord>();
        // 司机奖励
        Wrapper<DriverActivityHistory> between4 = new EntityWrapper<DriverActivityHistory>()
                ;
      Wrapper<DriverActivityHistory> between4 = new EntityWrapper<DriverActivityHistory>();
        if (time == 5 && !StringUtils.hasLength(insertTime)){
            // 专车wrapper
            between = new EntityWrapper<TOrderPrivateCar>()
@@ -1230,7 +1236,17 @@
        for (UserCouponRecord userCouponRecord : userCouponRecords) {
            GrantVO grantVO = new GrantVO();
            grantVO.setInsertTime(format.format(userCouponRecord.getInsertTime()));
            grantVO.setType("优惠券");
            switch (userCouponRecord.getCouponUseType()){
                case 0:
                    grantVO.setType(userCouponRecord.getCouponType() == 1 ? "通用 抵扣券" : "通用 满减券");
                    break;
                case 1:
                    grantVO.setType(userCouponRecord.getCouponType() == 1 ? "打车 抵扣券" : "打车 满减券");
                    break;
                case 4:
                    grantVO.setType(userCouponRecord.getCouponType() == 1 ? "包裹 抵扣券" : "包裹 满减券");
                    break;
            }
            grantVO.setAmount(userCouponRecord.getMoney().toString());
            TUser tUser = userMap.get(userCouponRecord.getUserId());
            if (tUser!=null){
@@ -1278,6 +1294,7 @@
        total = total.add(redPackage).add(coupon).add(discount).add(driver);
        return sortedList;
    }
    @RequestMapping(value = "/grant/getCount")
    @ResponseBody
    public Object getCount(Integer time,String insertTime,Integer type) {
@@ -1356,22 +1373,15 @@
        List<DriverActivityHistory> driverActivityHistories = new ArrayList<>();
        // 专车wrapper
        Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>()
                ;
      Wrapper<TOrderPrivateCar> between = new EntityWrapper<TOrderPrivateCar>();
        // 小件物流wrapper
        Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>()
                ;
      Wrapper<TOrderLogistics> between1 = new EntityWrapper<TOrderLogistics>();
        // 优惠券领取记录wrapper
        Wrapper<UserCouponRecord> between2 = new EntityWrapper<UserCouponRecord>()
                ;
      Wrapper<UserCouponRecord> between2 = new EntityWrapper<UserCouponRecord>();
        // 红包领取记录wrapper
        Wrapper<UserRedPacketRecord> between3 = new EntityWrapper<UserRedPacketRecord>()
                ;
      Wrapper<UserRedPacketRecord> between3 = new EntityWrapper<UserRedPacketRecord>();
        // 司机奖励
        Wrapper<DriverActivityHistory> between4 = new EntityWrapper<DriverActivityHistory>()
                ;
      Wrapper<DriverActivityHistory> between4 = new EntityWrapper<DriverActivityHistory>();
        if (time == 5 && !StringUtils.hasLength(insertTime)){
            // 专车wrapper
            between = new EntityWrapper<TOrderPrivateCar>()