From 97f4a9b9621eca21da79df727121f5fac12cc42a Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期一, 22 一月 2024 10:01:41 +0800
Subject: [PATCH] app单兵端发起查看指挥端位置及车辆位置提交
---
ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java | 24 ++++++++++++++++++++++++
ard-work/src/main/java/com/ruoyi/app/position/service/IArdAppPositionService.java | 4 ++++
ard-work/src/main/java/com/ruoyi/app/position/service/impl/ArdAppPositionServiceImpl.java | 31 +++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+), 0 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java b/ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java
index 292e891..bb57243 100644
--- a/ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java
+++ b/ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java
@@ -225,4 +225,28 @@
Map<String,List<SysUser>> result = ardAppPositionService.getOnlinePCOrCommander(usersId);
return AjaxResult.success(result);
}
+
+ @PostMapping("/sendCheckCommandersPosition")
+ @ApiOperation("鍙戣捣鏌ョ湅鎸囨尌绔綅缃�")
+ public AjaxResult sendCheckCommandersPosition(@RequestBody Map<String,Object> para) {
+ String usersId = SecurityUtils.getUserId();
+ try{
+ ardAppPositionService.sendCheckCommandersPosition(usersId,para);
+ return AjaxResult.success();
+ }catch(Exception e){
+ return AjaxResult.error();
+ }
+ }
+
+ @PostMapping("/sendCheckSYCarsPosition")
+ @ApiOperation("鍙戣捣鏌ョ湅杞﹁締浣嶇疆")
+ public AjaxResult sendCheckSYCarsPosition(@RequestBody Map<String,Object> para) {
+ String usersId = SecurityUtils.getUserId();
+ try{
+ ardAppPositionService.sendCheckSYCarsPosition(usersId,para);
+ return AjaxResult.success();
+ }catch(Exception e){
+ return AjaxResult.error();
+ }
+ }
}
diff --git a/ard-work/src/main/java/com/ruoyi/app/position/service/IArdAppPositionService.java b/ard-work/src/main/java/com/ruoyi/app/position/service/IArdAppPositionService.java
index e96b753..4b1e97f 100644
--- a/ard-work/src/main/java/com/ruoyi/app/position/service/IArdAppPositionService.java
+++ b/ard-work/src/main/java/com/ruoyi/app/position/service/IArdAppPositionService.java
@@ -85,4 +85,8 @@
public List<SysUser>getNearAppUsersWithPolygon(SchedulingParam param);
public Map<String,List<SysUser>> getOnlinePCOrCommander(String usersId);
+
+ public void sendCheckCommandersPosition(String usersId,Map<String,Object> para);
+
+ public void sendCheckSYCarsPosition(String usersId,Map<String,Object> para);
}
diff --git a/ard-work/src/main/java/com/ruoyi/app/position/service/impl/ArdAppPositionServiceImpl.java b/ard-work/src/main/java/com/ruoyi/app/position/service/impl/ArdAppPositionServiceImpl.java
index 95c1a94..6fd2713 100644
--- a/ard-work/src/main/java/com/ruoyi/app/position/service/impl/ArdAppPositionServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/app/position/service/impl/ArdAppPositionServiceImpl.java
@@ -1,5 +1,6 @@
package com.ruoyi.app.position.service.impl;
+import com.alibaba.fastjson2.JSON;
import com.ruoyi.alarm.wall.domain.ArdAlarmWall;
import com.ruoyi.alarm.wall.mapper.ArdAlarmWallMapper;
import com.ruoyi.alarm.wall.service.IArdAlarmWallService;
@@ -345,4 +346,34 @@
}
return result;
}
+
+ @Override
+ public void sendCheckCommandersPosition(String usersId,Map<String, Object> para) {
+ String reason = (String) para.get("reason");
+ List<String> usersIdList = (List<String>) para.get("usersIdList");
+ for(String commanderId : usersIdList){
+ //璁剧疆key涓篶heckCommanderPosition_鎸囨尌绔富閿甠鍗曞叺绔富閿�
+ String key = "checkCommanderPosition_" + commanderId + "_" + usersId;
+ Map<String,Object> value = new HashMap();
+ value.put("reason",reason);
+ value.put("state","0");
+ value.put("begin","");
+ redisCache.setCacheObject(key, JSON.toJSONString(value));
+ }
+ }
+
+ @Override
+ public void sendCheckSYCarsPosition(String usersId, Map<String, Object> para) {
+ String reason = (String) para.get("reason");
+ List<String> usersIdList = (List<String>) para.get("usersIdList");
+ for(String commanderId : usersIdList){
+ //璁剧疆key涓篶heckCommanderPosition_鎸囨尌绔富閿�/PC绔富閿甠鍗曞叺绔富閿�
+ String key = "checkSYCarsPosition_" + commanderId + "_" + usersId;
+ Map<String,Object> value = new HashMap();
+ value.put("reason",reason);
+ value.put("state","0");
+ value.put("begin","");
+ redisCache.setCacheObject(key, JSON.toJSONString(value));
+ }
+ }
}
--
Gitblit v1.9.3