|
@@ -0,0 +1,131 @@
|
|
|
+<?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.ValidateCoefMapper">
|
|
|
+
|
|
|
+ <resultMap type="ValidateCoef" id="ValidateCoefResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="validateDate" column="validate_date" />
|
|
|
+ <result property="validateTime" column="validate_time" />
|
|
|
+ <result property="source" column="source" />
|
|
|
+ <result property="coef" column="coef" />
|
|
|
+ <result property="subcate" column="subcate" />
|
|
|
+ <result property="hycXsy1" column="hyc_xsy1" />
|
|
|
+ <result property="hycXsy2" column="hyc_xsy2" />
|
|
|
+ <result property="hycXsy3" column="hyc_xsy3" />
|
|
|
+ <result property="carbonCalculate" column="carbon_calculate" />
|
|
|
+ <result property="carbonReal" column="carbon_real" />
|
|
|
+ <result property="CN" column="CN" />
|
|
|
+ <result property="waterInflow" column="water_inflow" />
|
|
|
+ <result property="MLSS" column="MLSS" />
|
|
|
+ <result property="MLVSS" column="MLVSS" />
|
|
|
+ <result property="ext" column="ext" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectValidateCoefVo">
|
|
|
+ select id, validate_date, validate_time, source, coef, subcate, hyc_xsy1, hyc_xsy2, hyc_xsy3, carbon_calculate, carbon_real, CN, water_inflow, MLSS, MLVSS, ext from validate_coef
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectValidateCoefList" parameterType="ValidateCoef" resultMap="ValidateCoefResult">
|
|
|
+ <include refid="selectValidateCoefVo"/>
|
|
|
+ <where>
|
|
|
+ 1 = 1
|
|
|
+ <if test="validateDate != null and validateDate != ''"> and validate_date = #{validateDate}</if>
|
|
|
+ <if test="validateTime != null and validateTime != ''"> and validate_time = #{validateTime}</if>
|
|
|
+ <if test="source != null "> and source = #{source}</if>
|
|
|
+ <if test="coef != null "> and coef = #{coef}</if>
|
|
|
+ <if test="subcate != null "> and subcate = #{subcate}</if>
|
|
|
+ <if test="hycXsy1 != null "> and hyc_xsy1 = #{hycXsy1}</if>
|
|
|
+ <if test="hycXsy2 != null "> and hyc_xsy2 = #{hycXsy2}</if>
|
|
|
+ <if test="hycXsy3 != null "> and hyc_xsy3 = #{hycXsy3}</if>
|
|
|
+ <if test="carbonCalculate != null "> and carbon_calculate = #{carbonCalculate}</if>
|
|
|
+ <if test="carbonReal != null "> and carbon_real = #{carbonReal}</if>
|
|
|
+ <if test="CN != null "> and CN = #{CN}</if>
|
|
|
+ <if test="waterInflow != null "> and water_inflow = #{waterInflow}</if>
|
|
|
+ <if test="MLSS != null "> and MLSS = #{MLSS}</if>
|
|
|
+ <if test="MLVSS != null "> and MLVSS = #{MLVSS}</if>
|
|
|
+ <if test="ext != null and ext != ''"> and ext = #{ext}</if>
|
|
|
+ </where>
|
|
|
+ and del_flag = 0 order by id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectValidateCoefById" parameterType="Long" resultMap="ValidateCoefResult">
|
|
|
+ <include refid="selectValidateCoefVo"/>
|
|
|
+ where id = #{id} and del_flag = 0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertValidateCoef" parameterType="ValidateCoef" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into validate_coef
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="validateDate != null">validate_date,</if>
|
|
|
+ <if test="validateTime != null">validate_time,</if>
|
|
|
+ <if test="source != null">source,</if>
|
|
|
+ <if test="coef != null">coef,</if>
|
|
|
+ <if test="subcate != null">subcate,</if>
|
|
|
+ <if test="hycXsy1 != null">hyc_xsy1,</if>
|
|
|
+ <if test="hycXsy2 != null">hyc_xsy2,</if>
|
|
|
+ <if test="hycXsy3 != null">hyc_xsy3,</if>
|
|
|
+ <if test="carbonCalculate != null">carbon_calculate,</if>
|
|
|
+ <if test="carbonReal != null">carbon_real,</if>
|
|
|
+ <if test="CN != null">CN,</if>
|
|
|
+ <if test="waterInflow != null">water_inflow,</if>
|
|
|
+ <if test="MLSS != null">MLSS,</if>
|
|
|
+ <if test="MLVSS != null">MLVSS,</if>
|
|
|
+ <if test="ext != null">ext,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="validateDate != null">#{validateDate},</if>
|
|
|
+ <if test="validateTime != null">#{validateTime},</if>
|
|
|
+ <if test="source != null">#{source},</if>
|
|
|
+ <if test="coef != null">#{coef},</if>
|
|
|
+ <if test="subcate != null">#{subcate},</if>
|
|
|
+ <if test="hycXsy1 != null">#{hycXsy1},</if>
|
|
|
+ <if test="hycXsy2 != null">#{hycXsy2},</if>
|
|
|
+ <if test="hycXsy3 != null">#{hycXsy3},</if>
|
|
|
+ <if test="carbonCalculate != null">#{carbonCalculate},</if>
|
|
|
+ <if test="carbonReal != null">#{carbonReal},</if>
|
|
|
+ <if test="CN != null">#{CN},</if>
|
|
|
+ <if test="waterInflow != null">#{waterInflow},</if>
|
|
|
+ <if test="MLSS != null">#{MLSS},</if>
|
|
|
+ <if test="MLVSS != null">#{MLVSS},</if>
|
|
|
+ <if test="ext != null">#{ext},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateValidateCoef" parameterType="ValidateCoef">
|
|
|
+ update validate_coef
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="validateDate != null">validate_date = #{validateDate},</if>
|
|
|
+ <if test="validateTime != null">validate_time = #{validateTime},</if>
|
|
|
+ <if test="source != null">source = #{source},</if>
|
|
|
+ <if test="coef != null">coef = #{coef},</if>
|
|
|
+ <if test="subcate != null">subcate = #{subcate},</if>
|
|
|
+ <if test="hycXsy1 != null">hyc_xsy1 = #{hycXsy1},</if>
|
|
|
+ <if test="hycXsy2 != null">hyc_xsy2 = #{hycXsy2},</if>
|
|
|
+ <if test="hycXsy3 != null">hyc_xsy3 = #{hycXsy3},</if>
|
|
|
+ <if test="carbonCalculate != null">carbon_calculate = #{carbonCalculate},</if>
|
|
|
+ <if test="carbonReal != null">carbon_real = #{carbonReal},</if>
|
|
|
+ <if test="CN != null">CN = #{CN},</if>
|
|
|
+ <if test="waterInflow != null">water_inflow = #{waterInflow},</if>
|
|
|
+ <if test="MLSS != null">MLSS = #{MLSS},</if>
|
|
|
+ <if test="MLVSS != null">MLVSS = #{MLVSS},</if>
|
|
|
+ <if test="ext != null">ext = #{ext},</if>
|
|
|
+ </trim>
|
|
|
+ ,revision = revision + 1
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <delete id="deleteValidateCoefById" parameterType="Long">
|
|
|
+ update validate_coef set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteValidateCoefByIds" parameterType="String">
|
|
|
+ update validate_coef 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>
|
|
|
+</mapper>
|