Pu Zhibing
2025-04-02 af335bf1ef9104dc62c721e142eca790356d18b6
修改bug
18个文件已修改
212 ■■■■■ 已修改文件
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/PlatformController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TSubsidyController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/UserActivityController.java 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TReassignController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TReassignMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderLogisticsMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TReassignMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserCouponRecordMapper.xml 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/DriverActivityHistory.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITReassignService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TReassignServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/appWithdrawalRule/appWithdrawalRule.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/tOrderLogistics/tOrderLogistics.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCar/tOrderPrivateCar.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/userActivity/userActivity.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/PlatformController.java
@@ -188,7 +188,6 @@
        }
        EntityWrapper<SettlementDetail> settlementDetailEntityWrapper = new EntityWrapper<>();
        settlementDetailEntityWrapper.between("createTime", start, end);
        if (state!=null && state == 2){
            List<SettlementRecord> paymentStatus = settlementRecordService.selectList(new EntityWrapper<SettlementRecord>().eq("paymentStatus", 1));
            if(paymentStatus.size() > 0){
@@ -1784,7 +1783,6 @@
                    break;
            }
        }
        Page<Map<String,Object>> page = new PageFactory<Map<String,Object>>().defaultPage();
        List<Income> incomes = new ArrayList<>();
        List<SettlementDetail> settlementDetails = new ArrayList<>();
        if (time == 5 && !StringUtils.hasLength(insertTime)){
@@ -1803,18 +1801,20 @@
        }
        EntityWrapper<SettlementDetail> settlementDetailEntityWrapper = new EntityWrapper<>();
        settlementDetailEntityWrapper.between("createTime", start, end);
