<?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.NatureTransDao" >
  <resultMap id="BaseResultMap" type="com.unis.base.server.entity.XZzbDo" >
    <id column="XZZBDBH" property="xzzbdbh" jdbcType="VARCHAR" />
    <result column="CFBH" property="cfbh" jdbcType="VARCHAR" />
    <result column="HWBM" property="hwbm" jdbcType="VARCHAR" />
    <result column="LSSL" property="lssl" jdbcType="DECIMAL" />
    <result column="HZSL" property="hzsl" jdbcType="DECIMAL" />
    <result column="BZWH" property="bzwh" jdbcType="VARCHAR" />
    <result column="LSPZ" property="lspz" jdbcType="VARCHAR" />
    <result column="YKCXZ" property="ykcxz" jdbcType="VARCHAR" />
    <result column="ZRXZ" property="zrxz" jdbcType="VARCHAR" />
    <result column="HZSJ" property="hzsj" jdbcType="TIMESTAMP" />
    <result column="CCSHR" property="ccshr" jdbcType="VARCHAR" />
    <result column="ZJSHR" property="zjshr" jdbcType="VARCHAR" />
    <result column="TJSHR" property="tjshr" jdbcType="VARCHAR" />
    <result column="KJSHR" property="kjshr" jdbcType="VARCHAR" />
    <result column="LDSHR" property="ldshr" jdbcType="VARCHAR" />
    <result column="BZ" property="bz" jdbcType="VARCHAR" />
    <result column="CZBZ" property="czbz" jdbcType="VARCHAR" />
    <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="Example_Where_Clause" >
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause" >
    <where >
      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    XZZBDBH, CFBH, HWBM, LSSL, HZSL, BZWH, LSPZ, YKCXZ, ZRXZ, HZSJ, CCSHR, ZJSHR, TJSHR, 
    KJSHR, LDSHR, BZ, CZBZ, STATUS, CREATOR, CREATOR_CODE, CREATE_DATE, REFRESHER, REFRESHER_CODE, 
    REFRESH_TIME, REMARK
  </sql>
<!--   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.unis.base.server.entity.XZzbExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from X_ZZB
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select> -->
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from X_ZZB
    where XZZBDBH = #{xzzbdbh,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from X_ZZB
    where XZZBDBH = #{xzzbdbh,jdbcType=VARCHAR}
  </delete>
