|
|
@@ -5,133 +5,143 @@
|
|
|
<mapper namespace="com.jjt.ripa.mapper.RipaAnalyRecordMapper">
|
|
|
|
|
|
<resultMap type="RipaAnalyRecord" id="RipaAnalyRecordResult">
|
|
|
- <result property="recordId" column="RECORD_ID"/>
|
|
|
- <result property="analyId" column="ANALY_ID"/>
|
|
|
- <result property="analyResult" column="ANALY_RESULT"/>
|
|
|
- <result property="alarmWitch" column="ALARM_WITCH"/>
|
|
|
- <result property="createBy" column="CREATE_BY"/>
|
|
|
- <result property="createTime" column="CREATE_TIME"/>
|
|
|
- <result property="updateBy" column="UPDATE_BY"/>
|
|
|
- <result property="updateTime" column="UPDATE_TIME"/>
|
|
|
- <result property="remark" column="REMARK"/>
|
|
|
+ <result property="recordId" column="RECORD_ID"/>
|
|
|
+ <result property="analyId" column="ANALY_ID"/>
|
|
|
+ <result property="analyResult" column="ANALY_RESULT"/>
|
|
|
+ <result property="alarmWitch" column="ALARM_WITCH"/>
|
|
|
+ <result property="createBy" column="CREATE_BY"/>
|
|
|
+ <result property="createTime" column="CREATE_TIME"/>
|
|
|
+ <result property="updateBy" column="UPDATE_BY"/>
|
|
|
+ <result property="updateTime" column="UPDATE_TIME"/>
|
|
|
+ <result property="remark" column="REMARK"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectRipaAnalyRecordVo">
|
|
|
- select RECORD_ID, ANALY_ID, ANALY_RESULT, ALARM_WITCH, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK
|
|
|
+ select RECORD_ID,
|
|
|
+ ANALY_ID,
|
|
|
+ ANALY_RESULT,
|
|
|
+ ALARM_WITCH,
|
|
|
+ CREATE_BY,
|
|
|
+ CREATE_TIME,
|
|
|
+ UPDATE_BY,
|
|
|
+ UPDATE_TIME,
|
|
|
+ REMARK
|
|
|
from ripa_analy_record
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectRipaAnalyRecordList" parameterType="RipaAnalyRecord" resultMap="RipaAnalyRecordResult">
|
|
|
<include refid="selectRipaAnalyRecordVo"/>
|
|
|
<where>
|
|
|
- <if test="analyId != null ">
|
|
|
- and ANALY_ID = #{analyId}
|
|
|
- </if>
|
|
|
- <if test="analyResult != null and analyResult != ''">
|
|
|
- and ANALY_RESULT like concat('%', #{analyResult}, '%')
|
|
|
- </if>
|
|
|
- <if test="alarmWitch != null and alarmWitch != ''">
|
|
|
- and ALARM_WITCH = #{alarmWitch}
|
|
|
- </if>
|
|
|
- <if test="createBy != null and createBy != ''">
|
|
|
- and CREATE_BY = #{createBy}
|
|
|
- </if>
|
|
|
- <if test="createTime != null ">
|
|
|
- and CREATE_TIME = #{createTime}
|
|
|
- </if>
|
|
|
- <if test="updateBy != null and updateBy != ''">
|
|
|
- and UPDATE_BY = #{updateBy}
|
|
|
- </if>
|
|
|
- <if test="updateTime != null ">
|
|
|
- and UPDATE_TIME = #{updateTime}
|
|
|
- </if>
|
|
|
- <if test="remark != null and remark != ''">
|
|
|
- and REMARK = #{remark}
|
|
|
- </if>
|
|
|
+ <if test="analyId != null ">
|
|
|
+ and ANALY_ID = #{analyId}
|
|
|
+ </if>
|
|
|
+ <if test="analyResult != null and analyResult != ''">
|
|
|
+ and ANALY_RESULT like concat('%', #{analyResult}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="alarmWitch != null and alarmWitch != ''">
|
|
|
+ and ALARM_WITCH = #{alarmWitch}
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null and createBy != ''">
|
|
|
+ and CREATE_BY = #{createBy}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null ">
|
|
|
+ and CREATE_TIME = #{createTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null and updateBy != ''">
|
|
|
+ and UPDATE_BY = #{updateBy}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null ">
|
|
|
+ and UPDATE_TIME = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and REMARK = #{remark}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
+ order by CREATE_TIME desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectRipaAnalyRecordByRecordId" parameterType="Long"
|
|
|
resultMap="RipaAnalyRecordResult">
|
|
|
- <include refid="selectRipaAnalyRecordVo"/>
|
|
|
- where RECORD_ID = #{recordId}
|
|
|
+ <include refid="selectRipaAnalyRecordVo"/>
|
|
|
+ where RECORD_ID = #{recordId}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertRipaAnalyRecord" parameterType="RipaAnalyRecord" useGeneratedKeys="true"
|
|
|
keyProperty="recordId">
|
|
|
insert into ripa_analy_record
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="analyId != null">ANALY_ID,
|
|
|
- </if>
|
|
|
- <if test="analyResult != null">ANALY_RESULT,
|
|
|
- </if>
|
|
|
- <if test="alarmWitch != null">ALARM_WITCH,
|
|
|
- </if>
|
|
|
- <if test="createBy != null">CREATE_BY,
|
|
|
- </if>
|
|
|
- <if test="createTime != null">CREATE_TIME,
|
|
|
- </if>
|
|
|
- <if test="updateBy != null">UPDATE_BY,
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">UPDATE_TIME,
|
|
|
- </if>
|
|
|
- <if test="remark != null">REMARK,
|
|
|
- </if>
|
|
|
+ <if test="analyId != null">ANALY_ID,
|
|
|
+ </if>
|
|
|
+ <if test="analyResult != null">ANALY_RESULT,
|
|
|
+ </if>
|
|
|
+ <if test="alarmWitch != null">ALARM_WITCH,
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">CREATE_BY,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">CREATE_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">UPDATE_BY,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">UPDATE_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">REMARK,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="analyId != null">#{analyId},
|
|
|
- </if>
|
|
|
- <if test="analyResult != null">#{analyResult},
|
|
|
- </if>
|
|
|
- <if test="alarmWitch != null">#{alarmWitch},
|
|
|
- </if>
|
|
|
- <if test="createBy != null">#{createBy},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">#{createTime},
|
|
|
- </if>
|
|
|
- <if test="updateBy != null">#{updateBy},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">#{updateTime},
|
|
|
- </if>
|
|
|
- <if test="remark != null">#{remark},
|
|
|
- </if>
|
|
|
+ <if test="analyId != null">#{analyId},
|
|
|
+ </if>
|
|
|
+ <if test="analyResult != null">#{analyResult},
|
|
|
+ </if>
|
|
|
+ <if test="alarmWitch != null">#{alarmWitch},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">#{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">#{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">#{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">#{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">#{remark},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateRipaAnalyRecord" parameterType="RipaAnalyRecord">
|
|
|
update ripa_analy_record
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="analyId != null">ANALY_ID =
|
|
|
- #{analyId},
|
|
|
- </if>
|
|
|
- <if test="analyResult != null">ANALY_RESULT =
|
|
|
- #{analyResult},
|
|
|
- </if>
|
|
|
- <if test="alarmWitch != null">ALARM_WITCH =
|
|
|
- #{alarmWitch},
|
|
|
- </if>
|
|
|
- <if test="createBy != null">CREATE_BY =
|
|
|
- #{createBy},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">CREATE_TIME =
|
|
|
- #{createTime},
|
|
|
- </if>
|
|
|
- <if test="updateBy != null">UPDATE_BY =
|
|
|
- #{updateBy},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">UPDATE_TIME =
|
|
|
- #{updateTime},
|
|
|
- </if>
|
|
|
- <if test="remark != null">REMARK =
|
|
|
- #{remark},
|
|
|
- </if>
|
|
|
+ <if test="analyId != null">ANALY_ID =
|
|
|
+ #{analyId},
|
|
|
+ </if>
|
|
|
+ <if test="analyResult != null">ANALY_RESULT =
|
|
|
+ #{analyResult},
|
|
|
+ </if>
|
|
|
+ <if test="alarmWitch != null">ALARM_WITCH =
|
|
|
+ #{alarmWitch},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">CREATE_BY =
|
|
|
+ #{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">CREATE_TIME =
|
|
|
+ #{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">UPDATE_BY =
|
|
|
+ #{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">UPDATE_TIME =
|
|
|
+ #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">REMARK =
|
|
|
+ #{remark},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
where RECORD_ID = #{recordId}
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteRipaAnalyRecordByRecordId" parameterType="Long">
|
|
|
delete
|
|
|
- from ripa_analy_record where RECORD_ID = #{recordId}
|
|
|
+ from ripa_analy_record
|
|
|
+ where RECORD_ID = #{recordId}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteRipaAnalyRecordByRecordIds" parameterType="String">
|