From 41bde40651227c35433eeb6a7910c06794dc9659 Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期三, 28 二月 2024 16:03:00 +0800
Subject: [PATCH] 三一车辆类型查询加入报错打印提交
---
ard-work/src/main/resources/mapper/app/ArdAppPositionMapper.xml | 33 +++++++++++++++++++++++++++++++--
1 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/ard-work/src/main/resources/mapper/app/ArdAppPositionMapper.xml b/ard-work/src/main/resources/mapper/app/ArdAppPositionMapper.xml
index 2905557..0517147 100644
--- a/ard-work/src/main/resources/mapper/app/ArdAppPositionMapper.xml
+++ b/ard-work/src/main/resources/mapper/app/ArdAppPositionMapper.xml
@@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.app.mapper.ArdAppPositionMapper">
+<mapper namespace="com.ruoyi.app.position.mapper.ArdAppPositionMapper">
<resultMap type="ArdAppPosition" id="ArdAppPositionResult">
<result property="id" column="id"/>
<result property="userId" column="user_id"/>
@@ -29,7 +29,12 @@
<include refid="selectArdAppPositionVo"/>
where id = #{id}
</select>
-
+ <select id="selectLastArdAppPositionByUserId" parameterType="String" resultMap="ArdAppPositionResult">
+ <include refid="selectArdAppPositionVo"/>
+ where user_id = #{userId}
+ order by create_time desc
+ limit 1
+ </select>
<insert id="insertArdAppPosition" parameterType="ArdAppPosition">
insert into ard_app_position
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -80,4 +85,28 @@
#{id}
</foreach>
</delete>
+
+ <select id="getOnlineCommanderPosition" parameterType="java.lang.String" resultType="java.util.Map">
+ select su.user_name as "userName",su.nick_name as "nickName",
+ aap.user_id as "userId",aap.longitude,aap.latitude,aap.altitude,
+ aap.speed,aap.bearing,aap.create_time as "createTime"
+ from ard_app_application aaa
+ inner join sys_user su on aaa.commander_id = su.user_id
+ inner join ard_app_position aap on su.user_id = aap.user_id
+ where aaa.soilder_id = #{soilderId} and aaa.application_type = 'Commander'
+ 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>
+
+ <select id="getLastAPPPositionByUserId" parameterType="java.lang.String" resultMap="ArdAppPositionResult">
+ select * from ard_app_position aap
+ where aap.user_id = #{userId}
+ order by aap.create_time desc limit 1 offset 0
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3