无关风月
2025-01-15 735cf1a886140531485fcc9c8b7b3dd131d5cb11
补充
3个文件已修改
75 ■■■■■ 已修改文件
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/taxi/TOrderTaxiController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/home.html 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/webapp/static/home.js 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/taxi/TOrderTaxiController.java
@@ -110,8 +110,8 @@
                .eq("userId", tOrderTaxi.get("driverId"))
                .eq("state", 2)
                .eq("type", 1)
                .eq("userType", 6)
                .eq("payState", 2)
                .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()));
ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/home.html
@@ -1,4 +1,15 @@
@layout("/common/_container.html"){
<style>
    body,
    html,
    #container {
        overflow: hidden;
        width: 100%;
        height: 100%;
        margin: 0;
        font-family: "微软雅黑";
    }
</style>
<div class="container-fluid" style="padding: 0 !important;">
    <div class="row">
        <div class="col-sm-12">
@@ -200,6 +211,11 @@
        </div>
    </div>
</div>
<script type="text/javascript" src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=t5pcBZB5G4D11G9MzHq8Kik7jqzlTrAL"></script>
<script src="${ctxPath}/static/js/track1.js"></script>
<script src="${ctxPath}/static/js/track2.js"></script>
<script src="${ctxPath}/static/js/track3.js"></script>
<script type="text/javascript" src="//mapopen-pub-jsapi.bj.bcebos.com/jsapiGlgeo/track.js"></script>
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=c59c0ec8058a8305009eb315584e07d1"></script>
<script src="https://webapi.amap.com/maps?v=1.4.15&key=c59c0ec8058a8305009eb315584e07d1&plugin=AMap.MouseTool"></script>
<script type="text/javascript" src='https://a.amap.com/jsapi_demos/static/citys.js'></script>
ManagementOKTravel/guns-admin/src/main/webapp/static/home.js
@@ -9,7 +9,8 @@
    layerIndex: -1,
    businessType:null,//存储企业信息
};
var map = new BMapGL.Map('container'); // 创建Map实例
map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
/**
 * 初始化表格的列
@@ -59,14 +60,13 @@
 * 点击添加信息
 */
Home.openNetCarInfo = function (e) {
    var id = e.getExtData()[0];
    var index = layer.open({
        type: 2,
        title: '详细数据',
        area: ['770px', '500px'], //宽高
        fix: false, //不固定
        maxmin: true,
        content: Feng.ctxPath + '/home/openNetCarInfo?id=' + id,
        content: Feng.ctxPath + '/home/openNetCarInfo?id=' + e,
    });
    this.layerIndex = index;
};
@@ -181,18 +181,19 @@
var map = new AMap.Map('container',{
    resizeEnable: true,
    zoom:10
});
var map = new BMapGL.Map('container');
var point = new BMapGL.Point(114.322492,  29.841443);
map.enableScrollWheelZoom(true);
map.centerAndZoom(point, 13);
var map_ = new AMap.Map('container_',{
    resizeEnable: true,
    mapStyle: 'amap://styles/1de318cbb8d12c02303a22c550b9ccc9',
    zoom:10
});
// var map_ = new AMap.Map('container_',{
//     resizeEnable: true,
//     mapStyle: 'amap://styles/1de318cbb8d12c02303a22c550b9ccc9',
//     zoom:10
// });
var map_ = new BMapGL.Map('container_'); // 创建Map实例
map_.centerAndZoom(new BMapGL.Point(114.322492,  29.841443), 13); // 初始化地图,设置中心点坐标和地图级别
map_.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
var mouseTool = new AMap.MouseTool(map);
//监听draw事件可获取画好的覆盖物
var overlays = [];
@@ -354,7 +355,6 @@
            companyId: companyId
        },
        success: function (res) {
            map.remove(markers);
            markers = [];
            var data = res.driver;
            var order = res.order;
@@ -364,28 +364,21 @@
                var driverId = driver.id;
                d += '<li class="list-group-item" id="' + driverId + '">' + driver.name + '-' + driver.phone + '</li>';
                if('' != data[i].lon){
                    // 创建 AMap.Icon 实例:
                    var icon = new AMap.Icon({
                        size: new AMap.Size(40, 50),    // 图标尺寸
                        image: '/static/car.png',  // Icon的图像
                        // imageOffset: new AMap.Pixel(0, -60),  // 图像相对展示区域的偏移量,适于雪碧图等
                        imageSize: new AMap.Size(40, 50),   // 根据所设置的大小拉伸或压缩图片
                    var point = new BMapGL.Point(data[i].lon, data[i].lat);
                    // 创建小车图标
                    var myIcon = new BMapGL.Icon("/static/car.png", new BMapGL.Size(52, 26));
                    // 创建Marker标注,使用小车图标
                    var marker = new BMapGL.Marker(point, {
                        icon: myIcon
                    });
                    var marker = new AMap.Marker({
                        position: new AMap.LngLat(data[i].lon, data[i].lat),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
                        offset: new AMap.Pixel(-10, -10),
                        icon: icon, // 添加 Icon 实例
                    });
                    marker.setExtData([driverId])
                    marker.on('click', function(){
                        Home.openNetCarInfo(this);
                        Home.openNetCarInfo(driverId);
                    });
                    markers.push(marker)
                    // markers.push(marker)
                    map.addOverlay(marker);
                }
            }
            $('#netcardriver').html(d);
            map.add(markers);
            //订单数据
            var zhuanche = order.zhuanche;