<?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.DKdxxsjyDao" >

	<resultMap id="BaseResultMap" type="com.unis.base.server.entity.DKdxxsjyDO" >
		<result column="kddm" property="kddm" jdbcType="VARCHAR" />
		<result column="kdmc" property="kdmc" jdbcType="VARCHAR" />
		<result column="kdjc" property="kdjc" jdbcType="VARCHAR" />
		<result column="kdqyxz" property="kdqyxz" jdbcType="VARCHAR" />
		<result column="tyshxydm" property="tyshxydm" jdbcType="VARCHAR" />
		<result column="qymc" property="qymc" jdbcType="VARCHAR" />
		<result column="jcrq" property="jcrq" jdbcType="VARCHAR" />
		<result column="sjcr" property="sjcr" jdbcType="VARCHAR" />
		<result column="kdyxcr" property="kdyxcr" jdbcType="VARCHAR" />
		<result column="cfs" property="cfs" jdbcType="VARCHAR" />
		<result column="yzkqs" property="yzkqs" jdbcType="VARCHAR" />
		<result column="ygsl" property="ygsl" jdbcType="VARCHAR" />
		<result column="yxgr" property="yxgr" jdbcType="VARCHAR" />
		<result column="kdmj" property="kdmj" jdbcType="VARCHAR" />
		<result column="kddh" property="kddh" jdbcType="VARCHAR" />
		<result column="kddz" property="kddz" jdbcType="VARCHAR" />
		<result column="kdcz" property="kdcz" jdbcType="VARCHAR" />
		<result column="kdyb" property="kdyb" jdbcType="VARCHAR" />
		<result column="kdjd" property="kdjd" jdbcType="VARCHAR" />
		<result column="kdwd" property="kdwd" jdbcType="VARCHAR" />
		<result column="xzqhmc" property="xzqhmc" jdbcType="VARCHAR" />
		<result column="xzqhdm" property="xzqhdm" jdbcType="VARCHAR" />
		<result column="jlgllb" property="jlgllb" jdbcType="VARCHAR" />
		<result column="jlgljl" property="jlgljl" jdbcType="VARCHAR" />
		<result column="sffhwry" property="sffhwry" jdbcType="VARCHAR" />
		<result column="ywxfsy" property="ywxfsy" jdbcType="VARCHAR" />
		<result column="ywxfss" property="ywxfss" jdbcType="VARCHAR" />
		<result column="ywjhys" property="ywjhys" jdbcType="VARCHAR" />
		<result column="jccsb_qch" property="jccsbQch" jdbcType="VARCHAR" />
		<result column="fhbznx" property="fhbznx" jdbcType="VARCHAR" />
		<result column="status" property="status" jdbcType="VARCHAR" />
		<result column="creator" property="creator" jdbcType="VARCHAR" />
		<result column="creator_code" property="creatorCode" jdbcType="VARCHAR" />
		<result column="create_date" property="createDate" jdbcType="VARCHAR" />
		<result column="refresher" property="refresher" jdbcType="VARCHAR" />
		<result column="refresher_code" property="refresherCode" jdbcType="VARCHAR" />
		<result column="refresh_time" property="refreshTime" jdbcType="VARCHAR" />
		<result column="remark" property="remark" jdbcType="VARCHAR" />
		<result column="sfznhsjgz" property="sfznhsjgz" jdbcType="VARCHAR" />
		<result column="BHCGZT" property="bhcgzt" jdbcType="DECIMAL" />
		<result column="CGBH" property="cgbh" jdbcType="VARCHAR" />
		<result column="CGRL" property="cgrl" jdbcType="DECIMAL" />
		<result column="TLZYX" property="tlzyx" jdbcType="DECIMAL" />
		<result column="YXCD" property="yxcd" jdbcType="DECIMAL" />
		<result column="MTBW" property="mtbw" jdbcType="DECIMAL" />
		<result column="ZDW" property="zdw" jdbcType="DECIMAL" />
		<result column="PTFSSSQK" property="ptfsssqk" jdbcType="VARCHAR" />
		<result column="ZCYZ" property="zcyz" jdbcType="DECIMAL" />
		<result column="ZCPGXZ" property="zcpgxz" jdbcType="DECIMAL" />
		<result column="BGCLLB" property="bgcllb" jdbcType="DECIMAL" />
		<result column="SFBA" property="sfba" jdbcType="DECIMAL" />
		<result column="CGMC" property="cgmc" jdbcType="VARCHAR" />
		<result column="KQCQ" property="kqcq" jdbcType="VARCHAR" />
		<result column="KQDM" property="kqdm" jdbcType="VARCHAR" />
	</resultMap>

	<sql id="Base_Column_List_common">
    	kd.kddm, kd.kdmc, kd.kdjc, kd.kdqyxz, kd.tyshxydm, kd.qymc, kd.lklb, kd.jcrq, kd.sjcr, kd.kdyxcr, kd.cfs,
    	kd.yzkqs, kd.ygsl, kd.yxgr, kd.kdmj, kd.kddh, kd.kddz, kd.kdcz, kd.kdyb, kd.kdjd, kd.kdwd, kd.xzqhmc,
    	kd.xzqhdm, kd.jlgllb, kd.jlgljl, kd.sffhwry, kd.ywxfsy, kd.ywxfss, kd.ywjhys, kd.jccsb_qch, kd.fhbznx,
    	kd.remark, kd.sfznhsjgz, kd.BHCGZT, tz.qyjgdm as CGBH, kd.CGRL, kd.TLZYX, kd.YXCD, kd.MTBW,
    	kd.ZDW,
    	kd.PTFSSSQK, kd.ZCYZ, kd.ZCPGXZ, kd.BGCLLB, kd.SFBA, kd.CGMC, kd.KQCQ, KD.KQDM
    </sql>

	<!--	根据KDDM模糊查询总库容和总仓房数-->
	<select id="getKdyxcrAndCfsByKddm" parameterType="String" resultMap="BaseResultMap">
		SELECT kdyxcr, cfs
		FROM D_KDXXSJY
		WHERE kddm LIKE concat(CONCAT('%',#{kddm,jdbcType=VARCHAR}),'%')
	</select>

	<!-- 根据统一社会信用代码获取库点信息列表 -->
	<select id="getDKdxxsjyInfoBytyshxydm" parameterType="java.lang.String" resultMap="BaseResultMap">
		SELECT
		<include refid="Base_Column_List_common"></include>
		from
		D_KDXXSJY kd inner join tz_slqy tz on kd.tyshxydm=tz.tyshxydm
		<where>
			kd.tyshxydm = #{tyshxydm,jdbcType=DECIMAL}
			and kd.STATUS = 1
		</where>
	</select>

	<!-- 根据统一社会信用代码删除库点信息 -->
	<update id="deleteList" parameterType="java.lang.String">
		update D_KDXXSJY kd
		<set>
			ks.STATUS = 0
		</set>
		<where>
			kd.tyshxydm = #{tyshxydm,jdbcType=DECIMAL}
		</where>
	</update>

	<!-- 根据条件查询仓房信息 -->
	<select id="getDKdxxsjyList" parameterType="com.unis.base.server.entity.DKdxxsjyDO" resultMap="BaseResultMap">
		SELECT
		<include refid="Base_Column_List_common"></include>
		from
		D_KDXXSJY kd,tz_qyjg tz
		<where>
			kd.status = 1 and tz.tyshxydm = kd.tyshxydm
			<!-- 库点编号 -->
			<if test="kddm != null and kddm != ''" >
				and	kd.kddm LIKE concat(CONCAT('%',#{kddm,jdbcType=VARCHAR}) ,'%')
			</if>
			<!-- 库点名称 -->
			<if test="kdmc != null and kdmc != ''" >
				and	kd.kdmc LIKE concat(CONCAT('%',#{kdmc,jdbcType=VARCHAR}) ,'%')
			</if>
			<!-- 所属企业编号 -->
			<if test="tyshxydm != null and tyshxydm != ''" >
				and	kd.tyshxydm LIKE concat(CONCAT('%',#{tyshxydm,jdbcType=VARCHAR}) ,'%')
			</if>
			<!-- 企业名称 -->
			<if test="qymc != null and qymc != ''" >
				and	kd.qymc LIKE concat(CONCAT('%',#{qymc,jdbcType=VARCHAR}) ,'%')
			</if>
			<!-- 粮库类型 -->
			<if test="lklb != null and lklb != ''" >
				and	kd.lklb LIKE concat(CONCAT('%',#{lklb,jdbcType=VARCHAR}) ,'%')
			</if>
		</where>
		ORDER BY kd.kddm asc
	</select>

	<!-- 添加库点信息 -->
	<insert id="insert" parameterType="com.unis.base.server.entity.DKdxxsjyDO">
		insert into D_KDXXSJY
		<trim prefix="(" suffix=")" suffixOverrides="," >
			<if test="kddm != null" >
				kddm,
			</if>
			<if test="kdmc != null" >
				kdmc,
			</if>
			<if test="kdjc != null" >
				kdjc,
			</if>
			<if test="kdqyxz != null" >
				kdqyxz,
			</if>
			<if test="tyshxydm != null" >
				tyshxydm,
			</if>
			<if test="qymc != null" >
				qymc,
			</if>
			<if test="lklb != null" >
				lklb,
			</if>
			<if test="jcrq != null" >
				jcrq,
			</if>
			<if test="sjcr != null" >
				sjcr,
			</if>
			<if test="kdyxcr != null" >
				kdyxcr,
			</if>
			<if test="cfs != null" >
				cfs,
			</if>
			<if test="yzkqs != null" >
				yzkqs,
			</if>

			<if test="ygsl != null" >
				ygsl,
			</if>
			<if test="yxgr != null" >
				yxgr,
			</if>
			<if test="kdmj != null" >
				kdmj,
			</if>
			<if test="kddh != null" >
				kddh,
			</if>
			<if test="kddz != null" >
				kddz,
			</if>
			<if test="kdcz != null" >
				kdcz,
			</if>
			<if test="kdyb != null" >
				kdyb,
			</if>
			<if test="kdjd != null" >
				kdjd,
			</if>
			<if test="kdwd != null" >
				kdwd,
			</if>
			<if test="xzqhmc != null" >
				xzqhmc,
			</if>
			<if test="xzqhdm != null" >
				xzqhdm,
			</if>
			<if test="jlgllb != null" >
				jlgllb,
			</if>

			<if test="jlgljl != null" >
				jlgljl,
			</if>
			<if test="sffhwry != null" >
				sffhwry,
			</if>
			<if test="ywxfsy != null" >
				ywxfsy,
			</if>
			<if test="ywxfss != null" >
				ywxfss,
			</if>
			<if test="ywjhys != null" >
				ywjhys,
			</if>
			<if test="jccsbQch != null" >
				jccsb_qch,
			</if>
			<if test="fhbznx != null" >
				fhbznx,
			</if>
			<if test="creator != null" >
				creator,
			</if>
			<if test="creatorCode != null" >
				creator_code,
			</if>
			<if test="refresher != null" >
				refresher,
			</if>
			<if test="remark != null" >
				remark,
			</if>
			<if test="remark != null" >
				sfznhsjgz,
			</if>
			<if test="bhcgzt != null" >
				BHCGZT,
			</if>
			<if test="cgbh != null" >
				CGBH,
			</if>
			<if test="cgrl != null" >
				CGRL,
			</if>
			<if test="tlzyx != null" >
				TLZYX,
			</if>
			<if test="yxcd != null" >
				YXCD,
			</if>
			<if test="mtbw != null" >
				MTBW,
			</if>
			<if test="zdw != null" >
				ZDW,
			</if>
			<if test="ptfsssqk != null" >
				PTFSSSQK,
			</if>
			<if test="zcyz != null" >
				ZCYZ,
			</if>
			<if test="zcpgxz != null" >
				ZCPGXZ,
			</if>
			<if test="bgcllb != null" >
				BGCLLB,
			</if>
			<if test="sfba != null" >
				SFBA,
			</if>
			<if test="cgmc != null" >
				CGMC,
			</if>
			<if test="syzt != null" >
				syzt,
			</if>
			<if test="kqdm != null" >
				kqdm,
			</if>
		</trim>
		<trim prefix="values (" suffix=")" suffixOverrides="," >
			<if test="kddm != null" >
				#{kddm,jdbcType=VARCHAR},
			</if>
			<if test="kdmc != null" >
				#{kdmc,jdbcType=VARCHAR},
			</if>
			<if test="kdjc != null" >
				#{kdjc,jdbcType=VARCHAR},
			</if>
			<if test="kdqyxz != null" >
				#{kdqyxz,jdbcType=VARCHAR},
			</if>
			<if test="tyshxydm != null" >
				#{tyshxydm,jdbcType=VARCHAR},
			</if>
			<if test="qymc != null" >
				#{qymc,jdbcType=VARCHAR},
			</if>
			<if test="lklb != null" >
				#{lklb,jdbcType=VARCHAR},
			</if>
			<if test="jcrq != null" >
				#{jcrq,jdbcType=VARCHAR},
			</if>
			<if test="sjcr != null" >
				#{sjcr,jdbcType=VARCHAR},
			</if>
			<if test="kdyxcr != null" >
				#{kdyxcr,jdbcType=VARCHAR},
			</if>
			<if test="cfs != null" >
				#{cfs,jdbcType=VARCHAR},
			</if>
			<if test="yzkqs != null" >
				#{yzkqs,jdbcType=VARCHAR},
			</if>

			<if test="ygsl != null" >
				#{ygsl,jdbcType=VARCHAR},
			</if>
			<if test="yxgr != null" >
				#{yxgr,jdbcType=VARCHAR},
			</if>
			<if test="kdmj != null" >
				#{kdmj,jdbcType=VARCHAR},
			</if>
			<if test="kddh != null" >
				#{kddh,jdbcType=VARCHAR},
			</if>
			<if test="kddz != null" >
				#{kddz,jdbcType=VARCHAR},
			</if>
			<if test="kdcz != null" >
				#{kdcz,jdbcType=VARCHAR},
			</if>
			<if test="kdyb != null" >
				#{kdyb,jdbcType=VARCHAR},
			</if>
			<if test="kdjd != null" >
				#{kdjd,jdbcType=VARCHAR},
			</if>
			<if test="kdwd != null" >
				#{kdwd,jdbcType=VARCHAR},
			</if>
			<if test="xzqhmc != null" >
				#{xzqhmc,jdbcType=VARCHAR},
			</if>
			<if test="xzqhdm != null" >
				#{xzqhdm,jdbcType=VARCHAR},
			</if>
			<if test="jlgllb != null" >
				#{jlgllb,jdbcType=VARCHAR},
			</if>
			<if test="jlgljl != null" >
				#{jlgljl,jdbcType=VARCHAR},
			</if>
			<if test="sffhwry != null" >
				#{sffhwry,jdbcType=VARCHAR},
			</if>
			<if test="ywxfsy != null" >
				#{ywxfsy,jdbcType=VARCHAR},
			</if>
			<if test="ywxfss != null" >
				#{ywxfss,jdbcType=VARCHAR},
			</if>

			<if test="ywjhys != null" >
				#{ywjhys,jdbcType=VARCHAR},
			</if>
			<if test="jccsbQch != null" >
				#{jccsbQch,jdbcType=VARCHAR},
			</if>
			<if test="fhbznx != null" >
				#{fhbznx,jdbcType=VARCHAR},
			</if>
			<if test="creator != null" >
				#{creator,jdbcType=VARCHAR},
			</if>
			<if test="creatorCode != null" >
				#{creatorCode,jdbcType=VARCHAR},
			</if>
			<if test="refresher != null" >
				#{refresher,jdbcType=VARCHAR},
			</if>
			<if test="remark != null" >
				#{remark,jdbcType=VARCHAR},
			</if>
			<if test="sfznhsjgz != null" >
				#{sfznhsjgz,jdbcType=VARCHAR},
			</if>
			<if test="bhcgzt != null" >
				#{bhcgzt,jdbcType=DECIMAL},
			</if>
			<if test="cgbh != null" >
				#{cgbh,jdbcType=VARCHAR},
			</if>
			<if test="cgrl != null" >
				#{cgrl,jdbcType=DECIMAL},
			</if>
			<if test="tlzyx != null" >
				#{tlzyx,jdbcType=DECIMAL},
			</if>
			<if test="yxcd != null" >
				#{yxcd,jdbcType=DECIMAL},
			</if>
			<if test="mtbw != null" >
				#{mtbw,jdbcType=DECIMAL},
			</if>
			<if test="zdw != null" >
				#{zdw,jdbcType=DECIMAL},
			</if>
			<if test="ptfsssqk != null" >
				#{ptfsssqk,jdbcType=VARCHAR},
			</if>
			<if test="zcyz != null" >
				#{zcyz,jdbcType=DECIMAL},
			</if>
			<if test="zcpgxz != null" >
				#{zcpgxz,jdbcType=DECIMAL},
			</if>
			<if test="bgcllb != null" >
				#{bgcllb,jdbcType=DECIMAL},
			</if>
			<if test="sfba != null" >
				#{sfba,jdbcType=DECIMAL},
			</if>
			<if test="cgmc != null" >
				#{cgmc,jdbcType=VARCHAR},
			</if>
			<if test="syzt != null" >
				#{syzt,jdbcType=VARCHAR},
			</if>
			<if test="kqdm != null" >
				#{kqdm,jdbcType=VARCHAR},
			</if>
		</trim>
	</insert>

	<select id="getDKdxxsjyInfoBykddm" parameterType="java.lang.String" resultMap="BaseResultMap">
		SELECT
		<include refid="Base_Column_List_common"></include>,tz.QYMC
		from
		D_KDXXSJY kd, TZ_SLQY tz
		<where>
			kd.TYSHXYDM = tz.TYSHXYDM
			and kd.status = 1
			and kd.kddm = #{kddm,jdbcType=VARCHAR}
		</where>
	</select>

	<select id="getDKdxxsjyInfoBykdmc" parameterType="java.lang.String" resultMap="BaseResultMap">
		SELECT
		<include refid="Base_Column_List_common"></include>,tz.QYMC
		from
		D_KDXXSJY kd, TZ_SLQY tz
		<where>
			kd.TYSHXYDM = tz.TYSHXYDM
			and kd.status = 1
			and kd.kdmc = #{kdmc,jdbcType=VARCHAR}
		</where>
	</select>

	<select id="getMaxCodeById" parameterType="java.lang.String" resultType="java.lang.String">
        SELECT
        	max(kd.kddm)
        from
			D_KDXXSJY kd
    </select>

	<!--获取最大设备编号-->
	<select id="getMaxById" parameterType="java.lang.String" resultType="java.lang.String">
		SELECT
		max(kd.kddm)
		from
		D_KDXXSJY kd
		<where>
			kd.kddm like CONCAT(#{prefix,jdbcType=VARCHAR},'%')
		</where>
	</select>
	<select id="sinkpointListLDQ" resultType="com.unis.base.common.vo.DKdxxsjyVO">
		SELECT
		kd.kdmc as kdmc
		from
		D_KDXXSJY kd,tz_qyjg tz
		<where>
			kd.status = 1 and tz.tyshxydm = kd.tyshxydm
			<!-- 库点名称 -->
			<if test="kdmc != null and kdmc != ''" >
				and	kd.kdmc LIKE concat(CONCAT('%',#{kdmc,jdbcType=VARCHAR}) ,'%')
			</if>
		</where>
		union
		select
		distinct lh.ssyqmc as kdmc
		from db_utf8.ty_lhtzd lh
		<where>
			<if test="kdmc != null and kdmc != ''" >
				and	lh.ssyqmc LIKE concat(CONCAT('%',#{kdmc,jdbcType=VARCHAR}) ,'%')
			</if>
		</where>
	</select>
	<select id="getSlqyList" resultType="com.unis.base.common.vo.DKdxxsjyVO">
		select a.tyshxydm as tyshxydm,a.qymc as kdmc,a.qyjgdm as cgbh from tz_slqy a where a.qyjgdm in
		(select org_code from usercenter.sys_orgainze where org_level = '10180008')
		and a.status=1
		union
		select b.tyshxydm as tyshxydm,b.qymc as kdmc,b.qyjgdm as cgbh from tz_slqy b where b.qyzyyw like '%8%'
		and b.status=1
	</select>

	<!-- 更新企业信息 -->
	<update id="update" parameterType="com.unis.base.server.entity.DKdxxsjyDO">
		update D_KDXXSJY
		<set>
			<if test="kdmc != null">
				kdmc = #{kdmc,jdbcType=VARCHAR},
			</if>
			<if test="kdjc != null">
				kdjc = #{kdjc,jdbcType=VARCHAR},
			</if>
			<if test="kdqyxz != null">
				kdqyxz = #{kdqyxz,jdbcType=VARCHAR},
			</if>
			<if test="tyshxydm != null">
				tyshxydm = #{tyshxydm,jdbcType=VARCHAR},
			</if>
			<if test="qymc != null">
				qymc = #{qymc,jdbcType=VARCHAR},
			</if>
			<if test="lklb != null">
				lklb = #{lklb,jdbcType=VARCHAR},
			</if>
			<if test="jcrq != null">
				jcrq = #{jcrq,jdbcType=VARCHAR},
			</if>
			<if test="sjcr != null">
				sjcr = #{sjcr,jdbcType=VARCHAR},
			</if>
			<if test="kdyxcr != null">
				kdyxcr = #{kdyxcr,jdbcType=VARCHAR},
			</if>
			<if test="cfs != null">
				cfs = #{cfs,jdbcType=VARCHAR},
			</if>
			<if test="yzkqs != null">
				yzkqs = #{yzkqs,jdbcType=VARCHAR},
			</if>
			<if test="ygsl != null">
				ygsl = #{ygsl,jdbcType=VARCHAR},
			</if>
			<if test="yxgr != null">
				yxgr = #{yxgr,jdbcType=VARCHAR},
			</if>
			<if test="kdmj != null">
				kdmj = #{kdmj,jdbcType=VARCHAR},
			</if>
			<if test="kddh != null">
				kddh = #{kddh,jdbcType=VARCHAR},
			</if>
			<if test="kddz != null">
				kddz = #{kddz,jdbcType=VARCHAR},
			</if>
			<if test="kdcz != null">
				kdcz = #{kdcz,jdbcType=VARCHAR},
			</if>
			<if test="kdyb != null">
				kdyb = #{kdyb,jdbcType=VARCHAR},
			</if>
			<if test="kdjd != null">
				kdjd = #{kdjd,jdbcType=VARCHAR},
			</if>
			<if test="kdwd != null">
				kdwd = #{kdwd,jdbcType=VARCHAR},
			</if>
			<if test="xzqhmc != null">
				xzqhmc = #{xzqhmc,jdbcType=VARCHAR},
			</if>
			<if test="xzqhdm != null">
				xzqhdm = #{xzqhdm,jdbcType=VARCHAR},
			</if>
			<if test="jlgllb != null">
				jlgllb = #{jlgllb,jdbcType=VARCHAR},
			</if>
			<if test="jlgljl != null">
				jlgljl = #{jlgljl,jdbcType=VARCHAR},
			</if>
			<if test="sffhwry != null">
				sffhwry = #{sffhwry,jdbcType=VARCHAR},
			</if>

			<if test="ywxfsy != null">
				ywxfsy = #{ywxfsy,jdbcType=VARCHAR},
			</if>
			<if test="ywxfss != null">
				ywxfss = #{ywxfss,jdbcType=VARCHAR},
			</if>
			<if test="ywjhys != null">
				ywjhys = #{ywjhys,jdbcType=VARCHAR},
			</if>
			<if test="jccsbQch != null">
				jccsb_qch = #{jccsbQch,jdbcType=VARCHAR},
			</if>

			<if test="fhbznx != null">
				fhbznx = #{fhbznx,jdbcType=VARCHAR},
			</if>
			<if test="refreshTime != null">
				refresh_time = #{refreshTime,jdbcType=VARCHAR},
			</if>
			<if test="refresher != null">
				refresher = #{refresher,jdbcType=VARCHAR},
			</if>
			<if test="refresherCode != null">
				refresher_code = #{refresherCode,jdbcType=VARCHAR},
			</if>
			<if test="status != null">
				status = #{status,jdbcType=VARCHAR},
			</if>
			<if test="sfznhsjgz != null">
				sfznhsjgz = #{sfznhsjgz,jdbcType=VARCHAR},
			</if>
			<if test="bhcgzt != null" >
				BHCGZT = #{bhcgzt,jdbcType=DECIMAL},
			</if>
			<if test="cgbh != null" >
				CGBH = #{cgbh,jdbcType=VARCHAR},
			</if>
			<if test="cgrl != null" >
				CGRL = #{cgrl,jdbcType=DECIMAL},
			</if>
			<if test="tlzyx != null" >
				TLZYX = #{tlzyx,jdbcType=DECIMAL},
			</if>
			<if test="yxcd != null" >
				YXCD = #{yxcd,jdbcType=DECIMAL},
			</if>
			<if test="mtbw != null" >
				MTBW = #{mtbw,jdbcType=DECIMAL},
			</if>
			<if test="zdw != null" >
				ZDW = #{zdw,jdbcType=DECIMAL},
			</if>
			<if test="ptfsssqk != null" >
				PTFSSSQK = #{ptfsssqk,jdbcType=VARCHAR},
			</if>
			<if test="zcyz != null" >
				ZCYZ = #{zcyz,jdbcType=DECIMAL},
			</if>
			<if test="zcpgxz != null" >
				ZCPGXZ = #{zcpgxz,jdbcType=DECIMAL},
			</if>
			<if test="bgcllb != null" >
				BGCLLB = #{bgcllb,jdbcType=DECIMAL},
			</if>
			<if test="sfba != null" >
				SFBA = #{sfba,jdbcType=DECIMAL},
			</if>
			<if test="cgmc != null" >
				CGMC = #{cgmc,jdbcType=VARCHAR},
			</if>
			<if test="syzt != null" >
				syzt = #{syzt,jdbcType=VARCHAR},
			</if>
		</set>
		<where>
			kddm = #{kddm,jdbcType=VARCHAR}
		</where>
	</update>

	<select id="getDKdxxsjyInfo" parameterType="java.lang.String" resultType="com.unis.base.common.vo.DKdxxsjyVO">
		SELECT
		kd.*
		from
		D_KDXXSJY kd ,tz_slqy tz
		<where>
			kd.TYSHXYDM = tz.TYSHXYDM
			and kd.tyshxydm = #{tyshxydm,jdbcType=VARCHAR}
			and kd.STATUS = 1
		</where>
	</select>
</mapper>
