xuhy
2025-01-16 c0f67c46642a98476a7e8659d0f7d3310fe40e83
管理后台bug修改
10个文件已修改
144 ■■■■■ 已修改文件
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/taxi/TOrderTaxiController.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderTaxiMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TPubTransactionDetails.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDriverServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detail.html 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detailFranchisee.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_edit.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_updateFranchisee.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java
@@ -145,6 +145,11 @@
        List<Map<String, Object>> scopeList = tCompanyService.getCompanyScopeById(tCompanyId);
        model.addAttribute("scopeList",scopeList);
        //计费规则
        TSystemPrice tSystemPrice = systemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("companyId", tCompanyId)
                .eq("type", 2).last("LIMIT 1"));
        model.addAttribute("contentExclusive",JSONObject.parseObject(tSystemPrice.getContent()));
        return PREFIX + "tCompany_detail.html";
    }
@@ -168,6 +173,10 @@
        //经营区域
        List<Map<String, Object>> scopeList = tCompanyService.getCompanyScopeById(tCompanyId);
        model.addAttribute("scopeList",scopeList);
        //计费规则
        TSystemPrice tSystemPrice = systemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("companyId", tCompanyId)
                .eq("type", 2).last("LIMIT 1"));
        model.addAttribute("contentExclusive",JSONObject.parseObject(tSystemPrice.getContent()));
        return PREFIX + "tCompany_edit.html";
    }
@@ -192,6 +201,10 @@
        //系统用户对象
        User user = userService.selectOne(new EntityWrapper<User>().eq("roleType", 3).eq("objectId", tCompanyId));
        model.addAttribute("user",user);
        //计费规则
        TSystemPrice tSystemPrice = systemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("companyId", tCompanyId)
                .eq("type", 2).last("LIMIT 1"));
        model.addAttribute("contentExclusive",JSONObject.parseObject(tSystemPrice.getContent()));
        return PREFIX + "tCompany_detailFranchisee.html";
    }