//        settlementDetailEntityWrapper.between("createTime", start, end);
        if (state!=null && state == 2){
            List<SettlementRecord> paymentStatus = settlementRecordService.selectList(new EntityWrapper<SettlementRecord>().eq("paymentStatus", 1));
            if(paymentStatus.size() > 0){
                settlementDetailEntityWrapper.in("settlementRecordId", paymentStatus.stream().map(SettlementRecord::getId).collect(Collectors.toList()));
                settlementDetailEntityWrapper.in("settlementRecordId", paymentStatus.stream().map(SettlementRecord::getId).collect(Collectors.toList()))
                        .or().isNull("settlementRecordId");
            }else{
                settlementDetailEntityWrapper.eq("settlementRecordId", 0);
            }
        }else if (state!=null && state == 1){
            List<SettlementRecord> paymentStatus = settlementRecordService.selectList(new EntityWrapper<SettlementRecord>().eq("paymentStatus", 2));
            if(paymentStatus.size() > 0){
                settlementDetailEntityWrapper.in("settlementRecordId", paymentStatus.stream().map(SettlementRecord::getId).collect(Collectors.toList()));
                settlementDetailEntityWrapper.in("settlementRecordId", paymentStatus.stream().map(SettlementRecord::getId).collect(Collectors.toList()))
                        .or().isNull("settlementRecordId");;
            }else{
                settlementDetailEntityWrapper.eq("settlementRecordId", 0);
            }
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TSubsidyController.java
@@ -1263,7 +1263,7 @@
        // 已领取司机奖励
        for (DriverActivityHistory driverActivityHistory : driverActivityHistories) {
            GrantVO grantVO = new GrantVO();
            grantVO.setInsertTime(format.format(driverActivityHistory.getInsertTime()));
            grantVO.setInsertTime(null == driverActivityHistory.getCompletionTime() ? format.format(driverActivityHistory.getInsertTime()) : format.format(driverActivityHistory.getCompletionTime()));
            grantVO.setType("司机奖励");
            grantVO.setAmount(driverActivityHistory.getMoney().toString());
            TDriver tDriver = driverMap.get(driverActivityHistory.getDriverId());
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/UserActivityController.java
@@ -1,25 +1,23 @@
package com.stylefeng.guns.modular.system.controller.general;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.core.common.constant.factory.PageFactory;
import com.stylefeng.guns.core.page.PageInfoBT;
import com.stylefeng.guns.core.log.LogObjectHolder;
import com.stylefeng.guns.core.shiro.ShiroKit;
import com.stylefeng.guns.core.shiro.ShiroUser;
import com.stylefeng.guns.core.util.DateUtil;
import com.stylefeng.guns.core.util.SinataUtil;
import com.stylefeng.guns.modular.system.model.*;
import com.stylefeng.guns.modular.system.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.beans.factory.annotation.Autowired;
import com.stylefeng.guns.core.log.LogObjectHolder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
@@ -72,6 +70,7 @@
    /**
     * 跳转领取统计
     *
     * @return
     */
    @RequestMapping("/receiveRecord")
@@ -131,6 +130,7 @@
        UserActivityRedenvelope userActivityRedenvelope = userActivityRedenvelopeService.selectOne(new EntityWrapper<UserActivityRedenvelope>().eq("userActivityId",activityId));
        if(SinataUtil.isNotEmpty(userActivityRegistered)){
            Map<String,Object> resultMap = userCouponRecordService.getCouponStatic(startTimes,endTimes,userActivityRegistered.getId(),2);
            if (null != resultMap) {
            totalMOney+=Double.parseDouble(resultMap.get("money").toString());
            map.put("userActivityRegisteredMoney",resultMap.get("money"));
            map.put("userActivityRegisteredNumber",resultMap.get("number"));
@@ -140,12 +140,23 @@
            map.put("userActivityRegisteredNumber",0);
            map.put("userActivityRegisteredUseMoney",0);
        }
        } else {
            map.put("userActivityRegisteredMoney", 0);
            map.put("userActivityRegisteredNumber", 0);
            map.put("userActivityRegisteredUseMoney", 0);
        }
        if(SinataUtil.isNotEmpty(userActivityInvite)){
            Map<String,Object> resultMap = userCouponRecordService.getCouponStatic(startTimes,endTimes,userActivityInvite.getId(),3);
            if (null != resultMap) {
            totalMOney+=Double.parseDouble(resultMap.get("money").toString());
            map.put("userActivityInviteMoney",resultMap.get("money"));
            map.put("userActivityInviteNumber",resultMap.get("number"));
            map.put("userActivityInviteUseMoney",resultMap.get("useMoney"));
            } else {
                map.put("userActivityInviteMoney", 0);
                map.put("userActivityInviteNumber", 0);
                map.put("userActivityInviteUseMoney", 0);
            }
        }else{
            map.put("userActivityInviteMoney",0);
            map.put("userActivityInviteNumber",0);
@@ -159,6 +170,7 @@
            Integer i = Integer.valueOf(string);
            // 小件物流
            Map<String,Object> resultMap1 = userCouponRecordService.getDiscountStatic1(startTimes,endTimes,userActivityDiscount1.getId());
            if (null != resultMap1) {
            BigDecimal bigDecimal1 = new BigDecimal(resultMap1.get("money").toString());
            String string1 = resultMap1.get("number").toString();
            Integer i1 = Integer.valueOf(string1);
@@ -170,12 +182,22 @@
            map.put("userActivityDiscount1Money",0);
            map.put("userActivityDiscount1Number",0);
        }
        } else {
            map.put("userActivityDiscount1Money", 0);
            map.put("userActivityDiscount1Number", 0);
        }
        if(SinataUtil.isNotEmpty(userActivityRedenvelope)){
            Map<String,Object> resultMap = userCouponRecordService.getRedStatic(startTimes,endTimes,userActivityRedenvelope.getId());
            if (null != resultMap) {
            totalMOney+=Double.parseDouble(resultMap.get("money").toString());
            map.put("userActivityRedenvelopeMoney",resultMap.get("money"));
            map.put("userActivityRedenvelopeNumber",resultMap.get("number"));
            map.put("userActivityRedenvelopeUseMoney",resultMap.get("useMoney"));
            } else {
                map.put("userActivityRedenvelopeMoney", 0);
                map.put("userActivityRedenvelopeNumber", 0);
                map.put("userActivityRedenvelopeUseMoney", 0);
            }
        }else{
            map.put("userActivityRedenvelopeMoney",0);
            map.put("userActivityRedenvelopeNumber",0);
@@ -195,24 +217,30 @@
    public String index() {
        return PREFIX + "userActivity.html";
    }
    /**
     * 跳转添加注册送优惠券页面
     *
     * @return
     */
    @RequestMapping("addRegist")
    public String addRegist() {
        return PREFIX + "addRegist.html";
    }
    /**
     * 跳转红包选择页面
     *
     * @return
     */
    @RequestMapping("/sysRedPacketRecord")
    public String sysRedPacketRecord() {
        return PREFIX + "sysRedPacketRecord.html";
    }
    /**
     * 跳转到选择优惠券页面
     *
     * @return
     */
    @RequestMapping("/sysCouponRecord")
@@ -224,11 +252,13 @@
    public String sysCouponRecord1() {
        return PREFIX + "sysCouponRecord1.html";
    }
    @RequestMapping("/sysCouponRecord2")
    public String sysCouponRecord2(Model model,Integer type) {
        model.addAttribute("type",type);
        return PREFIX + "sysCouponRecord2.html";
    }
    /**
     * 跳转到添加
     */
@@ -269,6 +299,7 @@
        LogObjectHolder.me().set(userActivity);
        return PREFIX + "userActivity_edit.html";
    }
    /**
     * 获取列表
     */
@@ -287,6 +318,7 @@
        page.setRecords(userCouponRecordService.getBlanceList(page,beginTime,endTime,activityId));
        return super.packForBT(page);
    }
    /**
     * 获取列表
     */
@@ -306,7 +338,6 @@
    }
    /**
     *
     * @param name 活动时间
     * @param startTime  时间区间
     * @param registCouponId 注册活动-优惠券id
@@ -355,7 +386,6 @@
    }
    /**
     *
     * @param name 活动时间
     * @param startTime  时间区间
     * @param registCouponId 注册活动-优惠券id
@@ -392,8 +422,10 @@
                redenvelopeId, redenvelopeEnable, registerPrice, invitationPrice, redPrice,discountDistance,discountOrderNum);
        return SUCCESS_TIP;
    }
    /**
     * 修改状态
     *
     * @param driverActivity
     * @return
     */
