xuhy
2025-09-05 016ddc332273c36e437a6f3b5f0a25574d5b7b78
bug修改
17个文件已修改
265 ■■■■ 已修改文件
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/OrderPrivateCarMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/model/OrderPrivateCar.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ReassignServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/ElectricFenceUtil.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TIncomeController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarConfirmController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/UploadUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tIncome/balance.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/specialAreaBilling.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar_info.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserZYTravel/guns-admin/pom.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java
@@ -881,6 +881,22 @@
                baseWarpper.setRemark(String.valueOf(map.get("remark")));
                data.add(baseWarpper);
            }
            List<TransactionDetails> transactionDetails = transactionDetailsService.selectList(new EntityWrapper<TransactionDetails>()
                    .eq("type", 1)
                    .eq("userId", uid)
                    .eq("state", 2)
                    .eq("userType", 2)
                    .eq("orderType", 7));
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
            for (TransactionDetails transactionDetail : transactionDetails) {
                BaseWarpper baseWarpper = new BaseWarpper();
                baseWarpper.setDay(format.format(transactionDetail.getInsertTime()));
                baseWarpper.setAmount(transactionDetail.getMoney());
                baseWarpper.setRemark(transactionDetail.getRemark());
                baseWarpper.setName("平台扣除");
                baseWarpper.setData(new HashMap<>());
                data.add(baseWarpper);
            }
            return ResultUtil.success(data);
        }catch (Exception e){
            e.printStackTrace();
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/OrderPrivateCarMapper.java
@@ -60,6 +60,16 @@
     */
    List<OrderPrivateCar> queryByState(@Param("uid") Integer uid, @Param("orderType") Integer orderType,
                                       @Param("type") Integer type, @Param("state") Integer...state) throws Exception;
    /**
     * 根据状态数据订单数据
     * @param uid
     * @param orderType
     * @param state
     * @return
     * @throws Exception
     */
    List<OrderPrivateCar> queryDriverByState(@Param("uid") Integer uid, @Param("orderType") Integer orderType,
                                       @Param("type") Integer type, @Param("state") Integer...state) throws Exception;
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml
@@ -409,6 +409,92 @@
            and `type` = #{type}
        </if>
    </select>
    <select id="queryDriverByState" resultType="OrderPrivateCar">
        select
        id as id,
        `type` as `type`,
        userId as userId,
        serverCarModelId as serverCarModelId,
        driverId as driverId,
        carId as carId,
        orderNum as orderNum,
        placementLon as placementLon,
        placementLat as placementLat,
        placementAddress as placementAddress,
        startLon as startLon,
        startLat as startLat,
        startAddress as startAddress,
        endLon as endLon,
        endLat as endLat,
        endAddress as endAddress,
        boardingLon as boardingLon,
        boardingLat as boardingLat,
        boardingAddress as boardingAddress,
        boardingTime as boardingTime,
        getoffLon as getoffLon,
        getoffLat as getoffLat,
        getoffAddress as getoffAddress,
        getoffTime as getoffTime,
        mileage as mileage,
        payManner as payManner,
        payType as payType,
        orderMoney as orderMoney,
        startMileage as startMileage,
        startMoney as startMoney,
        mileageKilometers as mileageKilometers,
        mileageMoney as mileageMoney,
        duration as duration,
        durationMoney as durationMoney,
        wait as wait,
        waitMoney as waitMoney,
        longDistance as longDistance,
        longDistanceMoney as longDistanceMoney,
        parkMoney as parkMoney,
        roadTollMoney as roadTollMoney,
        redPacketMoney as redPacketMoney,
        couponMoney as couponMoney,
        redPacketId as redPacketId,
        couponId as couponId,
        discount as discount,
        discountMoney as discountMoney,
        activityId as activityId,
        companyId as companyId,
        payMoney as payMoney,
        substitute as substitute,
        passengers as passengers,
        passengersPhone as passengersPhone,
        state as state,
        insertTime as insertTime,
        travelTime as travelTime,
        snatchOrderTime as snatchOrderTime,
        setOutTime as setOutTime,
        arriveTime as arriveTime,
        startServiceTime as startServiceTime,
        endServiceTime as endServiceTime,
        orderType as orderType,
        orderSource as orderSource,
        invoiceId as invoiceId,
        isReassign as isReassign,
        reassignNotice as reassignNotice,
        trackId as trackId,
        isDelete as isDelete,
        oldState as oldState,
        telX as telX,
        bindId as bindId
        from t_order_private_car where isDelete = 1 and driverId = #{uid}
        <if test="null != orderType">
            and orderType = #{orderType}
        </if>
        <if test="null != state">
            and state in
            <foreach collection="state" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        <if test="null != type">
            and `type` = #{type}
        </if>
    </select>
    <select id="query" resultType="OrderPrivateCar">
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/model/OrderPrivateCar.java
@@ -457,6 +457,17 @@
    @ApiModelProperty(value = "支付流水号")
    @TableField("transactionId")
    private String transactionId;
    @ApiModelProperty(value = "是否已确认 1=是 0=否")
    @TableField("isConfirm")
    private Integer isConfirm;
    public Integer getIsConfirm() {
        return isConfirm;
    }
    public void setIsConfirm(Integer isConfirm) {
        this.isConfirm = isConfirm;
    }
    public String getTransactionId() {
        return transactionId;
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java
@@ -302,7 +302,7 @@
        switch (state){
            case 3://出发前往预约点
                // 判断是否有其他未完成的单子
                List<OrderPrivateCar> orderPrivateCars = orderPrivateCarMapper.queryByState(orderPrivateCar.getUserId(), 1, 1, 3,4, 5,6);
                List<OrderPrivateCar> orderPrivateCars = orderPrivateCarMapper.queryDriverByState(orderPrivateCar.getDriverId(), 1, 1, 3,4, 5,6);
                if(!CollectionUtils.isEmpty(orderPrivateCars)){
                    return ResultUtil.error("有未完成的服务订单");
                }
@@ -531,6 +531,7 @@
        orderPrivateCar.setParkMoney(null == parkingFee ? 0D : parkingFee);
        orderPrivateCar.setRoadTollMoney(null == crossingFee ? 0D : crossingFee);
        orderPrivateCar.setOrderMoney(orderPrivateCar.getOrderMoney() + orderPrivateCar.getParkMoney() + orderPrivateCar.getRoadTollMoney());
        orderPrivateCar.setIsConfirm(1);
        //判断是否首单免费-免费直接完成
        Integer orderNumber = this.selectCount(new EntityWrapper<OrderPrivateCar>().eq("userId",orderPrivateCar.getUserId()).last("and (state=8 or state=9)"));
@@ -561,7 +562,7 @@
                    driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                    driver.setBalance(new BigDecimal(null != driver.getBalance() ? driver.getBalance() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                    driverService.updateById(driver);
                    incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue(),driver.getBalance());
                    incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue(),driver.getLaveBusinessMoney());
                }else{
                    orderPrivateCar.setState(7);
                    orderPrivateCar.setOrderMoney(orderPrivateCar.getOrderMoney()-userInfo.getFreeMoney().doubleValue());
@@ -627,7 +628,7 @@
            driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
            driver.setBalance(new BigDecimal(null != driver.getBalance() ? driver.getBalance() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
            driverService.updateById(driver);
            incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue(), driver.getBalance());
            incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue(), driver.getLaveBusinessMoney());
        }else {
            orderPrivateCar.setState(7);
        }
@@ -693,6 +694,56 @@
            this.setMoney(orderPrivateCar, 0D, 0D);
        }
        if(Objects.isNull(orderPrivateCar.getEstimatedPrice())){
            orderPrivateCar.setEstimatedPrice(0D);
        }
        if(BigDecimal.valueOf(orderPrivateCar.getOrderMoney()).subtract(new BigDecimal(orderPrivateCar.getEstimatedPrice())).abs().doubleValue() > 3){
            orderPrivateCar.setIsException(1);
        }
        this.updateById(orderPrivateCar);
        if(orderPrivateCar.getIsConfirm() == 0){
            // 查询起点或者终点在特殊区域中
            List<SpecialAreaBilling> specialAreaBillings = specialAreaBillingService.selectList(new EntityWrapper<SpecialAreaBilling>()
                    .eq("state", 1));
            if(!CollectionUtils.isEmpty(specialAreaBillings)){
                // 判断起点或者终点在特殊区域中
                Iterator<SpecialAreaBilling> iterator = specialAreaBillings.iterator();
                while (iterator.hasNext()) {
                    SpecialAreaBilling specialAreaBilling = iterator.next();
                    // 起点
                    Double startLon = orderPrivateCar.getStartLon();
                    Double startLat = orderPrivateCar.getStartLat();
                    boolean start = ElectricFenceUtil.monitorElectricFenc(specialAreaBilling.getCoordinate(), startLon + "," + startLat);
                    // 终点
                    Double endLon = orderPrivateCar.getEndLon();
                    Double endLat = orderPrivateCar.getEndLat();
                    boolean end = ElectricFenceUtil.monitorElectricFenc(specialAreaBilling.getCoordinate(), endLon + "," + endLat);
                    if(!start && !end){
                        iterator.remove();
                    }
                }
                if(!CollectionUtils.isEmpty(specialAreaBillings)){
                    // 拿到价格系数最高的特殊区域
                    specialAreaBillings.sort(new Comparator<SpecialAreaBilling>() {
                        @Override
                        public int compare(SpecialAreaBilling o1, SpecialAreaBilling o2) {
                            return o2.getPriceCoefficient().compareTo(o1.getPriceCoefficient());
                        }
                    });
                    BigDecimal priceCoefficient = specialAreaBillings.get(0).getPriceCoefficient();
                    orderPrivateCar.setOrderMoney(Objects.nonNull(orderPrivateCar.getOrderMoney())?new BigDecimal(orderPrivateCar.getOrderMoney()).multiply(priceCoefficient).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue():0D);
                    orderPrivateCar.setStartMoney(Objects.nonNull(orderPrivateCar.getStartMoney())?new BigDecimal(orderPrivateCar.getStartMoney()).multiply(priceCoefficient).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue():0D);
                    orderPrivateCar.setMileageMoney(Objects.nonNull(orderPrivateCar.getMileageMoney())?new BigDecimal(orderPrivateCar.getMileageMoney()).multiply(priceCoefficient).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue():0D);
                    orderPrivateCar.setDurationMoney(Objects.nonNull(orderPrivateCar.getDurationMoney())?new BigDecimal(orderPrivateCar.getDurationMoney()).multiply(priceCoefficient).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue():0D);
                    orderPrivateCar.setWaitMoney(Objects.nonNull(orderPrivateCar.getWaitMoney())?new BigDecimal(orderPrivateCar.getWaitMoney()).multiply(priceCoefficient).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue():0D);
                    orderPrivateCar.setLongDistanceMoney(Objects.nonNull(orderPrivateCar.getLongDistanceMoney())?new BigDecimal(orderPrivateCar.getLongDistanceMoney()).multiply(priceCoefficient).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue():0D);
                    orderPrivateCar.setParkMoney(Objects.nonNull(orderPrivateCar.getParkMoney())?new BigDecimal(orderPrivateCar.getParkMoney()).multiply(priceCoefficient).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue():0D);
                    orderPrivateCar.setRoadTollMoney(Objects.nonNull(orderPrivateCar.getRoadTollMoney())?new BigDecimal(orderPrivateCar.getRoadTollMoney()).multiply(priceCoefficient).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue():0D);
                }
            }
        }
        Map<String, Object> map = new HashMap<>();
        map.put("orderMoney", orderPrivateCar.getOrderMoney());//订单金额
        map.put("startMileage", orderPrivateCar.getStartMileage());//起步价
@@ -711,12 +762,6 @@
        map.put("couponMoney", orderPrivateCar.getCouponMoney());//优惠券抵扣金额
        map.put("discountMoney", orderPrivateCar.getDiscountMoney());//折扣抵扣金额
        map.put("discount", orderPrivateCar.getDiscount());//折扣
        if(Objects.isNull(orderPrivateCar.getEstimatedPrice())){
            orderPrivateCar.setEstimatedPrice(0D);
        }
        if(BigDecimal.valueOf(orderPrivateCar.getOrderMoney()).subtract(new BigDecimal(orderPrivateCar.getEstimatedPrice())).abs().doubleValue() > 3){
            orderPrivateCar.setIsException(1);
        }
        map.put("estimatedPrice", orderPrivateCar.getEstimatedPrice());
        map.put("isException", orderPrivateCar.getIsException());//是否异常
        return map;
@@ -1008,6 +1053,7 @@
        OrderPrivateCar orderPrivateCar = this.selectById(orderId);
        orderPrivateCar.setPriceType(priceType);
        orderPrivateCar.setUpdatePrice(updatePrice);
        orderPrivateCar.setOrderMoney(updatePrice.doubleValue());
        orderPrivateCar.setPriceAuditState(1);
        orderPrivateCar.setState(6);
        this.updateById(orderPrivateCar);
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ReassignServiceImpl.java
@@ -190,7 +190,7 @@
                    driver.setBalance(new BigDecimal(balance).subtract(new BigDecimal(aDouble)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                    driverService.updateById(driver);
                    //添加交易明细
                    transactionDetailsService.saveDriverData(uid, "司机改派支付", aDouble, 2, 1, 2, reassign.getOrderType(), reassign.getOrderId(), driver.getBalance());
                    transactionDetailsService.saveDriverData(uid, "司机改派支付", aDouble, 2, 1, 2, reassign.getOrderType(), reassign.getOrderId(), driver.getLaveBusinessMoney());
            
            
                    //修改改派通知状态
@@ -354,7 +354,7 @@
                driverService.updateById(driver);
                for(String id : split){
                    //添加交易明细
                    transactionDetailsService.saveDriverData(uid, "司机改派支付", aDouble, 2, 1, 2, 3, Integer.valueOf(id),driver.getBalance());
                    transactionDetailsService.saveDriverData(uid, "司机改派支付", aDouble, 2, 1, 2, 3, Integer.valueOf(id),driver.getLaveBusinessMoney());
                }
                //修改改派通知状态
@@ -418,7 +418,7 @@
                PaymentRecord query = paymentRecordService.query(1, null, null, Integer.valueOf(key), 3, type, 1);
                if(null != query){
                    //添加交易明细
                    transactionDetailsService.saveDriverData(reassigns.get(0).getOriginalDriverId(), "司机改派支付", reassigns.get(0).getMoney(), 2, 1, 2, 3, Integer.valueOf(key),driver.getBalance());
                    transactionDetailsService.saveDriverData(reassigns.get(0).getOriginalDriverId(), "司机改派支付", reassigns.get(0).getMoney(), 2, 1, 2, 3, Integer.valueOf(key),driver.getLaveBusinessMoney());
                    for(Reassign reassign : reassigns){
                        reassign.setState(2);
                        reassign.setPayOrder(order_id);
@@ -462,7 +462,7 @@
            PaymentRecord query = paymentRecordService.query(1, null, null, reassign.getOrderId(), reassign.getOrderType(), type, 1);
            if(null != query){
                //添加交易明细
                transactionDetailsService.saveDriverData(reassign.getOriginalDriverId(), "司机改派支付", reassign.getMoney(), 2, 1, 2, reassign.getOrderType(), reassign.getOrderId(),driver.getBalance());
                transactionDetailsService.saveDriverData(reassign.getOriginalDriverId(), "司机改派支付", reassign.getMoney(), 2, 1, 2, reassign.getOrderType(), reassign.getOrderId(),driver.getLaveBusinessMoney());
                reassign.setState(2);
                reassign.setPayOrder(order_id);
                reassign.setPayTime(new Date());
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/ElectricFenceUtil.java
@@ -26,8 +26,8 @@
        List<Double> pointsX = new ArrayList<>();
        List<Double> pointsY = new ArrayList<>();
        for (String s : split) {
            pointsX.add(Double.valueOf(s.split(",")[1]));
            pointsY.add(Double.valueOf(s.split(",")[0]));
            pointsX.add(Double.valueOf(s.split(",")[0]));
            pointsY.add(Double.valueOf(s.split(",")[1]));
        }
        String lon1 = lonLat.split(",")[0];
        String lat1 = lonLat.split(",")[1];
ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/TIncomeController.java
@@ -140,7 +140,6 @@
                tPubTransactionDetails.setOrderType(7);
                break;
        }
        pubTransactionDetailsService.insert(tPubTransactionDetails);
        // type=1增加 type=2减少
        switch (type){
            case 1:
@@ -148,22 +147,27 @@
                BigDecimal add = tDriver.getBalance().add(bigDecimal);
                tDriver.setBalance(add);
                BigDecimal laveBusinessMoney = new BigDecimal(tDriver.getLaveBusinessMoney()).add(bigDecimal);
                tDriver.setLaveBusinessMoney(laveBusinessMoney.doubleValue());
                break;
            case 2:
                BigDecimal bigDecimal1 = new BigDecimal(mount);
                BigDecimal subtract = tDriver.getBalance().subtract(bigDecimal1);
                int comparisonResult = subtract.compareTo(BigDecimal.ZERO);
                // 小于0 设置为0 不要为负数
                if (comparisonResult<0){
//                    tDriver.setBalance(BigDecimal.ZERO);
                    return 502;
                }else{
                if (comparisonResult>0){
                    tDriver.setBalance(subtract);
                }
                BigDecimal laveBusinessMoney1 = new BigDecimal(tDriver.getLaveBusinessMoney()).subtract(bigDecimal1);
                int comparisonResult1 = laveBusinessMoney1.compareTo(BigDecimal.ZERO);
                if (comparisonResult1>0){
                    tDriver.setLaveBusinessMoney(laveBusinessMoney1.doubleValue());
                }
                break;
        }
        driverService.updateById(tDriver);
        tPubTransactionDetails.setDriverBalance(tDriver.getLaveBusinessMoney());
        pubTransactionDetailsService.insert(tPubTransactionDetails);
        return SUCCESS_TIP;
    }
    /**
ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarConfirmController.java
@@ -203,6 +203,8 @@
        orderPrivateCar.setAbnormalMoney(orderPrivateCar.getOrderMoney());
        orderPrivateCar.setOrderMoney(money);
        orderPrivateCar.setIsException(0);
        orderPrivateCar.setPriceAuditState(2);
        orderPrivateCar.setState(7);
        orderPrivateCar.updateById();
        // 推送消息
        TOrderPrivateCar finalOrderPrivateCar = orderPrivateCar;
ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/UploadUtil.java
@@ -4,7 +4,7 @@
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.core.common.exception.BizExceptionEnum;
import com.stylefeng.guns.core.exception.GunsException;
import com.stylefeng.guns.core.util.ObsUploadUtil;
//import com.stylefeng.guns.core.util.ObsUploadUtil;
import com.stylefeng.guns.modular.system.util.OssUploadUtil;
import com.stylefeng.guns.modular.system.util.qiniuyun.KodoUtil;
import org.slf4j.Logger;
ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tIncome/balance.html
@@ -21,8 +21,8 @@
                            <option value="2">车费平台手续费扣除</option>
                            <option value="3">充值</option>
                            <option value="4">提现</option>
                            <option value="5">平台充值</option>
                            <option value="6">平台扣除</option>
                            <option value="6">平台充值</option>
                            <option value="7">平台扣除</option>
                        </#SelectCon>
                    </div>
                    <div class="col-sm-3">
ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/specialAreaBilling.js
@@ -96,7 +96,7 @@
        }, function () {
            var ajax = new $ax(Feng.ctxPath + "/specialAreaBilling/delete", function (data) {
                swal("删除成功", "您已经成功删除了。", "success");
                TCar.table.refresh();
                SpecialAreaBilling.table.refresh();
            }, function (data) {
                swal("删除失败", data.responseJSON.message+"!", "warning");
            });
ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar_info.js
@@ -163,7 +163,7 @@
    ajax.start();
}
TOrderPrivateCarInfoDlg.confirmMoney= function(){
    var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCar/confirmMoney", function(data){
    var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCarConfirm/confirmMoney", function(data){
        Feng.success("修改成功!");
        window.parent.TOrderPrivateCar.table.refresh();
        TOrderPrivateCarInfoDlg.close();
UserZYTravel/guns-admin/pom.xml
@@ -203,6 +203,12 @@
            <artifactId>wechatpay-java</artifactId>
            <version>0.2.12</version>
        </dependency>
        <dependency>
            <groupId>com.alipay.sdk</groupId>
            <artifactId>alipay-sdk-java</artifactId>
            <version>4.39.186.ALL</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
UserZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java
@@ -904,7 +904,10 @@
        if(null == orderPrivateCar){
            return ResultUtil.error("取消订单失败,订单信息有误");
        }
        if(orderPrivateCar.getState() > 5 && orderPrivateCar.getState() != 11){
        if(orderPrivateCar.getPayMethod() == 0 && orderPrivateCar.getPaymentAdvanceMoney()>0 && orderPrivateCar.getState() > 5 && orderPrivateCar.getState() != 11){
            return ResultUtil.error("取消订单失败,当前状态无法取消");
        }
        if(orderPrivateCar.getPayMethod() == 1 && orderPrivateCar.getState() > 5 && orderPrivateCar.getState() != 11){
            return ResultUtil.error("取消订单失败,不合法的操作");
        }
        if(null == orderPrivateCar.getDriverId()){//没有接单的情况
@@ -1126,7 +1129,7 @@
                    driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                    driver.setBalance(new BigDecimal(null != driver.getBalance() ? driver.getBalance() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                    driverService.updateById(driver);
                    incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 3, orderPrivateCar.getId(), 1, c.doubleValue(),driver.getBalance());
                    incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 3, orderPrivateCar.getId(), 1, c.doubleValue(),driver.getLaveBusinessMoney());
                    this.deleteTask(id);//删除定时任务
@@ -1187,11 +1190,10 @@
                            for(Driver driver : list){//开始进行推送
                                // 判断该司机是否有30分钟内预约单
                                long count = orderPrivateCars.stream().filter(orderPrivateCar1 -> driver.getId().equals(orderPrivateCar1.getDriverId())
                                        && DateUtil.dateToLocalDateTime(orderPrivateCar1.getTravelTime()).minusMinutes(query.getLimitationTime()).isBefore(LocalDateTime.now())
                                        && DateUtil.dateToLocalDateTime(orderPrivateCar1.getTravelTime()).isAfter(LocalDateTime.now())).count();
                                if(orderPrivateCar.getOrderType() == 2 && orderPrivateCarDriverIds.contains(driver.getId())){
                                    continue;
                                }
                                        && DateUtil.dateToLocalDateTime(orderPrivateCar1.getTravelTime()).minusMinutes(query.getLimitationTime()).isBefore(LocalDateTime.now())).count();
//                                if(orderPrivateCar.getOrderType() == 2 && orderPrivateCarDriverIds.contains(driver.getId())){
//                                    continue;
//                                }
                                if(count > 0){
                                    continue;
                                }
@@ -1594,7 +1596,7 @@
                        driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                        driver.setBalance(new BigDecimal(null != driver.getBalance() ? driver.getBalance() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                        driverService.updateById(driver);
                        incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue(), driver.getBalance());
                        incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue(), driver.getLaveBusinessMoney());
                        orderPrivateCar.setState(8);
                    }else {
                        if(orderPrivateCar.getOrderSource() == 2){
@@ -1646,7 +1648,7 @@
                        driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                        driver.setBalance(new BigDecimal(null != driver.getBalance() ? driver.getBalance() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                        driverService.updateById(driver);
                        incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue(), driver.getBalance());
                        incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue(), driver.getLaveBusinessMoney());
                    }
@@ -1834,7 +1836,7 @@
            driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
            driver.setBalance(new BigDecimal(null != driver.getBalance() ? driver.getBalance() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
            driverService.updateById(driver);
            incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 3, orderPrivateCar.getId(), 1, c.doubleValue(), driver.getBalance());
            incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 3, orderPrivateCar.getId(), 1, c.doubleValue(), driver.getLaveBusinessMoney());
            this.deleteTask(orderPrivateCar.getId());//删除定时任务
            // TODO: 2020/5/24 这里需要给司机和用户推送订单状态
@@ -1937,7 +1939,7 @@
                        driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                        driver.setBalance(new BigDecimal(null != driver.getBalance() ? driver.getBalance() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                        driverService.updateById(driver);
                        incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue(), driver.getBalance());
                        incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue(), driver.getLaveBusinessMoney());
                    }else {
                        if(orderPrivateCar.getOrderSource() == 2){
                            orderPrivateCar.setState(2);
@@ -1975,7 +1977,7 @@
                        driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                        driver.setBalance(new BigDecimal(null != driver.getBalance() ? driver.getBalance() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
                        driverService.updateById(driver);
                        incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue(), driver.getBalance());
                        incomeService.saveDriverData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue(), driver.getLaveBusinessMoney());
                    }
                }
                // TODO: 2020/5/24 这里需要给司机和用户推送订单状态
UserZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
@@ -319,7 +319,7 @@
        updateTime as updateTime,
        updateUser as updateUser
        from t_driver
        where flag != 3 and state = 3 and authState = 2
        where flag != 3 and state in (2,3) and authState = 2
        <if test="null != companyId">
            <choose>
                <when test="companyId != 1">
UserZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java
@@ -132,7 +132,9 @@
        List<Driver> list = new ArrayList<>();
        for(Driver driver : drivers){
            int count = orderPrivateCarService.selectCount(new EntityWrapper<OrderPrivateCar>().eq("driverId", driver.getId())
                    .in("state", Arrays.asList(2, 3, 4, 5, 6, 11)).eq("isDelete", 1));
                    .in("state", Arrays.asList(2, 3, 4, 11))
                    .ne("orderType",2)
                    .eq("isDelete", 1));
            if(0 != count){
                continue;
            }