Pu Zhibing
2024-11-09 f85ea638d98b302c590e65f00e6912d91601613c
修改bug
11个文件已修改
162 ■■■■■ 已修改文件
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderLogisticsMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserCouponRecordMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserRedPacketRecordMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/GoogleMap/FleetEngineUtil.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/webapp/WEB-INF/view/system/settlementAllocation/settlementAllocation.html 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/settlementAllocation/settlementAllocation.js 36 ●●●●● 补丁 | 查看 | 原始文档 | 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 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java
@@ -139,19 +139,19 @@
        orderCancelMapper.insert(orderCancel);
        
        //修改行程信息
        try {
            boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderLogistics.getTripId(), null, null, null, null);
            if(!updateTrip){
                for (int i = 0; i < 5; i++) {
                    updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderLogistics.getTripId(), null, null, null, null);
                    if(updateTrip){
                        break;
                    }
                    Thread.sleep(5000L);
        boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderLogistics.getTripId(), null, null, null, null);
        if(!updateTrip){
            for (int i = 0; i < 5; i++) {
                updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderLogistics.getTripId(), null, null, null, null);
                if(updateTrip){
                    break;
                }
                try {
                    Thread.sleep(3000L);
                }catch (Exception e){
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    
    
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java
@@ -277,6 +277,38 @@
            
            tOrderPrivateCarService.updateById(orderPrivateCar);
    
            //修改行程数据
            boolean updateTrip = fleetEngineUtil.updateTrip("COMPLETE", null, null, orderPrivateCar.getTripId(), null, null, null, null);
            if(!updateTrip){
                for (int i = 0; i < 5; i++) {
                    updateTrip = fleetEngineUtil.updateTrip("COMPLETE", null, null, orderPrivateCar.getTripId(), null, null, null, null);
                    if(updateTrip){
                        break;
                    }
                    try {
                        Thread.sleep(3000L);
                    } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                    }
                }
            }
            //上报行程
            boolean reportBillableEvent = fleetEngineUtil.reportBillableEvent(orderPrivateCar.getTripId());
            if(!reportBillableEvent){
                for (int i = 0; i < 5; i++) {
                    reportBillableEvent = fleetEngineUtil.reportBillableEvent(orderPrivateCar.getTripId());
                    if(reportBillableEvent){
                        break;
                    }
                    try {
                        Thread.sleep(3000L);
                    } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                    }
                }
            }
    
            TUser userInfo = userService.selectById(orderPrivateCar.getUserId());
            Integer language1 = userInfo.getLanguage();
@@ -294,18 +326,6 @@
                public void run() {
                    pushUtil.pushOrderState(1, finalOrderTaxi.getUserId(), finalOrderTaxi.getId(), 1, finalOrderTaxi.getState(), 0, "");
                    pushUtil.pushOrderState(2, finalOrderTaxi.getDriverId(), finalOrderTaxi.getId(), 1, finalOrderTaxi.getState(), 0, "");
                }
            }).start();
            TOrderPrivateCar finalOrderPrivateCar = orderPrivateCar;
            new Thread(()->{
                try {
                    //上报google
                    fleetEngineUtil.reportBillableEvent(finalOrderPrivateCar.getTripId());
                    log.warn("上报时间:{},tripid:{},created_at:{},completed_at:{}", System.currentTimeMillis(), finalOrderPrivateCar.getTripId(),
                            finalOrderPrivateCar.getInsertTime().getTime(), finalOrderPrivateCar.getEndServiceTime().getTime());
                }catch (Exception e){
                    e.printStackTrace();
                }
            }).start();
    
@@ -611,19 +631,19 @@
        orderCancelMapper.insert(orderCancel);
    
        //修改行程信息
        try {
            boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderPrivateCar.getTripId(), null, null, null, null);
            if(!updateTrip){
                for (int i = 0; i < 5; i++) {
                    updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderPrivateCar.getTripId(), null, null, null, null);
                    if(updateTrip){
                        break;
                    }
                    Thread.sleep(5000L);
        boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderPrivateCar.getTripId(), null, null, null, null);
        if(!updateTrip){
            for (int i = 0; i < 5; i++) {
                updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderPrivateCar.getTripId(), null, null, null, null);
                if(updateTrip){
                    break;
                }
                try {
                    Thread.sleep(3000L);
                }catch (Exception e){
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    
    
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderLogisticsMapper.xml
@@ -72,11 +72,13 @@
    <!--根据条件查询小件物流订单列表-->
    <select id="getLogisticsOrderList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page">
        SELECT * FROM (SELECT ui.nickName as userName,ui.phone as userPhone,CONCAT(di.firstName, " ", di.lastName,'-',di.phone) as driver,CONCAT(cb.`name`,'-',ci.carLicensePlate) as car,
        ot.* FROM t_order_logistics as ot
        ot.*,oc.money as cancel_money 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
        LEFT JOIN t_car as ci on ci.id= ot.carId
        LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId) as o
        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)
        ) as o
        <where>
            o.isDelete = 1
            <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml
