zhibing.pu
2024-08-22 b77c1869930d044db13a0d4a672bf98da1cab2c2
修改bug
7个文件已修改
96 ■■■■■ 已修改文件
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TIntegralOrderController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/controller/OrderLogisticsController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/OrderWarpper.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
@@ -115,7 +115,7 @@
    <select id="queryHomeData" resultType="map">
        select
        b.carLicensePlate as licensePlate,
        CONCAT(d.`name`, c.`name`, ' . ', b.carColor) as brand,
        CONCAT(d.`name`, ' ', c.`name`, ' . ', b.carColor) as brand,
        (
        (select count(id) from t_order_private_car where driverId = a.id and state in (7, 8, 9) and to_days(insertTime) = to_days(now())) +
        (select count(id) from t_order_taxi where driverId = a.id and state in (7, 8, 9) and to_days(insertTime) = to_days(now())) +
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TIntegralOrderController.java
@@ -124,12 +124,12 @@
        tIntegralOrderService.updateById(tIntegralOrder);
        TIntegralOrder tIntegralOrder1 = tIntegralOrderService.selectById(tIntegralOrder.getId());
        TUser tUser = userService.selectById(tIntegralOrder1.getUserId());
        TIntegralGoods tIntegralGoods = integralGoodsService.selectById(tIntegralOrder.getGoodsId());
        TIntegralGoods tIntegralGoods = integralGoodsService.selectById(tIntegralOrder1.getGoodsId());
        try {
            Integer language = tUser.getLanguage();
            systemNoticeService.addSystemNotice(1, language == 1 ? "您使用" + tIntegralOrder.getIntegral() + "积分成功兑换" + tIntegralGoods.getName() :
                    language == 2 ? "You redeemed " + tIntegralOrder.getIntegral() + " points for the " + tIntegralGoods.getName() + " successfully" :
                            "Vous avez échangé " + tIntegralOrder.getIntegral() + " points avec succès contre le " + tIntegralGoods.getName() + "", tIntegralOrder.getUserId());
            systemNoticeService.addSystemNotice(1, language == 1 ? "您使用" + tIntegralOrder1.getIntegral() + "积分成功兑换" + tIntegralGoods.getName() :
                    language == 2 ? "You redeemed " + tIntegralOrder1.getIntegral() + " points for the " + tIntegralGoods.getName() + " successfully" :
                            "Vous avez échangé " + tIntegralOrder1.getIntegral() + " points avec succès contre le " + tIntegralGoods.getName() + "", tIntegralOrder1.getUserId());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/controller/OrderLogisticsController.java
@@ -335,7 +335,7 @@
            long m = time % 60;
            String usedTime = "";
            if(0 == h){
                usedTime = language == 1 ? m + "分钟" : language == 2 ? m + "-minute" : m + "-minute";
                usedTime = language == 1 ? m + "分钟" : language == 2 ? m + "-minute(s)" : m + "-minute";
            }else{
                usedTime = language == 1 ? h + "小时" + m + "分钟" : language == 2 ? h + "-hour" + m + "-minute" : h + "-hour" + m + "-minute";
            }
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
@@ -1743,21 +1743,22 @@
                    if(null != settlementAllocation){
                        JSONObject jsonObject = JSON.parseObject(settlementAllocation.getContent());
                        Double maxPrice = jsonObject.getDouble("maxPrice");
                        Integer type1 = jsonObject.getInteger("type");
                        if(1 == type1){
                            List<SettlementDetail> settlementDetailList = settlementDetailService.selectList(new EntityWrapper<SettlementDetail>().eq("driverId", driver.getId()).isNull("settlementRecordId").last(" and DATE_FORMAT(now(), '%Y-%m-%d') = DATE_FORMAT(createTime, '%Y-%m-%d')"));
                        if(null != maxPrice){
                            List<SettlementDetail> settlementDetailList = settlementDetailService.selectList(new EntityWrapper<SettlementDetail>().eq("driverId", driver.getId())
                                    .isNull("settlementRecordId").last(" and DATE_FORMAT(now(), '%Y-%m-%d') = DATE_FORMAT(createTime, '%Y-%m-%d')"));
                            BigDecimal total = new BigDecimal(0);
                            for (SettlementDetail detail : settlementDetailList) {
                                total = total.add(new BigDecimal(detail.getPrice()));
                            }
                            //日结算
                            if(maxPrice.compareTo(total.doubleValue()) <= 0){
                                SettlementRecord settlementRecord = settlementRecordService.selectOne(new EntityWrapper<SettlementRecord>().eq("driverId", orderLogistics.getDriverId())
                                        .eq("type", type1).eq("paymentStatus", 1).last(" and day = DATE_FORMAT(now(), '%Y-%m-%d')"));
                                        .eq("type", 1).eq("paymentStatus", 1).last(" and day = DATE_FORMAT(now(), '%Y-%m-%d')"));
                                if(null == settlementRecord){
                                    settlementRecord = new SettlementRecord();
                                    settlementRecord.setDay(new Date());
                                    settlementRecord.setDriverId(orderLogistics.getDriverId());
                                    settlementRecord.setType(type1);
                                    settlementRecord.setType(1);
                                    settlementRecord.setPaymentStatus(1);
                                    settlementRecord.setPayMoney(total.doubleValue());
                                    settlementRecord.setInsertTime(new Date());
@@ -2967,17 +2968,20 @@
            }
    
            OrderLogistics orderLogistics = this.selectById(orderId);
            long timeOutCancel = 0L;
            long driverTimeOut = 0L;
            map.put("driverTimeOutTime", 0);
            map.put("driverTimeOut", 0);
            if(null != orderLogistics.getEstimateArriveTime()){
                CancleOrder cancleOrder = cancleOrderService.selectOne(new EntityWrapper<CancleOrder>().eq("companyId", orderLogistics.getCompanyId()));
                JSONObject jsonObject = JSON.parseObject(cancleOrder.getContent());
                int driverTimeout = jsonObject.getIntValue("driverTimeout") * 60000;
                timeOutCancel = orderLogistics.getEstimateArriveTime().getTime() + driverTimeout;
                driverTimeOut = orderLogistics.getEstimateArriveTime().getTime();
                int driverTimeout1 = jsonObject.getIntValue("driverTimeout");
                long time = orderLogistics.getEstimateArriveTime().getTime() + driverTimeout1 * 60000;
                if(System.currentTimeMillis() > time){
                    Integer driverTimeOutTime = Double.valueOf((System.currentTimeMillis() - time) / 60000).intValue();
                    driverTimeOutTime = driverTimeOutTime == 0 ? 1 : driverTimeOutTime;
                    map.put("driverTimeOutTime", driverTimeOutTime);
                    map.put("driverTimeOut", 1);
                }
            }
            map.put("driverTimeOut", driverTimeOut);
            map.put("timeOutCancel", timeOutCancel);
        }
        return maps;
    }
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java
@@ -3094,18 +3094,29 @@
            }
    
            OrderPrivateCar orderPrivateCar = orderPrivateCarMapper.selectById(orderId);
            long timeOutCancel = 0L;
            if(null != orderPrivateCar.getEstimateArriveTime()){
                CancleOrder cancleOrder = cancleOrderService.selectOne(new EntityWrapper<CancleOrder>().eq("companyId", orderPrivateCar.getCompanyId()));
                JSONObject jsonObject = JSON.parseObject(cancleOrder.getContent());
                int driverTimeout = jsonObject.getIntValue("driverTimeout") * 60000;
                if(orderPrivateCar.getOrderType() == 1){
                    timeOutCancel = orderPrivateCar.getEstimateArriveTime().getTime() + driverTimeout;
                }else{
                    timeOutCancel = orderPrivateCar.getTravelTime().getTime() + driverTimeout;
            Integer driverTimeOutTime = 0;
            Integer driverTimeOut = 0;
            CancleOrder cancleOrder = cancleOrderService.selectOne(new EntityWrapper<CancleOrder>().eq("companyId", orderPrivateCar.getCompanyId()));
            JSONObject jsonObject = JSON.parseObject(cancleOrder.getContent());
            int driverTimeout1 = jsonObject.getIntValue("driverTimeout");
            if(orderPrivateCar.getOrderType() == 1 && null != orderPrivateCar.getEstimateArriveTime()){
                long time = orderPrivateCar.getEstimateArriveTime().getTime() + driverTimeout1 * 60000L;
                if(System.currentTimeMillis() > time){
                    driverTimeOutTime = Double.valueOf((System.currentTimeMillis() - time) / 60000).intValue();
                    driverTimeOutTime = driverTimeOutTime == 0 ? 1 : driverTimeOutTime;
                    driverTimeOut = 1;
                }
            }else{
                long time = orderPrivateCar.getTravelTime().getTime() + driverTimeout1 * 60000L;
                if(System.currentTimeMillis() >= time){
                    driverTimeOutTime = Double.valueOf((System.currentTimeMillis() - time) / 60000).intValue();
                    driverTimeOutTime = driverTimeOutTime == 0 ? 1 : driverTimeOutTime;
                    driverTimeOut = 1;
                }
            }
            map.put("timeOutCancel", timeOutCancel);
            map.put("driverTimeOutTime", driverTimeOutTime);
            map.put("driverTimeOut", driverTimeOut);
        }
        return maps;
    }
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
@@ -130,8 +130,8 @@
        select driverId from t_driver_work where startTime &lt; now() and state = 1 and `type` like CONCAT('%', #{type}, '%')
        )
        and id in (select driverId from t_driver_orders where `type` = #{type})
        and id not in (select driverId from t_settlement_record where paymentStatus = 1)
        and carId in (select carId from t_car_service where `type` = #{type}
        <if test="null != serverCarModelId">
            and serverCarModelId = #{serverCarModelId}
        </if>
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/OrderWarpper.java
@@ -58,10 +58,11 @@
    private Integer cancelMidway;
    @ApiModelProperty("备注")
    private String remark;
    @ApiModelProperty("超时取消时间")
    private Long timeOutCancel;
    @ApiModelProperty("司机超时时间")
    private Long driverTimeOut;
    private Integer driverTimeOutTime;
    @ApiModelProperty("司机是否超时(0=否,1=是)")
    private Integer driverTimeOut;
    
    private String tripId;
@@ -217,19 +218,19 @@
        this.receipt = receipt;
    }
    
    public Long getTimeOutCancel() {
        return timeOutCancel;
    public Integer getDriverTimeOutTime() {
        return driverTimeOutTime;
    }
    
    public void setTimeOutCancel(Long timeOutCancel) {
        this.timeOutCancel = timeOutCancel;
    public void setDriverTimeOutTime(Integer driverTimeOutTime) {
        this.driverTimeOutTime = driverTimeOutTime;
    }
    
    public Long getDriverTimeOut() {
    public Integer getDriverTimeOut() {
        return driverTimeOut;
    }
    
    public void setDriverTimeOut(Long driverTimeOut) {
    public void setDriverTimeOut(Integer driverTimeOut) {
        this.driverTimeOut = driverTimeOut;
    }
    
@@ -283,8 +284,8 @@
                orderWarpper.setCancelMidway(null != map.get("cancelMidway") ? Integer.valueOf(String.valueOf(map.get("cancelMidway"))) : 0);
                orderWarpper.setTripId(null != map.get("tripId") ? String.valueOf(map.get("tripId")) : "");
                orderWarpper.setRemark(null != map.get("remark") ? String.valueOf(map.get("remark")) : "");
                orderWarpper.setTimeOutCancel(null != map.get("timeOutCancel") ? Long.valueOf(String.valueOf(map.get("timeOutCancel"))) : 0);
                orderWarpper.setDriverTimeOut(null != map.get("driverTimeOut") ? Long.valueOf(String.valueOf(map.get("driverTimeOut"))) : 0);
                orderWarpper.setDriverTimeOutTime(null != map.get("driverTimeOutTime") ? Integer.valueOf(String.valueOf(map.get("driverTimeOutTime"))) : 0);
                orderWarpper.setDriverTimeOut(null != map.get("driverTimeOut") ? Integer.valueOf(String.valueOf(map.get("driverTimeOut"))) : 0);
                list.add(orderWarpper);
            }
        }