<?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.emr.dao.ArchiveOtherExtMapper">
  <resultMap id="BaseResultMap" type="com.emr.entity.ArchiveOtherExt">
    <id column="ID" jdbcType="BIGINT" property="id" />
    <result column="SycTime" jdbcType="TIMESTAMP" property="syctime" />
    <result column="SycObj" jdbcType="NVARCHAR" property="sycobj" />
    <result column="otherID" jdbcType="BIGINT" property="otherid" />
    <result column="sysFlag" jdbcType="INTEGER" property="sysflag" />
    <result column="sysUpdateTime" jdbcType="TIMESTAMP" property="sysupdatetime" />
    <result column="jzh" jdbcType="NVARCHAR" property="jzh" />
    <result column="zyh" jdbcType="NVARCHAR" property="zyh" />
    <result column="stime" jdbcType="TIMESTAMP" property="stime" />
    <result column="eTime" jdbcType="TIMESTAMP" property="etime" />
    <result column="statusFlag" jdbcType="INTEGER" property="statusflag" />
    <result column="pResult" jdbcType="NVARCHAR" property="presult" />
    <result column="MID" jdbcType="NVARCHAR" property="mid" />
    <result column="DID" jdbcType="NVARCHAR" property="did" />
    <result column="C1" jdbcType="NVARCHAR" property="c1" />
    <result column="C2" jdbcType="NVARCHAR" property="c2" />
    <result column="C3" jdbcType="NVARCHAR" property="c3" />
    <result column="C4" jdbcType="NVARCHAR" property="c4" />
    <result column="C5" jdbcType="NVARCHAR" property="c5" />
    <result column="C6" jdbcType="NVARCHAR" property="c6" />
    <result column="C7" jdbcType="NVARCHAR" property="c7" />
    <result column="C8" jdbcType="NVARCHAR" property="c8" />
    <result column="C9" jdbcType="NVARCHAR" property="c9" />
    <result column="C10" jdbcType="NVARCHAR" property="c10" />
    <result column="N1" jdbcType="DECIMAL" property="n1" />
    <result column="N2" jdbcType="DECIMAL" property="n2" />
    <result column="N3" jdbcType="DECIMAL" property="n3" />
    <result column="T1" jdbcType="TIMESTAMP" property="t1" />
    <result column="T2" jdbcType="TIMESTAMP" property="t2" />
    <result column="T3" jdbcType="TIMESTAMP" property="t3" />
    <result column="T4" jdbcType="TIMESTAMP" property="t4" />
    <result column="T5" jdbcType="TIMESTAMP" property="t5" />
    <result column="T6" jdbcType="TIMESTAMP" property="t6" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    ID, SycTime, SycObj, otherID, sysFlag, sysUpdateTime, jzh, zyh, stime, eTime, statusFlag, 
    pResult, MID, DID, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, N1, N2, N3, T1, T2, T3, 
    T4, T5, T6
  </sql>
  <select id="selectByExample" parameterType="com.emr.entity.ArchiveOtherExt" resultMap="BaseResultMap">
    select  distinct 'false' as QUERYID,
    <include refid="Base_Column_List" />
    from archive_other_ext
    <where>
      1=1
      <if test="mid != null">
        and mid=#{mid,jdbcType=NVARCHAR}
      </if>
      <if test="sysflag != null">
        and sysflag=#{sysflag,jdbcType=INTEGER}
      </if>
      <!--<if test="_parameter != null">
        <include refid="Example_Where_Clause" />
      </if>
      <if test="orderByClause != null">
        order by ${orderByClause}
      </if>-->
    </where>

  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from archive_other_ext
    where ID = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from archive_other_ext
    where ID = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.emr.entity.ArchiveOtherExt">
    insert into archive_other_ext (ID, SycTime, SycObj, 
      otherID, sysFlag, sysUpdateTime, 
      jzh, zyh, stime, 
      eTime, statusFlag, pResult, 
      MID, DID, C1, C2, 
      C3, C4, C5, C6, 
      C7, C8, C9, C10, 
      N1, N2, N3, T1, 
      T2, T3, T4, T5, 
      T6)
    values (#{id,jdbcType=BIGINT}, #{syctime,jdbcType=TIMESTAMP}, #{sycobj,jdbcType=NVARCHAR}, 
      #{otherid,jdbcType=BIGINT}, #{sysflag,jdbcType=INTEGER}, #{sysupdatetime,jdbcType=TIMESTAMP}, 
      #{jzh,jdbcType=NVARCHAR}, #{zyh,jdbcType=NVARCHAR}, #{stime,jdbcType=TIMESTAMP}, 
      #{etime,jdbcType=TIMESTAMP}, #{statusflag,jdbcType=INTEGER}, #{presult,jdbcType=NVARCHAR}, 
      #{mid,jdbcType=NVARCHAR}, #{did,jdbcType=NVARCHAR}, #{c1,jdbcType=NVARCHAR}, #{c2,jdbcType=NVARCHAR}, 
      #{c3,jdbcType=NVARCHAR}, #{c4,jdbcType=NVARCHAR}, #{c5,jdbcType=NVARCHAR}, #{c6,jdbcType=NVARCHAR}, 
      #{c7,jdbcType=NVARCHAR}, #{c8,jdbcType=NVARCHAR}, #{c9,jdbcType=NVARCHAR}, #{c10,jdbcType=NVARCHAR}, 
      #{n1,jdbcType=DECIMAL}, #{n2,jdbcType=DECIMAL}, #{n3,jdbcType=DECIMAL}, #{t1,jdbcType=TIMESTAMP}, 
      #{t2,jdbcType=TIMESTAMP}, #{t3,jdbcType=TIMESTAMP}, #{t4,jdbcType=TIMESTAMP}, #{t5,jdbcType=TIMESTAMP}, 
      #{t6,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.emr.entity.ArchiveOtherExt">
    insert into archive_other_ext
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="syctime != null">
        SycTime,
      </if>
      <if test="sycobj != null">
        SycObj,
      </if>
      <if test="otherid != null">
        otherID,
      </if>
      <if test="sysflag != null">
        sysFlag,
      </if>
      <if test="sysupdatetime != null">
        sysUpdateTime,
      </if>
      <if test="jzh != null">
        jzh,
      </if>
      <if test="zyh != null">
        zyh,
      </if>
      <if test="stime != null">
        stime,
      </if>
      <if test="etime != null">
        eTime,
      </if>
      <if test="statusflag != null">
        statusFlag,
      </if>
      <if test="presult != null">
        pResult,
      </if>
      <if test="mid != null">
        MID,
      </if>
      <if test="did != null">
        DID,
      </if>
      <if test="c1 != null">
        C1,
      </if>
      <if test="c2 != null">
        C2,
      </if>
      <if test="c3 != null">
        C3,
      </if>
      <if test="c4 != null">
        C4,
      </if>
      <if test="c5 != null">
        C5,
      </if>
      <if test="c6 != null">
        C6,
      </if>
      <if test="c7 != null">
        C7,
      </if>
      <if test="c8 != null">
        C8,
      </if>
      <if test="c9 != null">
        C9,
      </if>
      <if test="c10 != null">
        C10,
      </if>
      <if test="n1 != null">
        N1,
      </if>
      <if test="n2 != null">
        N2,
      </if>
      <if test="n3 != null">
        N3,
      </if>
      <if test="t1 != null">
        T1,
      </if>
      <if test="t2 != null">
        T2,
      </if>
      <if test="t3 != null">
        T3,
      </if>
      <if test="t4 != null">
        T4,
      </if>
      <if test="t5 != null">
        T5,
      </if>
      <if test="t6 != null">
        T6,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="syctime != null">
        #{syctime,jdbcType=TIMESTAMP},
      </if>
      <if test="sycobj != null">
        #{sycobj,jdbcType=NVARCHAR},
      </if>
      <if test="otherid != null">
        #{otherid,jdbcType=BIGINT},
      </if>
      <if test="sysflag != null">
        #{sysflag,jdbcType=INTEGER},
      </if>
      <if test="sysupdatetime != null">
        #{sysupdatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="jzh != null">
        #{jzh,jdbcType=NVARCHAR},
      </if>
      <if test="zyh != null">
        #{zyh,jdbcType=NVARCHAR},
      </if>
      <if test="stime != null">
        #{stime,jdbcType=TIMESTAMP},
      </if>
      <if test="etime != null">
        #{etime,jdbcType=TIMESTAMP},
      </if>
      <if test="statusflag != null">
        #{statusflag,jdbcType=INTEGER},
      </if>
      <if test="presult != null">
        #{presult,jdbcType=NVARCHAR},
      </if>
      <if test="mid != null">
        #{mid,jdbcType=NVARCHAR},
      </if>
      <if test="did != null">
        #{did,jdbcType=NVARCHAR},
      </if>
      <if test="c1 != null">
        #{c1,jdbcType=NVARCHAR},
      </if>
      <if test="c2 != null">
        #{c2,jdbcType=NVARCHAR},
      </if>
      <if test="c3 != null">
        #{c3,jdbcType=NVARCHAR},
      </if>
      <if test="c4 != null">
        #{c4,jdbcType=NVARCHAR},
      </if>
      <if test="c5 != null">
        #{c5,jdbcType=NVARCHAR},
      </if>
      <if test="c6 != null">
        #{c6,jdbcType=NVARCHAR},
      </if>
      <if test="c7 != null">
        #{c7,jdbcType=NVARCHAR},
      </if>
      <if test="c8 != null">
        #{c8,jdbcType=NVARCHAR},
      </if>
      <if test="c9 != null">
        #{c9,jdbcType=NVARCHAR},
      </if>
      <if test="c10 != null">
        #{c10,jdbcType=NVARCHAR},
      </if>
      <if test="n1 != null">
        #{n1,jdbcType=DECIMAL},
      </if>
      <if test="n2 != null">
        #{n2,jdbcType=DECIMAL},
      </if>
      <if test="n3 != null">
        #{n3,jdbcType=DECIMAL},
      </if>
      <if test="t1 != null">
        #{t1,jdbcType=TIMESTAMP},
      </if>
      <if test="t2 != null">
        #{t2,jdbcType=TIMESTAMP},
      </if>
      <if test="t3 != null">
        #{t3,jdbcType=TIMESTAMP},
      </if>
      <if test="t4 != null">
        #{t4,jdbcType=TIMESTAMP},
      </if>
      <if test="t5 != null">
        #{t5,jdbcType=TIMESTAMP},
      </if>
      <if test="t6 != null">
        #{t6,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.ArchiveOtherExt">
    update archive_other_ext
    <set>
      <if test="syctime != null">
        SycTime = #{syctime,jdbcType=TIMESTAMP},
      </if>
      <if test="sycobj != null">
        SycObj = #{sycobj,jdbcType=NVARCHAR},
      </if>
      <if test="otherid != null">
        otherID = #{otherid,jdbcType=BIGINT},
      </if>
      <if test="sysflag != null">
        sysFlag = #{sysflag,jdbcType=INTEGER},
      </if>
      <if test="sysupdatetime != null">
        sysUpdateTime = #{sysupdatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="jzh != null">
        jzh = #{jzh,jdbcType=NVARCHAR},
      </if>
      <if test="zyh != null">
        zyh = #{zyh,jdbcType=NVARCHAR},
      </if>
      <if test="stime != null">
        stime = #{stime,jdbcType=TIMESTAMP},
      </if>
      <if test="etime != null">
        eTime = #{etime,jdbcType=TIMESTAMP},
      </if>
      <if test="statusflag != null">
        statusFlag = #{statusflag,jdbcType=INTEGER},
      </if>
      <if test="presult != null">
        pResult = #{presult,jdbcType=NVARCHAR},
      </if>
      <if test="mid != null">
        MID = #{mid,jdbcType=NVARCHAR},
      </if>
      <if test="did != null">
        DID = #{did,jdbcType=NVARCHAR},
      </if>
      <if test="c1 != null">
        C1 = #{c1,jdbcType=NVARCHAR},
      </if>
      <if test="c2 != null">
        C2 = #{c2,jdbcType=NVARCHAR},
      </if>
      <if test="c3 != null">
        C3 = #{c3,jdbcType=NVARCHAR},
      </if>
      <if test="c4 != null">
        C4 = #{c4,jdbcType=NVARCHAR},
      </if>
      <if test="c5 != null">
        C5 = #{c5,jdbcType=NVARCHAR},
      </if>
      <if test="c6 != null">
        C6 = #{c6,jdbcType=NVARCHAR},
      </if>
      <if test="c7 != null">
        C7 = #{c7,jdbcType=NVARCHAR},
      </if>
      <if test="c8 != null">
        C8 = #{c8,jdbcType=NVARCHAR},
      </if>
      <if test="c9 != null">
        C9 = #{c9,jdbcType=NVARCHAR},
      </if>
      <if test="c10 != null">
        C10 = #{c10,jdbcType=NVARCHAR},
      </if>
      <if test="n1 != null">
        N1 = #{n1,jdbcType=DECIMAL},
      </if>
      <if test="n2 != null">
        N2 = #{n2,jdbcType=DECIMAL},
      </if>
      <if test="n3 != null">
        N3 = #{n3,jdbcType=DECIMAL},
      </if>
      <if test="t1 != null">
        T1 = #{t1,jdbcType=TIMESTAMP},
      </if>
      <if test="t2 != null">
        T2 = #{t2,jdbcType=TIMESTAMP},
      </if>
      <if test="t3 != null">
        T3 = #{t3,jdbcType=TIMESTAMP},
      </if>
      <if test="t4 != null">
        T4 = #{t4,jdbcType=TIMESTAMP},
      </if>
      <if test="t5 != null">
        T5 = #{t5,jdbcType=TIMESTAMP},
      </if>
      <if test="t6 != null">
        T6 = #{t6,jdbcType=TIMESTAMP},
      </if>
    </set>
    where ID = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.emr.entity.ArchiveOtherExt">
    update archive_other_ext
    set SycTime = #{syctime,jdbcType=TIMESTAMP},
      SycObj = #{sycobj,jdbcType=NVARCHAR},
      otherID = #{otherid,jdbcType=BIGINT},
      sysFlag = #{sysflag,jdbcType=INTEGER},
      sysUpdateTime = #{sysupdatetime,jdbcType=TIMESTAMP},
      jzh = #{jzh,jdbcType=NVARCHAR},
      zyh = #{zyh,jdbcType=NVARCHAR},
      stime = #{stime,jdbcType=TIMESTAMP},
      eTime = #{etime,jdbcType=TIMESTAMP},
      statusFlag = #{statusflag,jdbcType=INTEGER},
      pResult = #{presult,jdbcType=NVARCHAR},
      MID = #{mid,jdbcType=NVARCHAR},
      DID = #{did,jdbcType=NVARCHAR},
      C1 = #{c1,jdbcType=NVARCHAR},
      C2 = #{c2,jdbcType=NVARCHAR},
      C3 = #{c3,jdbcType=NVARCHAR},
      C4 = #{c4,jdbcType=NVARCHAR},
      C5 = #{c5,jdbcType=NVARCHAR},
      C6 = #{c6,jdbcType=NVARCHAR},
      C7 = #{c7,jdbcType=NVARCHAR},
      C8 = #{c8,jdbcType=NVARCHAR},
      C9 = #{c9,jdbcType=NVARCHAR},
      C10 = #{c10,jdbcType=NVARCHAR},
      N1 = #{n1,jdbcType=DECIMAL},
      N2 = #{n2,jdbcType=DECIMAL},
      N3 = #{n3,jdbcType=DECIMAL},
      T1 = #{t1,jdbcType=TIMESTAMP},
      T2 = #{t2,jdbcType=TIMESTAMP},
      T3 = #{t3,jdbcType=TIMESTAMP},
      T4 = #{t4,jdbcType=TIMESTAMP},
      T5 = #{t5,jdbcType=TIMESTAMP},
      T6 = #{t6,jdbcType=TIMESTAMP}
    where ID = #{id,jdbcType=BIGINT}
  </update>
</mapper>