da_jbdj_SqlMap.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  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="da_jbdj" >
  4. <resultMap id="ibatorgenerated_BaseResultMap" class="com.huimv.da.dataobject.DaJbdj" >
  5. <!--
  6. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  7. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  8. -->
  9. <result column="ID" property="id" jdbcType="INTEGER" />
  10. <result column="LQID" property="lqid" jdbcType="INTEGER" />
  11. <result column="DWEB" property="dweb" jdbcType="VARCHAR" />
  12. <result column="DQTW" property="dqtw" jdbcType="DECIMAL" />
  13. <result column="QZSJ" property="qzsj" jdbcType="TIMESTAMP" />
  14. <result column="JBZL" property="jbzl" jdbcType="VARCHAR" />
  15. <result column="YPZL" property="ypzl" jdbcType="VARCHAR" />
  16. </resultMap>
  17. <sql id="ibatorgenerated_Example_Where_Clause" >
  18. <!--
  19. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  20. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  21. -->
  22. <iterate property="oredCriteria" conjunction="or" prepend="where" removeFirstPrepend="iterate" >
  23. <isEqual property="oredCriteria[].valid" compareValue="true" >
  24. (
  25. <iterate prepend="and" property="oredCriteria[].criteriaWithoutValue" conjunction="and" >
  26. $oredCriteria[].criteriaWithoutValue[]$
  27. </iterate>
  28. <iterate prepend="and" property="oredCriteria[].criteriaWithSingleValue" conjunction="and" >
  29. $oredCriteria[].criteriaWithSingleValue[].condition$
  30. #oredCriteria[].criteriaWithSingleValue[].value#
  31. </iterate>
  32. <iterate prepend="and" property="oredCriteria[].criteriaWithListValue" conjunction="and" >
  33. $oredCriteria[].criteriaWithListValue[].condition$
  34. <iterate property="oredCriteria[].criteriaWithListValue[].values" open="(" close=")" conjunction="," >
  35. #oredCriteria[].criteriaWithListValue[].values[]#
  36. </iterate>
  37. </iterate>
  38. <iterate prepend="and" property="oredCriteria[].criteriaWithBetweenValue" conjunction="and" >
  39. $oredCriteria[].criteriaWithBetweenValue[].condition$
  40. #oredCriteria[].criteriaWithBetweenValue[].values[0]# and
  41. #oredCriteria[].criteriaWithBetweenValue[].values[1]#
  42. </iterate>
  43. )
  44. </isEqual>
  45. </iterate>
  46. </sql>
  47. <select id="ibatorgenerated_selectByExample" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.da.dataobject.DaJbdjExample" >
  48. <!--
  49. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  50. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  51. -->
  52. select ID, LQID, DWEB, DQTW, QZSJ, JBZL, YPZL
  53. from da_jbdj
  54. <isParameterPresent >
  55. <include refid="da_jbdj.ibatorgenerated_Example_Where_Clause" />
  56. <isNotNull property="orderByClause" >
  57. order by $orderByClause$
  58. </isNotNull>
  59. <isGreaterEqual property="start" compareValue="0" >
  60. limit $start$ , $limit$
  61. </isGreaterEqual>
  62. </isParameterPresent>
  63. </select>
  64. <select id="ibatorgenerated_selectByPrimaryKey" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.da.dataobject.DaJbdj" >
  65. <!--
  66. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  67. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  68. -->
  69. select ID, LQID, DWEB, DQTW, QZSJ, JBZL, YPZL
  70. from da_jbdj
  71. where ID = #id:INTEGER#
  72. </select>
  73. <delete id="ibatorgenerated_deleteByPrimaryKey" parameterClass="com.huimv.da.dataobject.DaJbdj" >
  74. <!--
  75. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  76. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  77. -->
  78. delete from da_jbdj
  79. where ID = #id:INTEGER#
  80. </delete>
  81. <delete id="ibatorgenerated_deleteByExample" parameterClass="com.huimv.da.dataobject.DaJbdjExample" >
  82. <!--
  83. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  84. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  85. -->
  86. delete from da_jbdj
  87. <include refid="da_jbdj.ibatorgenerated_Example_Where_Clause" />
  88. </delete>
  89. <insert id="ibatorgenerated_insert" parameterClass="com.huimv.da.dataobject.DaJbdj" >
  90. <!--
  91. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  92. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  93. -->
  94. insert into da_jbdj (ID, LQID, DWEB, DQTW, QZSJ, JBZL, YPZL)
  95. values (#id:INTEGER#, #lqid:INTEGER#, #dweb:VARCHAR#, #dqtw:DECIMAL#, #qzsj:TIMESTAMP#,
  96. #jbzl:VARCHAR#, #ypzl:VARCHAR#)
  97. </insert>
  98. <insert id="ibatorgenerated_insertSelective" parameterClass="com.huimv.da.dataobject.DaJbdj" >
  99. <!--
  100. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  101. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  102. -->
  103. insert into da_jbdj
  104. <dynamic prepend="(" >
  105. <isNotNull prepend="," property="id" >
  106. ID
  107. </isNotNull>
  108. <isNotNull prepend="," property="lqid" >
  109. LQID
  110. </isNotNull>
  111. <isNotNull prepend="," property="dweb" >
  112. DWEB
  113. </isNotNull>
  114. <isNotNull prepend="," property="dqtw" >
  115. DQTW
  116. </isNotNull>
  117. <isNotNull prepend="," property="qzsj" >
  118. QZSJ
  119. </isNotNull>
  120. <isNotNull prepend="," property="jbzl" >
  121. JBZL
  122. </isNotNull>
  123. <isNotNull prepend="," property="ypzl" >
  124. YPZL
  125. </isNotNull>
  126. )
  127. </dynamic>
  128. values
  129. <dynamic prepend="(" >
  130. <isNotNull prepend="," property="id" >
  131. #id:INTEGER#
  132. </isNotNull>
  133. <isNotNull prepend="," property="lqid" >
  134. #lqid:INTEGER#
  135. </isNotNull>
  136. <isNotNull prepend="," property="dweb" >
  137. #dweb:VARCHAR#
  138. </isNotNull>
  139. <isNotNull prepend="," property="dqtw" >
  140. #dqtw:DECIMAL#
  141. </isNotNull>
  142. <isNotNull prepend="," property="qzsj" >
  143. #qzsj:TIMESTAMP#
  144. </isNotNull>
  145. <isNotNull prepend="," property="jbzl" >
  146. #jbzl:VARCHAR#
  147. </isNotNull>
  148. <isNotNull prepend="," property="ypzl" >
  149. #ypzl:VARCHAR#
  150. </isNotNull>
  151. )
  152. </dynamic>
  153. </insert>
  154. <select id="ibatorgenerated_countByExample" parameterClass="com.huimv.da.dataobject.DaJbdjExample" resultClass="java.lang.Integer" >
  155. <!--
  156. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  157. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  158. -->
  159. select count(*) from da_jbdj
  160. <include refid="da_jbdj.ibatorgenerated_Example_Where_Clause" />
  161. </select>
  162. <update id="ibatorgenerated_updateByExampleSelective" >
  163. <!--
  164. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  165. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  166. -->
  167. update da_jbdj
  168. <dynamic prepend="set" >
  169. <isNotNull prepend="," property="record.id" >
  170. ID = #record.id:INTEGER#
  171. </isNotNull>
  172. <isNotNull prepend="," property="record.lqid" >
  173. LQID = #record.lqid:INTEGER#
  174. </isNotNull>
  175. <isNotNull prepend="," property="record.dweb" >
  176. DWEB = #record.dweb:VARCHAR#
  177. </isNotNull>
  178. <isNotNull prepend="," property="record.dqtw" >
  179. DQTW = #record.dqtw:DECIMAL#
  180. </isNotNull>
  181. <isNotNull prepend="," property="record.qzsj" >
  182. QZSJ = #record.qzsj:TIMESTAMP#
  183. </isNotNull>
  184. <isNotNull prepend="," property="record.jbzl" >
  185. JBZL = #record.jbzl:VARCHAR#
  186. </isNotNull>
  187. <isNotNull prepend="," property="record.ypzl" >
  188. YPZL = #record.ypzl:VARCHAR#
  189. </isNotNull>
  190. </dynamic>
  191. <isParameterPresent >
  192. <include refid="da_jbdj.ibatorgenerated_Example_Where_Clause" />
  193. </isParameterPresent>
  194. </update>
  195. <update id="ibatorgenerated_updateByExample" >
  196. <!--
  197. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  198. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  199. -->
  200. update da_jbdj
  201. set ID = #record.id:INTEGER#,
  202. LQID = #record.lqid:INTEGER#,
  203. DWEB = #record.dweb:VARCHAR#,
  204. DQTW = #record.dqtw:DECIMAL#,
  205. QZSJ = #record.qzsj:TIMESTAMP#,
  206. JBZL = #record.jbzl:VARCHAR#,
  207. YPZL = #record.ypzl:VARCHAR#
  208. <isParameterPresent >
  209. <include refid="da_jbdj.ibatorgenerated_Example_Where_Clause" />
  210. </isParameterPresent>
  211. </update>
  212. <update id="ibatorgenerated_updateByPrimaryKeySelective" parameterClass="com.huimv.da.dataobject.DaJbdj" >
  213. <!--
  214. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  215. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  216. -->
  217. update da_jbdj
  218. <dynamic prepend="set" >
  219. <isNotNull prepend="," property="lqid" >
  220. LQID = #lqid:INTEGER#
  221. </isNotNull>
  222. <isNotNull prepend="," property="dweb" >
  223. DWEB = #dweb:VARCHAR#
  224. </isNotNull>
  225. <isNotNull prepend="," property="dqtw" >
  226. DQTW = #dqtw:DECIMAL#
  227. </isNotNull>
  228. <isNotNull prepend="," property="qzsj" >
  229. QZSJ = #qzsj:TIMESTAMP#
  230. </isNotNull>
  231. <isNotNull prepend="," property="jbzl" >
  232. JBZL = #jbzl:VARCHAR#
  233. </isNotNull>
  234. <isNotNull prepend="," property="ypzl" >
  235. YPZL = #ypzl:VARCHAR#
  236. </isNotNull>
  237. </dynamic>
  238. where ID = #id:INTEGER#
  239. </update>
  240. <update id="ibatorgenerated_updateByPrimaryKey" parameterClass="com.huimv.da.dataobject.DaJbdj" >
  241. <!--
  242. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  243. This element was generated on Sat Dec 05 10:27:39 CST 2015.
  244. -->
  245. update da_jbdj
  246. set LQID = #lqid:INTEGER#,
  247. DWEB = #dweb:VARCHAR#,
  248. DQTW = #dqtw:DECIMAL#,
  249. QZSJ = #qzsj:TIMESTAMP#,
  250. JBZL = #jbzl:VARCHAR#,
  251. YPZL = #ypzl:VARCHAR#
  252. where ID = #id:INTEGER#
  253. </update>
  254. <sql id="da.jbdj.where.cause">
  255. <dynamic prepend="where">
  256. <isNotNull prepend="and" property="lqid">
  257. j.lqid = #lqid#
  258. </isNotNull>
  259. <isNotNull prepend="and" property="dweb">
  260. j.dweb = #dweb#
  261. </isNotNull>
  262. <isNotEmpty prepend="and" property="ksrq">
  263. <![CDATA[j.qzsj >= #ksrq#]]>
  264. </isNotEmpty>
  265. <isNotEmpty prepend="and" property="jsrq">
  266. <![CDATA[j.qzsj <= #jsrq#]]>
  267. </isNotEmpty>
  268. <isNotNull prepend="and" property="jbzl">
  269. j.jbzl = #jbzl#
  270. </isNotNull>
  271. <isNotNull prepend="and" property="ypzl">
  272. j.ypzl = #ypzl#
  273. </isNotNull>
  274. </dynamic>
  275. </sql>
  276. <select id="count.jbdj.by.param" resultClass="java.lang.Integer" parameterClass="java.util.HashMap">
  277. select count(*)
  278. from da_jbdj j
  279. <isParameterPresent>
  280. <include refid="da.jbdj.where.cause" />
  281. </isParameterPresent>
  282. </select>
  283. <select id="select.jbdj.by.param" resultClass="com.huimv.da.dataobject.DaJbdj" parameterClass="java.util.HashMap">
  284. select j.*, g1.dmmc as jbzlmc, g2.dmmc as ypzlmc
  285. from da_jbdj j
  286. left join xt_gydm g1 on g1.dmid = j.jbzl and g1.lbid = 25
  287. left join xt_gydm g2 on g2.dmid = j.jbzl and g2.lbid = 26
  288. <isParameterPresent>
  289. <include refid="da.jbdj.where.cause" />
  290. </isParameterPresent>
  291. order by j.qzsj desc
  292. <dynamic prepend="limit">
  293. <isNotEmpty property="limit">$limit$</isNotEmpty>
  294. </dynamic>
  295. </select>
  296. </sqlMap>