68 lines
3.2 KiB
XML
68 lines
3.2 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="org.dromara.extract.mapper.DeviceGpsMapper">
|
|
|
|
<resultMap type="org.dromara.extract.domain.EsGpsInfo" id="DeviceResult">
|
|
<result property="id" column="id" />
|
|
<result property="deltaH" column="deltaH" />
|
|
<result property="deviceCode" column="deviceCode" />
|
|
<result property="deviceType" column="deviceType" />
|
|
<result property="gpsTime" column="gpsTime" />
|
|
<result property="height" column="height" />
|
|
<result property="lat" column="lat" />
|
|
<result property="lng" column="lng" />
|
|
<result property="orientation" column="orientation" />
|
|
<result property="speed" column="speed" />
|
|
<result property="zzjgdm" column="zzjgdm" />
|
|
<result property="online" column="is_online" />
|
|
</resultMap>
|
|
|
|
<select id="selectPDTGPS" parameterType="org.dromara.extract.domain.EsGpsInfo" resultMap="DeviceResult">
|
|
select u_id deviceCode,'3' deviceType, x lat, y lng, time gpsTime,nvl(p.is_alive,0) is_online from t_location t left join t_pdtuser p
|
|
on t.u_id = p.user_no
|
|
<where>
|
|
<if test="gpsTime != null "> and time >= #{gpsTime}</if>
|
|
</where>
|
|
order by time desc
|
|
</select>
|
|
|
|
<select id="selectYDJWGPS" parameterType="org.dromara.extract.domain.EsGpsInfo" resultMap="DeviceResult">
|
|
select userid deviceCode,'4' deviceType, lng lng, lat lat, gpstime gpsTime from v_device_status
|
|
<where>
|
|
<if test="gpsTime != null "> and to_date(gpstime,'yyyy-mm-dd,hh24:mi:ss') >= #{gpsTime}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectBDGCGPS" parameterType="org.dromara.extract.domain.EsGpsInfo" resultMap="DeviceResult">
|
|
select terminalid deviceCode,'2' deviceType, lon lng, lat lat, gpstime gpsTime from car_gps_info
|
|
<where>
|
|
<if test="gpsTime != null "> and gpstime >= #{gpsTime}</if>
|
|
</where>
|
|
order by gpstime desc
|
|
</select>
|
|
|
|
<select id="selectBDGCMaxTime" resultMap="DeviceResult">
|
|
select id, gpsid deviceCode,'2' deviceType, longitude lng, latitude lat, DATE_FORMAT(time,'%Y-%m-%d %H:%i:%s') gpsTime, speed speed from vehicle_trajectory
|
|
order by time desc limit 1
|
|
</select>
|
|
|
|
<select id="selectJlyGPS" parameterType="org.dromara.extract.domain.EsGpsInfo" resultMap="DeviceResult">
|
|
select indexcode deviceCode,'5' deviceType, longitude lng, latitude lat,to_timestamp(updatatime, 'YYYY-MM-DD HH24:MI:SS') gpsTime from public.mobileposition_view
|
|
<where>
|
|
<if test="gpsTime != null "> and to_timestamp(updatatime, 'YYYY-MM-DD HH24:MI:SS') > #{gpsTime} </if>
|
|
</where>
|
|
order by updatatime desc
|
|
</select>
|
|
|
|
<select id="selectJlyStatus" parameterType="org.dromara.extract.domain.EsGpsInfo" resultMap="DeviceResult">
|
|
select zdbh deviceCode,'5' deviceType,ifnull(zt,0) is_online,ztgxsj gpsTime from bas_device
|
|
<where>
|
|
<if test="gpsTime != null "> and ztgxsj >= #{gpsTime}</if>
|
|
</where>
|
|
order by ztgxsj desc
|
|
</select>
|
|
|
|
</mapper>
|