<?xml version="1.0" encoding="gbk" standalone="no"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="Ptyh">
	<typeAlias alias="ptyhbean" type="cn.bsystem.ptuserrole.model.PtyhBean"/>

	<sql id="condition_Ptyh">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEkhbh'>
			(khbh like '%$LIKEkhbh$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='khbh'>
			(khbh = #khbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyhbh'>
			(yhbh like '%$LIKEyhbh$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yhbh'>
			(yhbh = #yhbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsfgly'>
			(sfgly like '%$LIKEsfgly$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sfgly'>
			(sfgly = #sfgly# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyhzh'>
			(yhzh like '%$LIKEyhzh$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yhzh'>
			(yhzh = #yhzh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyhmm'>
			(yhmm like '%$LIKEyhmm$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyhzhLIKEyhmc'>
			(yhzh like '%$LIKEyhzhLIKEyhmc$%' or yhmc like '%$LIKEyhzhLIKEyhmc$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yhmm'>
			(yhmm = #yhmm# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyhmc'>
			(yhmc like '%$LIKEyhmc$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yhmc'>
			(yhmc = #yhmc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyhmcpy'>
			(yhmcpy like '%$LIKEyhmcpy$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yhmcpy'>
			(yhmcpy = #yhmcpy# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyhyxj'>
			(yhyxj like '%$LIKEyhyxj$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yhyxj'>
			(yhyxj = #yhyxj# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyhlx'>
			(yhlx like '%$LIKEyhlx$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yhlx'>
			(yhlx = #yhlx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEjh'>
			(jh like '%$LIKEjh$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jh'>
			(jh = #jh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzp'>
			(zp like '%$LIKEzp$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zp'>
			(zp = #zp# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEgddh'>
			(gddh like '%$LIKEgddh$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='gddh'>
			(gddh = #gddh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsjhm'>
			(sjhm like '%$LIKEsjhm$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sjhm'>
			(sjhm = #sjhm# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdh'>
			(dh like '%$LIKEdh$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dh'>
			(dh = #dh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyjdz'>
			(yjdz like '%$LIKEyjdz$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yjdz'>
			(yjdz = #yjdz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzz'>
			(zz like '%$LIKEzz$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zz'>
			(zz = #zz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEms'>
			(ms like '%$LIKEms$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ms'>
			(ms = #ms# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyhzt'>
			(yhzt like '%$LIKEyhzt$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yhzt'>
			(yhzt = #yhzt# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsfjs'>
			(sfjs like '%$LIKEsfjs$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sfjs'>
			(sfjs = #sfjs# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEbmbh'>
			(bmbh like '%$LIKEbmbh$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='bmbh'>
			(bmbh = #bmbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkhdlmtsjtx'>
			(khdlmtsjtx like '%$LIKEkhdlmtsjtx$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='khdlmtsjtx'>
			(khdlmtsjtx = #khdlmtsjtx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdnkhdxdlkg'>
			(dnkhdxdlkg like '%$LIKEdnkhdxdlkg$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dnkhdxdlkg'>
			(dnkhdxdlkg =#dnkhdxdlkg# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsjkhdxdlkg'>
			(sjkhdxdlkg like '%$LIKEsjkhdxdlkg$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sjkhdxdlkg'>
			(sjkhdxdlkg = #sjkhdxdlkg# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdnusbkeydlkg'>
			(dnusbkeydlkg like '%$LIKEdnusbkeydlkg$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dnusbkeydlkg'>
			(dnusbkeydlkg = #dnusbkeydlkg# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdtdxfszdcs'>
			(dtdxfszdcs like '%$LIKEdtdxfszdcs$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dtdxfszdcs'>
			(dtdxfszdcs = #dtdxfszdcs# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyxdlipsz'>
			(yxdlipsz like '%$LIKEyxdlipsz$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yxdlipsz'>
			(yxdlipsz = #yxdlipsz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdqx'>
			(dqx like '%$LIKEdqx$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dqx'>
			(dqx = #dqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExqx'>
			(xqx like '%$LIKExqx$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xqx'>
			(xqx = #xqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkqx'>
			(kqx like '%$LIKEkqx$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kqx'>
			(kqx = #kqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEpqx'>
			(pqx like '%$LIKEpqx$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='pqx'>
			(pqx = #pqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxhfqx'>
			(lxhfqx like '%$LIKElxhfqx$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxhfqx'>
			(lxhfqx = #lxhfqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxxzqx'>
			(lxxzqx like '%$LIKElxxzqx$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxxzqx'>
			(lxxzqx = #lxxzqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxdjqx'>
			(lxdjqx like '%$LIKElxdjqx$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxdjqx'>
			(lxdjqx = #lxdjqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdldxh'>
			(dldxh like '%$LIKEdldxh$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dldxh'>
			(dldxh = #dldxh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEusbkeymm'>
			(usbkeymm like '%$LIKEusbkeymm$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='usbkeymm'>
			(usbkeymm = #usbkeymm# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEusbkeybh'>
			(usbkeybh like '%$LIKEusbkeybh$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='usbkeybh'>
			(usbkeybh = #usbkeybh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEygjpzh'>
			(ygjpzh like '%$LIKEygjpzh$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ygjpzh'>
			(ygjpzh = #ygjpzh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEygjpmm'>
			(ygjpmm like '%$LIKEygjpmm$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ygjpmm'>
			(ygjpmm = #ygjpmm# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsfzh'>
			(sfzh like '%$LIKEsfzh$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sfzh'>
			(sfzh = #sfzh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsfhyz'>
			(sfhyz like '%$LIKEsfhyz$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sfhyz'>
			(sfhyz = #sfhyz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsfzx'>
			(sfzx like '%$LIKEsfzx$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sfzx'>
			(sfzx = #sfzx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEjqjsfw'>
			(jqjsfw like '%$LIKEjqjsfw$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jqjsfw'>
			(jqjsfw = #jqjsfw# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzdjqjsfw'>
			(zdjqjsfw like '%$LIKEzdjqjsfw$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zdjqjsfw'>
			(zdjqjsfw = #zdjqjsfw# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcjry'>
			(cjry like '%$LIKEcjry$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='cjry'>
			(cjry = #cjry# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcjrq'>
			(cjrq like '%$LIKEcjrq$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='cjrq'>
			(cjrq = #cjrq# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExgry'>
			(xgry like '%$LIKExgry$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xgry'>
			(xgry = #xgry# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExgrq'>
			(xgrq like '%$LIKExgrq$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xgrq'>
			(xgrq = #xgrq# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEbz'>
			(bz like '%$LIKEbz$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='bz'>
			(bz = #bz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz1'>
			(kz1 like '%$LIKEkz1$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz1'>
			(kz1 = #kz1# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz2'>
			(kz2 like '%$LIKEkz2$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz2'>
			(kz2 = #kz2# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz3'>
			(kz3 like '%$LIKEkz3$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz3'>
			(kz3 = #kz3# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz4'>
			(kz4 like '%$LIKEkz4$%')
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz4'>
			(kz4 = #kz4# )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</sql>

	<!-- 增加 -->
	<insert id="insert_Ptyh" parameterClass="java.util.Map">
		insert into Ptyh(
		<isNotEmpty prepend='' property='yhbh'>yhbh</isNotEmpty>
		<isNotEmpty prepend=',' property='khbh'>khbh</isNotEmpty>
		<isNotEmpty prepend=',' property='sfgly'>sfgly</isNotEmpty>
		<isNotEmpty prepend=',' property='yhzh'>yhzh</isNotEmpty>
		<isNotEmpty prepend=',' property='yhmm'>yhmm</isNotEmpty>
		<isNotEmpty prepend=',' property='yhmc'>yhmc</isNotEmpty>
		<isNotEmpty prepend=',' property='yhmcpy'>yhmcpy</isNotEmpty>
		<isNotEmpty prepend=',' property='yhyxj'>yhyxj</isNotEmpty>
		<isNotEmpty prepend=',' property='yhlx'>yhlx</isNotEmpty>
		<isNotEmpty prepend=',' property='jh'>jh</isNotEmpty>
		<isNotEmpty prepend=',' property='zp'>zp</isNotEmpty>
		<isNotEmpty prepend=',' property='gddh'>gddh</isNotEmpty>
		<isNotEmpty prepend=',' property='sjhm'>sjhm</isNotEmpty>
		<isNotEmpty prepend=',' property='dh'>dh</isNotEmpty>
		<isNotEmpty prepend=',' property='yjdz'>yjdz</isNotEmpty>
		<isNotEmpty prepend=',' property='zz'>zz</isNotEmpty>
		<isNotEmpty prepend=',' property='ms'>ms</isNotEmpty>
		<isNotEmpty prepend=',' property='yhzt'>yhzt</isNotEmpty>
		<isNotEmpty prepend=',' property='sfjs'>sfjs</isNotEmpty>
		<isNotEmpty prepend=',' property='bmbh'>bmbh</isNotEmpty>
		<isNotEmpty prepend=',' property='khdlmtsjtx'>khdlmtsjtx</isNotEmpty>
		<isNotEmpty prepend=',' property='dnkhdxdlkg'>dnkhdxdlkg</isNotEmpty>
		<isNotEmpty prepend=',' property='sjkhdxdlkg'>sjkhdxdlkg</isNotEmpty>
		<isNotEmpty prepend=',' property='dnusbkeydlkg'>dnusbkeydlkg</isNotEmpty>
		<isNotEmpty prepend=',' property='dtdxfszdcs'>dtdxfszdcs</isNotEmpty>
		<isNotEmpty prepend=',' property='yxdlipsz'>yxdlipsz</isNotEmpty>
		<isNotEmpty prepend=',' property='dqx'>dqx</isNotEmpty>
		<isNotEmpty prepend=',' property='xqx'>xqx</isNotEmpty>
		<isNotEmpty prepend=',' property='kqx'>kqx</isNotEmpty>
		<isNotEmpty prepend=',' property='pqx'>pqx</isNotEmpty>
		<isNotEmpty prepend=',' property='lxhfqx'>lxhfqx</isNotEmpty>
		<isNotEmpty prepend=',' property='lxxzqx'>lxxzqx</isNotEmpty>
		<isNotEmpty prepend=',' property='lxdjqx'>lxdjqx</isNotEmpty>
		<isNotEmpty prepend=',' property='dldxh'>dldxh</isNotEmpty>
		<isNotEmpty prepend=',' property='usbkeymm'>usbkeymm</isNotEmpty>
		<isNotEmpty prepend=',' property='usbkeybh'>usbkeybh</isNotEmpty>
		<isNotEmpty prepend=',' property='ygjpzh'>ygjpzh</isNotEmpty>
		<isNotEmpty prepend=',' property='ygjpmm'>ygjpmm</isNotEmpty>
		<isNotEmpty prepend=',' property='sfzh'>sfzh</isNotEmpty>
		<isNotEmpty prepend=',' property='sfhyz'>sfhyz</isNotEmpty>
		<isNotEmpty prepend=',' property='sfzx'>sfzx</isNotEmpty>
		<isNotEmpty prepend=',' property='jqjsfw'>jqjsfw</isNotEmpty>
		<isNotEmpty prepend=',' property='zdjqjsfw'>zdjqjsfw</isNotEmpty>
		<isNotEmpty prepend=',' property='cjry'>cjry</isNotEmpty>
		<isNotEmpty prepend=',' property='cjrq'>cjrq</isNotEmpty>
		<isNotEmpty prepend=',' property='xgry'>xgry</isNotEmpty>
		<isNotEmpty prepend=',' property='xgrq'>xgrq</isNotEmpty>
		<isNotEmpty prepend=',' property='bz'>bz</isNotEmpty>
		<isNotEmpty prepend=',' property='kz1'>kz1</isNotEmpty>
		<isNotEmpty prepend=',' property='kz2'>kz2</isNotEmpty>
		<isNotEmpty prepend=',' property='kz3'>kz3</isNotEmpty>
		<isNotEmpty prepend=',' property='kz4'>kz4</isNotEmpty>

		)values(
		<isNotEmpty prepend='' property='yhbh'>#yhbh#</isNotEmpty>
		<isNotEmpty prepend=',' property='khbh'>#khbh#</isNotEmpty>
		<isNotEmpty prepend=',' property='sfgly'>#sfgly#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhzh'>#yhzh#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhmm'>#yhmm#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhmc'>#yhmc#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhmcpy'>#yhmcpy#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhyxj'>#yhyxj#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhlx'>#yhlx#</isNotEmpty>
		<isNotEmpty prepend=',' property='jh'>#jh#</isNotEmpty>
		<isNotEmpty prepend=',' property='zp'>#zp#</isNotEmpty>
		<isNotEmpty prepend=',' property='gddh'>#gddh#</isNotEmpty>
		<isNotEmpty prepend=',' property='sjhm'>#sjhm#</isNotEmpty>
		<isNotEmpty prepend=',' property='dh'>#dh#</isNotEmpty>
		<isNotEmpty prepend=',' property='yjdz'>#yjdz#</isNotEmpty>
		<isNotEmpty prepend=',' property='zz'>#zz#</isNotEmpty>
		<isNotEmpty prepend=',' property='ms'>#ms#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhzt'>#yhzt#</isNotEmpty>
		<isNotEmpty prepend=',' property='sfjs'>#sfjs#</isNotEmpty>
		<isNotEmpty prepend=',' property='bmbh'>#bmbh#</isNotEmpty>
		<isNotEmpty prepend=',' property='khdlmtsjtx'>#khdlmtsjtx#</isNotEmpty>
		<isNotEmpty prepend=',' property='dnkhdxdlkg'>#dnkhdxdlkg#</isNotEmpty>
		<isNotEmpty prepend=',' property='sjkhdxdlkg'>#sjkhdxdlkg#</isNotEmpty>
		<isNotEmpty prepend=',' property='dnusbkeydlkg'>#dnusbkeydlkg#</isNotEmpty>
		<isNotEmpty prepend=',' property='dtdxfszdcs'>#dtdxfszdcs#</isNotEmpty>
		<isNotEmpty prepend=',' property='yxdlipsz'>#yxdlipsz#</isNotEmpty>
		<isNotEmpty prepend=',' property='dqx'>#dqx#</isNotEmpty>
		<isNotEmpty prepend=',' property='xqx'>#xqx#</isNotEmpty>
		<isNotEmpty prepend=',' property='kqx'>#kqx#</isNotEmpty>
		<isNotEmpty prepend=',' property='pqx'>#pqx#</isNotEmpty>
		<isNotEmpty prepend=',' property='lxhfqx'>#lxhfqx#</isNotEmpty>
		<isNotEmpty prepend=',' property='lxxzqx'>#lxxzqx#</isNotEmpty>
		<isNotEmpty prepend=',' property='lxdjqx'>#lxdjqx#</isNotEmpty>
		<isNotEmpty prepend=',' property='dldxh'>#dldxh#</isNotEmpty>
		<isNotEmpty prepend=',' property='usbkeymm'>#usbkeymm#</isNotEmpty>
		<isNotEmpty prepend=',' property='usbkeybh'>#usbkeybh#</isNotEmpty>
		<isNotEmpty prepend=',' property='ygjpzh'>#ygjpzh#</isNotEmpty>
		<isNotEmpty prepend=',' property='ygjpmm'>#ygjpmm#</isNotEmpty>
		<isNotEmpty prepend=',' property='sfzh'>#sfzh#</isNotEmpty>
		<isNotEmpty prepend=',' property='sfhyz'>#sfhyz#</isNotEmpty>
		<isNotEmpty prepend=',' property='sfzx'>#sfzx#</isNotEmpty>
		<isNotEmpty prepend=',' property='jqjsfw'>#jqjsfw#</isNotEmpty>
		<isNotEmpty prepend=',' property='zdjqjsfw'>#zdjqjsfw#</isNotEmpty>
		<isNotEmpty prepend=',' property='cjry'>#cjry#</isNotEmpty>
		<isNotEmpty prepend=',' property='cjrq'>#cjrq#</isNotEmpty>
		<isNotEmpty prepend=',' property='xgry'>#xgry#</isNotEmpty>
		<isNotEmpty prepend=',' property='xgrq'>#xgrq#</isNotEmpty>
		<isNotEmpty prepend=',' property='bz'>#bz#</isNotEmpty>
		<isNotEmpty prepend=',' property='kz1'>#kz1#</isNotEmpty>
		<isNotEmpty prepend=',' property='kz2'>#kz2#</isNotEmpty>
		<isNotEmpty prepend=',' property='kz3'>#kz3#</isNotEmpty>
		<isNotEmpty prepend=',' property='kz4'>#kz4#</isNotEmpty>

		)
	</insert>

	<!-- 修改 -->
	<update id="update_Ptyh" parameterClass="java.util.Map">
		update Ptyh set
		yhbh = yhbh
		<isNotEmpty prepend=',' property='sfgly'>sfgly=#sfgly#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhzh'>yhzh=#yhzh#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhmm'>yhmm=#yhmm#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhmc'>yhmc=#yhmc#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhmcpy'>yhmcpy=#yhmcpy#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='yhyxj'>yhyxj=#yhyxj#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhlx'>yhlx=#yhlx#</isNotEmpty>
		<isNotEmpty prepend=',' property='jh'>jh=#jh#</isNotEmpty>
		<isNotEmpty prepend=',' property='zp'>zp=#zp#</isNotEmpty>
		<isNotEmpty prepend=',' property='gddh'>gddh=#gddh#</isNotEmpty>
		<isNotEmpty prepend=',' property='sjhm'>sjhm=#sjhm#</isNotEmpty>
		<isNotEmpty prepend=',' property='dh'>dh=#dh#</isNotEmpty>
		<isNotEmpty prepend=',' property='yjdz'>yjdz=#yjdz#</isNotEmpty>
		<isNotEmpty prepend=',' property='zz'>zz=#zz#</isNotEmpty>
		<isNotEmpty prepend=',' property='ms'>ms=#ms#</isNotEmpty>
		<isNotEmpty prepend=',' property='yhzt'>yhzt=#yhzt#</isNotEmpty>
		<isNotEmpty prepend=',' property='sfjs'>sfjs=#sfjs#</isNotEmpty>
		<isNotEmpty prepend=',' property='bmbh'>bmbh=#bmbh#</isNotEmpty>
		<isNotEmpty prepend=',' property='khdlmtsjtx'>khdlmtsjtx=#khdlmtsjtx#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='dnkhdxdlkg'>dnkhdxdlkg=#dnkhdxdlkg#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='sjkhdxdlkg'>sjkhdxdlkg=#sjkhdxdlkg#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='dnusbkeydlkg'>dnusbkeydlkg=#dnusbkeydlkg#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='dtdxfszdcs'>dtdxfszdcs=#dtdxfszdcs#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='yxdlipsz'>yxdlipsz=#yxdlipsz#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='dqx'>dqx=#dqx#</isNotEmpty>
		<isNotEmpty prepend=',' property='xqx'>xqx=#xqx#</isNotEmpty>
		<isNotEmpty prepend=',' property='kqx'>kqx=#kqx#</isNotEmpty>
		<isNotEmpty prepend=',' property='pqx'>pqx=#pqx#</isNotEmpty>
		<isNotEmpty prepend=',' property='lxhfqx'>lxhfqx=#lxhfqx#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='lxxzqx'>lxxzqx=#lxxzqx#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='lxdjqx'>lxdjqx=#lxdjqx#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='dldxh'>dldxh=#dldxh#</isNotEmpty>
		<isNotEmpty prepend=',' property='usbkeymm'>usbkeymm=#usbkeymm#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='usbkeybh'>usbkeybh=#usbkeybh#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='ygjpzh'>ygjpzh=#ygjpzh#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='ygjpmm'>ygjpmm=#ygjpmm#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='sfzh'>sfzh=#sfzh#</isNotEmpty>
		<isNotEmpty prepend=',' property='sfhyz'>sfhyz=#sfhyz#</isNotEmpty>
		<isNotEmpty prepend=',' property='sfzx'>sfzx=#sfzx#</isNotEmpty>
		<isNotEmpty prepend=',' property='jqjsfw'>jqjsfw=#jqjsfw#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='zdjqjsfw'>zdjqjsfw=#zdjqjsfw#
		</isNotEmpty>
		<isNotEmpty prepend=',' property='cjry'>cjry=#cjry#</isNotEmpty>
		<isNotEmpty prepend=',' property='cjrq'>cjrq=#cjrq#</isNotEmpty>
		<isNotEmpty prepend=',' property='xgry'>xgry=#xgry#</isNotEmpty>
		<isNotEmpty prepend=',' property='xgrq'>xgrq=#xgrq#</isNotEmpty>
		<isNotEmpty prepend=',' property='bz'>bz=#bz#</isNotEmpty>
		<isNotEmpty prepend=',' property='kz1'>kz1=#kz1#</isNotEmpty>
		<isNotEmpty prepend=',' property='kz2'>kz2=#kz2#</isNotEmpty>
		<isNotEmpty prepend=',' property='kz3'>kz3=#kz3#</isNotEmpty>
		<isNotEmpty prepend=',' property='kz4'>kz4=#kz4#</isNotEmpty>

		where 1=1
		<isNotEmpty prepend='AND' property='XGTJyhbh'>
			yhbh= #XGTJyhbh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJkhbh'>
			khbh= #XGTJkhbh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJsfgly'>
			sfgly= #XGTJsfgly#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJyhzh'>
			yhzh= #XGTJyhzh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJyhmm'>
			yhmm= #XGTJyhmm#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJyhmc'>
			yhmc= #XGTJyhmc#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJyhmcpy'>
			yhmcpy= #XGTJyhmcpy#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJyhyxj'>
			yhyxj= #XGTJyhyxj#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJyhlx'>
			yhlx= #XGTJyhlx#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJjh'>
			jh= #XGTJjh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJzp'>
			zp= #XGTJzp#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJgddh'>
			gddh= #XGTJgddh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJsjhm'>
			sjhm= #XGTJsjhm#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJdh'>
			dh= #XGTJdh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJyjdz'>
			yjdz= #XGTJyjdz#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJzz'>
			zz= #XGTJzz#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJms'>
			ms= #XGTJms#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJyhzt'>
			yhzt= #XGTJyhzt#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJsfjs'>
			sfjs= #XGTJsfjs#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJbmbh'>
			bmbh= #XGTJbmbh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJkhdlmtsjtx'>
			khdlmtsjtx= #XGTJkhdlmtsjtx#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJdnkhdxdlkg'>
			dnkhdxdlkg= #XGTJdnkhdxdlkg#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJsjkhdxdlkg'>
			sjkhdxdlkg= #XGTJsjkhdxdlkg#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJdnusbkeydlkg'>
			dnusbkeydlkg= #XGTJdnusbkeydlkg#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJdtdxfszdcs'>
			dtdxfszdcs= #XGTJdtdxfszdcs#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJyxdlipsz'>
			yxdlipsz= #XGTJyxdlipsz#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJdqx'>
			dqx= #XGTJdqx#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJxqx'>
			xqx= #XGTJxqx#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJkqx'>
			kqx= #XGTJkqx#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJpqx'>
			pqx= #XGTJpqx#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJlxhfqx'>
			lxhfqx= #XGTJlxhfqx#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJlxxzqx'>
			lxxzqx= #XGTJlxxzqx#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJlxdjqx'>
			lxdjqx= #XGTJlxdjqx#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJdldxh'>
			dldxh= #XGTJdldxh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJusbkeymm'>
			usbkeymm= #XGTJusbkeymm#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJusbkeybh'>
			usbkeybh= #XGTJusbkeybh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJygjpzh'>
			ygjpzh= #XGTJygjpzh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJygjpmm'>
			ygjpmm= #XGTJygjpmm#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJsfzh'>
			sfzh= #XGTJsfzh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJsfhyz'>
			sfhyz= #XGTJsfhyz#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJsfzx'>
			sfzx= #XGTJsfzx#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJjqjsfw'>
			jqjsfw= #XGTJjqjsfw#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJzdjqjsfw'>
			zdjqjsfw= #XGTJzdjqjsfw#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJcjry'>
			cjry= #XGTJcjry#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJcjrq'>
			cjrq= #XGTJcjrq#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJxgry'>
			xgry= #XGTJxgry#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJxgrq'>
			xgrq= #XGTJxgrq#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJbz'>
			bz= #XGTJbz#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJkz1'>
			kz1= #XGTJkz1#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJkz2'>
			kz2= #XGTJkz2#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJkz3'>
			kz3= #XGTJkz3#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='XGTJkz4'>
			kz4= #XGTJkz4#
		</isNotEmpty>

	</update>

	<!-- 删除 -->
	<delete id="delete_Ptyh" parameterClass="java.util.Map">
		delete from Ptyh
		<include refid="condition_Ptyh" />
	</delete>

	<!-- 批处理删除 -->
	<delete id="batch_delete_Ptyh" parameterClass="java.util.Map">
		delete from Ptyh
		where 1=1
		<isNotEmpty prepend='AND' property='keyword'>
			key in (#keyword#)
		</isNotEmpty>
	</delete>

	<!-- 修改密码 -->
	<update id="update_Password" parameterClass="java.util.Map">
		update Ptyh set yhmm=#yhmm# where 1=1
		<isNotEmpty prepend='AND' property='yhbh'>
			yhbh=#yhbh#
		</isNotEmpty>
	</update>
	<!-- 查询 -->
	<select id="query_Ptyh" resultClass="java.util.HashMap"
		parameterClass="java.util.Map">
		select
		yhbh,khbh,sfgly,yhzh,yhmm,yhmc,yhmcpy,yhyxj,yhlx,jh,zp,gddh,sjhm,dh,yjdz,zz,ms,yhzt,sfjs,bmbh,khdlmtsjtx,dnkhdxdlkg,sjkhdxdlkg,dnusbkeydlkg,dtdxfszdcs,yxdlipsz,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,dldxh,usbkeymm,usbkeybh,ygjpzh,ygjpmm,sfzh,sfhyz,sfzx,jqjsfw,zdjqjsfw,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4
		from Ptyh
		<include refid="condition_Ptyh" />
	</select>

	<!-- 查询 -->
	<select id="query_PtyhBean" resultClass="ptyhbean"
		parameterClass="java.util.Map">
		select
		yhbh,khbh,sfgly,yhzh,yhmm,yhmc,yhmcpy,yhyxj,yhlx,jh,zp,gddh,sjhm,dh,yjdz,zz,ms,yhzt,sfjs,bmbh,khdlmtsjtx,dnkhdxdlkg,sjkhdxdlkg,dnusbkeydlkg,dtdxfszdcs,yxdlipsz,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,dldxh,usbkeymm,usbkeybh,ygjpzh,ygjpmm,sfzh,sfhyz,sfzx,jqjsfw,zdjqjsfw,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4
		from Ptyh
		<include refid="condition_Ptyh" />
	</select>

	<!-- 查询总数 -->
	<select id="count_Ptyh" resultClass="java.lang.Integer"
		parameterClass="java.util.Map">
		select count(*) from Ptyh
		<include refid="condition_Ptyh" />
	</select>

	<!-- 批量增加 -->
	<insert id="batch_insert_Ptyh" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT ALL
      	]]>
		<iterate conjunction=" ">
			into Ptyh(
			 <![CDATA[ 
				khbh,yhbh,sfgly,yhzh,yhmm,yhmc,yhmcpy,yhyxj,yhlx,jh,zp,gddh,sjhm,dh,yjdz,zz,ms,yhzt,sfjs,bmbh,khdlmtsjtx,dnkhdxdlkg,sjkhdxdlkg,dnusbkeydlkg,dtdxfszdcs,yxdlipsz,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,dldxh,usbkeymm,usbkeybh,ygjpzh,ygjpmm,sfzh,sfhyz,sfzx,jqjsfw,zdjqjsfw,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
			#list[].yhbh#
				)
			]]>
		</iterate> 
	</insert>
	
	
	<select id="query_ptyh_ext" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select a.*,b.csmc as sfglyName,c.csmc as yhyxjName,d.csmc as yhztName,e.csmc as sfjsName  from(
			select * from ptyh 
			<include refid="condition_Ptyh" />
		)a left join xtcl b on a.sfgly = b.csdm AND b.csdl= 'superFlag'
		left join xtcl c on a.yhyxj = c.csdm AND c.csdl= 'userLevel'
		left join xtcl d on a.yhzt = d.csdm AND d.csdl= 'userStatus'
		left join xtcl e on a.sfjs = e.csdm AND e.csdl= 'isTiming'
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</select>
	<!-- 查询总数1 -->
	<select id="count_ptyh_ext" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from (
			select a.*,b.csmc as sfglyName,c.csmc as userLevelName,d.csmc as userStatusName,e.csmc as isTimingName  from(
			select * from ptyh 
			<include refid="condition_Ptyh" />
		)a left join xtcl b on a.sfgly = b.csdm AND b.csdl= 'superFlag'
		left join xtcl c on a.yhyxj = c.csdm AND c.csdl= 'userLevel'
		left join xtcl d on a.yhzt = d.csdm AND d.csdl= 'userStatus'
		left join xtcl e on a.sfjs = e.csdm AND e.csdl= 'isTiming'
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
		) ff		 
	</select>
	
	<!-- 查询用户读写播控权限 -->
	<select id="query_Ptyh_sbqx" resultClass="java.util.HashMap"	parameterClass="java.util.Map">		
		select a.*,b.csmc as sfglymc,c.csmc as yhyxjmc,d.csmc as yhztmc,e.csmc as sfjsmc  from(
			select 
				yhbh,khbh,sfgly,yhzh,yhmm,yhmc,yhmcpy,yhyxj,yhlx,jh,zp,gddh,sjhm,dh,yjdz,zz,ms,yhzt,sfjs,bmbh,khdlmtsjtx,dnkhdxdlkg,sjkhdxdlkg,dnusbkeydlkg,dtdxfszdcs,yxdlipsz,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,dldxh,usbkeymm,usbkeybh,ygjpzh,ygjpmm,sfzh,sfhyz,sfzx,jqjsfw,zdjqjsfw,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4
			from ptyh 
		<include refid="condition_Ptyh" />
		)a left join xtcl b on a.sfgly = b.csdm AND b.csdl= 'superFlag'
		left join xtcl c on a.yhyxj = c.csdm AND c.csdl= 'userLevel'
		left join xtcl d on a.yhzt = d.csdm AND d.csdl= 'userStatus'
		left join xtcl e on a.sfjs = e.csdm AND e.csdl= 'isTiming'
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</select>
	
	<!-- 查询用户读写播控权限[精确] -->
	<select id="query_ptyh_sbjqqx" resultClass="java.util.HashMap"	parameterClass="java.util.Map">		
		select a.*,b.tdmc from (
			select 
             bmbh,sbbh,tdbh,xh,khbh,tdlx,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,cjry,cjrq,xgry,xgrq,bz
			from sbtdjqqx 
			where 1=1 
			<isNotEmpty prepend='AND' property='LIKEsbbh'>
				(sbbh like concat('%',#LIKEsbbh# ,'%') )
			</isNotEmpty>		
			<isNotEmpty prepend='AND' property='bmbh'>
				(bmbh = #bmbh# )
			</isNotEmpty>	
		)a left join sbtdspsr b on a.sbbh= b.sbbh AND a.tdbh = b.tdbh
		where 1=1 
		<isNotEmpty prepend='AND' property='LIKEtdmc'>
			(b.tdmc like concat('%',#LIKEtdmc# ,'%') )
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</select>
	<!-- 查询用户读写播控权限[精确]总数 -->
	<select id="count_ptyh_sbjqqx" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from (
			select 
            	bmbh,sbbh,tdbh,xh,khbh,tdlx,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,cjry,cjrq,xgry,xgrq,bz
			from sbtdjqqx 
			where 1=1 
			<isNotEmpty prepend='AND' property='LIKEsbbh'>
				(sbbh like concat('%',#LIKEsbbh# ,'%') )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='bmbh'>
				(bmbh = #bmbh# )
			</isNotEmpty>		
		)a left join sbtdspsr b on a.sbbh= b.sbbh AND a.tdbh = b.tdbh
		where 1=1 
		<isNotEmpty prepend='AND' property='LIKEtdmc'>
			(b.tdmc like concat('%',#LIKEtdmc# ,'%') )
		</isNotEmpty>
	</select>
	
	<!-- 查询用户读写播控权限[通配] -->
	<select id="query_ptyh_sbtpqx" resultClass="java.util.HashMap"	parameterClass="java.util.Map">		
		select 
			xh,khbh,bmbh,wbbh,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,cjry,cjrq,xgry,xgrq,bz
		from Sbtdtpqx 
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEwbbh'>
			(wbbh like concat('%',#LIKEwbbh# ,'%') )
		</isNotEmpty>	
		<isNotEmpty prepend='AND' property='bmbh'>
			(bmbh = #bmbh# )
		</isNotEmpty>
		
	</select>
	<!-- 查询用户读写播控权限[通配]总数 -->
	<select id="count_ptyh_sbtpqx" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select 
			count(*)
		from Sbtdtpqx 
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEwbbh'>
			(wbbh like concat('%',#LIKEwbbh# ,'%') )
		</isNotEmpty>	
		<isNotEmpty prepend='AND' property='bmbh'>
			(bmbh = #bmbh# )
		</isNotEmpty>
	</select>
	
</sqlMap>











