123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd" >
- <sqlMap namespace="xt_xzqh" >
- <resultMap id="ibatorgenerated_BaseResultMap" class="com.huimv.xt.dataobject.XtXzqh" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- <result column="ID" property="id" jdbcType="INTEGER" />
- <result column="QHBM" property="qhbm" jdbcType="VARCHAR" />
- <result column="QHMC" property="qhmc" jdbcType="VARCHAR" />
- <result column="QHLX" property="qhlx" jdbcType="VARCHAR" />
- <result column="SJQH" property="sjqh" jdbcType="VARCHAR" />
- <result column="PYM" property="pym" jdbcType="VARCHAR" />
- <result column="WBM" property="wbm" jdbcType="VARCHAR" />
- <result column="COORDS" property="coords" jdbcType="VARCHAR" />
- <result column="XGR" property="xgr" jdbcType="VARCHAR" />
- <result column="XGSJ" property="xgsj" jdbcType="TIMESTAMP" />
- <result column="ZFBZ" property="zfbz" jdbcType="INTEGER" />
- <result column="CITYCODE" property="citycode" jdbcType="INTEGER" />
- </resultMap>
- <sql id="ibatorgenerated_Example_Where_Clause" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- <iterate property="oredCriteria" conjunction="or" prepend="where" removeFirstPrepend="iterate" >
- <isEqual property="oredCriteria[].valid" compareValue="true" >
- (
- <iterate prepend="and" property="oredCriteria[].criteriaWithoutValue" conjunction="and" >
- $oredCriteria[].criteriaWithoutValue[]$
- </iterate>
- <iterate prepend="and" property="oredCriteria[].criteriaWithSingleValue" conjunction="and" >
- $oredCriteria[].criteriaWithSingleValue[].condition$
- #oredCriteria[].criteriaWithSingleValue[].value#
- </iterate>
- <iterate prepend="and" property="oredCriteria[].criteriaWithListValue" conjunction="and" >
- $oredCriteria[].criteriaWithListValue[].condition$
- <iterate property="oredCriteria[].criteriaWithListValue[].values" open="(" close=")" conjunction="," >
- #oredCriteria[].criteriaWithListValue[].values[]#
- </iterate>
- </iterate>
- <iterate prepend="and" property="oredCriteria[].criteriaWithBetweenValue" conjunction="and" >
- $oredCriteria[].criteriaWithBetweenValue[].condition$
- #oredCriteria[].criteriaWithBetweenValue[].values[0]# and
- #oredCriteria[].criteriaWithBetweenValue[].values[1]#
- </iterate>
- )
- </isEqual>
- </iterate>
- </sql>
- <select id="ibatorgenerated_selectByExample" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.xt.dataobject.XtXzqhExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- select ID, QHBM, QHMC, QHLX, SJQH, PYM, WBM, COORDS, XGR, XGSJ, ZFBZ, CITYCODE
- from xt_xzqh
- <isParameterPresent >
- <include refid="xt_xzqh.ibatorgenerated_Example_Where_Clause" />
- <isNotNull property="orderByClause" >
- order by $orderByClause$
- </isNotNull>
- <isGreaterEqual property="start" compareValue="0" >
- limit $start$ , $limit$
- </isGreaterEqual>
- </isParameterPresent>
- </select>
- <select id="ibatorgenerated_selectByPrimaryKey" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- select ID, QHBM, QHMC, QHLX, SJQH, PYM, WBM, COORDS, XGR, XGSJ, ZFBZ, CITYCODE
- from xt_xzqh
- where ID = #id:INTEGER#
- </select>
- <select id="select.xzqh.by.qhbm" resultClass="com.huimv.xt.dataobject.XtXzqh" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
- select t1.ID, t1.QHBM, t1.QHMC, t1.QHLX, t1.SJQH, t1.PYM, t1.WBM, t1.XGR, t1.XGSJ, t1.ZFBZ, t1.CITYCODE, t2.QHMC SJQHMC
- from xt_xzqh t1
- left join xt_xzqh t2 on t1.sjqh = t2.qhbm
- where t1.QHBM = #qhbm:VARCHAR#
- </select>
- <delete id="ibatorgenerated_deleteByPrimaryKey" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- delete from xt_xzqh
- where ID = #id:INTEGER#
- </delete>
- <delete id="ibatorgenerated_deleteByExample" parameterClass="com.huimv.xt.dataobject.XtXzqhExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- delete from xt_xzqh
- <include refid="xt_xzqh.ibatorgenerated_Example_Where_Clause" />
- </delete>
- <insert id="ibatorgenerated_insert" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- insert into xt_xzqh (ID, QHBM, QHMC, QHLX, SJQH, PYM, WBM, COORDS, XGR, XGSJ, ZFBZ, CITYCODE)
- values (#id:INTEGER#, #qhbm:VARCHAR#, #qhmc:VARCHAR#, #qhlx:VARCHAR#, #sjqh:VARCHAR#,
- #pym:VARCHAR#, #wbm:VARCHAR#, #coords:VARCHAR#, #xgr:VARCHAR#, #xgsj:TIMESTAMP#,
- #zfbz:INTEGER#, #citycode:INTEGER#)
- </insert>
- <insert id="ibatorgenerated_insertSelective" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- insert into xt_xzqh
- <dynamic prepend="(" >
- <isNotNull prepend="," property="id" >
- ID
- </isNotNull>
- <isNotNull prepend="," property="qhbm" >
- QHBM
- </isNotNull>
- <isNotNull prepend="," property="qhmc" >
- QHMC
- </isNotNull>
- <isNotNull prepend="," property="qhlx" >
- QHLX
- </isNotNull>
- <isNotNull prepend="," property="sjqh" >
- SJQH
- </isNotNull>
- <isNotNull prepend="," property="pym" >
- PYM
- </isNotNull>
- <isNotNull prepend="," property="wbm" >
- WBM
- </isNotNull>
- <isNotNull prepend="," property="coords" >
- COORDS
- </isNotNull>
- <isNotNull prepend="," property="xgr" >
- XGR
- </isNotNull>
- <isNotNull prepend="," property="xgsj" >
- XGSJ
- </isNotNull>
- <isNotNull prepend="," property="zfbz" >
- ZFBZ
- </isNotNull>
- <isNotNull prepend="," property="citycode" >
- CITYCODE
- </isNotNull>
- )
- </dynamic>
- values
- <dynamic prepend="(" >
- <isNotNull prepend="," property="id" >
- #id:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="qhbm" >
- #qhbm:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="qhmc" >
- #qhmc:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="qhlx" >
- #qhlx:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="sjqh" >
- #sjqh:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="pym" >
- #pym:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="wbm" >
- #wbm:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="coords" >
- #coords:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="xgr" >
- #xgr:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="xgsj" >
- #xgsj:TIMESTAMP#
- </isNotNull>
- <isNotNull prepend="," property="zfbz" >
- #zfbz:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="citycode" >
- #citycode:INTEGER#
- </isNotNull>
- )
- </dynamic>
- </insert>
- <select id="ibatorgenerated_countByExample" parameterClass="com.huimv.xt.dataobject.XtXzqhExample" resultClass="java.lang.Integer" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- select count(*) from xt_xzqh
- <include refid="xt_xzqh.ibatorgenerated_Example_Where_Clause" />
- </select>
- <update id="ibatorgenerated_updateByExampleSelective" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- update xt_xzqh
- <dynamic prepend="set" >
- <isNotNull prepend="," property="record.id" >
- ID = #record.id:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.qhbm" >
- QHBM = #record.qhbm:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.qhmc" >
- QHMC = #record.qhmc:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.qhlx" >
- QHLX = #record.qhlx:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.sjqh" >
- SJQH = #record.sjqh:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.pym" >
- PYM = #record.pym:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.wbm" >
- WBM = #record.wbm:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.coords" >
- COORDS = #record.coords:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.xgr" >
- XGR = #record.xgr:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.xgsj" >
- XGSJ = #record.xgsj:TIMESTAMP#
- </isNotNull>
- <isNotNull prepend="," property="record.zfbz" >
- ZFBZ = #record.zfbz:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.citycode" >
- CITYCODE = #record.citycode:INTEGER#
- </isNotNull>
- </dynamic>
- <isParameterPresent >
- <include refid="xt_xzqh.ibatorgenerated_Example_Where_Clause" />
- </isParameterPresent>
- </update>
- <update id="ibatorgenerated_updateByExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- update xt_xzqh
- set ID = #record.id:INTEGER#,
- QHBM = #record.qhbm:VARCHAR#,
- QHMC = #record.qhmc:VARCHAR#,
- QHLX = #record.qhlx:VARCHAR#,
- SJQH = #record.sjqh:VARCHAR#,
- PYM = #record.pym:VARCHAR#,
- WBM = #record.wbm:VARCHAR#,
- COORDS = #record.coords:VARCHAR#,
- XGR = #record.xgr:VARCHAR#,
- XGSJ = #record.xgsj:TIMESTAMP#,
- ZFBZ = #record.zfbz:INTEGER#,
- CITYCODE = #record.citycode:INTEGER#
- <isParameterPresent >
- <include refid="xt_xzqh.ibatorgenerated_Example_Where_Clause" />
- </isParameterPresent>
- </update>
- <update id="ibatorgenerated_updateByPrimaryKeySelective" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- update xt_xzqh
- <dynamic prepend="set" >
- <isNotNull prepend="," property="qhbm" >
- QHBM = #qhbm:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="qhmc" >
- QHMC = #qhmc:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="qhlx" >
- QHLX = #qhlx:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="sjqh" >
- SJQH = #sjqh:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="pym" >
- PYM = #pym:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="wbm" >
- WBM = #wbm:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="coords" >
- COORDS = #coords:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="xgr" >
- XGR = #xgr:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="xgsj" >
- XGSJ = #xgsj:TIMESTAMP#
- </isNotNull>
- <isNotNull prepend="," property="zfbz" >
- ZFBZ = #zfbz:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="citycode" >
- CITYCODE = #citycode:INTEGER#
- </isNotNull>
- </dynamic>
- where ID = #id:INTEGER#
- </update>
- <update id="ibatorgenerated_updateByPrimaryKey" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Wed May 21 10:29:31 CST 2014.
- -->
- update xt_xzqh
- set QHBM = #qhbm:VARCHAR#,
- QHMC = #qhmc:VARCHAR#,
- QHLX = #qhlx:VARCHAR#,
- SJQH = #sjqh:VARCHAR#,
- PYM = #pym:VARCHAR#,
- WBM = #wbm:VARCHAR#,
- COORDS = #coords:VARCHAR#,
- XGR = #xgr:VARCHAR#,
- XGSJ = #xgsj:TIMESTAMP#,
- ZFBZ = #zfbz:INTEGER#,
- CITYCODE = #citycode:INTEGER#
- where ID = #id:INTEGER#
- </update>
-
- <!-- 行政区划输入器 -->
- <select id="srq.select.xzqh.by.param" parameterClass="java.util.Map" resultClass="com.huimv.xt.dataobject.XtXzqh">
- select t1.*, t2.qhmc sjqhmc from xt_xzqh t1
- left join xt_xzqh t2 on t1.sjqh = t2.qhbm and t2.zfbz = 0
- where t1.zfbz = 0
- <isNotEmpty prepend="and" property="searchValue">
- ($srfsName$ like concat(#searchValue#, '%') or t1.qhmc like concat('%', #searchValue#, '%'))
- </isNotEmpty>
- <isNotEmpty prepend="and" property="qhbmsql">
- $qhbmsql$
- </isNotEmpty>
- order by t1.qhmc asc
- </select>
-
- <select id="xzqh.get.max.qhbm" parameterClass="java.util.Map" resultClass="java.lang.Long">
- select ifnull(max(qhbm), 0) as maxqhbm
- from xt_xzqh
- where zfbz = 0
- and qhlx = #qhlx#
- and sjqh = #sjqh#
- </select>
- </sqlMap>
|