From 44f2a0a32c096bdb05d4cc0ac162cdc1eb14c3ed Mon Sep 17 00:00:00 2001
From: Administrator <1144154118@qq.com>
Date: 星期四, 10 八月 2023 13:14:29 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java | 51 ++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java b/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java
index a0aeb28..3ecae28 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java
@@ -3,13 +3,13 @@
import java.util.*;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.sy.domain.ArdSyUser;
+import com.ruoyi.sy.gps31.PositionContainer;
import com.ruoyi.sy.gps31.PushClientImplAlarm;
import com.ruoyi.sy.gps31.PushClientImplPosition;
import com.ruoyi.sy.service.IArdSyUserService;
@@ -33,8 +33,6 @@
import com.ruoyi.sy.service.IArdSyCarService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
-import org.springframework.web.context.request.RequestContextHolder;
-import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.multipart.MultipartFile;
/**
@@ -340,4 +338,51 @@
}
return Results.succeed(map);
}
+
+ @PreAuthorize("@ss.hasPermi('sy:syCar:getSDKCarPositionByRight')")
+ @PostMapping("getSDKCarPositionByRight")
+ @ApiOperation("鑾峰彇閮ㄩ棬鏉冮檺涓嬫墍鏈夎溅杈嗕綅缃�")
+ public Results getSDKCarPositionByRight(){
+ String usersId = SecurityUtils.getUserId();
+ //鏍规嵁userId鏌ヨ閮ㄩ棬Id
+ SysUser sysUser = sysUserService.selectUserById(usersId);
+ Map<String, Map<String,Map<String,Object>>> deptPositionMap = PositionContainer.getDeptPositionMap();
+ if(deptPositionMap.isEmpty()){
+ return Results.succeed();
+ }else {
+// return Results.succeed(deptPositionMap.get(sysUser.getDeptId().toString()).get(map.get("carId")));
+ return Results.succeed(deptPositionMap.get(sysUser.getDeptId().toString()));
+ }
+ }
+
+ @PreAuthorize("@ss.hasPermi('sy:syCar:getCarNearPositionByCarId')")
+ @PostMapping("getCarNearPositionByCarId")
+ @ApiOperation("鑾峰彇鍗曚釜杞﹁締浣嶇疆")
+ public Results getCarNearPositionByCarId(@RequestBody Map<String,String> map){
+ String usersId = SecurityUtils.getUserId();
+ ArdSyUser ardSyUser = iArdSyUserService.userById(usersId);
+ String carId = map.get("carId");
+ String syURL = sysConfigService.getSYURL();
+ return ardSyCarService.getCarGPSBycarId(usersId,carId,syURL,ardSyUser);
+ }
+
+ @PreAuthorize("@ss.hasPermi('sy:syCar:chaseCarByCarId')")
+ @PostMapping("chaseCarByCarId")
+ @ApiOperation("鏍规嵁杞﹁締涓婚敭杩借釜杞﹁締")
+ public Results chaseCarByCarId(@RequestBody Map<String,String> map){
+ String usersId = SecurityUtils.getUserId();
+ String carId = map.get("carId");
+ String cycle = map.get("cycle");
+ return ardSyCarService.chaseCarByCarId(usersId,carId,cycle);
+ }
+
+ @PreAuthorize("@ss.hasPermi('sy:syCar:getExistTraceByCarIdAndMonth')")
+ @PostMapping("getExistTraceByCarIdAndMonth")
+ @ApiOperation("鏍规嵁杞﹁締涓婚敭鍙婃湀浠芥煡璇㈣建杩瑰瓨鍦�")
+ public Results getExistTraceByCarIdAndMonth(@RequestBody Map<String,String> map){
+ String userId = SecurityUtils.getUserId();
+ String carId = map.get("carId");
+ String time = map.get("time");
+ return ardSyCarService.getExistTraceByCarIdAndMonth(userId,carId,time);
+ }
}
--
Gitblit v1.9.3