SDZL_Mapper.xml 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- 核三框架升级自动生成mapper文件 -->
  3. <!-- SDZL表牵涉到的sql文件 -->
  4. <!DOCTYPE mapper
  5. PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
  6. "http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd">
  7. <mapper namespace="SDZL">
  8. <!-- SDZL 全字段 -->
  9. <sql id="SDZL_COL">
  10. SDZLID,SDZTID,SDJLID,ZLLBID,ZYS,GXSJ,BZ,
  11. ZLLRZT,SDFS,FS,SFGDBZ,SFBSBZ,DZZZBZ,ORDERNO
  12. </sql>
  13. <!-- SDZL 选择字段 -->
  14. <sql id="SDZL_COLSEL">
  15. <trim suffixOverrides=",">
  16. <if test="SDZLID != null">
  17. SDZLID,
  18. </if>
  19. <if test="SDZTID != null">
  20. SDZTID,
  21. </if>
  22. <if test="SDJLID != null">
  23. SDJLID,
  24. </if>
  25. <if test="ZLLBID != null">
  26. ZLLBID,
  27. </if>
  28. <if test="ZYS != null">
  29. ZYS,
  30. </if>
  31. <if test="GXSJ != null">
  32. GXSJ,
  33. </if>
  34. <if test="BZ != null">
  35. BZ,
  36. </if>
  37. <if test="ZLLRZT != null">
  38. ZLLRZT,
  39. </if>
  40. <if test="SDFS != null">
  41. SDFS,
  42. </if>
  43. <if test="FS != null">
  44. FS,
  45. </if>
  46. <if test="SFGDBZ != null">
  47. SFGDBZ,
  48. </if>
  49. <if test="SFBSBZ != null">
  50. SFBSBZ,
  51. </if>
  52. <if test="DZZZBZ != null">
  53. DZZZBZ,
  54. </if>
  55. <if test="ORDERNO != null">
  56. ORDERNO
  57. </if>
  58. </trim>
  59. </sql>
  60. <!-- SDZL 记录数 -->
  61. <select id="SDZL_CNT" parameterType="hashmap" resultType="long">
  62. select count(1)
  63. from SDZL
  64. <where>
  65. <if test="SDZLID != null">
  66. and SDZLID=#{SDZLID}
  67. </if>
  68. <if test="SDZTID != null">
  69. and SDZTID=#{SDZTID}
  70. </if>
  71. <if test="SDJLID != null">
  72. and SDJLID=#{SDJLID}
  73. </if>
  74. <if test="ZLLBID != null">
  75. and ZLLBID=#{ZLLBID}
  76. </if>
  77. <if test="ZYS != null">
  78. and ZYS=#{ZYS}
  79. </if>
  80. <if test="GXSJ != null">
  81. and GXSJ=#{GXSJ}
  82. </if>
  83. <if test="BZ != null">
  84. and BZ=#{BZ}
  85. </if>
  86. <if test="ZLLRZT != null">
  87. and ZLLRZT=#{ZLLRZT}
  88. </if>
  89. <if test="SDFS != null">
  90. and SDFS=#{SDFS}
  91. </if>
  92. <if test="FS != null">
  93. and FS=#{FS}
  94. </if>
  95. <if test="SFGDBZ != null">
  96. and SFGDBZ=#{SFGDBZ}
  97. </if>
  98. <if test="SFBSBZ != null">
  99. and SFBSBZ=#{SFBSBZ}
  100. </if>
  101. <if test="DZZZBZ != null">
  102. and DZZZBZ=#{DZZZBZ}
  103. </if>
  104. <if test="ORDERNO != null">
  105. and ORDERNO=#{ORDERNO}
  106. </if>
  107. </where>
  108. </select>
  109. <!-- SDZL 全字段查询 -->
  110. <select id="SDZL_Q" parameterType="hashmap" resultType="hashmap">
  111. select
  112. <include refid="SDZL_COL" /> <!--引用前边定义的所有字段 -->
  113. from SDZL
  114. <where>
  115. <if test="SDZLID != null">
  116. and SDZLID=#{SDZLID}
  117. </if>
  118. <if test="SDZTID != null">
  119. and SDZTID=#{SDZTID}
  120. </if>
  121. <if test="SDJLID != null">
  122. and SDJLID=#{SDJLID}
  123. </if>
  124. <if test="ZLLBID != null">
  125. and ZLLBID=#{ZLLBID}
  126. </if>
  127. <if test="ZYS != null">
  128. and ZYS=#{ZYS}
  129. </if>
  130. <if test="GXSJ != null">
  131. and GXSJ=#{GXSJ}
  132. </if>
  133. <if test="BZ != null">
  134. and BZ=#{BZ}
  135. </if>
  136. <if test="ZLLRZT != null">
  137. and ZLLRZT=#{ZLLRZT}
  138. </if>
  139. <if test="SDFS != null">
  140. and SDFS=#{SDFS}
  141. </if>
  142. <if test="FS != null">
  143. and FS=#{FS}
  144. </if>
  145. <if test="SFGDBZ != null">
  146. and SFGDBZ=#{SFGDBZ}
  147. </if>
  148. <if test="SFBSBZ != null">
  149. and SFBSBZ=#{SFBSBZ}
  150. </if>
  151. <if test="DZZZBZ != null">
  152. and DZZZBZ=#{DZZZBZ}
  153. </if>
  154. <if test="ORDERNO != null">
  155. and ORDERNO=#{ORDERNO}
  156. </if>
  157. </where>
  158. </select>
  159. <!-- SDZL 选择查询 -->
  160. <select id="SDZL_QS" parameterType="hashmap" resultType="hashmap">
  161. select
  162. <include refid="SDZL_COLSEL" /> <!--引用前边定义的所有字段 -->
  163. from SDZL
  164. <where>
  165. <if test="SDZLID != null">
  166. and SDZLID=#{SDZLID}
  167. </if>
  168. <if test="SDZTID != null">
  169. and SDZTID=#{SDZTID}
  170. </if>
  171. <if test="SDJLID != null">
  172. and SDJLID=#{SDJLID}
  173. </if>
  174. <if test="ZLLBID != null">
  175. and ZLLBID=#{ZLLBID}
  176. </if>
  177. <if test="ZYS != null">
  178. and ZYS=#{ZYS}
  179. </if>
  180. <if test="GXSJ != null">
  181. and GXSJ=#{GXSJ}
  182. </if>
  183. <if test="BZ != null">
  184. and BZ=#{BZ}
  185. </if>
  186. <if test="ZLLRZT != null">
  187. and ZLLRZT=#{ZLLRZT}
  188. </if>
  189. <if test="SDFS != null">
  190. and SDFS=#{SDFS}
  191. </if>
  192. <if test="FS != null">
  193. and FS=#{FS}
  194. </if>
  195. <if test="SFGDBZ != null">
  196. and SFGDBZ=#{SFGDBZ}
  197. </if>
  198. <if test="SFBSBZ != null">
  199. and SFBSBZ=#{SFBSBZ}
  200. </if>
  201. <if test="DZZZBZ != null">
  202. and DZZZBZ=#{DZZZBZ}
  203. </if>
  204. <if test="ORDERNO != null">
  205. and ORDERNO=#{ORDERNO}
  206. </if>
  207. </where>
  208. </select>
  209. <!-- SDZL 选择查询 -->
  210. <select id="SDZL_ZLLB_Q" parameterType="hashmap" resultType="hashmap">
  211. select a.SDZLID,(select ZLMC from SDZLSX where ZLLBID=a.ZLLBID) ZLLBMC,SFBSBZ,
  212. (select count(1) from SDZLMX where SDZLID=a.SDZLID and YXBZ='1') CNT
  213. from SDZL a where SDJLID=#{SDJLID}
  214. </select>
  215. <!-- SDZL 插入 -->
  216. <insert id="SDZL_I" parameterType="hashmap">
  217. insert into SDZL (
  218. SDZLID,SDZTID,SDJLID,ZLLBID,ZYS,GXSJ,BZ,
  219. ZLLRZT,SDFS,FS,SFGDBZ,SFBSBZ,DZZZBZ,ORDERNO
  220. ) values (
  221. #{SDZLID},#{SDZTID},#{SDJLID},#{ZLLBID},#{ZYS},#{GXSJ},#{BZ},
  222. #{ZLLRZT},#{SDFS},#{FS},#{SFGDBZ},#{SFBSBZ},#{DZZZBZ},#{ORDERNO}
  223. )
  224. </insert>
  225. <!-- SDZL 插入-类型映射 -->
  226. <insert id="SDZL_IT" parameterType="hashmap">
  227. insert into SDZL (
  228. SDZLID,SDZTID,SDJLID,ZLLBID,ZYS,GXSJ,BZ,
  229. ZLLRZT,SDFS,FS,SFGDBZ,SFBSBZ,DZZZBZ,ORDERNO
  230. ) values (
  231. #{SDZLID ,javaType=long,jdbcType=NUMERIC},#{SDZTID ,javaType=long,jdbcType=NUMERIC},
  232. #{SDJLID ,javaType=long,jdbcType=NUMERIC},#{ZLLBID ,javaType=long,jdbcType=NUMERIC},#{ZYS ,javaType=long,jdbcType=NUMERIC},
  233. #{GXSJ ,javaType=long,jdbcType=NUMERIC},#{BZ ,javaType=string,jdbcType=VARCHAR},#{ZLLRZT ,javaType=string,jdbcType=VARCHAR},
  234. #{SDFS ,javaType=string,jdbcType=VARCHAR},#{FS ,javaType=long,jdbcType=NUMERIC},#{SFGDBZ ,javaType=string,jdbcType=VARCHAR},
  235. #{SFBSBZ ,javaType=string,jdbcType=VARCHAR},#{DZZZBZ ,javaType=string,jdbcType=VARCHAR},#{ORDERNO ,javaType=long,jdbcType=NUMERIC}
  236. )
  237. </insert>
  238. <!-- SDZL 选择字段插入 -->
  239. <insert id="SDZL_IS" parameterType="hashmap">
  240. insert into SDZL (
  241. <trim suffixOverrides=",">
  242. <if test="SDZLID != null">SDZLID,</if>
  243. <if test="SDZTID != null">SDZTID,</if>
  244. <if test="SDJLID != null">SDJLID,</if>
  245. <if test="ZLLBID != null">ZLLBID,</if>
  246. <if test="ZYS != null">ZYS,</if>
  247. <if test="GXSJ != null">GXSJ,</if>
  248. <if test="BZ != null">BZ,</if>
  249. <if test="ZLLRZT != null">ZLLRZT,</if>
  250. <if test="SDFS != null">SDFS,</if>
  251. <if test="FS != null">FS,</if>
  252. <if test="SFGDBZ != null">SFGDBZ,</if>
  253. <if test="SFBSBZ != null">SFBSBZ,</if>
  254. <if test="DZZZBZ != null">DZZZBZ,</if>
  255. <if test="ORDERNO != null">ORDERNO,</if>
  256. <if test="YJFS != null">YJFS,</if>
  257. <if test="FYJFS != null">FYJFS,</if>
  258. <if test="CLSM != null">CLSM,</if>
  259. <if test="CLXS != null">CLXS,</if>
  260. </trim>
  261. ) values (
  262. <trim suffixOverrides=",">
  263. <if test="SDZLID != null">#{SDZLID},</if>
  264. <if test="SDZTID != null">#{SDZTID},</if>
  265. <if test="SDJLID != null">#{SDJLID},</if>
  266. <if test="ZLLBID != null">#{ZLLBID},</if>
  267. <if test="ZYS != null">#{ZYS},</if>
  268. <if test="GXSJ != null">#{GXSJ},</if>
  269. <if test="BZ != null">#{BZ},</if>
  270. <if test="ZLLRZT != null">#{ZLLRZT},</if>
  271. <if test="SDFS != null">#{SDFS},</if>
  272. <if test="FS != null">#{FS},</if>
  273. <if test="SFGDBZ != null">#{SFGDBZ},</if>
  274. <if test="SFBSBZ != null">#{SFBSBZ},</if>
  275. <if test="DZZZBZ != null">#{DZZZBZ},</if>
  276. <if test="ORDERNO != null">#{ORDERNO},</if>
  277. <if test="YJFS != null">#{YJFS},</if>
  278. <if test="FYJFS != null">#{FYJFS},</if>
  279. <if test="CLSM != null">#{CLSM},</if>
  280. <if test="CLXS != null">#{CLXS},</if>
  281. </trim>
  282. )
  283. </insert>
  284. <!-- SDZL 修改 -->
  285. <update id="SDZL_U" parameterType="hashmap">
  286. update SDZL
  287. set
  288. SDZLID= #{SDZLID},SDZTID= #{SDZTID},SDJLID= #{SDJLID},
  289. ZLLBID= #{ZLLBID},ZYS= #{ZYS},GXSJ= #{GXSJ},BZ= #{BZ},
  290. ZLLRZT= #{ZLLRZT},SDFS= #{SDFS},FS= #{FS},SFGDBZ= #{SFGDBZ},
  291. SFBSBZ= #{SFBSBZ},DZZZBZ= #{DZZZBZ},ORDERNO= #{ORDERNO}
  292. where
  293. SDZLID = #{SDZLID}
  294. </update>
  295. <!-- SDZL 选择修改 -->
  296. <update id="SDZL_US" parameterType="hashmap">
  297. update SDZL
  298. set
  299. <trim suffixOverrides=",">
  300. <if test="SDZLID != null">SDZLID=#{SDZLID},</if>
  301. <if test="SDZTID != null">SDZTID=#{SDZTID},</if>
  302. <if test="SDJLID != null">SDJLID=#{SDJLID},</if>
  303. <if test="ZLLBID != null">ZLLBID=#{ZLLBID},</if>
  304. <if test="ZYS != null">ZYS=#{ZYS},</if>
  305. <if test="GXSJ != null">GXSJ=#{GXSJ},</if>
  306. <if test="BZ != null">BZ=#{BZ},</if>
  307. <if test="ZLLRZT != null">ZLLRZT=#{ZLLRZT},</if>
  308. <if test="SDFS != null">SDFS=#{SDFS},</if>
  309. <if test="FS != null">FS=#{FS},</if>
  310. <if test="SFGDBZ != null">SFGDBZ=#{SFGDBZ},</if>
  311. <if test="SFBSBZ != null">SFBSBZ=#{SFBSBZ},</if>
  312. <if test="DZZZBZ != null">DZZZBZ=#{DZZZBZ},</if>
  313. <if test="ORDERNO != null">ORDERNO=#{ORDERNO},</if>
  314. </trim>
  315. where
  316. SDZLID = #{SDZLID}
  317. </update>
  318. <!-- SDZL 删除 -->
  319. <delete id="SDZL_D" parameterType="hashmap">
  320. delete from SDZL
  321. <where>
  322. SDZLID = #{SDZLID}
  323. </where>
  324. </delete>
  325. <!-- SDZL 序列 -->
  326. <select id="SDZLID_SEQ" parameterType="hashmap" resultType="string">
  327. select seq_sdzlid.nextval from dual
  328. </select>
  329. </mapper>