xt_bbxx_SqlMap.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd" >
  3. <sqlMap namespace="xt_bbxx" >
  4. <resultMap id="ibatorgenerated_BaseResultMap" class="com.huimv.xt.dataobject.XtBbxx" >
  5. <!--
  6. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  7. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  8. -->
  9. <result column="ID" property="id" jdbcType="INTEGER" />
  10. <result column="BBH" property="bbh" jdbcType="VARCHAR" />
  11. <result column="FBR" property="fbr" jdbcType="VARCHAR" />
  12. <result column="FBSJ" property="fbsj" jdbcType="TIMESTAMP" />
  13. <result column="XGR" property="xgr" jdbcType="VARCHAR" />
  14. <result column="XGSJ" property="xgsj" jdbcType="TIMESTAMP" />
  15. <result column="ZFBZ" property="zfbz" jdbcType="INTEGER" />
  16. <result column="TYPE" property="type" jdbcType="INTEGER" />
  17. </resultMap>
  18. <resultMap id="ibatorgenerated_ResultMapWithBLOBs" class="com.huimv.xt.dataobject.XtBbxx" extends="xt_bbxx.ibatorgenerated_BaseResultMap" >
  19. <!--
  20. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  21. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  22. -->
  23. <result column="GXSM" property="gxsm" jdbcType="LONGVARCHAR" />
  24. </resultMap>
  25. <sql id="ibatorgenerated_Example_Where_Clause" >
  26. <!--
  27. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  28. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  29. -->
  30. <iterate property="oredCriteria" conjunction="or" prepend="where" removeFirstPrepend="iterate" >
  31. <isEqual property="oredCriteria[].valid" compareValue="true" >
  32. (
  33. <iterate prepend="and" property="oredCriteria[].criteriaWithoutValue" conjunction="and" >
  34. $oredCriteria[].criteriaWithoutValue[]$
  35. </iterate>
  36. <iterate prepend="and" property="oredCriteria[].criteriaWithSingleValue" conjunction="and" >
  37. $oredCriteria[].criteriaWithSingleValue[].condition$
  38. #oredCriteria[].criteriaWithSingleValue[].value#
  39. </iterate>
  40. <iterate prepend="and" property="oredCriteria[].criteriaWithListValue" conjunction="and" >
  41. $oredCriteria[].criteriaWithListValue[].condition$
  42. <iterate property="oredCriteria[].criteriaWithListValue[].values" open="(" close=")" conjunction="," >
  43. #oredCriteria[].criteriaWithListValue[].values[]#
  44. </iterate>
  45. </iterate>
  46. <iterate prepend="and" property="oredCriteria[].criteriaWithBetweenValue" conjunction="and" >
  47. $oredCriteria[].criteriaWithBetweenValue[].condition$
  48. #oredCriteria[].criteriaWithBetweenValue[].values[0]# and
  49. #oredCriteria[].criteriaWithBetweenValue[].values[1]#
  50. </iterate>
  51. )
  52. </isEqual>
  53. </iterate>
  54. </sql>
  55. <select id="ibatorgenerated_selectByExampleWithBLOBs" resultMap="ibatorgenerated_ResultMapWithBLOBs" parameterClass="com.huimv.xt.dataobject.XtBbxxExample" >
  56. <!--
  57. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  58. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  59. -->
  60. select ID, BBH, FBR, FBSJ, XGR, XGSJ, ZFBZ, TYPE, GXSM
  61. from xt_bbxx
  62. <isParameterPresent >
  63. <include refid="xt_bbxx.ibatorgenerated_Example_Where_Clause" />
  64. <isNotNull property="orderByClause" >
  65. order by $orderByClause$
  66. </isNotNull>
  67. </isParameterPresent>
  68. </select>
  69. <select id="ibatorgenerated_selectByExample" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.xt.dataobject.XtBbxxExample" >
  70. <!--
  71. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  72. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  73. -->
  74. select ID, BBH, FBR, FBSJ, XGR, XGSJ, ZFBZ, TYPE
  75. from xt_bbxx
  76. <isParameterPresent >
  77. <include refid="xt_bbxx.ibatorgenerated_Example_Where_Clause" />
  78. <isNotNull property="orderByClause" >
  79. order by $orderByClause$
  80. </isNotNull>
  81. <isGreaterEqual property="start" compareValue="0" >
  82. limit $start$ , $limit$
  83. </isGreaterEqual>
  84. </isParameterPresent>
  85. </select>
  86. <select id="ibatorgenerated_selectByPrimaryKey" resultMap="ibatorgenerated_ResultMapWithBLOBs" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
  87. <!--
  88. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  89. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  90. -->
  91. select ID, BBH, FBR, FBSJ, XGR, XGSJ, ZFBZ, TYPE, GXSM
  92. from xt_bbxx
  93. where ID = #id:INTEGER#
  94. </select>
  95. <delete id="ibatorgenerated_deleteByPrimaryKey" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
  96. <!--
  97. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  98. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  99. -->
  100. delete from xt_bbxx
  101. where ID = #id:INTEGER#
  102. </delete>
  103. <delete id="ibatorgenerated_deleteByExample" parameterClass="com.huimv.xt.dataobject.XtBbxxExample" >
  104. <!--
  105. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  106. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  107. -->
  108. delete from xt_bbxx
  109. <include refid="xt_bbxx.ibatorgenerated_Example_Where_Clause" />
  110. </delete>
  111. <insert id="ibatorgenerated_insert" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
  112. <!--
  113. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  114. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  115. -->
  116. insert into xt_bbxx (ID, BBH, FBR, FBSJ, XGR, XGSJ, ZFBZ, TYPE, GXSM)
  117. values (#id:INTEGER#, #bbh:VARCHAR#, #fbr:VARCHAR#, #fbsj:TIMESTAMP#, #xgr:VARCHAR#,
  118. #xgsj:TIMESTAMP#, #zfbz:INTEGER#, #type:INTEGER#, #gxsm:LONGVARCHAR#)
  119. </insert>
  120. <insert id="ibatorgenerated_insertSelective" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
  121. <!--
  122. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  123. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  124. -->
  125. insert into xt_bbxx
  126. <dynamic prepend="(" >
  127. <isNotNull prepend="," property="id" >
  128. ID
  129. </isNotNull>
  130. <isNotNull prepend="," property="bbh" >
  131. BBH
  132. </isNotNull>
  133. <isNotNull prepend="," property="fbr" >
  134. FBR
  135. </isNotNull>
  136. <isNotNull prepend="," property="fbsj" >
  137. FBSJ
  138. </isNotNull>
  139. <isNotNull prepend="," property="xgr" >
  140. XGR
  141. </isNotNull>
  142. <isNotNull prepend="," property="xgsj" >
  143. XGSJ
  144. </isNotNull>
  145. <isNotNull prepend="," property="zfbz" >
  146. ZFBZ
  147. </isNotNull>
  148. <isNotNull prepend="," property="type" >
  149. TYPE
  150. </isNotNull>
  151. <isNotNull prepend="," property="gxsm" >
  152. GXSM
  153. </isNotNull>
  154. )
  155. </dynamic>
  156. values
  157. <dynamic prepend="(" >
  158. <isNotNull prepend="," property="id" >
  159. #id:INTEGER#
  160. </isNotNull>
  161. <isNotNull prepend="," property="bbh" >
  162. #bbh:VARCHAR#
  163. </isNotNull>
  164. <isNotNull prepend="," property="fbr" >
  165. #fbr:VARCHAR#
  166. </isNotNull>
  167. <isNotNull prepend="," property="fbsj" >
  168. #fbsj:TIMESTAMP#
  169. </isNotNull>
  170. <isNotNull prepend="," property="xgr" >
  171. #xgr:VARCHAR#
  172. </isNotNull>
  173. <isNotNull prepend="," property="xgsj" >
  174. #xgsj:TIMESTAMP#
  175. </isNotNull>
  176. <isNotNull prepend="," property="zfbz" >
  177. #zfbz:INTEGER#
  178. </isNotNull>
  179. <isNotNull prepend="," property="type" >
  180. #type:INTEGER#
  181. </isNotNull>
  182. <isNotNull prepend="," property="gxsm" >
  183. #gxsm:LONGVARCHAR#
  184. </isNotNull>
  185. )
  186. </dynamic>
  187. </insert>
  188. <select id="ibatorgenerated_countByExample" parameterClass="com.huimv.xt.dataobject.XtBbxxExample" resultClass="java.lang.Integer" >
  189. <!--
  190. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  191. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  192. -->
  193. select count(*) from xt_bbxx
  194. <include refid="xt_bbxx.ibatorgenerated_Example_Where_Clause" />
  195. </select>
  196. <update id="ibatorgenerated_updateByExampleSelective" >
  197. <!--
  198. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  199. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  200. -->
  201. update xt_bbxx
  202. <dynamic prepend="set" >
  203. <isNotNull prepend="," property="record.id" >
  204. ID = #record.id:INTEGER#
  205. </isNotNull>
  206. <isNotNull prepend="," property="record.bbh" >
  207. BBH = #record.bbh:VARCHAR#
  208. </isNotNull>
  209. <isNotNull prepend="," property="record.fbr" >
  210. FBR = #record.fbr:VARCHAR#
  211. </isNotNull>
  212. <isNotNull prepend="," property="record.fbsj" >
  213. FBSJ = #record.fbsj:TIMESTAMP#
  214. </isNotNull>
  215. <isNotNull prepend="," property="record.xgr" >
  216. XGR = #record.xgr:VARCHAR#
  217. </isNotNull>
  218. <isNotNull prepend="," property="record.xgsj" >
  219. XGSJ = #record.xgsj:TIMESTAMP#
  220. </isNotNull>
  221. <isNotNull prepend="," property="record.zfbz" >
  222. ZFBZ = #record.zfbz:INTEGER#
  223. </isNotNull>
  224. <isNotNull prepend="," property="record.type" >
  225. TYPE = #record.type:INTEGER#
  226. </isNotNull>
  227. <isNotNull prepend="," property="record.gxsm" >
  228. GXSM = #record.gxsm:LONGVARCHAR#
  229. </isNotNull>
  230. </dynamic>
  231. <isParameterPresent >
  232. <include refid="xt_bbxx.ibatorgenerated_Example_Where_Clause" />
  233. </isParameterPresent>
  234. </update>
  235. <update id="ibatorgenerated_updateByExampleWithBLOBs" >
  236. <!--
  237. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  238. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  239. -->
  240. update xt_bbxx
  241. set ID = #record.id:INTEGER#,
  242. BBH = #record.bbh:VARCHAR#,
  243. FBR = #record.fbr:VARCHAR#,
  244. FBSJ = #record.fbsj:TIMESTAMP#,
  245. XGR = #record.xgr:VARCHAR#,
  246. XGSJ = #record.xgsj:TIMESTAMP#,
  247. ZFBZ = #record.zfbz:INTEGER#,
  248. TYPE = #record.type:INTEGER#,
  249. GXSM = #record.gxsm:LONGVARCHAR#
  250. <isParameterPresent >
  251. <include refid="xt_bbxx.ibatorgenerated_Example_Where_Clause" />
  252. </isParameterPresent>
  253. </update>
  254. <update id="ibatorgenerated_updateByExample" >
  255. <!--
  256. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  257. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  258. -->
  259. update xt_bbxx
  260. set ID = #record.id:INTEGER#,
  261. BBH = #record.bbh:VARCHAR#,
  262. FBR = #record.fbr:VARCHAR#,
  263. FBSJ = #record.fbsj:TIMESTAMP#,
  264. XGR = #record.xgr:VARCHAR#,
  265. XGSJ = #record.xgsj:TIMESTAMP#,
  266. ZFBZ = #record.zfbz:INTEGER#,
  267. TYPE = #record.type:INTEGER#
  268. <isParameterPresent >
  269. <include refid="xt_bbxx.ibatorgenerated_Example_Where_Clause" />
  270. </isParameterPresent>
  271. </update>
  272. <update id="ibatorgenerated_updateByPrimaryKeySelective" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
  273. <!--
  274. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  275. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  276. -->
  277. update xt_bbxx
  278. <dynamic prepend="set" >
  279. <isNotNull prepend="," property="bbh" >
  280. BBH = #bbh:VARCHAR#
  281. </isNotNull>
  282. <isNotNull prepend="," property="fbr" >
  283. FBR = #fbr:VARCHAR#
  284. </isNotNull>
  285. <isNotNull prepend="," property="fbsj" >
  286. FBSJ = #fbsj:TIMESTAMP#
  287. </isNotNull>
  288. <isNotNull prepend="," property="xgr" >
  289. XGR = #xgr:VARCHAR#
  290. </isNotNull>
  291. <isNotNull prepend="," property="xgsj" >
  292. XGSJ = #xgsj:TIMESTAMP#
  293. </isNotNull>
  294. <isNotNull prepend="," property="zfbz" >
  295. ZFBZ = #zfbz:INTEGER#
  296. </isNotNull>
  297. <isNotNull prepend="," property="type" >
  298. TYPE = #type:INTEGER#
  299. </isNotNull>
  300. <isNotNull prepend="," property="gxsm" >
  301. GXSM = #gxsm:LONGVARCHAR#
  302. </isNotNull>
  303. </dynamic>
  304. where ID = #id:INTEGER#
  305. </update>
  306. <update id="ibatorgenerated_updateByPrimaryKeyWithBLOBs" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
  307. <!--
  308. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  309. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  310. -->
  311. update xt_bbxx
  312. set BBH = #bbh:VARCHAR#,
  313. FBR = #fbr:VARCHAR#,
  314. FBSJ = #fbsj:TIMESTAMP#,
  315. XGR = #xgr:VARCHAR#,
  316. XGSJ = #xgsj:TIMESTAMP#,
  317. ZFBZ = #zfbz:INTEGER#,
  318. TYPE = #type:INTEGER#,
  319. GXSM = #gxsm:LONGVARCHAR#
  320. where ID = #id:INTEGER#
  321. </update>
  322. <update id="ibatorgenerated_updateByPrimaryKey" parameterClass="com.huimv.xt.dataobject.XtBbxx" >
  323. <!--
  324. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  325. This element was generated on Thu Nov 03 18:21:25 CST 2016.
  326. -->
  327. update xt_bbxx
  328. set BBH = #bbh:VARCHAR#,
  329. FBR = #fbr:VARCHAR#,
  330. FBSJ = #fbsj:TIMESTAMP#,
  331. XGR = #xgr:VARCHAR#,
  332. XGSJ = #xgsj:TIMESTAMP#,
  333. ZFBZ = #zfbz:INTEGER#,
  334. TYPE = #type:INTEGER#
  335. where ID = #id:INTEGER#
  336. </update>
  337. <!-- 版本信息搜索条件 -->
  338. <sql id="xt.bbxx.where.cause">
  339. <dynamic>
  340. <isNotEmpty prepend="and" property="id">
  341. b.ID = #id#
  342. </isNotEmpty>
  343. <isNotEmpty prepend="and" property="bbh">
  344. b.BBH = #bbh#
  345. </isNotEmpty>
  346. <isNotEmpty prepend="and" property="ksrq">
  347. <![CDATA[b.FBSJ >= #ksrq#]]>
  348. </isNotEmpty>
  349. <isNotEmpty prepend="and" property="jsrq">
  350. <![CDATA[b.FBSJ <= #jsrq#]]>
  351. </isNotEmpty>
  352. </dynamic>
  353. </sql>
  354. <!-- 根据指定搜索条件消息-->
  355. <select id="select.bbxx.by.param" parameterClass="java.util.Map" resultClass="com.huimv.xt.dataobject.XtBbxx">
  356. select b.ID,b.BBH,b.GXSM,c1.YHXM as FBRXM,b.FBSJ,c2.YHXM as XGRXM,b.XGSJ from xt_bbxx b
  357. LEFT JOIN xt_czyh c1 on b.FBR = c1.ID and c1.ZFBZ = 0
  358. LEFT JOIN xt_czyh c2 on b.XGR = c2.ID and c2.ZFBZ = 0
  359. WHERE b.ZFBZ = 0
  360. <isParameterPresent>
  361. <include refid="xt.bbxx.where.cause" />
  362. </isParameterPresent>
  363. <dynamic prepend="order by">
  364. <isNotEmpty property="order">$order$</isNotEmpty>
  365. </dynamic>
  366. limit #startRecord#,#endRecord#
  367. </select>
  368. <!-- 搜索指定条件版本信息记录条数 -->
  369. <select id="count.bbxx.by.param" parameterClass="java.util.Map" resultClass="java.lang.Integer">
  370. select count(*) from xt_bbxx b
  371. LEFT JOIN xt_czyh c1 on b.FBR = c1.ID and c1.ZFBZ = 0
  372. LEFT JOIN xt_czyh c2 on b.XGR = c2.ID and c2.ZFBZ = 0
  373. WHERE b.ZFBZ = 0
  374. <isParameterPresent>
  375. <include refid="xt.bbxx.where.cause" />
  376. </isParameterPresent>
  377. </select>
  378. <!-- 搜索bbxx中fbsj最大的记录 -->
  379. <select id="select.bbxx.by.max.fbsj" resultClass="com.huimv.xt.dataobject.XtBbxx" parameterClass="java.util.Map" >
  380. select * from xt_bbxx
  381. where FBSJ = (select max(fbsj) from xt_bbxx where ZFBZ = 0 and type = #type#) and ZFBZ = 0 and type = #type#
  382. </select>
  383. </sqlMap>