@@ -219,6 +232,11 @@
        User user = userService.selectOne(new EntityWrapper<User>().eq("roleType", 3).eq("objectId", tCompanyId));
        model.addAttribute("user",user);
        //计费规则
        TSystemPrice tSystemPrice = systemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("companyId", tCompanyId)
                .eq("type", 2).last("LIMIT 1"));
        model.addAttribute("contentExclusive",JSONObject.parseObject(tSystemPrice.getContent()));
        return PREFIX + "tCompany_updateFranchisee.html";
    }
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java
@@ -586,13 +586,13 @@
        // 查询司机订单
        List<TOrderTaxi> orderTaxiList = orderTaxiService.selectList(new EntityWrapper<TOrderTaxi>()
                .in("driverId", driverIds));
        // 查询司机所有的扣款
        List<TPubTransactionDetails> tPubTransactionDetails = pubTransactionDetailsService.selectList(new EntityWrapper<TPubTransactionDetails>()
        // 查询司机所有的收入
        List<TPubTransactionDetails> tPubTransactionDetailsIncome = pubTransactionDetailsService.selectList(new EntityWrapper<TPubTransactionDetails>()
                .in("userId", driverIds)
                .eq("userType", 2)
                .eq("type", 1)
                .eq("state", 2)
                .eq("orderType", 6));
                .eq("state",1)
                .eq("orderType", 2));
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        for (Map<String, Object> stringObjectMap : driverList) {
            // 司机id
@@ -625,19 +625,15 @@
                long sumReceivingOrders = orderTaxiList.stream().filter(orderTaxi -> orderTaxi.getDriverId().equals(id)).count();
                stringObjectMap.put("sumReceivingOrders", sumReceivingOrders);
                // 今日统计收入
                Optional<BigDecimal> dayReduce = orderTaxiList.stream().filter(orderTaxi -> orderTaxi.getDriverId().equals(id)
                        && format.format(orderTaxi.getTravelTime()).equals(format.format(new Date()))
                        && orderTaxi.getState() == 6).map(TOrderTaxi::getPayMoney).reduce(BigDecimal::add);
                Optional<BigDecimal> dayReduceOut = tPubTransactionDetails.stream().filter(pubTransactionDetails -> pubTransactionDetails.getUserId().equals(id)
                Optional<BigDecimal> dayReduceIncome = tPubTransactionDetailsIncome.stream().filter(pubTransactionDetails -> pubTransactionDetails.getUserId().equals(id)
                                && format.format(pubTransactionDetails.getInsertTime()).equals(format.format(new Date())))
                        .map(TPubTransactionDetails::getMoney).reduce(BigDecimal::add);
                dayReduce.ifPresent(bigDecimal -> stringObjectMap.put("dayIncome", bigDecimal.subtract(dayReduceOut.get())));
                dayReduceIncome.ifPresent(bigDecimal -> stringObjectMap.put("dayIncome", bigDecimal));
                // 过滤所有统计
                Optional<BigDecimal> sumReduce = orderTaxiList.stream().filter(orderTaxi -> orderTaxi.getDriverId().equals(id)
                        && orderTaxi.getState() == 6).map(TOrderTaxi::getPayMoney).reduce(BigDecimal::add);
                Optional<BigDecimal> sumReduceOut = tPubTransactionDetails.stream().filter(pubTransactionDetails -> pubTransactionDetails.getUserId().equals(id))
                Optional<BigDecimal> sumReduceIncome = tPubTransactionDetailsIncome.stream().filter(pubTransactionDetails -> pubTransactionDetails.getUserId().equals(id))
                        .map(TPubTransactionDetails::getMoney).reduce(BigDecimal::add);
                sumReduce.ifPresent(bigDecimal -> stringObjectMap.put("sumIncome", bigDecimal.subtract(sumReduceOut.get())));
                sumReduceIncome.ifPresent(bigDecimal -> stringObjectMap.put("sumIncome", bigDecimal));
            }
        }
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/taxi/TOrderTaxiController.java
@@ -14,6 +14,7 @@
import com.stylefeng.guns.modular.system.util.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.ui.Model;
import org.springframework.beans.factory.annotation.Autowired;
@@ -106,15 +107,28 @@
        Map<String, Object> tOrderTaxi = tOrderTaxiService.getTaxiOrderDetailById(tOrderTaxiId);
        model.addAttribute("item",tOrderTaxi);
        // 查询司机扣款
        TPubTransactionDetails tPubTransactionDetails = pubTransactionDetailsService.selectOne(new EntityWrapper<TPubTransactionDetails>()
        List<TPubTransactionDetails> tPubTransactionDetails = pubTransactionDetailsService.selectList(new EntityWrapper<TPubTransactionDetails>()
                .eq("userId", tOrderTaxi.get("driverId"))
                .eq("state", 2)
                .eq("orderId", tOrderTaxi.get("id"))
                .eq("type", 1)
                .eq("userType", 2)
                .eq("orderType", 6)
                .last("LIMIT 1"));
        model.addAttribute("companyMoney",tPubTransactionDetails.getMoney());
        model.addAttribute("driverMoney",new BigDecimal(tOrderTaxi.get("payMoney").toString()).subtract(tPubTransactionDetails.getMoney()));
                .eq("userType", 2));
        if(CollectionUtils.isEmpty(tPubTransactionDetails)){
            model.addAttribute("companyMoney","");
            model.addAttribute("driverMoney","");
        }else {
            TPubTransactionDetails pubTransactionDetailCompany = tPubTransactionDetails.stream().filter(e -> e.getOrderType().equals(6)).findFirst().orElse(null);
            if(Objects.nonNull(pubTransactionDetailCompany)){
                model.addAttribute("companyMoney",pubTransactionDetailCompany.getMoney());
            }else {
                model.addAttribute("companyMoney","");
            }
            TPubTransactionDetails pubTransactionDetailDriver = tPubTransactionDetails.stream().filter(e -> e.getOrderType().equals(2)).findFirst().orElse(null);
            if(Objects.nonNull(pubTransactionDetailCompany)){
                model.addAttribute("driverMoney",pubTransactionDetailDriver.getMoney());
            }else {
                model.addAttribute("driverMoney","");
            }
        }
        if(tOrderTaxi.get("payManner").equals("1")){
            model.addAttribute("payMannerStr","线上收款");
        }else {
@@ -390,6 +404,7 @@
            tOrderTaxi.setSubstitute(0);
            tOrderTaxi.setOrderSource(5);
            tOrderTaxi.setIsDelete(1);
            tOrderTaxi.setPayManner(3);
            tOrderTaxiService.insert(tOrderTaxi);
            if(tOrderTaxi.getState() == 1){
                //推送司机抢单
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderTaxiMapper.xml
@@ -250,9 +250,9 @@
    <!--查询所有总收益-->
    <select id="getAllIncomeMoney" resultType="java.lang.Double">
        SELECT IFNULL(SUM(money),0) as value FROM t_income where userType = 1
        SELECT IFNULL(SUM(money),0) as value FROM t_pub_transaction_details where userType = 2 and orderType = 6
        <if test="companyId != null and companyId != ''">
            and objectId = #{companyId}
            and companyId = #{companyId}
        </if>
        <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'))
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TPubTransactionDetails.java
@@ -62,7 +62,18 @@
     * 订单id
     */
    private Integer orderId;
    /**
     * 公司id
     */
    private Integer companyId;
    public Integer getCompanyId() {
        return companyId;
    }
    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }
    public Integer getId() {
        return id;
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDriverServiceImpl.java
@@ -83,13 +83,13 @@
//                Map<String, String> distance1 = gdMapElectricFenceUtil.getDistance(lon + "," + lat, value, 0);//计算距离
                Map<String, Double> distance1 = geodesyUtil.getDistance(lon + "," + lat, value);
                double d = Double.valueOf(distance1.get("WGS84")).doubleValue();
                System.out.println("d="+d+",distance="+distance);
                System.err.println("d="+d+",distance="+distance);
                if(d < (distance * 1000)){
                    list.add(driver);
                }
            }
        }
        System.out.println(list.size());
        System.err.println("满足条件司机=="+list);
        return list;
    }
}
ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detail.html
@@ -135,7 +135,7 @@
                            <label class="col-sm-2 control-label">起步价设置:</label>
                            <div class="col-sm-10">
                                起步价为&nbsp;<input type="text" onblur="checkIsYuan(this)" name="num1" id="num1" value="${contentExclusive.num1}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元,
                                起步包含&nbsp;<input type="text" onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num2" id="num2" value="${contentExclusive.num2}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;公里,
                                起步包含&nbsp;<input type="text" onblur="checkIsGongLi(this, 'content')" name="num2" id="num2" value="${contentExclusive.num2}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;公里,
                                &nbsp;<input type="text" onblur="checkIsMinute(this)" name="num3" id="num3" value="${contentExclusive.num3}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;分钟
                                <br/>
                            </div>
