<?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.unis.base.server.dao.TyLskcxxHisDao" >
  <resultMap id="BaseResultMap" type="com.unis.base.server.entity.TyLskcxxHisDO" >
    <result column="ID" property="id" jdbcType="VARCHAR" />
    <result column="KCXXID" property="kcxxid" jdbcType="VARCHAR" />
    <result column="HWBM" property="hwbm" jdbcType="VARCHAR" />
    <result column="SSAJBH" property="ssajbh" jdbcType="VARCHAR" />
    <result column="SSAJMC" property="ssajmc" jdbcType="VARCHAR" />
    <result column="SSCFBH" property="sscfbh" jdbcType="VARCHAR" />
    <result column="SSCFMC" property="sscfmc" jdbcType="VARCHAR" />
    <result column="SSKDDM" property="sskddm" jdbcType="VARCHAR" />
    <result column="SSKDMC" property="sskdmc" jdbcType="VARCHAR" />
    <result column="SSYDDM" property="ssyddm" jdbcType="VARCHAR" />
    <result column="SSYQMC" property="ssyqmc" jdbcType="VARCHAR" />
    <result column="LSPZBM" property="lspzbm" jdbcType="VARCHAR" />
    <result column="LSPZMC" property="lspzmc" jdbcType="VARCHAR" />
    <result column="LSND" property="lsnd" jdbcType="VARCHAR" />
    <result column="CCQJ" property="ccqj" jdbcType="VARCHAR" />
    <result column="PZBM" property="pzbm" jdbcType="VARCHAR" />
    <result column="LSXZBM" property="lsxzbm" jdbcType="VARCHAR" />
    <result column="LSCCFSBM" property="lsccfsbm" jdbcType="VARCHAR" />
    <result column="LSCCFSMC" property="lsccfsmc" jdbcType="VARCHAR" />
    <result column="LSXZMC" property="lsxzmc" jdbcType="VARCHAR" />
    <result column="RKSJ" property="rksj" jdbcType="DATE" />
    <result column="CZHDDJ" property="czhddj" jdbcType="VARCHAR" />
    <result column="LSDJBM" property="lsdjbm" jdbcType="VARCHAR" />
    <result column="LSDJMC" property="lsdjmc" jdbcType="VARCHAR" />
    <result column="SHND" property="shnd" jdbcType="VARCHAR" />
    <result column="LSGB" property="lsgb" jdbcType="VARCHAR" />
    <result column="LSCD" property="lscd" jdbcType="VARCHAR" />
    <result column="BGYBM" property="bgybm" jdbcType="VARCHAR" />
    <result column="BGYMC" property="bgymc" jdbcType="VARCHAR" />
    <result column="LQGSDWBM" property="lqgsdwbm" jdbcType="VARCHAR" />
    <result column="LQGSDWMC" property="lqgsdwmc" jdbcType="VARCHAR" />
    <result column="FCSJ" property="fcsj" jdbcType="DATE" />
    <result column="FCSL" property="fcsl" jdbcType="DECIMAL" />
    <result column="QCSJ" property="qcsj" jdbcType="DATE" />
    <result column="STATUS" property="status" jdbcType="DECIMAL" />
    <result column="CREATOR" property="creator" jdbcType="VARCHAR" />
    <result column="CREATOR_CODE" property="creatorCode" jdbcType="VARCHAR" />
    <result column="CREATE_DATE" property="createDate" jdbcType="TIMESTAMP" />
    <result column="REFRESHER" property="refresher" jdbcType="VARCHAR" />
    <result column="REFRESHER_CODE" property="refresherCode" jdbcType="VARCHAR" />
    <result column="REFRESH_TIME" property="refreshTime" jdbcType="TIMESTAMP" />
    <result column="REMARK" property="remark" jdbcType="VARCHAR" />
  </resultMap>

  <sql id="Base_Column_List" >
    ID, KCXXID, HWBM, SSAJBH, SSAJMC, SSCFBH, SSCFMC, SSKDDM, SSKDMC, SSYDDM, SSYQMC, 
    LSPZBM, LSPZMC, LSND, CCQJ, PZBM, LSXZBM, LSCCFSBM, LSCCFSMC, LSXZMC, RKSJ, CZHDDJ, 
    LSDJBM, LSDJMC, SHND, LSGB, LSCD, BGYBM, BGYMC, LQGSDWBM, LQGSDWMC, FCSJ, FCSL, QCSJ, 
    STATUS, CREATOR, CREATOR_CODE, CREATE_DATE, REFRESHER, REFRESHER_CODE, REFRESH_TIME, 
    REMARK
  </sql>

  <select id="getTyLskcxxHisList" resultMap="BaseResultMap">
    select <include refid="Base_Column_List"/> from TY_LSKCXX_HIS where status = 1 order by id asc
  </select>

  <insert id="insert" parameterType="com.unis.base.server.entity.TyLskcxxDO" >
    insert into TY_LSKCXX_HIS
    <trim prefix="(" suffix=")" suffixOverrides="," >
        ID,
      <if test="kcxxid != null" >
        KCXXID,
      </if>
      <if test="hwbm != null" >
        HWBM,
      </if>
      <if test="ssajbh != null" >
        SSAJBH,
      </if>
      <if test="ssajmc != null" >
        SSAJMC,
      </if>
      <if test="sscfbh != null" >
        SSCFBH,
      </if>
      <if test="sscfmc != null" >
        SSCFMC,
      </if>
      <if test="sskddm != null" >
        SSKDDM,
      </if>
      <if test="sskdmc != null" >
        SSKDMC,
      </if>
      <if test="ssyddm != null" >
        SSYDDM,
      </if>
      <if test="ssyqmc != null" >
        SSYQMC,
      </if>
      <if test="lspzbm != null" >
        LSPZBM,
      </if>
      <if test="lspzmc != null" >
        LSPZMC,
      </if>
      <if test="lsnd != null" >
        LSND,
      </if>
      <if test="ccqj != null" >
        CCQJ,
      </if>
      <if test="pzbm != null" >
        PZBM,
      </if>
      <if test="lsxzbm != null" >
        LSXZBM,
      </if>
      <if test="lsccfsbm != null" >
        LSCCFSBM,
      </if>
      <if test="lsccfsmc != null" >
        LSCCFSMC,
      </if>
      <if test="lsxzmc != null" >
        LSXZMC,
      </if>
      <if test="rksj != null" >
        RKSJ,
      </if>
      <if test="czhddj != null" >
        CZHDDJ,
      </if>
      <if test="lsdjbm != null" >
        LSDJBM,
      </if>
      <if test="lsdjmc != null" >
        LSDJMC,
      </if>
      <if test="shnd != null" >
        SHND,
      </if>
      <if test="lsgb != null" >
        LSGB,
      </if>
      <if test="lscd != null" >
        LSCD,
      </if>
      <if test="bgybm != null" >
        BGYBM,
      </if>
      <if test="bgymc != null" >
        BGYMC,
      </if>
      <if test="lqgsdwbm != null" >
        LQGSDWBM,
      </if>
      <if test="lqgsdwmc != null" >
        LQGSDWMC,
      </if>
      <if test="fcsj != null" >
        FCSJ,
      </if>
      <if test="fcsl != null" >
        FCSL,
      </if>
      <if test="qcsj != null" >
        QCSJ,
      </if>
      <if test="status != null" >
        STATUS,
      </if>
      <if test="creator != null" >
        CREATOR,
      </if>
      <if test="creatorCode != null" >
        CREATOR_CODE,
      </if>
      <if test="createDate != null" >
        CREATE_DATE,
      </if>
      <if test="refresher != null" >
        REFRESHER,
      </if>
      <if test="refresherCode != null" >
        REFRESHER_CODE,
      </if>
      <if test="refreshTime != null" >
        REFRESH_TIME,
      </if>
      <if test="remark != null" >
        REMARK,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      ty_lskcxx_his_id_sequence.nextval,
      <if test="kcxxid != null" >
        #{kcxxid,jdbcType=VARCHAR},
      </if>
      <if test="hwbm != null" >
        #{hwbm,jdbcType=VARCHAR},
      </if>
      <if test="ssajbh != null" >
        #{ssajbh,jdbcType=VARCHAR},
      </if>
      <if test="ssajmc != null" >
        #{ssajmc,jdbcType=VARCHAR},
      </if>
      <if test="sscfbh != null" >
        #{sscfbh,jdbcType=VARCHAR},
      </if>
      <if test="sscfmc != null" >
        #{sscfmc,jdbcType=VARCHAR},
      </if>
      <if test="sskddm != null" >
        #{sskddm,jdbcType=VARCHAR},
      </if>
      <if test="sskdmc != null" >
        #{sskdmc,jdbcType=VARCHAR},
      </if>
      <if test="ssyddm != null" >
        #{ssyddm,jdbcType=VARCHAR},
      </if>
      <if test="ssyqmc != null" >
        #{ssyqmc,jdbcType=VARCHAR},
      </if>
      <if test="lspzbm != null" >
        #{lspzbm,jdbcType=VARCHAR},
      </if>
      <if test="lspzmc != null" >
        #{lspzmc,jdbcType=VARCHAR},
      </if>
      <if test="lsnd != null" >
        #{lsnd,jdbcType=VARCHAR},
      </if>
      <if test="ccqj != null" >
        #{ccqj,jdbcType=VARCHAR},
      </if>
      <if test="pzbm != null" >
        #{pzbm,jdbcType=VARCHAR},
      </if>
      <if test="lsxzbm != null" >
        #{lsxzbm,jdbcType=VARCHAR},
      </if>
      <if test="lsccfsbm != null" >
        #{lsccfsbm,jdbcType=VARCHAR},
      </if>
      <if test="lsccfsmc != null" >
        #{lsccfsmc,jdbcType=VARCHAR},
      </if>
      <if test="lsxzmc != null" >
        #{lsxzmc,jdbcType=VARCHAR},
      </if>
      <if test="rksj != null" >
        #{rksj,jdbcType=DATE},
      </if>
      <if test="czhddj != null" >
        #{czhddj,jdbcType=VARCHAR},
      </if>
      <if test="lsdjbm != null" >
        #{lsdjbm,jdbcType=VARCHAR},
      </if>
      <if test="lsdjmc != null" >
        #{lsdjmc,jdbcType=VARCHAR},
      </if>
      <if test="shnd != null" >
        #{shnd,jdbcType=VARCHAR},
      </if>
      <if test="lsgb != null" >
        #{lsgb,jdbcType=VARCHAR},
      </if>
      <if test="lscd != null" >
        #{lscd,jdbcType=VARCHAR},
      </if>
      <if test="bgybm != null" >
        #{bgybm,jdbcType=VARCHAR},
      </if>
      <if test="bgymc != null" >
        #{bgymc,jdbcType=VARCHAR},
      </if>
      <if test="lqgsdwbm != null" >
        #{lqgsdwbm,jdbcType=VARCHAR},
      </if>
      <if test="lqgsdwmc != null" >
        #{lqgsdwmc,jdbcType=VARCHAR},
      </if>
      <if test="fcsj != null" >
        #{fcsj,jdbcType=DATE},
      </if>
      <if test="fcsl != null" >
        #{fcsl,jdbcType=DECIMAL},
      </if>
      <if test="qcsj != null" >
        #{qcsj,jdbcType=DATE},
      </if>
      <if test="status != null" >
        #{status,jdbcType=DECIMAL},
      </if>
      <if test="creator != null" >
        #{creator,jdbcType=VARCHAR},
      </if>
      <if test="creatorCode != null" >
        #{creatorCode,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null" >
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="refresher != null" >
        #{refresher,jdbcType=VARCHAR},
      </if>
      <if test="refresherCode != null" >
        #{refresherCode,jdbcType=VARCHAR},
      </if>
      <if test="refreshTime != null" >
        #{refreshTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>

  <update id="updateByExampleSelective" parameterType="map" >
    update TY_LSKCXX_HIS
    <set >
      <if test="record.id != null" >
        ID = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.kcxxid != null" >
        KCXXID = #{record.kcxxid,jdbcType=VARCHAR},
      </if>
      <if test="record.hwbm != null" >
        HWBM = #{record.hwbm,jdbcType=VARCHAR},
      </if>
      <if test="record.ssajbh != null" >
        SSAJBH = #{record.ssajbh,jdbcType=VARCHAR},
      </if>
      <if test="record.ssajmc != null" >
        SSAJMC = #{record.ssajmc,jdbcType=VARCHAR},
      </if>
      <if test="record.sscfbh != null" >
        SSCFBH = #{record.sscfbh,jdbcType=VARCHAR},
      </if>
      <if test="record.sscfmc != null" >
        SSCFMC = #{record.sscfmc,jdbcType=VARCHAR},
      </if>
      <if test="record.sskddm != null" >
        SSKDDM = #{record.sskddm,jdbcType=VARCHAR},
      </if>
      <if test="record.sskdmc != null" >
        SSKDMC = #{record.sskdmc,jdbcType=VARCHAR},
      </if>
      <if test="record.ssyddm != null" >
        SSYDDM = #{record.ssyddm,jdbcType=VARCHAR},
      </if>
      <if test="record.ssyqmc != null" >
        SSYQMC = #{record.ssyqmc,jdbcType=VARCHAR},
      </if>
      <if test="record.lspzbm != null" >
        LSPZBM = #{record.lspzbm,jdbcType=VARCHAR},
      </if>
      <if test="record.lspzmc != null" >
        LSPZMC = #{record.lspzmc,jdbcType=VARCHAR},
      </if>
      <if test="record.lsnd != null" >
        LSND = #{record.lsnd,jdbcType=VARCHAR},
      </if>
      <if test="record.ccqj != null" >
        CCQJ = #{record.ccqj,jdbcType=VARCHAR},
      </if>
      <if test="record.pzbm != null" >
        PZBM = #{record.pzbm,jdbcType=VARCHAR},
      </if>
      <if test="record.lsxzbm != null" >
        LSXZBM = #{record.lsxzbm,jdbcType=VARCHAR},
      </if>
      <if test="record.lsccfsbm != null" >
        LSCCFSBM = #{record.lsccfsbm,jdbcType=VARCHAR},
      </if>
      <if test="record.lsccfsmc != null" >
        LSCCFSMC = #{record.lsccfsmc,jdbcType=VARCHAR},
      </if>
      <if test="record.lsxzmc != null" >
        LSXZMC = #{record.lsxzmc,jdbcType=VARCHAR},
      </if>
      <if test="record.rksj != null" >
        RKSJ = #{record.rksj,jdbcType=DATE},
      </if>
      <if test="record.czhddj != null" >
        CZHDDJ = #{record.czhddj,jdbcType=VARCHAR},
      </if>
      <if test="record.lsdjbm != null" >
        LSDJBM = #{record.lsdjbm,jdbcType=VARCHAR},
      </if>
      <if test="record.lsdjmc != null" >
        LSDJMC = #{record.lsdjmc,jdbcType=VARCHAR},
      </if>
      <if test="record.shnd != null" >
        SHND = #{record.shnd,jdbcType=VARCHAR},
      </if>
      <if test="record.lsgb != null" >
        LSGB = #{record.lsgb,jdbcType=VARCHAR},
      </if>
      <if test="record.lscd != null" >
        LSCD = #{record.lscd,jdbcType=VARCHAR},
      </if>
      <if test="record.bgybm != null" >
        BGYBM = #{record.bgybm,jdbcType=VARCHAR},
      </if>
      <if test="record.bgymc != null" >
        BGYMC = #{record.bgymc,jdbcType=VARCHAR},
      </if>
      <if test="record.lqgsdwbm != null" >
        LQGSDWBM = #{record.lqgsdwbm,jdbcType=VARCHAR},
      </if>
      <if test="record.lqgsdwmc != null" >
        LQGSDWMC = #{record.lqgsdwmc,jdbcType=VARCHAR},
      </if>
      <if test="record.fcsj != null" >
        FCSJ = #{record.fcsj,jdbcType=DATE},
      </if>
      <if test="record.fcsl != null" >
        FCSL = #{record.fcsl,jdbcType=DECIMAL},
      </if>
      <if test="record.qcsj != null" >
        QCSJ = #{record.qcsj,jdbcType=DATE},
      </if>
      <if test="record.status != null" >
        STATUS = #{record.status,jdbcType=DECIMAL},
      </if>
      <if test="record.creator != null" >
        CREATOR = #{record.creator,jdbcType=VARCHAR},
      </if>
      <if test="record.creatorCode != null" >
        CREATOR_CODE = #{record.creatorCode,jdbcType=VARCHAR},
      </if>
      <if test="record.createDate != null" >
        CREATE_DATE = #{record.createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.refresher != null" >
        REFRESHER = #{record.refresher,jdbcType=VARCHAR},
      </if>
      <if test="record.refresherCode != null" >
        REFRESHER_CODE = #{record.refresherCode,jdbcType=VARCHAR},
      </if>
      <if test="record.refreshTime != null" >
        REFRESH_TIME = #{record.refreshTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.remark != null" >
        REMARK = #{record.remark,jdbcType=VARCHAR},
      </if>
    </set>
  </update>

</mapper>