138 lines
3.9 KiB
XML
138 lines
3.9 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="com.zhangy.skyeye.jm.mapper.JmStatusLogMapper">
|
|
<sql id="selectSql">
|
|
select
|
|
sl.job_id,
|
|
sl.uav_id,
|
|
sl.longitude,
|
|
sl.latitude,
|
|
sl.altitude,
|
|
sl.date,
|
|
sl.cpu_c,
|
|
sl.ant_c,
|
|
sl.rf_c,
|
|
sl.disk_c,
|
|
sl.fpga_c,
|
|
sl.system_v,
|
|
sl.clock_lock,
|
|
sl.imu_status,
|
|
sl.memory_capacity,
|
|
sl.disk_utilization,
|
|
sl.north_velocity,
|
|
sl.sky_velocity,
|
|
sl.east_velocity,
|
|
sl.angle_roll,
|
|
sl.angle_yaw,
|
|
sl.angle_pitch,
|
|
sl.antenna_azimuth,
|
|
sl.antenna_pitch,
|
|
sl.is_boot,
|
|
sl.satellite_num,
|
|
sl.rtk_status
|
|
from jm_status_log sl
|
|
</sql>
|
|
|
|
<select id="selectByJob" resultType="com.zhangy.skyeye.jm.entity.JmSarStatusLog">
|
|
<include refid="selectSql"/>
|
|
where sl.job_id in
|
|
<foreach item="item" collection="array" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
order by sl.date
|
|
</select>
|
|
|
|
<select id="selectByUav" resultType="com.zhangy.skyeye.jm.entity.JmSarStatusLog">
|
|
<include refid="selectSql"/>
|
|
where sl.job_id = #{jobId}
|
|
<if test="array != null and array.length > 0">
|
|
and sl.uav_id in
|
|
<foreach item="item" collection="array" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
</if>
|
|
order by sl.date
|
|
</select>
|
|
|
|
<insert id="insert">
|
|
insert into jm_status_log(
|
|
job_id,
|
|
uav_id,
|
|
longitude,
|
|
latitude,
|
|
altitude,
|
|
date,
|
|
cpu_c,
|
|
ant_c,
|
|
rf_c,
|
|
disk_c,
|
|
fpga_c,
|
|
system_v,
|
|
clock_lock,
|
|
imu_status,
|
|
memory_capacity,
|
|
disk_utilization,
|
|
north_velocity,
|
|
sky_velocity,
|
|
east_velocity,
|
|
angle_roll,
|
|
angle_yaw,
|
|
angle_pitch,
|
|
antenna_azimuth,
|
|
antenna_pitch,
|
|
is_boot,
|
|
satellite_num,
|
|
rtk_status
|
|
) values
|
|
<foreach item="item" index="index" collection="array" separator=",">
|
|
(
|
|
#{item.jobId},
|
|
#{item.uavId},
|
|
#{item.longitude},
|
|
#{item.latitude},
|
|
#{item.altitude},
|
|
#{item.date},
|
|
#{item.cpuC},
|
|
#{item.antC},
|
|
#{item.rfC},
|
|
#{item.diskC},
|
|
#{item.fpgaC},
|
|
#{item.systemV},
|
|
#{item.clockLock},
|
|
#{item.imuStatus},
|
|
#{item.memoryCapacity},
|
|
#{item.diskUtilization},
|
|
#{item.northVelocity},
|
|
#{item.skyVelocity},
|
|
#{item.eastVelocity},
|
|
#{item.angleRoll},
|
|
#{item.angleYaw},
|
|
#{item.anglePitch},
|
|
#{item.antennaAzimuth},
|
|
#{item.antennaPitch},
|
|
#{item.isBoot},
|
|
#{item.satelliteNum},
|
|
#{item.rtkStatus}
|
|
)
|
|
</foreach>
|
|
</insert>
|
|
|
|
<delete id="deleteByJob">
|
|
delete from jm_status_log where job_id in
|
|
<foreach item="item" collection="array" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<delete id="deleteByUav">
|
|
delete from jm_status_log
|
|
where job_id = #{jobId}
|
|
<if test="array != null and array.length > 0">
|
|
and uav_id in
|
|
<foreach item="item" collection="array" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
</if>
|
|
</delete>
|
|
</mapper> |