|
@@ -0,0 +1,65 @@
|
|
|
+<?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="com.sooka.sponest.monitor.meiqiguan.mapper.CenternonitorTBeidouTrajectoryMapper">
|
|
|
+
|
|
|
+ <resultMap type="CenternonitorTBeidouTrajectory" id="CenternonitorTBeidouTrajectoryResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="macid" column="macid" />
|
|
|
+ <result property="gpsTime" column="gps_time" />
|
|
|
+ <result property="speed" column="speed" />
|
|
|
+ <result property="lat" column="lat" />
|
|
|
+ <result property="lon" column="lon" />
|
|
|
+ <result property="dir" column="dir" />
|
|
|
+ <result property="sType" column="s_type" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ </resultMap>
|
|
|
+ <resultMap type="GasTankHistoricalTrajectoryVo" id="GasTankHistoricalTrajectoryVoResult">
|
|
|
+ <result property="callat" column="callat"/>
|
|
|
+ <result property="callon" column="callon"/>
|
|
|
+ </resultMap>
|
|
|
+ <sql id="selectBeidouTrajectoryVo">
|
|
|
+ select id,
|
|
|
+ macid,
|
|
|
+ gps_time,
|
|
|
+ speed,
|
|
|
+ lat,
|
|
|
+ lon,
|
|
|
+ dir,
|
|
|
+ s_type,
|
|
|
+ status,
|
|
|
+ create_time
|
|
|
+ from centernonitor_t_beidou_trajectory
|
|
|
+ </sql>
|
|
|
+ <insert id="saveBatchBeidouTrajectory" parameterType="List">
|
|
|
+ insert into centernonitor_t_beidou_trajectory(macid, gps_time, speed, lat, lon, dir, s_type, status, create_time)
|
|
|
+ values
|
|
|
+ <foreach collection="list" item="item" separator=",">
|
|
|
+ (#{item.Macid}, #{item.GpsTime}, #{item.Speed}, #{item.Lat}, #{item.Lon}, #{item.Dir}, #{item.SType},
|
|
|
+ #{item.Status}, now())
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="selectBeidouTrajectoryListByDeviceId" resultType="java.util.Map">
|
|
|
+ select id,
|
|
|
+ macid as deviceid,
|
|
|
+ lat as callat,
|
|
|
+ lon as callon
|
|
|
+ from centernonitor_t_beidou_trajectory
|
|
|
+ where macid= #{deviceid} AND DATE(create_time) = CURDATE()
|
|
|
+ ORDER BY gps_time asc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectBeidouTrajectoryListOneByDeviceId" parameterType="GasTankHistoricalTrajectoryVo"
|
|
|
+ resultMap="GasTankHistoricalTrajectoryVoResult">
|
|
|
+ select id,
|
|
|
+ macid as deviceid,
|
|
|
+ lat as callat,
|
|
|
+ lon as callon
|
|
|
+ from centernonitor_t_beidou_trajectory
|
|
|
+ where macid= #{deviceid} AND DATE(create_time) = CURDATE()
|
|
|
+ ORDER BY gps_time asc
|
|
|
+ </select>
|
|
|
+</mapper>
|