@@ -403,6 +435,7 @@
        userActivityService.updateById(driverActivity);
        return SUCCESS_TIP;
    }
    /**
     * 详情
     */
@@ -443,6 +476,7 @@
        model.addAttribute("id",id);
        return PREFIX + "userActivity_immediately.html";
    }
    /**
     * 立即处理操作
     */
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java
@@ -24,6 +24,7 @@
import com.stylefeng.guns.modular.system.service.ITOrderLogisticsService;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -122,7 +123,9 @@
    @ResponseBody
    public Object cancel(@RequestParam Integer tOrderLogisticsId) {
        TOrderLogistics tOrderLogistics = tOrderLogisticsService.selectById(tOrderLogisticsId);
        if(Arrays.asList(6, 7, 8, 9, 10).contains(tOrderLogistics.getState())){
            return ERROR;
        }
        //修改之前司机状态 -- 空闲
        if(null != tOrderLogistics.getDriverId()){
            TDriver driver = itDriverService.selectById(tOrderLogistics.getDriverId());
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java
@@ -615,7 +615,9 @@
    @ResponseBody
    public Object cancel(@RequestParam Integer tOrderPrivateCarId) {
        TOrderPrivateCar tOrderPrivateCar = tOrderPrivateCarService.selectById(tOrderPrivateCarId);
        if(Arrays.asList(6, 7, 8, 9, 10).contains(tOrderPrivateCar.getState())){
            return ERROR;
        }
        //修改之前司机状态 -- 空闲
        if(null != tOrderPrivateCar.getDriverId()){
            TDriver driver = tDriverService.selectById(tOrderPrivateCar.getDriverId());
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TReassignController.java
@@ -251,7 +251,7 @@
        TReassign reassign = tReassignService.selectById(orderId);
        TOrderPrivateCar privateCar = itOrderPrivateCarService.selectById(reassign.getOrderId());
        Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
        page.setRecords(tReassignService.getCanSelectPrivateCarDriverList(page,privateCar.getCompanyId(),name,phone));
        page.setRecords(tReassignService.getCanSelectPrivateCarDriverList(page,privateCar.getCompanyId(),privateCar.getDriverId(),name,phone));
        return super.packForBT(page);
    }
@@ -284,7 +284,7 @@
        TReassign reassign = tReassignService.selectById(orderId);
        TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(reassign.getOrderId());
        Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
        page.setRecords(tReassignService.getCanSelectSmallDriverList(page,tOrderLogistics.getCompanyId(), tOrderLogistics.getType(),name,phone));
        page.setRecords(tReassignService.getCanSelectSmallDriverList(page,tOrderLogistics.getCompanyId(), tOrderLogistics.getDriverId(), tOrderLogistics.getType(),name,phone));
        return super.packForBT(page);
    }
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TReassignMapper.java
@@ -42,6 +42,7 @@
     */
    List<Map<String,Object>> getCanSelectPrivateCarDriverList(@Param("page") Page<Map<String, Object>> page,
                                                              @Param("companyId") Integer companyId,
                                                              @Param("driverId") Integer driverId,
                                                              @Param("name") String name,
                                                              @Param("phone") String phone);
@@ -53,6 +54,7 @@
     */
    List<Map<String,Object>> getCanSelectSmallDriverList(@Param("page") Page<Map<String, Object>> page,
                                                         @Param("companyId") Integer companyId,
                                                         @Param("driverId") Integer driverId,
                                                         @Param("type") Integer type,
                                                         @Param("name") String name,
                                                         @Param("phone") String phone);
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderLogisticsMapper.xml
@@ -77,7 +77,7 @@
        LEFT JOIN t_driver as di on di.id = ot.driverId
        LEFT JOIN t_car as ci on ci.id= ot.carId
        LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId
        left join t_order_cancel as oc on (ot.id = oc.orderId and oc.orderType = 4 and oc.state = 2)
        left join t_order_cancel as oc on (ot.id = oc.orderId and oc.orderType = 4)
        ) as o
        <where>
            o.isDelete = 1
@@ -148,7 +148,8 @@
        oc.money as cancelMoney,
        case when oc.payType = 1 then '手机支付'
             when oc.payType = 2 then '银行卡支付'
             when oc.payType = 3 then '余额支付' else '现金支付' end as cancelPayTypeStr
             when oc.payType = 3 then '余额支付'
             when oc.payType = 4 then '现金支付'else '' end as cancelPayTypeStr
        FROM t_order_logistics as ot
        LEFT JOIN t_user as ui on ui.id = ot.userId
        LEFT JOIN t_driver as di on di.id = ot.driverId
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml
@@ -85,7 +85,7 @@
        LEFT JOIN t_car as ci on ci.id= ot.carId
        LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId
        LEFT JOIN t_server_carmodel as sc on sc.id = ot.serverCarModelId
        left join t_order_cancel as oc on (ot.id = oc.orderId and oc.orderType = 1 and oc.state = 2)
        left join t_order_cancel as oc on (ot.id = oc.orderId and oc.orderType = 1)
        ) as o
        <where>
            o.isDelete = 1 and o.type = 1
