From 887fe5cfaa835a8da3f6d7a6f48feeb8e52be88b Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 22 Jul 2021 22:47:00 +0800
Subject: [PATCH] 实时定位接口修改
---
src/main/java/org/springblade/modules/location/mapper/LiveLocationMapper.xml | 144 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 143 insertions(+), 1 deletions(-)
diff --git a/src/main/java/org/springblade/modules/location/mapper/LiveLocationMapper.xml b/src/main/java/org/springblade/modules/location/mapper/LiveLocationMapper.xml
index 62c144e..c7e9b90 100644
--- a/src/main/java/org/springblade/modules/location/mapper/LiveLocationMapper.xml
+++ b/src/main/java/org/springblade/modules/location/mapper/LiveLocationMapper.xml
@@ -76,6 +76,148 @@
and sl.record_time <= #{liveLocation.endTime}
</if>
order by sl.record_time desc
-
</select>
+
+
+ <!--保安人员的实时位置信息-->
+ <select id="getSecurityLocusInfoList" resultType="org.springblade.modules.location.vo.LiveLocationVo">
+ SELECT
+ sll.*,
+ bu.real_name name,bu.phone tel,
+ bd.dept_name company
+ FROM
+ sys_live_location sll
+ left join
+ blade_user bu
+ on
+ sll.worker_id = bu.id
+ left join
+ blade_dept bd
+ on
+ bu.dept_id = bd.id
+ where
+ sll.type=1
+ </select>
+
+ <!--车辆的实时位置信息-->
+ <select id="getCarLocusInfoList" resultType="org.springblade.modules.location.vo.LiveLocationVo">
+ SELECT
+ sll.*,
+ sc.car_number carNum,sc.person_in_charge linkman,
+ bd.dept_name company
+ FROM
+ sys_live_location sll
+ left join
+ sys_car sc
+ on
+ sll.worker_id = sc.id
+ left join
+ blade_dept bd
+ on
+ sc.dept_id = bd.id
+ where
+ sll.type=2
+ </select>
+
+
+ <!--枪支的实时位置信息-->
+ <select id="getGunLocusInfoList" resultType="org.springblade.modules.location.vo.LiveLocationVo">
+ SELECT
+ sll.*,
+ sg.gun_card_number number,sg.person_in_charge linkman,
+ bd.dept_name company
+ FROM
+ sys_live_location sll
+ left join
+ sys_gun sg
+ on
+ sll.worker_id = sg.id
+ left join
+ blade_dept bd
+ on
+ sg.dept_id = bd.id
+ where
+ sll.type=3
+ </select>
+
+
+ <!--枪支的实时位置信息-->
+ <select id="selectSecurityAndCarAndGunLiveLocationPage" resultType="org.springblade.modules.location.vo.LiveLocationVo">
+ (SELECT
+ sll.*,
+ bu.real_name name,
+ null as number,
+ null as linkman,
+ null as carNum,
+ bu.phone tel,
+ bd.dept_name company
+ FROM
+ sys_live_location sll
+ left join
+ blade_user bu
+ on
+ sll.worker_id = bu.id
+ left join
+ blade_dept bd
+ on
+ bu.dept_id = bd.id
+ where
+ sll.type=1)
+ union all
+
+
+ (SELECT
+ sll.*,
+ null as name,
+ null as number,
+ sc.person_in_charge linkman,
+ sc.car_number carNum,
+ null as tel,
+ bd.dept_name company
+ FROM
+ sys_live_location sll
+ left join
+ sys_car sc
+ on
+ sll.worker_id = sc.id
+ left join
+ blade_dept bd
+ on
+ sc.dept_id = bd.id
+ where
+ sll.type=2)
+ union all
+
+ (SELECT
+ sll.*,
+ null as name,
+ sg.gun_card_number number,
+ sg.person_in_charge linkman,
+ null as carNum,
+ null as tel,
+ bd.dept_name company
+ FROM
+ sys_live_location sll
+ left join
+ sys_gun sg
+ on
+ sll.worker_id = sg.id
+ left join
+ blade_dept bd
+ on
+ sg.dept_id = bd.id
+ where
+ sll.type=3)
+ </select>
+
+
+
+
+
+
+
+
+
+
+
</mapper>
--
Gitblit v1.9.3