@@ -160,8 +160,8 @@
                        <div class="form-group waitFee">
                            <label class="col-sm-2 control-label">等待费设置:</label>
                            <div class="col-sm-10">
                                司机到达预约地点&nbsp;<input type="text" onblur="checkIsMinute(this)" name="num29" id="num29" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;分钟过后开始收取等待费,
                                为&nbsp;<input type="text" onblur="checkIsYuan(this)" name="num30" id="num30" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元/分,不足一分钟按照一分钟计算
                                司机到达预约地点&nbsp;<input type="text" onblur="checkIsMinute(this)" name="num29" id="num29" value="${contentExclusive.num29}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;分钟过后开始收取等待费,
                                为&nbsp;<input type="text" onblur="checkIsYuan(this)" name="num30" id="num30" value="${contentExclusive.num30}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元/分,不足一分钟按照一分钟计算
                                <br/>
                            </div>
                        </div>
@@ -169,17 +169,17 @@
                        <div class="form-group">
                            <label class="col-sm-2 control-label">远途费设置:</label>
                            <div class="col-sm-10">
                                总里程超过&nbsp;<input type="text" onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num6" id="num6" value="${contentExclusive.num6}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;公里
                                不足&nbsp;<input type="text" onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num7" id="num7" value="${contentExclusive.num7}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;公里,
                                超出部分每公里加收&nbsp;<input type="text" onblur="checkIsYuan(this, 'exclusivePriceSettings')" name="num8" id="num8" value="${contentExclusive.num8}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元
                                总里程超过&nbsp;<input type="text" onblur="checkIsGongLi(this, 'content')" name="num6" id="num6" value="${contentExclusive.num6}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;公里
                                不足&nbsp;<input type="text" onblur="checkIsGongLi(this, 'content')" name="num7" id="num7" value="${contentExclusive.num7}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;公里,
                                超出部分每公里加收&nbsp;<input type="text" onblur="checkIsYuan(this, 'content')" name="num8" id="num8" value="${contentExclusive.num8}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元
                                <br>
                                <br>
                                超过&nbsp;<input type="text" disabled onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num9" id="num9" value="${contentExclusive.num9}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;公里
                                不足&nbsp;<input type="text" onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num10" id="num10" value="${contentExclusive.num10}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;公里时,
                                超过&nbsp;<input type="text" disabled onblur="checkIsGongLi(this, 'content')" name="num9" id="num9" value="${contentExclusive.num9}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;公里
                                不足&nbsp;<input type="text" onblur="checkIsGongLi(this, 'content')" name="num10" id="num10" value="${contentExclusive.num10}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;公里时,
                                超出部分每公里加收&nbsp;<input type="text" onblur="checkIsYuan(this)" name="num11" id="num11" value="${contentExclusive.num11}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元
                                <br/>
                                <br>
                                超过&nbsp;<input type="text" disabled onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num12" id="num12" value="${contentExclusive.num12}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;公里以后,
                                超过&nbsp;<input type="text" disabled onblur="checkIsGongLi(this, 'content')" name="num12" id="num12" value="${contentExclusive.num12}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;公里以后,
                                超出部分每公里加收&nbsp;<input type="text" onblur="checkIsYuan(this)" name="num13" id="num13" value="${contentExclusive.num13}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元
                                <br/>
                            </div>
