From 588fd7b47b6caf30562e1267a27f5898a5c2671f Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 27 四月 2026 17:34:41 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/YueKeDuo

---
 DriverYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/controller/LineSiteController.java |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 41 insertions(+), 1 deletions(-)

diff --git a/DriverYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/controller/LineSiteController.java b/DriverYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/controller/LineSiteController.java
index 0d6eaff..53bb081 100644
--- a/DriverYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/controller/LineSiteController.java
+++ b/DriverYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/controller/LineSiteController.java
@@ -1,6 +1,5 @@
 package com.stylefeng.guns.modular.crossCity.controller;
 
-
 import com.stylefeng.guns.modular.crossCity.server.ILineSiteService;
 import com.stylefeng.guns.modular.crossCity.warpper.LineSiteWarpper;
 import com.stylefeng.guns.modular.crossCity.warpper.LocationWarpper;
@@ -132,6 +131,24 @@
         }
     }
 
+    @ResponseBody
+    @RequestMapping(value = "/api/selfLine/queryLocation", method = RequestMethod.POST)
+    @ApiOperation(value = "自主行程获取上下车点区域范围", tags = {"司机端-首页"}, notes = "")
+    @ApiImplicitParams({
+            @ApiImplicitParam(value = "司机排班记录id", name = "lineShiftDriverId", required = true, dataType = "int"),
+            @ApiImplicitParam(value = "类型(1=上车点,2=下车点)", name = "type", required = true, dataType = "int"),
+            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
+    })
+    public ResultUtil<List<LocationWarpper>> querySelfLocation(Integer lineShiftDriverId, Integer type, HttpServletRequest request) {
+        try {
+            Integer driverId = driverService.getUserIdFormRedis(request);
+            return lineSiteService.querySelfLocation(driverId, lineShiftDriverId, type);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return ResultUtil.runErr();
+        }
+    }
+
 
     /**
      * 判断一个点是是否在区域范围内
@@ -159,4 +176,27 @@
         }
     }
 
+    @ResponseBody
+    @RequestMapping(value = "/api/selfLine/areaMonitoring", method = RequestMethod.POST)
+    @ApiOperation(value = "判断自主行程点位是否在电子围栏内", tags = {"司机端-首页"}, notes = "")
+    @ApiImplicitParams({
+            @ApiImplicitParam(value = "司机排班记录id", name = "lineShiftDriverId", required = true, dataType = "int"),
+            @ApiImplicitParam(value = "类型(1=上车点,2=下车点)", name = "type", required = true, dataType = "int"),
+            @ApiImplicitParam(value = "经纬度(lon,lat)", name = "lonLat", required = true, dataType = "string"),
+            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
+    })
+    public ResultUtil selfAreaMonitoring(Integer lineShiftDriverId, Integer type, String lonLat, HttpServletRequest request) {
+        try {
+            Integer driverId = driverService.getUserIdFormRedis(request);
+            if (driverId == null) {
+                return ResultUtil.tokenErr();
+            }
+            boolean b = lineSiteService.selfAreaMonitoring(driverId, lineShiftDriverId, type, lonLat);
+            return ResultUtil.success(b ? 1 : -1);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return ResultUtil.runErr();
+        }
+    }
+
 }

--
Gitblit v1.7.1