123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387 |
- <?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_bbxx" >
- <resultMap id="ibatorgenerated_BaseResultMap" class="com.huimv.xt.dataobject.XtBbxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- <result column="ID" property="id" jdbcType="INTEGER" />
- <result column="BBH" property="bbh" jdbcType="VARCHAR" />
- <result column="FBR" property="fbr" jdbcType="VARCHAR" />
- <result column="FBSJ" property="fbsj" jdbcType="TIMESTAMP" />
- <result column="XGR" property="xgr" jdbcType="VARCHAR" />
- <result column="XGSJ" property="xgsj" jdbcType="TIMESTAMP" />
- <result column="ZFBZ" property="zfbz" jdbcType="INTEGER" />
- <result column="TYPE" property="type" jdbcType="INTEGER" />
- </resultMap>
- <resultMap id="ibatorgenerated_ResultMapWithBLOBs" class="com.huimv.xt.dataobject.XtBbxx" extends="xt_bbxx.ibatorgenerated_BaseResultMap" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- <result column="GXSM" property="gxsm" jdbcType="LONGVARCHAR" />
- </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 Thu Nov 03 18:21:25 CST 2016.
- -->
- <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_selectByExampleWithBLOBs" resultMap="ibatorgenerated_ResultMapWithBLOBs" parameterClass="com.huimv.xt.dataobject.XtBbxxExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- select ID, BBH, FBR, FBSJ, XGR, XGSJ, ZFBZ, TYPE, GXSM
- from xt_bbxx
- <isParameterPresent >
- <include refid="xt_bbxx.ibatorgenerated_Example_Where_Clause" />
- <isNotNull property="orderByClause" >
- order by $orderByClause$
- </isNotNull>
- </isParameterPresent>
- </select>
- <select id="ibatorgenerated_selectByExample" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.xt.dataobject.XtBbxxExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- select ID, BBH, FBR, FBSJ, XGR, XGSJ, ZFBZ, TYPE
- from xt_bbxx
- <isParameterPresent >
- <include refid="xt_bbxx.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_ResultMapWithBLOBs" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- select ID, BBH, FBR, FBSJ, XGR, XGSJ, ZFBZ, TYPE, GXSM
- from xt_bbxx
- where ID = #id:INTEGER#
- </select>
- <delete id="ibatorgenerated_deleteByPrimaryKey" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- delete from xt_bbxx
- where ID = #id:INTEGER#
- </delete>
- <delete id="ibatorgenerated_deleteByExample" parameterClass="com.huimv.xt.dataobject.XtBbxxExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- delete from xt_bbxx
- <include refid="xt_bbxx.ibatorgenerated_Example_Where_Clause" />
- </delete>
- <insert id="ibatorgenerated_insert" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- insert into xt_bbxx (ID, BBH, FBR, FBSJ, XGR, XGSJ, ZFBZ, TYPE, GXSM)
- values (#id:INTEGER#, #bbh:VARCHAR#, #fbr:VARCHAR#, #fbsj:TIMESTAMP#, #xgr:VARCHAR#,
- #xgsj:TIMESTAMP#, #zfbz:INTEGER#, #type:INTEGER#, #gxsm:LONGVARCHAR#)
- </insert>
- <insert id="ibatorgenerated_insertSelective" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- insert into xt_bbxx
- <dynamic prepend="(" >
- <isNotNull prepend="," property="id" >
- ID
- </isNotNull>
- <isNotNull prepend="," property="bbh" >
- BBH
- </isNotNull>
- <isNotNull prepend="," property="fbr" >
- FBR
- </isNotNull>
- <isNotNull prepend="," property="fbsj" >
- FBSJ
- </isNotNull>
- <isNotNull prepend="," property="xgr" >
- XGR
- </isNotNull>
- <isNotNull prepend="," property="xgsj" >
- XGSJ
- </isNotNull>
- <isNotNull prepend="," property="zfbz" >
- ZFBZ
- </isNotNull>
- <isNotNull prepend="," property="type" >
- TYPE
- </isNotNull>
- <isNotNull prepend="," property="gxsm" >
- GXSM
- </isNotNull>
- )
- </dynamic>
- values
- <dynamic prepend="(" >
- <isNotNull prepend="," property="id" >
- #id:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="bbh" >
- #bbh:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="fbr" >
- #fbr:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="fbsj" >
- #fbsj:TIMESTAMP#
- </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="type" >
- #type:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="gxsm" >
- #gxsm:LONGVARCHAR#
- </isNotNull>
- )
- </dynamic>
- </insert>
- <select id="ibatorgenerated_countByExample" parameterClass="com.huimv.xt.dataobject.XtBbxxExample" resultClass="java.lang.Integer" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- select count(*) from xt_bbxx
- <include refid="xt_bbxx.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 Thu Nov 03 18:21:25 CST 2016.
- -->
- update xt_bbxx
- <dynamic prepend="set" >
- <isNotNull prepend="," property="record.id" >
- ID = #record.id:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.bbh" >
- BBH = #record.bbh:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.fbr" >
- FBR = #record.fbr:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.fbsj" >
- FBSJ = #record.fbsj:TIMESTAMP#
- </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.type" >
- TYPE = #record.type:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.gxsm" >
- GXSM = #record.gxsm:LONGVARCHAR#
- </isNotNull>
- </dynamic>
- <isParameterPresent >
- <include refid="xt_bbxx.ibatorgenerated_Example_Where_Clause" />
- </isParameterPresent>
- </update>
- <update id="ibatorgenerated_updateByExampleWithBLOBs" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- update xt_bbxx
- set ID = #record.id:INTEGER#,
- BBH = #record.bbh:VARCHAR#,
- FBR = #record.fbr:VARCHAR#,
- FBSJ = #record.fbsj:TIMESTAMP#,
- XGR = #record.xgr:VARCHAR#,
- XGSJ = #record.xgsj:TIMESTAMP#,
- ZFBZ = #record.zfbz:INTEGER#,
- TYPE = #record.type:INTEGER#,
- GXSM = #record.gxsm:LONGVARCHAR#
- <isParameterPresent >
- <include refid="xt_bbxx.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 Thu Nov 03 18:21:25 CST 2016.
- -->
- update xt_bbxx
- set ID = #record.id:INTEGER#,
- BBH = #record.bbh:VARCHAR#,
- FBR = #record.fbr:VARCHAR#,
- FBSJ = #record.fbsj:TIMESTAMP#,
- XGR = #record.xgr:VARCHAR#,
- XGSJ = #record.xgsj:TIMESTAMP#,
- ZFBZ = #record.zfbz:INTEGER#,
- TYPE = #record.type:INTEGER#
- <isParameterPresent >
- <include refid="xt_bbxx.ibatorgenerated_Example_Where_Clause" />
- </isParameterPresent>
- </update>
- <update id="ibatorgenerated_updateByPrimaryKeySelective" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- update xt_bbxx
- <dynamic prepend="set" >
- <isNotNull prepend="," property="bbh" >
- BBH = #bbh:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="fbr" >
- FBR = #fbr:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="fbsj" >
- FBSJ = #fbsj:TIMESTAMP#
- </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="type" >
- TYPE = #type:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="gxsm" >
- GXSM = #gxsm:LONGVARCHAR#
- </isNotNull>
- </dynamic>
- where ID = #id:INTEGER#
- </update>
- <update id="ibatorgenerated_updateByPrimaryKeyWithBLOBs" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- update xt_bbxx
- set BBH = #bbh:VARCHAR#,
- FBR = #fbr:VARCHAR#,
- FBSJ = #fbsj:TIMESTAMP#,
- XGR = #xgr:VARCHAR#,
- XGSJ = #xgsj:TIMESTAMP#,
- ZFBZ = #zfbz:INTEGER#,
- TYPE = #type:INTEGER#,
- GXSM = #gxsm:LONGVARCHAR#
- where ID = #id:INTEGER#
- </update>
- <update id="ibatorgenerated_updateByPrimaryKey" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Thu Nov 03 18:21:25 CST 2016.
- -->
- update xt_bbxx
- set BBH = #bbh:VARCHAR#,
- FBR = #fbr:VARCHAR#,
- FBSJ = #fbsj:TIMESTAMP#,
- XGR = #xgr:VARCHAR#,
- XGSJ = #xgsj:TIMESTAMP#,
- ZFBZ = #zfbz:INTEGER#,
- TYPE = #type:INTEGER#
- where ID = #id:INTEGER#
- </update>
-
- <!-- 版本信息搜索条件 -->
- <sql id="xt.bbxx.where.cause">
- <dynamic>
- <isNotEmpty prepend="and" property="id">
- b.ID = #id#
- </isNotEmpty>
- <isNotEmpty prepend="and" property="bbh">
- b.BBH = #bbh#
- </isNotEmpty>
- <isNotEmpty prepend="and" property="ksrq">
- <![CDATA[b.FBSJ >= #ksrq#]]>
- </isNotEmpty>
- <isNotEmpty prepend="and" property="jsrq">
- <![CDATA[b.FBSJ <= #jsrq#]]>
- </isNotEmpty>
- </dynamic>
- </sql>
-
- <!-- 根据指定搜索条件消息-->
- <select id="select.bbxx.by.param" parameterClass="java.util.Map" resultClass="com.huimv.xt.dataobject.XtBbxx">
- select b.ID,b.BBH,b.GXSM,c1.YHXM as FBRXM,b.FBSJ,c2.YHXM as XGRXM,b.XGSJ from xt_bbxx b
- LEFT JOIN xt_czyh c1 on b.FBR = c1.ID and c1.ZFBZ = 0
- LEFT JOIN xt_czyh c2 on b.XGR = c2.ID and c2.ZFBZ = 0
- WHERE b.ZFBZ = 0
- <isParameterPresent>
- <include refid="xt.bbxx.where.cause" />
- </isParameterPresent>
- <dynamic prepend="order by">
- <isNotEmpty property="order">$order$</isNotEmpty>
- </dynamic>
- limit #startRecord#,#endRecord#
- </select>
-
- <!-- 搜索指定条件版本信息记录条数 -->
- <select id="count.bbxx.by.param" parameterClass="java.util.Map" resultClass="java.lang.Integer">
- select count(*) from xt_bbxx b
- LEFT JOIN xt_czyh c1 on b.FBR = c1.ID and c1.ZFBZ = 0
- LEFT JOIN xt_czyh c2 on b.XGR = c2.ID and c2.ZFBZ = 0
- WHERE b.ZFBZ = 0
- <isParameterPresent>
- <include refid="xt.bbxx.where.cause" />
- </isParameterPresent>
- </select>
-
- <!-- 搜索bbxx中fbsj最大的记录 -->
- <select id="select.bbxx.by.max.fbsj" resultClass="com.huimv.xt.dataobject.XtBbxx" parameterClass="java.util.Map" >
- select * from xt_bbxx
- where FBSJ = (select max(fbsj) from xt_bbxx where ZFBZ = 0 and type = #type#) and ZFBZ = 0 and type = #type#
- </select>
- </sqlMap>
|