128 lines
4.8 KiB
XML
128 lines
4.8 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.ruoyi.system.mapper.SysDiscernMapper">
|
|
|
|
<resultMap type="com.ruoyi.common.core.domain.entity.SysDiscern" id="SysDiscernResult">
|
|
<id property="id" column="id" />
|
|
<result property="tagId" column="tag_id" />
|
|
<result property="ladleNumber" column="ladle_number" />
|
|
<result property="radarLocation" column="radar_location" />
|
|
<result property="count" column="count" />
|
|
<result property="type" column="type" />
|
|
<result property="stationCode" column="station_code" />
|
|
<result property="value4" column="value4" />
|
|
<result property="number" column="number" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
</resultMap>
|
|
|
|
<select id="selectPrimaryRadarDataList" resultMap="SysDiscernResult">
|
|
select p.id,p.tag_id,p.value1,p.value2,p.value3,p.value4,p.value5,p.base_line,p.query_fre,p.number,p.radar_location,p.ladle_number,p.radar_ip,p.create_by,p.create_time,p.update_by,p.update_time,p.remark,p.del_flag from sys_primary_radar_data p
|
|
where p.del_flag = '0'
|
|
<if test="radarLocation != null and radarLocation != ''">
|
|
AND p.radar_location like concat('%',#{radarLocation}, '%')
|
|
</if>
|
|
<if test="ladleNumber != null and ladleNumber != ''">
|
|
AND p.ladle_number like concat('%',#{ladleNumber}, '%')
|
|
</if>
|
|
<if test="tagId != null and tagId != ''">
|
|
AND p.tag_id like concat('%',#{tagId},'%')
|
|
</if>
|
|
<if test="createTime != null and updateTime != null">
|
|
AND DATE_FORMAT(p.update_time,'%Y-%m-%d') between DATE_FORMAT(#{createTime},'%Y-%m-%d') and DATE_FORMAT(#{updateTime},'%Y-%m-%d')
|
|
</if>
|
|
</select>
|
|
|
|
<insert id="insertPrimaryRadarData">
|
|
insert into sys_primary_radar_data(
|
|
<if test="id != null and id != 0">id,</if>
|
|
<if test="tagId != null and tagId != ''">tag_id,</if>
|
|
<if test="value1 != null and value1 != ''">value1,</if>
|
|
<if test="value2 != null and value2 != ''">value2,</if>
|
|
<if test="value3 != null and value3 != ''">value3,</if>
|
|
<if test="value4 != null and value4 != ''">value4,</if>
|
|
<if test="value5 != null and value5 != ''">value5,</if>
|
|
<if test="baseLine != null and baseLine != ''">base_line,</if>
|
|
<if test="queryFre != null ">query_fre,</if>
|
|
<if test="number != null and number != ''">number,</if>
|
|
<if test="radarLocation != null and radarLocation != ''">radar_location,</if>
|
|
<if test="ladleNumber != null and ladleNumber != ''">ladle_number,</if>
|
|
<if test="radarIp != null and radarIp != ''">radar_ip,</if>
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
create_time,
|
|
update_time
|
|
)values(
|
|
<if test="id != null and id != 0">#{id},</if>
|
|
<if test="tagId != null and tagId != ''">#{tagId},</if>
|
|
<if test="value1 != null and value1 != ''">#{value1},</if>
|
|
<if test="value2 != null and value2 != ''">#{value2},</if>
|
|
<if test="value3 != null and value3 != ''">#{value3},</if>
|
|
<if test="value4 != null and value4 != ''">#{value4},</if>
|
|
<if test="value5 != null and value5 != ''">#{value5},</if>
|
|
<if test="baseLine != null and baseLine != ''">#{baseLine},</if>
|
|
<if test="queryFre != null">#{queryFre},</if>
|
|
<if test="number != null and number != ''">#{number},</if>
|
|
<if test="radarLocation != null and radarLocation != ''">#{radarLocation},</if>
|
|
<if test="ladleNumber != null and ladleNumber != ''">#{ladleNumber},</if>
|
|
<if test="radarIp != null and radarIp != ''">#{radarIp},</if>
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
sysdate(),
|
|
sysdate()
|
|
)
|
|
</insert>
|
|
|
|
|
|
<select id="selectDiscernList" resultMap="SysDiscernResult">
|
|
|
|
SELECT d.id,d.tag_id,d.ladle_number,d.radar_location,d.count,d.type,d.value4,d.number,d.create_time,d.update_time
|
|
FROM sys_discern d
|
|
where 1=1
|
|
<if test="tagId != null and tagId != ''">
|
|
AND tag_id like concat('%',#{tagId}, '%')
|
|
</if>
|
|
<if test="radarLocation != null and radarLocation != ''">
|
|
AND radar_location like concat('%',#{radarLocation}, '%')
|
|
</if>
|
|
<if test="type != null">
|
|
AND ladle_number = #{type}
|
|
</if>
|
|
<if test="createTime != null and updateTime != null">
|
|
AND DATE_FORMAT(update_time,'%Y-%m-%d') between DATE_FORMAT(#{createTime},'%Y-%m-%d') and DATE_FORMAT(#{updateTime},'%Y-%m-%d')
|
|
</if>
|
|
order by id desc
|
|
</select>
|
|
|
|
|
|
<insert id="insertDiscern">
|
|
insert into sys_discern(
|
|
id,
|
|
tag_id,
|
|
ladle_number,
|
|
radar_location,
|
|
count,
|
|
type,
|
|
value4,
|
|
number,
|
|
create_time,
|
|
update_time,
|
|
station_code
|
|
)values(
|
|
#{id},
|
|
#{tagId},
|
|
#{ladleNumber},
|
|
#{radarLocation},
|
|
#{count},
|
|
#{type},
|
|
#{value4},
|
|
#{number},
|
|
#{createTime},
|
|
#{updateTime},
|
|
#{stationCode}
|
|
)
|
|
</insert>
|
|
|
|
</mapper> |