@@ -175,7 +175,7 @@
        LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId
        LEFT JOIN t_company as cc on cc.id = ot.companyId
        LEFT JOIN t_server_carmodel as sc on sc.id = ot.serverCarModelId
        LEFT JOIN t_order_cancel as oc on ot.id = oc.orderId and oc.orderType = 1 and oc.state = 2
        LEFT JOIN t_order_cancel as oc on ot.id = oc.orderId and oc.orderType = 1
        LEFT JOIN (
            SELECT sum(ii.money) as money,ii.incomeId,cc.type FROM t_income as ii
            LEFT JOIN t_company as cc on ii.objectId = cc.id
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TReassignMapper.xml
@@ -90,6 +90,7 @@
        LEFT JOIN t_company as c2 on c2.id = dd.franchiseeId
        LEFT JOIN (SELECT * from t_driver_service where type = 1) as ds on ds.driverId = dd.id
        <where>
            dd.id != driverId and
            (dd.companyId = #{companyId} or dd.franchiseeId = #{companyId}) and dd.authState = 2 and dd.state = 2 and (ds.id is not null ) and (dd.carId is not null)
            <if test="name != null and name != ''">
                and CONCAT(dd.firstName, ' ', dd.lastName) LIKE CONCAT('%',#{name},'%')
@@ -109,6 +110,7 @@
        LEFT JOIN t_company as c2 on c2.id = dd.franchiseeId
        LEFT JOIN (SELECT * from t_driver_service where type = #{type}) as ds on ds.driverId = dd.id
        <where>
            dd.id != driverId and
            (dd.companyId = #{companyId} or dd.franchiseeId = #{companyId}) and dd.authState = 2 and dd.state = 2 and (ds.id is not null ) and (dd.carId is not null)
            <if test="name != null and name != ''">
                and CONCAT(dd.firstName, ' ', dd.lastName) LIKE CONCAT('%',#{name},'%')
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserCouponRecordMapper.xml
@@ -22,7 +22,8 @@
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, money, fullMoney, expirationTime, insertTime, companyId, state, couponUseType, couponType, userId, couponId, couponActivityId, activityType
        id
        , money, fullMoney, expirationTime, insertTime, companyId, state, couponUseType, couponType, userId, couponId, couponActivityId, activityType
    </sql>
    <select id="getList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page">
@@ -42,7 +43,8 @@
            c.activityType,
            u.nickName,
            u.phone,
            if(a.id is null, if(b.id is null, if(d.id is null, if(e.id is null, '', e.endServiceTime), d.endServiceTime), b.endServiceTime), a.endServiceTime) as useTime
        if(a.id is null, if(b.id is null, if(d.id is null, if(e.id is null, '', e.endServiceTime), d.endServiceTime),
        b.endServiceTime), a.endServiceTime) as useTime
        FROM
            t_user_coupon_record c
        LEFT JOIN t_user u ON c.userId = u.id
@@ -82,7 +84,8 @@
            c.redPacketActivityId,
            u.nickName,
            u.phone,
          if(a.id is null, if(b.id is null, if(d.id is null, if(e.id is null, '', e.endServiceTime), d.endServiceTime), b.endServiceTime), a.endServiceTime) as useTime
        if(a.id is null, if(b.id is null, if(d.id is null, if(e.id is null, '', e.endServiceTime), d.endServiceTime),
        b.endServiceTime), a.endServiceTime) as useTime
        FROM
            t_user_red_packet_record c
        LEFT JOIN t_user u ON c.userId = u.id
@@ -108,63 +111,55 @@
        </if>
    </select>
    <select id="getCouponStatic" resultType="map">
        select
        IFNULL(SUM(aa.money), 0) money,
        IFNULL(SUM(aa.useMoney), 0) useMoney,
        COUNT(aa.userId) as number
        from (
        SELECT
            IFNULL(SUM(money), 0) money,
            IFNULL(
                SUM(
                    CASE
                    WHEN state = 2 THEN
                        money
                    ELSE
                        0
                    END
                ),
                0
            ) useMoney,
            (
            select count(c.userId) from (select userId from t_user_coupon_record where activityType = #{activityType} and couponActivityId = #{activityId}
        IFNULL(SUM(CASE WHEN state = 2 THEN money ELSE 0 END), 0) useMoney,
        userId
        FROM t_user_coupon_record WHERE activityType = #{activityType} AND couponActivityId = #{activityId}
                <if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''">
                    and (insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
                </if>
                group by userId) as c
            ) number
        FROM
            t_user_coupon_record
        WHERE
            activityType = #{activityType}
        AND couponActivityId = #{activityId}
        <if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''">
            and (insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
        </if>
        group by userId
        ) as aa
    </select>
    <select id="getRedStatic" resultType="map">
        SELECT
        IFNULL(SUM(aa.money), 0) money,
        IFNULL(SUM(aa.useMoney), 0) useMoney,
        COUNT(aa.userId) number
        FROM
        (
        SELECT
            IFNULL(SUM(money), 0) money,
            IFNULL(
                SUM(
                    CASE
                    WHEN state = 2 THEN
                        money
                    ELSE
                        0
                    END
                ),
                0
            ) useMoney,
            COUNT(id) number
        IFNULL(SUM(CASE WHEN state = 2 THEN money ELSE 0 END ), 0) useMoney,
        userId
        FROM
            t_user_red_packet_record
        WHERE
         redPacketActivityId = #{activityId}
        WHERE redPacketActivityId = #{activityId}
        <if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''">
            and (insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
        </if>
        group by userId
        ) as aa group by aa.userId
    </select>
    <select id="getDiscountStatic" resultType="map">
        SELECT IFNULL(SUM(discountMoney),0) money,COUNT(id) number FROM t_order_private_car WHERE activityId=#{activityId}
        SELECT IFNULL(SUM(aa.money), 0) money, COUNT(aa.userId) number
        FROM (select IFNULL(SUM(discountMoney), 0) money, userId
              from t_order_private_car
              WHERE activityId = #{activityId}
              group by userId) as aa
    </select>
    <select id="getDiscountStatic1" resultType="map">
        SELECT IFNULL(SUM(discountMoney),0) money,COUNT(id) number FROM t_order_logistics WHERE activityId=#{activityId}
        SELECT IFNULL(SUM(aa.money), 0) money, COUNT(aa.userId) number
        FROM (select IFNULL(SUM(discountMoney), 0) money, userId
              from t_order_logistics
              WHERE activityId = #{activityId}
              group by userId) as aa
    </select>
    <select id="getRegStatic" resultType="map">
        SELECT
@@ -725,7 +720,6 @@
            and c.companyId = #{companyId}
        </if>
    </select>
    <select id="queryCouponRegisterInfo1" resultType="map">
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/DriverActivityHistory.java
@@ -1,10 +1,14 @@
package com.stylefeng.guns.modular.system.model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
/**
@@ -53,6 +57,11 @@
     * 添加时间
     */
    private Date insertTime;
    /**
     * 完成时间
     */
    @TableField("completionTime")
    private Date completionTime;
    public Integer getId() {
@@ -119,6 +128,14 @@
        this.insertTime = insertTime;
    }
    public Date getCompletionTime() {
        return completionTime;
    }
    public void setCompletionTime(Date completionTime) {
        this.completionTime = completionTime;
    }
    @Override
    protected Serializable pkVal() {
        return this.id;
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITReassignService.java
@@ -41,6 +41,7 @@
     */
    List<Map<String,Object>> getCanSelectPrivateCarDriverList(@Param("page") Page<Map<String, Object>> page,
                                                              @Param("companyId") Integer companyId,
                                                              @Param("driverId") Integer driverId,
                                                              @Param("name") String name,
                                                              @Param("phone") String phone);
@@ -51,6 +52,7 @@
     */
    List<Map<String,Object>> getCanSelectSmallDriverList(@Param("page") Page<Map<String, Object>> page,
                                                              @Param("companyId") Integer companyId,
                                                         @Param("driverId") Integer driverId,
                                                         @Param("type") Integer type,
                                                              @Param("name") String name,
                                                              @Param("phone") String phone);
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TReassignServiceImpl.java
@@ -28,13 +28,13 @@
    }
    @Override
    public List<Map<String, Object>> getCanSelectPrivateCarDriverList(Page<Map<String, Object>> page, Integer companyId, String name, String phone) {
        return this.baseMapper.getCanSelectPrivateCarDriverList(page, companyId, name, phone);
    public List<Map<String, Object>> getCanSelectPrivateCarDriverList(Page<Map<String, Object>> page, Integer companyId, Integer driverId, String name, String phone) {
        return this.baseMapper.getCanSelectPrivateCarDriverList(page, companyId, driverId, name, phone);
    }
    @Override
    public List<Map<String, Object>> getCanSelectSmallDriverList(Page<Map<String, Object>> page, Integer companyId, Integer type, String name, String phone) {
        return this.baseMapper.getCanSelectSmallDriverList(page, companyId, type, name, phone);
    public List<Map<String, Object>> getCanSelectSmallDriverList(Page<Map<String, Object>> page, Integer companyId, Integer driverId, Integer type, String name, String phone) {
        return this.baseMapper.getCanSelectSmallDriverList(page, companyId, driverId, type, name, phone);
    }
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/appWithdrawalRule/appWithdrawalRule.js
@@ -15,7 +15,8 @@
    return [
        {field: 'selectItem', radio: true},
            {title: 'ID', field: 'id', visible: true, align: 'center', valign: 'middle'},
            {title: '可提现日期', field: 'weeks', visible: true, align: 'center', valign: 'middle',
        {
            title: '司机可提现日期(星期几)', field: 'weeks', visible: true, align: 'center', valign: 'middle',
                formatter: function (value, row) {
                    var btn = "";
                    if(value==1) {
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/tOrderLogistics/tOrderLogistics.js
@@ -258,7 +258,8 @@
        } else {
            nickname = "【" + nickname + "】";
        }
        if (TOrderLogistics.seItem.state == 9 || TOrderLogistics.seItem.state == 10 ) {
        if (TOrderLogistics.seItem.state == 6 || TOrderLogistics.seItem.state == 7 || TOrderLogistics.seItem.state == 8 ||
                TOrderLogistics.seItem.state == 9 || TOrderLogistics.seItem.state == 10 ) {
            swal("取消失败", "【已完成】【已取消】状态下不能执行此操作", "warning");
            return;
        }
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCar/tOrderPrivateCar.js
@@ -386,8 +386,8 @@
        } else {
            nickname = "【" + nickname + "】";
        }
        if (TOrderPrivateCar.seItem.state == 7 || TOrderPrivateCar.seItem.state == 8 || TOrderPrivateCar.seItem.state == 9 || TOrderPrivateCar.seItem.state == 10 ) {
            swal("支付失败", "【待评价】【已完成】【已取消】状态下不能执行此操作", "warning");
        if (TOrderPrivateCar.seItem.state == 6 || TOrderPrivateCar.seItem.state == 7 || TOrderPrivateCar.seItem.state == 8 || TOrderPrivateCar.seItem.state == 9 || TOrderPrivateCar.seItem.state == 10 ) {
            swal("取消失败", "【待评价】【已完成】【已取消】状态下不能执行此操作", "warning");
            return;
        }
        swal({
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/userActivity/userActivity.js
@@ -21,7 +21,8 @@
        {title: '结束时间', field: 'endTime', visible: true, align: 'center', valign: 'middle'},
        {title: '参与人次', field: 'number', visible: true, align: 'center', valign: 'middle'},
        {title: '备注', field: 'remark', visible: true, align: 'center', valign: 'middle'},
        {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle',
        {
            title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle',
            formatter: function (value, row) {
                if(value==1){
                    return "待审核";
@@ -63,10 +64,10 @@
        if(type==null){
            UserActivity.seItem = selected[0];
            return true;
        }else if(type==3 && selected[0].status!=3 && selected[0].status!=4){
        } else if (type == 3 && selected[0].status != 6 && selected[0].status != 7) {
            Feng.info("当前状态不能暂停/启动!");
            return false;
        }else if(type==3 && selected[0].status==3 && (selected[0].startTime>new Date() || new Date()>selected[0].endTime)){
        } else if (type == 3 && selected[0].status == 6 && (selected[0].startTime > new Date() || new Date() > selected[0].endTime)) {
            Feng.info("当前状态不能暂停/启动!");
            return false;
        }else if(type==1 && selected[0].status!=1){