From 0cc3db009a4388b83953f3ce439413122424abb8 Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期一, 19 二月 2024 14:37:51 +0800
Subject: [PATCH] app历史轨迹查询提交
---
ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java | 12 ++++++++++++
ard-work/src/main/java/com/ruoyi/app/position/service/IArdAppPositionService.java | 2 ++
ard-work/src/main/java/com/ruoyi/app/position/service/impl/ArdAppPositionServiceImpl.java | 9 +++++++++
ard-work/src/main/java/com/ruoyi/app/position/mapper/ArdAppPositionMapper.java | 3 +++
ard-work/src/main/resources/mapper/app/ArdAppPositionMapper.xml | 6 ++++++
5 files changed, 32 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 7565542..2a89eef 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
@@ -239,6 +239,18 @@
}
}
+ @GetMapping("/getAPPPositionByUserIdAndTime")
+ @ApiOperation("鏌ョ湅APP鍘嗗彶浣嶇疆")
+ public AjaxResult getAPPPositionByUserIdAndTime(@RequestBody Map<String,String> para) {
+ try{
+ List<ArdAppPosition> result = ardAppPositionService.getAPPPositionByUserIdAndTime(para);
+ return AjaxResult.success(result);
+ }catch(Exception e){
+ e.printStackTrace();
+ return AjaxResult.error();
+ }
+ }
+
/*@PostMapping("/sendCheckCommandersPosition")
@ApiOperation("鍙戣捣鏌ョ湅鎸囨尌绔綅缃�")
public AjaxResult sendCheckCommandersPosition(@RequestBody Map<String,Object> para) {
diff --git a/ard-work/src/main/java/com/ruoyi/app/position/mapper/ArdAppPositionMapper.java b/ard-work/src/main/java/com/ruoyi/app/position/mapper/ArdAppPositionMapper.java
index 83c5a45..4b4ad05 100644
--- a/ard-work/src/main/java/com/ruoyi/app/position/mapper/ArdAppPositionMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/app/position/mapper/ArdAppPositionMapper.java
@@ -4,6 +4,7 @@
import java.util.Map;
import com.ruoyi.app.position.domain.ArdAppPosition;
+import org.apache.ibatis.annotations.Param;
/**
@@ -70,4 +71,6 @@
public int deleteArdAppPositionByIds(String[] ids);
public List<Map<String,Object>> getOnlineCommanderPosition(String soilderId);
+
+ public List<ArdAppPosition> getAPPPositionByUserIdAndTime(@Param("userId") String userId,@Param("beginTime") String beginTime,@Param("endTime") String endTime);
}
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 64e1606..b08b7f9 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
@@ -88,6 +88,8 @@
public List<Map<String,Object>> getOnlineCommanderPosition(String soilderId);
+ public List<ArdAppPosition> getAPPPositionByUserIdAndTime(Map<String,String> para);
+
//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 b6105ec..2909fdf 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
@@ -478,6 +478,15 @@
return result;
}
+ @Override
+ public List<ArdAppPosition> getAPPPositionByUserIdAndTime(Map<String, String> para) {
+ String userId = para.get("userId");
+ String beginTime = para.get("beginTime");
+ String endTime = para.get("endTime");
+ List<ArdAppPosition> result = ardAppPositionMapper.getAPPPositionByUserIdAndTime(userId,beginTime,endTime);
+ return result;
+ }
+
/*@Override
public void sendCheckCommandersPosition(String usersId,Map<String, Object> para) {
String reason = (String) para.get("reason");
diff --git a/ard-work/src/main/resources/mapper/app/ArdAppPositionMapper.xml b/ard-work/src/main/resources/mapper/app/ArdAppPositionMapper.xml
index f9c55f4..6c7916d 100644
--- a/ard-work/src/main/resources/mapper/app/ArdAppPositionMapper.xml
+++ b/ard-work/src/main/resources/mapper/app/ArdAppPositionMapper.xml
@@ -97,4 +97,10 @@
and aaa.state = '1' and su.app_online_state = '1'
order by aap.create_time desc limit 1 offset 0
</select>
+
+ <select id="getAPPPositionByUserIdAndTime" parameterType="java.lang.String" resultMap="ArdAppPositionResult">
+ select * from ard_app_position aap
+ where aap.user_id = #{userId} and aap.create_time >= #{beginTime}
+ and aap.create_time <= #{endTime} order by aap.create_time asc
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3