<?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.SYdsjMapper" >
  <resultMap id="BaseResultMap" type="com.unis.base.server.entity.SYdsjDO" >
    <id column="SYDBH" property="sydbh" jdbcType="VARCHAR" />
    <result column="HWBM" property="hwbm" jdbcType="VARCHAR" />
    <result column="RKSL" property="rksl" jdbcType="DECIMAL" />
    <result column="RKSJ" property="rksj" jdbcType="TIMESTAMP" />
    <result column="RKSF" property="rksf" jdbcType="DECIMAL" />
    <result column="RKZZ" property="rkzz" jdbcType="DECIMAL" />
    <result column="CKSL" property="cksl" jdbcType="DECIMAL" />
    <result column="CKSJ" property="cksj" jdbcType="TIMESTAMP" />
    <result column="CKSF" property="cksf" jdbcType="DECIMAL" />
    <result column="CKZZ" property="ckzz" jdbcType="DECIMAL" />
    <result column="SYSL" property="sysl" jdbcType="DECIMAL" />
    <result column="SYYY" property="syyy" jdbcType="VARCHAR" />
    <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="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" />
    <result column="ORGID" property="orgid" jdbcType="VARCHAR" />
    <result column="STATUS" property="status" jdbcType="DECIMAL" />
  </resultMap>
 
  
  <sql id="Base_Column_List" >
    SYDBH, HWBM, RKSL, RKSJ, RKSF, RKZZ, CKSL, CKSJ, CKSF, CKZZ, SYSL, SYYY, CCSHR, ZJSHR, 
    TJSHR, KJSHR, LDSHR, BZ, CZBZ, CREATOR, CREATOR_CODE, CREATE_DATE, REFRESHER, REFRESHER_CODE, 
    REFRESH_TIME, REMARK, ORGID, STATUS
  </sql>

  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from S_YDSJ
    where SYDBH = #{sydbh,jdbcType=VARCHAR}
  </select>
  
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from S_YDSJ
    where SYDBH = #{sydbh,jdbcType=VARCHAR}
  </delete>
  
  <insert id="insert" parameterType="com.unis.base.server.entity.SYdsjDO" >
    insert into S_YDSJ (SYDBH, HWBM, RKSL, 
      RKSJ, RKSF, RKZZ, 
      CKSL, CKSJ, CKSF, 
      CKZZ, SYSL, SYYY, CCSHR, 
      ZJSHR, TJSHR, KJSHR, 
      LDSHR, BZ, CZBZ, CREATOR, 
      CREATOR_CODE, CREATE_DATE, REFRESHER, 
      REFRESHER_CODE, REFRESH_TIME, REMARK, 
      ORGID, STATUS)
    values (#{sydbh,jdbcType=VARCHAR}, #{hwbm,jdbcType=VARCHAR}, #{rksl,jdbcType=DECIMAL}, 
      #{rksj,jdbcType=TIMESTAMP}, #{rksf,jdbcType=DECIMAL}, #{rkzz,jdbcType=DECIMAL}, 
      #{cksl,jdbcType=DECIMAL}, #{cksj,jdbcType=TIMESTAMP}, #{cksf,jdbcType=DECIMAL}, 
      #{ckzz,jdbcType=DECIMAL}, #{sysl,jdbcType=DECIMAL}, #{syyy,jdbcType=VARCHAR}, #{ccshr,jdbcType=VARCHAR}, 
      #{zjshr,jdbcType=VARCHAR}, #{tjshr,jdbcType=VARCHAR}, #{kjshr,jdbcType=VARCHAR}, 
      #{ldshr,jdbcType=VARCHAR}, #{bz,jdbcType=VARCHAR}, #{czbz,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR}, 
      #{creatorCode,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{refresher,jdbcType=VARCHAR}, 
      #{refresherCode,jdbcType=VARCHAR}, #{refreshTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, 
      #{orgid,jdbcType=VARCHAR}, #{status,jdbcType=DECIMAL})
  </insert>
  
  <insert id="insertSelective" parameterType="com.unis.base.server.entity.SYdsjDO" >
    insert into S_YDSJ
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="sydbh != null" >
        SYDBH,
      </if>
      <if test="hwbm != null" >
        HWBM,
      </if>
      <if test="rksl != null" >
        RKSL,
      </if>
      <if test="rksj != null" >
        RKSJ,
      </if>
      <if test="rksf != null" >
        RKSF,
      </if>
      <if test="rkzz != null" >
        RKZZ,
      </if>
      <if test="cksl != null" >
        CKSL,
      </if>
      <if test="cksj != null" >
        CKSJ,
      </if>
      <if test="cksf != null" >
        CKSF,
      </if>
      <if test="ckzz != null" >
        CKZZ,
      </if>
      <if test="sysl != null" >
        SYSL,
      </if>
      <if test="syyy != null" >
        SYYY,
      </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="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>
      <if test="orgid != null" >
        ORGID,
      </if>
      <if test="status != null" >
        STATUS,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="sydbh != null" >
        #{sydbh,jdbcType=VARCHAR},
      </if>
      <if test="hwbm != null" >
        #{hwbm,jdbcType=VARCHAR},
      </if>
      <if test="rksl != null" >
        #{rksl,jdbcType=DECIMAL},
      </if>
      <if test="rksj != null" >
        #{rksj,jdbcType=TIMESTAMP},
      </if>
      <if test="rksf != null" >
        #{rksf,jdbcType=DECIMAL},
      </if>
      <if test="rkzz != null" >
        #{rkzz,jdbcType=DECIMAL},
      </if>
      <if test="cksl != null" >
        #{cksl,jdbcType=DECIMAL},
      </if>
      <if test="cksj != null" >
        #{cksj,jdbcType=TIMESTAMP},
      </if>
      <if test="cksf != null" >
        #{cksf,jdbcType=DECIMAL},
      </if>
      <if test="ckzz != null" >
        #{ckzz,jdbcType=DECIMAL},
      </if>
      <if test="sysl != null" >
        #{sysl,jdbcType=DECIMAL},
      </if>
      <if test="syyy != null" >
        #{syyy,jdbcType=VARCHAR},
      </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="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>
      <if test="orgid != null" >
        #{orgid,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        #{status,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  
  
  <select id="findPageList"  resultMap="BaseResultMap"  parameterType="com.unis.base.common.vo.ProfitVO" >
    SELECT 			
    		<include refid="Base_Column_List" />
     FROM    S_YDSJ
     <where>
				STATUS=1  
		</where>
			ORDER BY CREATE_DATE DESC
  </select>
  
  
  <update id="updateByExampleSelective" parameterType="map" >
    update S_YDSJ
    <set >
      <if test="record.sydbh != null" >
        SYDBH = #{record.sydbh,jdbcType=VARCHAR},
      </if>
      <if test="record.hwbm != null" >
        HWBM = #{record.hwbm,jdbcType=VARCHAR},
      </if>
      <if test="record.rksl != null" >
        RKSL = #{record.rksl,jdbcType=DECIMAL},
      </if>
      <if test="record.rksj != null" >
        RKSJ = #{record.rksj,jdbcType=TIMESTAMP},
      </if>
      <if test="record.rksf != null" >
        RKSF = #{record.rksf,jdbcType=DECIMAL},
      </if>
      <if test="record.rkzz != null" >
        RKZZ = #{record.rkzz,jdbcType=DECIMAL},
      </if>
      <if test="record.cksl != null" >
        CKSL = #{record.cksl,jdbcType=DECIMAL},
      </if>
      <if test="record.cksj != null" >
        CKSJ = #{record.cksj,jdbcType=TIMESTAMP},
      </if>
      <if test="record.cksf != null" >
        CKSF = #{record.cksf,jdbcType=DECIMAL},
      </if>
      <if test="record.ckzz != null" >
        CKZZ = #{record.ckzz,jdbcType=DECIMAL},
      </if>
      <if test="record.sysl != null" >
        SYSL = #{record.sysl,jdbcType=DECIMAL},
      </if>
      <if test="record.syyy != null" >
        SYYY = #{record.syyy,jdbcType=VARCHAR},
      </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.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>
      <if test="record.orgid != null" >
        ORGID = #{record.orgid,jdbcType=VARCHAR},
      </if>
      <if test="record.status != null" >
        STATUS = #{record.status,jdbcType=DECIMAL},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  
  
  <update id="updateByExample" parameterType="map" >
    update S_YDSJ
    set SYDBH = #{record.sydbh,jdbcType=VARCHAR},
      HWBM = #{record.hwbm,jdbcType=VARCHAR},
      RKSL = #{record.rksl,jdbcType=DECIMAL},
      RKSJ = #{record.rksj,jdbcType=TIMESTAMP},
      RKSF = #{record.rksf,jdbcType=DECIMAL},
      RKZZ = #{record.rkzz,jdbcType=DECIMAL},
      CKSL = #{record.cksl,jdbcType=DECIMAL},
      CKSJ = #{record.cksj,jdbcType=TIMESTAMP},
      CKSF = #{record.cksf,jdbcType=DECIMAL},
      CKZZ = #{record.ckzz,jdbcType=DECIMAL},
      SYSL = #{record.sysl,jdbcType=DECIMAL},
      SYYY = #{record.syyy,jdbcType=VARCHAR},
      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},
      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},
      ORGID = #{record.orgid,jdbcType=VARCHAR},
      STATUS = #{record.status,jdbcType=DECIMAL}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  
  
  <update id="updateKeySelective" parameterType="com.unis.base.server.entity.SYdsjDO" >
    update S_YDSJ
    <set >
      <if test="hwbm != null" >
        HWBM = #{hwbm,jdbcType=VARCHAR},
      </if>
      <if test="rksl != null" >
        RKSL = #{rksl,jdbcType=DECIMAL},
      </if>
      <if test="rksj != null" >
        RKSJ = #{rksj,jdbcType=TIMESTAMP},
      </if>
      <if test="rksf != null" >
        RKSF = #{rksf,jdbcType=DECIMAL},
      </if>
      <if test="rkzz != null" >
        RKZZ = #{rkzz,jdbcType=DECIMAL},
      </if>
      <if test="cksl != null" >
        CKSL = #{cksl,jdbcType=DECIMAL},
      </if>
      <if test="cksj != null" >
        CKSJ = #{cksj,jdbcType=TIMESTAMP},
      </if>
      <if test="cksf != null" >
        CKSF = #{cksf,jdbcType=DECIMAL},
      </if>
      <if test="ckzz != null" >
        CKZZ = #{ckzz,jdbcType=DECIMAL},
      </if>
      <if test="sysl != null" >
        SYSL = #{sysl,jdbcType=DECIMAL},
      </if>
      <if test="syyy != null" >
        SYYY = #{syyy,jdbcType=VARCHAR},
      </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="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>
      <if test="orgid != null" >
        ORGID = #{orgid,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        STATUS = #{status,jdbcType=DECIMAL},
      </if>
    </set>
    where SYDBH = #{sydbh,jdbcType=VARCHAR}
  </update>
  
  
  <update id="updateByPrimaryKey" parameterType="com.unis.base.server.entity.SYdsjDO" >
    update S_YDSJ
    set HWBM = #{hwbm,jdbcType=VARCHAR},
      RKSL = #{rksl,jdbcType=DECIMAL},
      RKSJ = #{rksj,jdbcType=TIMESTAMP},
      RKSF = #{rksf,jdbcType=DECIMAL},
      RKZZ = #{rkzz,jdbcType=DECIMAL},
      CKSL = #{cksl,jdbcType=DECIMAL},
      CKSJ = #{cksj,jdbcType=TIMESTAMP},
      CKSF = #{cksf,jdbcType=DECIMAL},
      CKZZ = #{ckzz,jdbcType=DECIMAL},
      SYSL = #{sysl,jdbcType=DECIMAL},
      SYYY = #{syyy,jdbcType=VARCHAR},
      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},
      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},
      ORGID = #{orgid,jdbcType=VARCHAR},
      STATUS = #{status,jdbcType=DECIMAL}
    where SYDBH = #{sydbh,jdbcType=VARCHAR}
  </update>
</mapper>