|
@@ -0,0 +1,140 @@
|
|
|
|
+<?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.slibra.business.mapper.TJlPredictMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="TJlPredict" id="TJlPredictResult">
|
|
|
|
+ <result property="id" column="id" />
|
|
|
|
+ <result property="testHour" column="TEST_HOUR" />
|
|
|
|
+ <result property="no3Hlj1Jqr" column="NO3_HLJ1_JQR" />
|
|
|
|
+ <result property="no3Hlj2Jqr" column="NO3_HLJ2_JQR" />
|
|
|
|
+ <result property="no3Qyc1Jqr" column="NO3_QYC_1_JQR" />
|
|
|
|
+ <result property="no3Qyc2Jqr" column="NO3_QYC_2_JQR" />
|
|
|
|
+ <result property="tpRccJqr" column="TP_RCC_JQR" />
|
|
|
|
+ <result property="tpHl1Jqr" column="TP_HL1_JQR" />
|
|
|
|
+ <result property="tpHl2Jqr" column="TP_HL2_JQR" />
|
|
|
|
+ <result property="nh31Jqr" column="NH3_1_JQR" />
|
|
|
|
+ <result property="nh32Jqr" column="NH3_2_JQR" />
|
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
|
+ <result property="revision" column="revision" />
|
|
|
|
+ <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="selectTJlPredictVo">
|
|
|
|
+ select id, TEST_HOUR, NO3_HLJ1_JQR, NO3_HLJ2_JQR, NO3_QYC_1_JQR, NO3_QYC_2_JQR, TP_RCC_JQR, TP_HL1_JQR, TP_HL2_JQR, NH3_1_JQR, NH3_2_JQR, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_jl_predict
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectTJlPredictList" parameterType="TJlPredict" resultMap="TJlPredictResult">
|
|
|
|
+ <include refid="selectTJlPredictVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ 1 = 1
|
|
|
|
+ <if test="testHour != null and testHour != ''"> and TEST_HOUR = #{testHour}</if>
|
|
|
|
+ <if test="no3Hlj1Jqr != null "> and NO3_HLJ1_JQR = #{no3Hlj1Jqr}</if>
|
|
|
|
+ <if test="no3Hlj2Jqr != null "> and NO3_HLJ2_JQR = #{no3Hlj2Jqr}</if>
|
|
|
|
+ <if test="no3Qyc1Jqr != null "> and NO3_QYC_1_JQR = #{no3Qyc1Jqr}</if>
|
|
|
|
+ <if test="no3Qyc2Jqr != null "> and NO3_QYC_2_JQR = #{no3Qyc2Jqr}</if>
|
|
|
|
+ <if test="tpRccJqr != null "> and TP_RCC_JQR = #{tpRccJqr}</if>
|
|
|
|
+ <if test="tpHl1Jqr != null "> and TP_HL1_JQR = #{tpHl1Jqr}</if>
|
|
|
|
+ <if test="tpHl2Jqr != null "> and TP_HL2_JQR = #{tpHl2Jqr}</if>
|
|
|
|
+ <if test="nh31Jqr != null "> and NH3_1_JQR = #{nh31Jqr}</if>
|
|
|
|
+ <if test="nh32Jqr != null "> and NH3_2_JQR = #{nh32Jqr}</if>
|
|
|
|
+ <if test="revision != null "> and revision = #{revision}</if>
|
|
|
|
+ </where>
|
|
|
|
+ and del_flag = 0 order by id desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectTJlPredictById" parameterType="Long" resultMap="TJlPredictResult">
|
|
|
|
+ <include refid="selectTJlPredictVo"/>
|
|
|
|
+ where id = #{id} and del_flag = 0
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertTJlPredict" parameterType="TJlPredict" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
+ insert into t_jl_predict
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="testHour != null">TEST_HOUR,</if>
|
|
|
|
+ <if test="no3Hlj1Jqr != null">NO3_HLJ1_JQR,</if>
|
|
|
|
+ <if test="no3Hlj2Jqr != null">NO3_HLJ2_JQR,</if>
|
|
|
|
+ <if test="no3Qyc1Jqr != null">NO3_QYC_1_JQR,</if>
|
|
|
|
+ <if test="no3Qyc2Jqr != null">NO3_QYC_2_JQR,</if>
|
|
|
|
+ <if test="tpRccJqr != null">TP_RCC_JQR,</if>
|
|
|
|
+ <if test="tpHl1Jqr != null">TP_HL1_JQR,</if>
|
|
|
|
+ <if test="tpHl2Jqr != null">TP_HL2_JQR,</if>
|
|
|
|
+ <if test="nh31Jqr != null">NH3_1_JQR,</if>
|
|
|
|
+ <if test="nh32Jqr != null">NH3_2_JQR,</if>
|
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
|
+ <if test="revision != null">revision,</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="testHour != null">#{testHour},</if>
|
|
|
|
+ <if test="no3Hlj1Jqr != null">#{no3Hlj1Jqr},</if>
|
|
|
|
+ <if test="no3Hlj2Jqr != null">#{no3Hlj2Jqr},</if>
|
|
|
|
+ <if test="no3Qyc1Jqr != null">#{no3Qyc1Jqr},</if>
|
|
|
|
+ <if test="no3Qyc2Jqr != null">#{no3Qyc2Jqr},</if>
|
|
|
|
+ <if test="tpRccJqr != null">#{tpRccJqr},</if>
|
|
|
|
+ <if test="tpHl1Jqr != null">#{tpHl1Jqr},</if>
|
|
|
|
+ <if test="tpHl2Jqr != null">#{tpHl2Jqr},</if>
|
|
|
|
+ <if test="nh31Jqr != null">#{nh31Jqr},</if>
|
|
|
|
+ <if test="nh32Jqr != null">#{nh32Jqr},</if>
|
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
|
+ <if test="revision != null">#{revision},</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="updateTJlPredict" parameterType="TJlPredict">
|
|
|
|
+ update t_jl_predict
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="testHour != null">TEST_HOUR = #{testHour},</if>
|
|
|
|
+ <if test="no3Hlj1Jqr != null">NO3_HLJ1_JQR = #{no3Hlj1Jqr},</if>
|
|
|
|
+ <if test="no3Hlj2Jqr != null">NO3_HLJ2_JQR = #{no3Hlj2Jqr},</if>
|
|
|
|
+ <if test="no3Qyc1Jqr != null">NO3_QYC_1_JQR = #{no3Qyc1Jqr},</if>
|
|
|
|
+ <if test="no3Qyc2Jqr != null">NO3_QYC_2_JQR = #{no3Qyc2Jqr},</if>
|
|
|
|
+ <if test="tpRccJqr != null">TP_RCC_JQR = #{tpRccJqr},</if>
|
|
|
|
+ <if test="tpHl1Jqr != null">TP_HL1_JQR = #{tpHl1Jqr},</if>
|
|
|
|
+ <if test="tpHl2Jqr != null">TP_HL2_JQR = #{tpHl2Jqr},</if>
|
|
|
|
+ <if test="nh31Jqr != null">NH3_1_JQR = #{nh31Jqr},</if>
|
|
|
|
+ <if test="nh32Jqr != null">NH3_2_JQR = #{nh32Jqr},</if>
|
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
|
+ <if test="revision != null">revision = #{revision},</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>
|
|
|
|
+ ,revision = revision + 1
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <delete id="deleteTJlPredictById" parameterType="Long">
|
|
|
|
+ update t_jl_predict set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteTJlPredictByIds" parameterType="String">
|
|
|
|
+ update t_jl_predict set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
|
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteAll" >
|
|
|
|
+ <!-- truncate table t_jl_predict -->
|
|
|
|
+ delete from t_jl_predict
|
|
|
|
+ </delete>
|
|
|
|
+</mapper>
|