@@ -78,12 +78,13 @@
    <!--根据条件查询专车订单列表-->
    <select id="getPrivateCarOrderList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page">
        SELECT * FROM (SELECT ui.nickName as userName,ui.phone as userPhone,CONCAT(di.firstName, " ", di.lastName,'-',di.phone) as driver,CONCAT(cb.`name`,'-',ci.carLicensePlate) as car,
        sc.chineseName as serverCarModel,ot.* FROM t_order_private_car as ot
        sc.chineseName as serverCarModel,oc.money as cancel_money,ot.* FROM t_order_private_car as ot
        LEFT JOIN t_user as ui on ui.id = ot.userId
        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_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)
        ) as o
        <where>
            o.isDelete = 1 and o.type = 1
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserCouponRecordMapper.xml
@@ -670,8 +670,8 @@
        select
        aa.time,
        aa.userId,
        aa.userName,
        aa.phone,
        any_value(aa.userName) as userName,
        any_value(aa.phone) as phone,
        sum(aa.amount) as amount,
        sum(aa.tyNum) as tyNum,
        sum(aa.tyUseNum) as tyUseNum,
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserRedPacketRecordMapper.xml
@@ -6,7 +6,6 @@
    <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.UserRedPacketRecord">
        <id column="id" property="id"/>
        <result column="money" property="money"/>
        <result column="expirationTime" property="expirationTime"/>
        <result column="insertTime" property="insertTime"/>
        <result column="companyId" property="companyId"/>
        <result column="state" property="state"/>
@@ -176,7 +175,6 @@
        d.nickName as `name`,
        d.phone as phone,
        a.money as money,
        DATE_FORMAT(a.expirationTime, '%Y-%m-%d %H:%i:%s') as expirationTime,
        if(a.state = 1, '未使用', if(a.state = 2, '已使用', '已过期')) as state,
        DATE_FORMAT(a.endTime, '%Y-%m-%d %H:%i:%s') as endTime
        from t_user_red_packet_record a
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/GoogleMap/FleetEngineUtil.java
@@ -478,7 +478,7 @@
        end_point.put("longitude", end_lng);
        dropoffPoint.put("point", end_point);
        body.put("dropoffPoint", dropoffPoint);
        logger.info("创建行程请求:{}", body.toJSONString());
        logger.info("创建行程请求:{}   {}", tripId, body.toJSONString());
        HttpRequest request = post.body(body.toJSONString());
        HttpResponse response = request.execute();
        logger.info("创建行程结果:{}", response.body());
@@ -698,7 +698,7 @@
            dropoffPoint.put("point", end_point);
            body.put("dropoffPoint", dropoffPoint);
        }
        logger.info("修改行程请求:{}", body.toJSONString());
        logger.info("修改行程请求:{}   {}", tripId, body.toJSONString());
        HttpRequest request = put.body(body.toJSONString());
        HttpResponse response = request.execute();
        logger.info("修改行程结果:{}", response.body());
