|
@@ -0,0 +1,239 @@
|
|
|
+<?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.xlht.xlhtproject.mapper.ZAssayResultMapper">
|
|
|
+
|
|
|
+ <resultMap type="ZAssayResult" id="ZAssayResultResult">
|
|
|
+ <result property="resultId" column="result_id" />
|
|
|
+ <result property="assayNo" column="assay_no" />
|
|
|
+ <result property="resultNo" column="result_no" />
|
|
|
+ <result property="sampleNo" column="sample_no" />
|
|
|
+ <result property="sampleVolume" column="sample_volume" />
|
|
|
+ <result property="deviceNo" column="device_no" />
|
|
|
+ <result property="assayItem" column="assay_item" />
|
|
|
+ <result property="resultConcentration" column="result_concentration" />
|
|
|
+ <result property="resultAbs" column="result_abs" />
|
|
|
+ <result property="resultDate" column="result_date" />
|
|
|
+ <result property="resultTime" column="result_time" />
|
|
|
+ <result property="curveK0" column="curve_k0" />
|
|
|
+ <result property="curveK1" column="curve_k1" />
|
|
|
+ <result property="curveId" column="curve_id" />
|
|
|
+ <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="j1901S01" column="j_1901_s0_1" />
|
|
|
+ <result property="j1901D01" column="j_1901_d0_1" />
|
|
|
+ <result property="j1901R01" column="j_1901_R0_1" />
|
|
|
+ <result property="j1901S1" column="j_1901_s_1" />
|
|
|
+ <result property="j1901D1" column="j_1901_d_1" />
|
|
|
+ <result property="j1901R1" column="j_1901_r_1" />
|
|
|
+ <result property="j1901S02" column="j_1901_s0_2" />
|
|
|
+ <result property="j1901D02" column="j_1901_d0_2" />
|
|
|
+ <result property="j1901R02" column="j_1901_r0_2" />
|
|
|
+ <result property="j1901S2" column="j_1901_s_2" />
|
|
|
+ <result property="j1901D2" column="j_1901_d_2" />
|
|
|
+ <result property="j1901R2" column="j_1901_r_2" />
|
|
|
+ <result property="assayType" column="assay_type" />
|
|
|
+ <result property="samplePost" column="sample_post" />
|
|
|
+ <result property="resultWendu" column="result_wendu" />
|
|
|
+ <result property="resultShidu" column="result_shidu" />
|
|
|
+ <result property="originalConcentration" column="original_concentration" />
|
|
|
+ <result property="curveNo" column="curve_no" />
|
|
|
+ <result property="readFlag" column="read_flag" />
|
|
|
+ <result property="tongbuZt" column="tongbu_zt" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectZAssayResultVo">
|
|
|
+ select result_id, assay_no, result_no, sample_no, sample_volume, device_no, assay_item, result_concentration, result_abs, result_date, result_time, curve_k0, curve_k1, curve_id, create_by, create_time, update_by, update_time, j_1901_s0_1, j_1901_d0_1, j_1901_R0_1, j_1901_s_1, j_1901_d_1, j_1901_r_1, j_1901_s0_2, j_1901_d0_2, j_1901_r0_2, j_1901_s_2, j_1901_d_2, j_1901_r_2, assay_type, sample_post, result_wendu, result_shidu, original_concentration, curve_no, read_flag, tongbu_zt from z_assay_result
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectZAssayResultList" parameterType="ZAssayResult" resultMap="ZAssayResultResult">
|
|
|
+ <include refid="selectZAssayResultVo"/>
|
|
|
+ <where>
|
|
|
+ 1 = 1
|
|
|
+ <if test="assayNo != null and assayNo != ''"> and assay_no = #{assayNo}</if>
|
|
|
+ <if test="resultNo != null and resultNo != ''"> and result_no = #{resultNo}</if>
|
|
|
+ <if test="sampleNo != null and sampleNo != ''"> and sample_no = #{sampleNo}</if>
|
|
|
+ <if test="sampleVolume != null "> and sample_volume = #{sampleVolume}</if>
|
|
|
+ <if test="deviceNo != null and deviceNo != ''"> and device_no = #{deviceNo}</if>
|
|
|
+ <if test="assayItem != null and assayItem != ''"> and assay_item = #{assayItem}</if>
|
|
|
+ <if test="resultConcentration != null "> and result_concentration = #{resultConcentration}</if>
|
|
|
+ <if test="resultAbs != null "> and result_abs = #{resultAbs}</if>
|
|
|
+ <if test="resultDate != null and resultDate != ''"> and result_date = #{resultDate}</if>
|
|
|
+ <if test="resultTime != null and resultTime != ''"> and result_time = #{resultTime}</if>
|
|
|
+ <if test="curveK0 != null "> and curve_k0 = #{curveK0}</if>
|
|
|
+ <if test="curveK1 != null "> and curve_k1 = #{curveK1}</if>
|
|
|
+ <if test="curveId != null "> and curve_id = #{curveId}</if>
|
|
|
+ <if test="j1901S01 != null "> and j_1901_s0_1 = #{j1901S01}</if>
|
|
|
+ <if test="j1901D01 != null "> and j_1901_d0_1 = #{j1901D01}</if>
|
|
|
+ <if test="j1901R01 != null "> and j_1901_R0_1 = #{j1901R01}</if>
|
|
|
+ <if test="j1901S1 != null "> and j_1901_s_1 = #{j1901S1}</if>
|
|
|
+ <if test="j1901D1 != null "> and j_1901_d_1 = #{j1901D1}</if>
|
|
|
+ <if test="j1901R1 != null "> and j_1901_r_1 = #{j1901R1}</if>
|
|
|
+ <if test="j1901S02 != null "> and j_1901_s0_2 = #{j1901S02}</if>
|
|
|
+ <if test="j1901D02 != null "> and j_1901_d0_2 = #{j1901D02}</if>
|
|
|
+ <if test="j1901R02 != null "> and j_1901_r0_2 = #{j1901R02}</if>
|
|
|
+ <if test="j1901S2 != null "> and j_1901_s_2 = #{j1901S2}</if>
|
|
|
+ <if test="j1901D2 != null "> and j_1901_d_2 = #{j1901D2}</if>
|
|
|
+ <if test="j1901R2 != null "> and j_1901_r_2 = #{j1901R2}</if>
|
|
|
+ <if test="assayType != null and assayType != ''"> and assay_type = #{assayType}</if>
|
|
|
+ <if test="samplePost != null "> and sample_post = #{samplePost}</if>
|
|
|
+ <if test="resultWendu != null "> and result_wendu = #{resultWendu}</if>
|
|
|
+ <if test="resultShidu != null "> and result_shidu = #{resultShidu}</if>
|
|
|
+ <if test="originalConcentration != null "> and original_concentration = #{originalConcentration}</if>
|
|
|
+ <if test="curveNo != null and curveNo != ''"> and curve_no = #{curveNo}</if>
|
|
|
+ <if test="readFlag != null and readFlag != ''"> and read_flag = #{readFlag}</if>
|
|
|
+ <if test="tongbuZt != null and tongbuZt != ''"> and tongbu_zt = #{tongbuZt}</if>
|
|
|
+ </where>
|
|
|
+ and del_flag = 0 order by id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectZAssayResultByResultId" parameterType="Long" resultMap="ZAssayResultResult">
|
|
|
+ <include refid="selectZAssayResultVo"/>
|
|
|
+ where result_id = #{resultId} and del_flag = 0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertZAssayResult" parameterType="ZAssayResult">
|
|
|
+ insert into z_assay_result
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">result_id,</if>
|
|
|
+ <if test="assayNo != null">assay_no,</if>
|
|
|
+ <if test="resultNo != null">result_no,</if>
|
|
|
+ <if test="sampleNo != null">sample_no,</if>
|
|
|
+ <if test="sampleVolume != null">sample_volume,</if>
|
|
|
+ <if test="deviceNo != null">device_no,</if>
|
|
|
+ <if test="assayItem != null">assay_item,</if>
|
|
|
+ <if test="resultConcentration != null">result_concentration,</if>
|
|
|
+ <if test="resultAbs != null">result_abs,</if>
|
|
|
+ <if test="resultDate != null">result_date,</if>
|
|
|
+ <if test="resultTime != null">result_time,</if>
|
|
|
+ <if test="curveK0 != null">curve_k0,</if>
|
|
|
+ <if test="curveK1 != null">curve_k1,</if>
|
|
|
+ <if test="curveId != null">curve_id,</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="j1901S01 != null">j_1901_s0_1,</if>
|
|
|
+ <if test="j1901D01 != null">j_1901_d0_1,</if>
|
|
|
+ <if test="j1901R01 != null">j_1901_R0_1,</if>
|
|
|
+ <if test="j1901S1 != null">j_1901_s_1,</if>
|
|
|
+ <if test="j1901D1 != null">j_1901_d_1,</if>
|
|
|
+ <if test="j1901R1 != null">j_1901_r_1,</if>
|
|
|
+ <if test="j1901S02 != null">j_1901_s0_2,</if>
|
|
|
+ <if test="j1901D02 != null">j_1901_d0_2,</if>
|
|
|
+ <if test="j1901R02 != null">j_1901_r0_2,</if>
|
|
|
+ <if test="j1901S2 != null">j_1901_s_2,</if>
|
|
|
+ <if test="j1901D2 != null">j_1901_d_2,</if>
|
|
|
+ <if test="j1901R2 != null">j_1901_r_2,</if>
|
|
|
+ <if test="assayType != null">assay_type,</if>
|
|
|
+ <if test="samplePost != null">sample_post,</if>
|
|
|
+ <if test="resultWendu != null">result_wendu,</if>
|
|
|
+ <if test="resultShidu != null">result_shidu,</if>
|
|
|
+ <if test="originalConcentration != null">original_concentration,</if>
|
|
|
+ <if test="curveNo != null">curve_no,</if>
|
|
|
+ <if test="readFlag != null">read_flag,</if>
|
|
|
+ <if test="tongbuZt != null">tongbu_zt,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">#{resultId},</if>
|
|
|
+ <if test="assayNo != null">#{assayNo},</if>
|
|
|
+ <if test="resultNo != null">#{resultNo},</if>
|
|
|
+ <if test="sampleNo != null">#{sampleNo},</if>
|
|
|
+ <if test="sampleVolume != null">#{sampleVolume},</if>
|
|
|
+ <if test="deviceNo != null">#{deviceNo},</if>
|
|
|
+ <if test="assayItem != null">#{assayItem},</if>
|
|
|
+ <if test="resultConcentration != null">#{resultConcentration},</if>
|
|
|
+ <if test="resultAbs != null">#{resultAbs},</if>
|
|
|
+ <if test="resultDate != null">#{resultDate},</if>
|
|
|
+ <if test="resultTime != null">#{resultTime},</if>
|
|
|
+ <if test="curveK0 != null">#{curveK0},</if>
|
|
|
+ <if test="curveK1 != null">#{curveK1},</if>
|
|
|
+ <if test="curveId != null">#{curveId},</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="j1901S01 != null">#{j1901S01},</if>
|
|
|
+ <if test="j1901D01 != null">#{j1901D01},</if>
|
|
|
+ <if test="j1901R01 != null">#{j1901R01},</if>
|
|
|
+ <if test="j1901S1 != null">#{j1901S1},</if>
|
|
|
+ <if test="j1901D1 != null">#{j1901D1},</if>
|
|
|
+ <if test="j1901R1 != null">#{j1901R1},</if>
|
|
|
+ <if test="j1901S02 != null">#{j1901S02},</if>
|
|
|
+ <if test="j1901D02 != null">#{j1901D02},</if>
|
|
|
+ <if test="j1901R02 != null">#{j1901R02},</if>
|
|
|
+ <if test="j1901S2 != null">#{j1901S2},</if>
|
|
|
+ <if test="j1901D2 != null">#{j1901D2},</if>
|
|
|
+ <if test="j1901R2 != null">#{j1901R2},</if>
|
|
|
+ <if test="assayType != null">#{assayType},</if>
|
|
|
+ <if test="samplePost != null">#{samplePost},</if>
|
|
|
+ <if test="resultWendu != null">#{resultWendu},</if>
|
|
|
+ <if test="resultShidu != null">#{resultShidu},</if>
|
|
|
+ <if test="originalConcentration != null">#{originalConcentration},</if>
|
|
|
+ <if test="curveNo != null">#{curveNo},</if>
|
|
|
+ <if test="readFlag != null">#{readFlag},</if>
|
|
|
+ <if test="tongbuZt != null">#{tongbuZt},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateZAssayResult" parameterType="ZAssayResult">
|
|
|
+ update z_assay_result
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="assayNo != null">assay_no = #{assayNo},</if>
|
|
|
+ <if test="resultNo != null">result_no = #{resultNo},</if>
|
|
|
+ <if test="sampleNo != null">sample_no = #{sampleNo},</if>
|
|
|
+ <if test="sampleVolume != null">sample_volume = #{sampleVolume},</if>
|
|
|
+ <if test="deviceNo != null">device_no = #{deviceNo},</if>
|
|
|
+ <if test="assayItem != null">assay_item = #{assayItem},</if>
|
|
|
+ <if test="resultConcentration != null">result_concentration = #{resultConcentration},</if>
|
|
|
+ <if test="resultAbs != null">result_abs = #{resultAbs},</if>
|
|
|
+ <if test="resultDate != null">result_date = #{resultDate},</if>
|
|
|
+ <if test="resultTime != null">result_time = #{resultTime},</if>
|
|
|
+ <if test="curveK0 != null">curve_k0 = #{curveK0},</if>
|
|
|
+ <if test="curveK1 != null">curve_k1 = #{curveK1},</if>
|
|
|
+ <if test="curveId != null">curve_id = #{curveId},</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="j1901S01 != null">j_1901_s0_1 = #{j1901S01},</if>
|
|
|
+ <if test="j1901D01 != null">j_1901_d0_1 = #{j1901D01},</if>
|
|
|
+ <if test="j1901R01 != null">j_1901_R0_1 = #{j1901R01},</if>
|
|
|
+ <if test="j1901S1 != null">j_1901_s_1 = #{j1901S1},</if>
|
|
|
+ <if test="j1901D1 != null">j_1901_d_1 = #{j1901D1},</if>
|
|
|
+ <if test="j1901R1 != null">j_1901_r_1 = #{j1901R1},</if>
|
|
|
+ <if test="j1901S02 != null">j_1901_s0_2 = #{j1901S02},</if>
|
|
|
+ <if test="j1901D02 != null">j_1901_d0_2 = #{j1901D02},</if>
|
|
|
+ <if test="j1901R02 != null">j_1901_r0_2 = #{j1901R02},</if>
|
|
|
+ <if test="j1901S2 != null">j_1901_s_2 = #{j1901S2},</if>
|
|
|
+ <if test="j1901D2 != null">j_1901_d_2 = #{j1901D2},</if>
|
|
|
+ <if test="j1901R2 != null">j_1901_r_2 = #{j1901R2},</if>
|
|
|
+ <if test="assayType != null">assay_type = #{assayType},</if>
|
|
|
+ <if test="samplePost != null">sample_post = #{samplePost},</if>
|
|
|
+ <if test="resultWendu != null">result_wendu = #{resultWendu},</if>
|
|
|
+ <if test="resultShidu != null">result_shidu = #{resultShidu},</if>
|
|
|
+ <if test="originalConcentration != null">original_concentration = #{originalConcentration},</if>
|
|
|
+ <if test="curveNo != null">curve_no = #{curveNo},</if>
|
|
|
+ <if test="readFlag != null">read_flag = #{readFlag},</if>
|
|
|
+ <if test="tongbuZt != null">tongbu_zt = #{tongbuZt},</if>
|
|
|
+ </trim>
|
|
|
+ ,revision = revision + 1
|
|
|
+ where result_id = #{resultId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <delete id="deleteZAssayResultByResultId" parameterType="Long">
|
|
|
+ update z_assay_result set del_flag = 2,revision = revision + 1 where del_flag = 0 and result_id = #{resultId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteZAssayResultByResultIds" parameterType="String">
|
|
|
+ update z_assay_result set del_flag = 2,revision = revision + 1 where del_flag = 0 and result_id in
|
|
|
+ <foreach item="resultId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{resultId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|