@@ -277,19 +277,19 @@
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">是否需要摆渡车:</label>
                        <div class="col-sm-9"  style="display: flex;align-items: center;">
                            <div class="radio radio-info radio-inline">
                                <input type="radio" id="isNeedFerry1" value="1" disabled name="isNeedFerry" ${1 == item.isNeedFerry ? 'checked=checked' : ''} >
                                <label for="isNeedFerry1"> 是 </label>
                            </div>
                            <div class="radio radio-success radio-inline">
                                <input type="radio" id="isNeedFerry2" value="2" disabled name="isNeedFerry" ${2 == item.isNeedFerry ? 'checked=checked' : ''}>
                                <label for="isNeedFerry2"> 否 </label>
                            </div>
                        </div>
                    </div>
<!--                    <div class="form-group">-->
<!--                        <label class="col-sm-2 control-label">是否需要摆渡车:</label>-->
<!--                        <div class="col-sm-9"  style="display: flex;align-items: center;">-->
<!--                            <div class="radio radio-info radio-inline">-->
<!--                                <input type="radio" id="isNeedFerry1" value="1" disabled name="isNeedFerry" ${1 == item.isNeedFerry ? 'checked=checked' : ''} >-->
<!--                                <label for="isNeedFerry1"> 是 </label>-->
<!--                            </div>-->
<!--                            <div class="radio radio-success radio-inline">-->
<!--                                <input type="radio" id="isNeedFerry2" value="2" disabled name="isNeedFerry" ${2 == item.isNeedFerry ? 'checked=checked' : ''}>-->
<!--                                <label for="isNeedFerry2"> 否 </label>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </div>-->
                </div>
            </div>
ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detailFranchisee.html
@@ -62,8 +62,8 @@
                    <div class="form-group waitFee">
                        <label class="col-sm-2 control-label">等待费设置:</label>
                        <div class="col-sm-10">
                            司机到达预约地点&nbsp;<input type="text" onblur="checkIsMinute(this)" name="num29" id="num29" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;分钟过后开始收取等待费,
                            为&nbsp;<input type="text" onblur="checkIsYuan(this)" name="num30" id="num30" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元/分,不足一分钟按照一分钟计算
                            司机到达预约地点&nbsp;<input type="text" onblur="checkIsMinute(this)" name="num29" id="num29" value="${contentExclusive.num29}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;分钟过后开始收取等待费,
                            为&nbsp;<input type="text" onblur="checkIsYuan(this)" name="num30" id="num30" value="${contentExclusive.num30}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元/分,不足一分钟按照一分钟计算
                            <br/>
                        </div>
                    </div>
ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_edit.html
@@ -145,8 +145,8 @@
                        <div class="form-group waitFee">
                            <label class="col-sm-2 control-label">等待费设置:</label>
                            <div class="col-sm-10">
                                司机到达预约地点&nbsp;<input type="text" onblur="checkIsMinute(this)" name="num29" id="num29" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;分钟过后开始收取等待费,
                                为&nbsp;<input type="text" onblur="checkIsYuan(this)" name="num30" id="num30" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元/分,不足一分钟按照一分钟计算
                                司机到达预约地点&nbsp;<input type="text" onblur="checkIsMinute(this)" name="num29" id="num29" value="${contentExclusive.num29}" class="form-control newWidth"  placeholder="最多3位数"/>&nbsp;分钟过后开始收取等待费,
                                为&nbsp;<input type="text" onblur="checkIsYuan(this)" name="num30" id="num30" value="${contentExclusive.num30}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元/分,不足一分钟按照一分钟计算
                                <br/>
                            </div>
                        </div>
ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_updateFranchisee.html
@@ -70,8 +70,8 @@
                        <div class="form-group waitFee">
                            <label class="col-sm-2 control-label">等待费设置:</label>
                            <div class="col-sm-10">
                                司机到达预约地点&nbsp;<input type="text" onblur="checkIsMinute(this)" name="num29" id="num29" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;分钟过后开始收取等待费,
                                为&nbsp;<input type="text" onblur="checkIsYuan(this)" name="num30" id="num30" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元/分,不足一分钟按照一分钟计算
                                司机到达预约地点&nbsp;<input type="text" onblur="checkIsMinute(this)" name="num29" id="num29" value="${contentExclusive.num29}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;分钟过后开始收取等待费,
                                为&nbsp;<input type="text" onblur="checkIsYuan(this)" name="num30" id="num30" value="${contentExclusive.num30}" class="form-control newWidth" placeholder="最多3位数"/>&nbsp;元/分,不足一分钟按照一分钟计算
                                <br/>
                            </div>
                        </div>