<!--   <delete id="deleteByExample" parameterType="com.unis.base.server.entity.XZzbExample" >
    delete from X_ZZB
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete> -->
  <insert id="insert" parameterType="com.unis.base.server.entity.XZzbDo" >
    insert into X_ZZB (XZZBDBH, CFBH, HWBM, 
      LSSL, HZSL, BZWH, LSPZ, 
      YKCXZ, ZRXZ, HZSJ, 
      CCSHR, ZJSHR, TJSHR, 
      KJSHR, LDSHR, BZ, CZBZ, 
      STATUS, CREATOR, CREATOR_CODE, 
      CREATE_DATE, REFRESHER, REFRESHER_CODE, 
      REFRESH_TIME, REMARK)
    values (#{xzzbdbh,jdbcType=VARCHAR}, #{cfbh,jdbcType=VARCHAR}, #{hwbm,jdbcType=VARCHAR}, 
      #{lssl,jdbcType=DECIMAL}, #{hzsl,jdbcType=DECIMAL}, #{bzwh,jdbcType=VARCHAR}, #{lspz,jdbcType=VARCHAR}, 
      #{ykcxz,jdbcType=VARCHAR}, #{zrxz,jdbcType=VARCHAR}, #{hzsj,jdbcType=TIMESTAMP}, 
      #{ccshr,jdbcType=VARCHAR}, #{zjshr,jdbcType=VARCHAR}, #{tjshr,jdbcType=VARCHAR}, 
      #{kjshr,jdbcType=VARCHAR}, #{ldshr,jdbcType=VARCHAR}, #{bz,jdbcType=VARCHAR}, #{czbz,jdbcType=VARCHAR}, 
      #{status,jdbcType=DECIMAL}, #{creator,jdbcType=VARCHAR}, #{creatorCode,jdbcType=VARCHAR}, 
      #{createDate,jdbcType=TIMESTAMP}, #{refresher,jdbcType=VARCHAR}, #{refresherCode,jdbcType=VARCHAR}, 
      #{refreshTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.unis.base.server.entity.XZzbDo" >
    insert into X_ZZB
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="xzzbdbh != null" >
        XZZBDBH,
      </if>
      <if test="cfbh != null" >
        CFBH,
      </if>
      <if test="hwbm != null" >
        HWBM,
      </if>
      <if test="lssl != null" >
        LSSL,
      </if>
      <if test="hzsl != null" >
        HZSL,
      </if>
      <if test="bzwh != null" >
        BZWH,
      </if>
      <if test="lspz != null" >
        LSPZ,
      </if>
      <if test="ykcxz != null" >
        YKCXZ,
      </if>
      <if test="zrxz != null" >
        ZRXZ,
      </if>
      <if test="hzsj != null" >
        HZSJ,
      </if>
      <if test="ccshr != null" >
        CCSHR,
      </if>
      <if test="zjshr != null" >
        ZJSHR,
      </if>
      <if test="tjshr != null" >
        TJSHR,
      </if>
      <if test="kjshr != null" >
        KJSHR,
      </if>
      <if test="ldshr != null" >
        LDSHR,
      </if>
      <if test="bz != null" >
        BZ,
      </if>
      <if test="czbz != null" >
        CZBZ,
      </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="," >
      <if test="xzzbdbh != null" >
        #{xzzbdbh,jdbcType=VARCHAR},
      </if>
      <if test="cfbh != null" >
        #{cfbh,jdbcType=VARCHAR},
      </if>
      <if test="hwbm != null" >
        #{hwbm,jdbcType=VARCHAR},
      </if>
      <if test="lssl != null" >
        #{lssl,jdbcType=DECIMAL},
      </if>
      <if test="hzsl != null" >
        #{hzsl,jdbcType=DECIMAL},
      </if>
      <if test="bzwh != null" >
        #{bzwh,jdbcType=VARCHAR},
      </if>
      <if test="lspz != null" >
        #{lspz,jdbcType=VARCHAR},
      </if>
      <if test="ykcxz != null" >
        #{ykcxz,jdbcType=VARCHAR},
      </if>
      <if test="zrxz != null" >
        #{zrxz,jdbcType=VARCHAR},
      </if>
      <if test="hzsj != null" >
        #{hzsj,jdbcType=TIMESTAMP},
      </if>
      <if test="ccshr != null" >
        #{ccshr,jdbcType=VARCHAR},
      </if>
      <if test="zjshr != null" >
        #{zjshr,jdbcType=VARCHAR},
      </if>
      <if test="tjshr != null" >
        #{tjshr,jdbcType=VARCHAR},
      </if>
      <if test="kjshr != null" >
        #{kjshr,jdbcType=VARCHAR},
      </if>
      <if test="ldshr != null" >
        #{ldshr,jdbcType=VARCHAR},
      </if>
      <if test="bz != null" >
        #{bz,jdbcType=VARCHAR},
      </if>
      <if test="czbz != null" >
        #{czbz,jdbcType=VARCHAR},
      </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>
<!--   <select id="countByExample" parameterType="com.unis.base.server.entity.XZzbExample" resultType="java.lang.Integer" >
    select count(*) from X_ZZB
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select> -->
  <update id="updateByExampleSelective" parameterType="map" >
    update X_ZZB
    <set >
      <if test="record.xzzbdbh != null" >
        XZZBDBH = #{record.xzzbdbh,jdbcType=VARCHAR},
      </if>
      <if test="record.cfbh != null" >
        CFBH = #{record.cfbh,jdbcType=VARCHAR},
      </if>
      <if test="record.hwbm != null" >
        HWBM = #{record.hwbm,jdbcType=VARCHAR},
      </if>
      <if test="record.lssl != null" >
        LSSL = #{record.lssl,jdbcType=DECIMAL},
      </if>
      <if test="record.hzsl != null" >
        HZSL = #{record.hzsl,jdbcType=DECIMAL},
      </if>
      <if test="record.bzwh != null" >
        BZWH = #{record.bzwh,jdbcType=VARCHAR},
      </if>
      <if test="record.lspz != null" >
        LSPZ = #{record.lspz,jdbcType=VARCHAR},
      </if>
      <if test="record.ykcxz != null" >
        YKCXZ = #{record.ykcxz,jdbcType=VARCHAR},
      </if>
      <if test="record.zrxz != null" >
        ZRXZ = #{record.zrxz,jdbcType=VARCHAR},
      </if>
      <if test="record.hzsj != null" >
        HZSJ = #{record.hzsj,jdbcType=TIMESTAMP},
      </if>
      <if test="record.ccshr != null" >
        CCSHR = #{record.ccshr,jdbcType=VARCHAR},
      </if>
      <if test="record.zjshr != null" >
        ZJSHR = #{record.zjshr,jdbcType=VARCHAR},
      </if>
      <if test="record.tjshr != null" >
        TJSHR = #{record.tjshr,jdbcType=VARCHAR},
      </if>
      <if test="record.kjshr != null" >
        KJSHR = #{record.kjshr,jdbcType=VARCHAR},
      </if>
      <if test="record.ldshr != null" >
        LDSHR = #{record.ldshr,jdbcType=VARCHAR},
      </if>
      <if test="record.bz != null" >
        BZ = #{record.bz,jdbcType=VARCHAR},
      </if>
      <if test="record.czbz != null" >
        CZBZ = #{record.czbz,jdbcType=VARCHAR},
      </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>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update X_ZZB
    set XZZBDBH = #{record.xzzbdbh,jdbcType=VARCHAR},
      CFBH = #{record.cfbh,jdbcType=VARCHAR},
      HWBM = #{record.hwbm,jdbcType=VARCHAR},
      LSSL = #{record.lssl,jdbcType=DECIMAL},
      HZSL = #{record.hzsl,jdbcType=DECIMAL},
      BZWH = #{record.bzwh,jdbcType=VARCHAR},
      LSPZ = #{record.lspz,jdbcType=VARCHAR},
      YKCXZ = #{record.ykcxz,jdbcType=VARCHAR},
      ZRXZ = #{record.zrxz,jdbcType=VARCHAR},
      HZSJ = #{record.hzsj,jdbcType=TIMESTAMP},
      CCSHR = #{record.ccshr,jdbcType=VARCHAR},
      ZJSHR = #{record.zjshr,jdbcType=VARCHAR},
      TJSHR = #{record.tjshr,jdbcType=VARCHAR},
      KJSHR = #{record.kjshr,jdbcType=VARCHAR},
      LDSHR = #{record.ldshr,jdbcType=VARCHAR},
      BZ = #{record.bz,jdbcType=VARCHAR},
      CZBZ = #{record.czbz,jdbcType=VARCHAR},
      STATUS = #{record.status,jdbcType=DECIMAL},
      CREATOR = #{record.creator,jdbcType=VARCHAR},
      CREATOR_CODE = #{record.creatorCode,jdbcType=VARCHAR},
      CREATE_DATE = #{record.createDate,jdbcType=TIMESTAMP},
      REFRESHER = #{record.refresher,jdbcType=VARCHAR},
      REFRESHER_CODE = #{record.refresherCode,jdbcType=VARCHAR},
      REFRESH_TIME = #{record.refreshTime,jdbcType=TIMESTAMP},
      REMARK = #{record.remark,jdbcType=VARCHAR}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.unis.base.server.entity.XZzbDo" >
    update X_ZZB
    <set >
      <if test="cfbh != null" >
        CFBH = #{cfbh,jdbcType=VARCHAR},
      </if>
      <if test="hwbm != null" >
        HWBM = #{hwbm,jdbcType=VARCHAR},
      </if>
      <if test="lssl != null" >
        LSSL = #{lssl,jdbcType=DECIMAL},
      </if>
      <if test="hzsl != null" >
        HZSL = #{hzsl,jdbcType=DECIMAL},
      </if>
      <if test="bzwh != null" >
        BZWH = #{bzwh,jdbcType=VARCHAR},
      </if>
      <if test="lspz != null" >
        LSPZ = #{lspz,jdbcType=VARCHAR},
      </if>
      <if test="ykcxz != null" >
        YKCXZ = #{ykcxz,jdbcType=VARCHAR},
      </if>
      <if test="zrxz != null" >
        ZRXZ = #{zrxz,jdbcType=VARCHAR},
      </if>
      <if test="hzsj != null" >
        HZSJ = #{hzsj,jdbcType=TIMESTAMP},
      </if>
      <if test="ccshr != null" >
        CCSHR = #{ccshr,jdbcType=VARCHAR},
      </if>
      <if test="zjshr != null" >
        ZJSHR = #{zjshr,jdbcType=VARCHAR},
      </if>
      <if test="tjshr != null" >
        TJSHR = #{tjshr,jdbcType=VARCHAR},
      </if>
      <if test="kjshr != null" >
        KJSHR = #{kjshr,jdbcType=VARCHAR},
      </if>
      <if test="ldshr != null" >
        LDSHR = #{ldshr,jdbcType=VARCHAR},
      </if>
      <if test="bz != null" >
        BZ = #{bz,jdbcType=VARCHAR},
      </if>
      <if test="czbz != null" >
        CZBZ = #{czbz,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        STATUS = #{status,jdbcType=DECIMAL},
      </if>
      <if test="creator != null" >
        CREATOR = #{creator,jdbcType=VARCHAR},
      </if>
      <if test="creatorCode != null" >
        CREATOR_CODE = #{creatorCode,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null" >
        CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="refresher != null" >
        REFRESHER = #{refresher,jdbcType=VARCHAR},
      </if>
      <if test="refresherCode != null" >
        REFRESHER_CODE = #{refresherCode,jdbcType=VARCHAR},
      </if>
      <if test="refreshTime != null" >
        REFRESH_TIME = #{refreshTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null" >
        REMARK = #{remark,jdbcType=VARCHAR},
      </if>
    </set>
    where XZZBDBH = #{xzzbdbh,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.unis.base.server.entity.XZzbDo" >
    update X_ZZB
    set CFBH = #{cfbh,jdbcType=VARCHAR},
      HWBM = #{hwbm,jdbcType=VARCHAR},
      LSSL = #{lssl,jdbcType=DECIMAL},
      HZSL = #{hzsl,jdbcType=DECIMAL},
      BZWH = #{bzwh,jdbcType=VARCHAR},
      LSPZ = #{lspz,jdbcType=VARCHAR},
      YKCXZ = #{ykcxz,jdbcType=VARCHAR},
      ZRXZ = #{zrxz,jdbcType=VARCHAR},
      HZSJ = #{hzsj,jdbcType=TIMESTAMP},
      CCSHR = #{ccshr,jdbcType=VARCHAR},
      ZJSHR = #{zjshr,jdbcType=VARCHAR},
      TJSHR = #{tjshr,jdbcType=VARCHAR},
      KJSHR = #{kjshr,jdbcType=VARCHAR},
      LDSHR = #{ldshr,jdbcType=VARCHAR},
      BZ = #{bz,jdbcType=VARCHAR},
      CZBZ = #{czbz,jdbcType=VARCHAR},
      STATUS = #{status,jdbcType=DECIMAL},
      CREATOR = #{creator,jdbcType=VARCHAR},
      CREATOR_CODE = #{creatorCode,jdbcType=VARCHAR},
      CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
      REFRESHER = #{refresher,jdbcType=VARCHAR},
      REFRESHER_CODE = #{refresherCode,jdbcType=VARCHAR},
      REFRESH_TIME = #{refreshTime,jdbcType=TIMESTAMP},
      REMARK = #{remark,jdbcType=VARCHAR}
    where XZZBDBH = #{xzzbdbh,jdbcType=VARCHAR}
  </update>

  <select id="findPageList" resultMap="BaseResultMap" parameterType="com.unis.base.common.vo.NatureTransVo" >
    select
    <include refid="Base_Column_List" />
    from X_ZZB
    <where>
      STATUS=1
      <if test="xzzbdbh != null and xzzbdbh != ''">
        AND FABH = #{xzzbdbh,jdbcType=VARCHAR}
      </if>
    </where>
    ORDER BY CREATE_DATE DESC
  </select>
</mapper>