@@ -970,6 +970,7 @@
     * @return
     */
    public boolean reportBillableEvent(String tripId) {
        log.info("上报行程:{}", tripId);
        String billableEventId = UUIDUtil.getRandomCode();
        String url = "https://mobilitybilling.googleapis.com/v1:reportBillableEvent?regionCode=GH&key=" + key + "&billableEventId=" + billableEventId;
        HttpRequest post = HttpUtil.createPost(url);
ManagementIGOTravel/guns-admin/src/main/webapp/WEB-INF/view/system/settlementAllocation/settlementAllocation.html
@@ -12,18 +12,18 @@
                            <#button name="修改" icon="fa-edit" clickFun="SettlementAllocation.setSettlementAllocation()"/>
                            <div class="form-group">
                                <input type="radio" name="type" value="1" ${null != item && item.type == '1' ? 'checked' : ''}>
                                每天&nbsp;&nbsp;&nbsp;&nbsp;超过 <input type="number" class="date"  value="${null != item && item.type == '1' ? item.maxPrice : ''}" style="background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> 必须结算
                                每天&nbsp;&nbsp;&nbsp;&nbsp;超过 <input type="number" min="1" class="day"  value="${null != item && item.type == '1' ? item.maxPrice : ''}" style="background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> 必须结算
                            </div>
                            <div class="form-group">
                                <input type="radio" name="type" value="2" ${null != item && item.type == '2' ? 'checked' : ''}> 每周&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                每周&nbsp;&nbsp;&nbsp;&nbsp;每周<input type="number" min="1" max="7" class="date" value="${null != item && item.type == '2' ? item.day : ''}" style="background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> (几)可结算
                            </div>
                            <div class="form-group">
                                <input type="radio" name="type" value="3" ${null != item && item.type == '3' ? 'checked' : ''}> 每月&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                每月&nbsp;&nbsp;&nbsp;&nbsp;每月<input type="number" min="1" max="31" class="date" value="${null != item && item.type == '3' ? item.day : ''}" style="background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> 号可结算
                            </div>
                            <div class="form-group">
                                <input type="radio" name="type" value="2" ${null != item && item.type == '2' ? 'checked' : ''}> 每周&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                每周&nbsp;&nbsp;&nbsp;&nbsp;每周<input type="number" min="1" max="7" class="date" value="${null != item && item.type == '2' ? item.day : ''}" style="background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> (几)可结算
                            </div>
                            <div class="form-group">
                                &nbsp;&nbsp;&nbsp;&nbsp;周/月&nbsp;&nbsp;&nbsp;&nbsp;日上限超过 <input type="number" id="maxPrice" value="${null != item && item.type != '1' ? item.maxPrice : ''}" style="background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> 必须结算
                                &nbsp;&nbsp;&nbsp;&nbsp;周/月&nbsp;&nbsp;&nbsp;&nbsp;日上限超过 <input type="number" min="0" id="maxPrice" value="${null != item && item.type != '1' ? item.maxPrice : ''}" style="background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> 必须结算
                            </div>
                        </div>
                        <div class="row">
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/settlementAllocation/settlementAllocation.js
@@ -61,26 +61,38 @@
 * 删除司机单单返活动
 */
SettlementAllocation.setSettlementAllocation = function () {
    let type = $('input[name="type"]:checked')[0];
    var type = $($('input[name="type"]:checked')[0]);
    if(typeof type == "undefined"){
        Feng.error("请选择结算周期");
        return
    }
    let day = $($(type).siblings('.date')[0]).val();
    if('' == day || null == day){
        Feng.error("请输入有效的结算日期")
        return
    if(type.val() == '1'){
        var day = $(type.siblings('.day')[0]).val();
        if('' == day || null == day){
            Feng.error("请输入金额上限")
            return
        }
    }else{
        var day = $(type.siblings('.date')[0]).val();
        if('' == day || null == day){
            Feng.error("请输入有效的结算日期")
            return
        }
    }
    let maxPrice = $('#maxPrice').val();
    if(1 == $(type).val()){
    var maxPrice = $('#maxPrice').val();
    if('1' == type.val()){
        maxPrice = day;
    }
    // if('' == maxPrice || null == maxPrice){
    //     Feng.error("请输入每日结算金额")
    //     return
    // }
    if('' == maxPrice || null == maxPrice){
        Feng.error("请输入金额上限")
        return
    }
    if(maxPrice < 0){
        Feng.error("金额上限不能小于0")
        return
    }
    let json = {
        type: $(type).val(),
        type: type.val(),
        day: day,
        maxPrice: maxPrice
    }
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/tOrderLogistics/tOrderLogistics.js
@@ -177,6 +177,9 @@
                if(row.orderMoney != '' && row.orderMoney != null) {
                    btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.orderMoney + '" onfocus="TUser.tooltip()">' + row.orderMoney + '</p>']
                }
                if(row.state == 10){
                    btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.cancel_money + '" onfocus="TUser.tooltip()">' + row.cancel_money + '</p>']
                }
                return btn;
            }
        },
ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCar/tOrderPrivateCar.js
@@ -173,6 +173,9 @@
                if(row.orderMoney != '' && row.orderMoney != null) {
                    btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.orderMoney + '" onfocus="TUser.tooltip()">' + row.orderMoney + '</p>']
                }
                if(row.state == 10){
                    btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.cancel_money + '" onfocus="TUser.tooltip()">' + row.cancel_money + '</p>']
                }
                return btn;
            }
        },