DzMaterialSfMapper.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.steerinfo.ems.dzmaterialsf.mapper.DzMaterialSfMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
  5. <id column="GBSJ" jdbcType="VARCHAR" property="gbsj" />
  6. <id column="CINVCCODE" jdbcType="VARCHAR" property="cinvccode" />
  7. <id column="CINVCODE" jdbcType="VARCHAR" property="cinvcode" />
  8. <id column="CWHCODE" jdbcType="VARCHAR" property="cwhcode" />
  9. <result column="CINVCNAME" jdbcType="VARCHAR" property="cinvcname" />
  10. <result column="CINVNAME" jdbcType="VARCHAR" property="cinvname" />
  11. <result column="CINVSTD" jdbcType="VARCHAR" property="cinvstd" />
  12. <result column="CWHNAME" jdbcType="VARCHAR" property="cwhname" />
  13. <result column="MZ" jdbcType="DECIMAL" property="mz" />
  14. <result column="PZ" jdbcType="DECIMAL" property="pz" />
  15. <result column="JZ" jdbcType="DECIMAL" property="jz" />
  16. <result column="TAB" jdbcType="VARCHAR" property="tab" />
  17. <result column="CREATEMAN" jdbcType="VARCHAR" property="createman" />
  18. <result column="CREATETIME" jdbcType="VARCHAR" property="createtime" />
  19. <result column="UPDATEMAN" jdbcType="VARCHAR" property="updateman" />
  20. <result column="UPDATETIME" jdbcType="VARCHAR" property="updatetime" />
  21. <result column="READTIME" jdbcType="VARCHAR" property="readtime" />
  22. <result column="DJLX" jdbcType="VARCHAR" property="djlx" />
  23. <result column="PZDL" jdbcType="VARCHAR" property="pzdl" />
  24. </resultMap>
  25. <sql id="columns">
  26. GBSJ, CINVCCODE, CINVCODE, CWHCODE, CINVCNAME, CINVNAME, CINVSTD, CWHNAME, MZ, PZ,
  27. JZ, TAB, CREATEMAN, CREATETIME, UPDATEMAN, UPDATETIME, READTIME, DJLX, PZDL
  28. </sql>
  29. <sql id="columns_alias">
  30. t.GBSJ, t.CINVCCODE, t.CINVCODE, t.CWHCODE, t.CINVCNAME, t.CINVNAME, t.CINVSTD, t.CWHNAME,
  31. t.MZ, t.PZ, t.JZ, t.TAB, t.CREATEMAN, t.CREATETIME, t.UPDATEMAN, t.UPDATETIME, t.READTIME,
  32. t.DJLX, t.PZDL
  33. </sql>
  34. <sql id="select">
  35. SELECT <include refid="columns"/> FROM DZ_MATERIAL_SF
  36. </sql>
  37. <sql id="select_alias">
  38. SELECT <include refid="columns_alias"/> FROM DZ_MATERIAL_SF t
  39. </sql>
  40. <sql id="where">
  41. <where>
  42. <if test="gbsj != null and gbsj != ''">
  43. and GBSJ = #{gbsj}
  44. </if>
  45. <if test="cinvccode != null and cinvccode != ''">
  46. and CINVCCODE = #{cinvccode}
  47. </if>
  48. <if test="cinvcode != null and cinvcode != ''">
  49. and CINVCODE = #{cinvcode}
  50. </if>
  51. <if test="cwhcode != null and cwhcode != ''">
  52. and CWHCODE = #{cwhcode}
  53. </if>
  54. <if test="cinvcname != null and cinvcname != ''">
  55. and CINVCNAME = #{cinvcname}
  56. </if>
  57. <if test="cinvname != null and cinvname != ''">
  58. and CINVNAME = #{cinvname}
  59. </if>
  60. <if test="cinvstd != null and cinvstd != ''">
  61. and CINVSTD = #{cinvstd}
  62. </if>
  63. <if test="cwhname != null and cwhname != ''">
  64. and CWHNAME = #{cwhname}
  65. </if>
  66. <if test="mz != null">
  67. and MZ = #{mz}
  68. </if>
  69. <if test="pz != null">
  70. and PZ = #{pz}
  71. </if>
  72. <if test="jz != null">
  73. and JZ = #{jz}
  74. </if>
  75. <if test="tab != null and tab != ''">
  76. and TAB = #{tab}
  77. </if>
  78. <if test="createman != null and createman != ''">
  79. and CREATEMAN = #{createman}
  80. </if>
  81. <if test="createtime != null and createtime != ''">
  82. and CREATETIME = #{createtime}
  83. </if>
  84. <if test="updateman != null and updateman != ''">
  85. and UPDATEMAN = #{updateman}
  86. </if>
  87. <if test="updatetime != null and updatetime != ''">
  88. and UPDATETIME = #{updatetime}
  89. </if>
  90. <if test="readtime != null and readtime != ''">
  91. and READTIME = #{readtime}
  92. </if>
  93. <if test="djlx != null and djlx != ''">
  94. and DJLX = #{djlx}
  95. </if>
  96. <if test="pzdl != null and pzdl != ''">
  97. and PZDL = #{pzdl}
  98. </if>
  99. </where>
  100. </sql>
  101. <sql id="whereLike">
  102. <where>
  103. <if test="gbsj != null and gbsj != ''">
  104. and GBSJ LIKE '%${gbsj}%'
  105. </if>
  106. <if test="cinvccode != null and cinvccode != ''">
  107. and CINVCCODE LIKE '%${cinvccode}%'
  108. </if>
  109. <if test="cinvcode != null and cinvcode != ''">
  110. and CINVCODE LIKE '%${cinvcode}%'
  111. </if>
  112. <if test="cwhcode != null and cwhcode != ''">
  113. and CWHCODE LIKE '%${cwhcode}%'
  114. </if>
  115. <if test="cinvcname != null and cinvcname != ''">
  116. and CINVCNAME LIKE '%${cinvcname}%'
  117. </if>
  118. <if test="cinvname != null and cinvname != ''">
  119. and CINVNAME LIKE '%${cinvname}%'
  120. </if>
  121. <if test="cinvstd != null and cinvstd != ''">
  122. and CINVSTD LIKE '%${cinvstd}%'
  123. </if>
  124. <if test="cwhname != null and cwhname != ''">
  125. and CWHNAME LIKE '%${cwhname}%'
  126. </if>
  127. <if test="mz != null">
  128. and MZ = #{mz}
  129. </if>
  130. <if test="pz != null">
  131. and PZ = #{pz}
  132. </if>
  133. <if test="jz != null">
  134. and JZ = #{jz}
  135. </if>
  136. <if test="tab != null and tab != ''">
  137. and TAB LIKE '%${tab}%'
  138. </if>
  139. <if test="createman != null and createman != ''">
  140. and CREATEMAN LIKE '%${createman}%'
  141. </if>
  142. <if test="createtime != null and createtime != ''">
  143. and CREATETIME LIKE '%${createtime}%'
  144. </if>
  145. <if test="updateman != null and updateman != ''">
  146. and UPDATEMAN LIKE '%${updateman}%'
  147. </if>
  148. <if test="updatetime != null and updatetime != ''">
  149. and UPDATETIME LIKE '%${updatetime}%'
  150. </if>
  151. <if test="readtime != null and readtime != ''">
  152. and READTIME LIKE '%${readtime}%'
  153. </if>
  154. <if test="djlx != null and djlx != ''">
  155. and READTIME LIKE '%${djlx}%'
  156. </if>
  157. <if test="pzdl != null and pzdl != ''">
  158. and PZDL LIKE '%${pzdl}%'
  159. </if>
  160. </where>
  161. </sql>
  162. <delete id="deleteByPrimaryKey" parameterType="map">
  163. delete from DZ_MATERIAL_SF
  164. where GBSJ = #{gbsj,jdbcType=VARCHAR}
  165. and CINVCCODE = #{cinvccode,jdbcType=VARCHAR}
  166. and CINVCODE = #{cinvcode,jdbcType=VARCHAR}
  167. and CWHCODE = #{cwhcode,jdbcType=VARCHAR}
  168. and TAB = #{tab,jdbcType=VARCHAR}
  169. and DJLX = #{djlx,jdbcType=VARCHAR}
  170. </delete>
  171. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  172. delete from DZ_MATERIAL_SF
  173. where 1!=1
  174. <if test="cinvccode != null and cinvccode != ''">
  175. or CINVCCODE = #{cinvccode}
  176. </if>
  177. <if test="cinvcode != null and cinvcode != ''">
  178. or CINVCODE = #{cinvcode}
  179. </if>
  180. <if test="cwhcode != null and cwhcode != ''">
  181. or CWHCODE = #{cwhcode}
  182. </if>
  183. <if test="cinvcname != null and cinvcname != ''">
  184. or CINVCNAME = #{cinvcname}
  185. </if>
  186. <if test="cinvname != null and cinvname != ''">
  187. or CINVNAME = #{cinvname}
  188. </if>
  189. <if test="cinvstd != null and cinvstd != ''">
  190. or CINVSTD = #{cinvstd}
  191. </if>
  192. <if test="cwhname != null and cwhname != ''">
  193. or CWHNAME = #{cwhname}
  194. </if>
  195. <if test="mz != null">
  196. or MZ = #{mz}
  197. </if>
  198. <if test="pz != null">
  199. or PZ = #{pz}
  200. </if>
  201. <if test="jz != null">
  202. or JZ = #{jz}
  203. </if>
  204. <if test="tab != null and tab != ''">
  205. or TAB = #{tab}
  206. </if>
  207. <if test="createman != null and createman != ''">
  208. or CREATEMAN = #{createman}
  209. </if>
  210. <if test="createtime != null and createtime != ''">
  211. or CREATETIME = #{createtime}
  212. </if>
  213. <if test="updateman != null and updateman != ''">
  214. or UPDATEMAN = #{updateman}
  215. </if>
  216. <if test="updatetime != null and updatetime != ''">
  217. or UPDATETIME = #{updatetime}
  218. </if>
  219. <if test="readtime != null and readtime != ''">
  220. or READTIME = #{readtime}
  221. </if>
  222. <if test="djlx != null and djlx != ''">
  223. or DJLX = #{djlx}
  224. </if>
  225. <if test="pzdl != null and pzdl != ''">
  226. or PZDL = #{pzdl}
  227. </if>
  228. </delete>
  229. <insert id="insert" parameterType="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
  230. insert into DZ_MATERIAL_SF (GBSJ, CINVCCODE, CINVCODE,
  231. CWHCODE, CINVCNAME, CINVNAME,
  232. CINVSTD, CWHNAME, MZ,
  233. PZ, JZ, TAB, CREATEMAN,
  234. CREATETIME, UPDATEMAN, UPDATETIME,
  235. READTIME,DJLX,PZDL)
  236. values (#{gbsj,jdbcType=VARCHAR}, #{cinvccode,jdbcType=VARCHAR}, #{cinvcode,jdbcType=VARCHAR},
  237. #{cwhcode,jdbcType=VARCHAR}, #{cinvcname,jdbcType=VARCHAR}, #{cinvname,jdbcType=VARCHAR},
  238. #{cinvstd,jdbcType=VARCHAR}, #{cwhname,jdbcType=VARCHAR}, #{mz,jdbcType=DECIMAL},
  239. #{pz,jdbcType=DECIMAL}, #{jz,jdbcType=DECIMAL}, #{tab,jdbcType=VARCHAR}, #{createman,jdbcType=VARCHAR},
  240. #{createtime,jdbcType=VARCHAR}, #{updateman,jdbcType=VARCHAR}, #{updatetime,jdbcType=VARCHAR},
  241. #{readtime,jdbcType=VARCHAR},#{djlx,jdbcType=VARCHAR},#{pzdl,jdbcType=VARCHAR})
  242. </insert>
  243. <insert id="insertSelective" parameterType="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
  244. insert into DZ_MATERIAL_SF
  245. <trim prefix="(" suffix=")" suffixOverrides=",">
  246. <if test="gbsj != null">
  247. GBSJ,
  248. </if>
  249. <if test="cinvccode != null">
  250. CINVCCODE,
  251. </if>
  252. <if test="cinvcode != null">
  253. CINVCODE,
  254. </if>
  255. <if test="cwhcode != null">
  256. CWHCODE,
  257. </if>
  258. <if test="cinvcname != null">
  259. CINVCNAME,
  260. </if>
  261. <if test="cinvname != null">
  262. CINVNAME,
  263. </if>
  264. <if test="cinvstd != null">
  265. CINVSTD,
  266. </if>
  267. <if test="cwhname != null">
  268. CWHNAME,
  269. </if>
  270. <if test="mz != null">
  271. MZ,
  272. </if>
  273. <if test="pz != null">
  274. PZ,
  275. </if>
  276. <if test="jz != null">
  277. JZ,
  278. </if>
  279. <if test="tab != null">
  280. TAB,
  281. </if>
  282. <if test="createman != null">
  283. CREATEMAN,
  284. </if>
  285. <if test="createtime != null">
  286. CREATETIME,
  287. </if>
  288. <if test="updateman != null">
  289. UPDATEMAN,
  290. </if>
  291. <if test="updatetime != null">
  292. UPDATETIME,
  293. </if>
  294. <if test="readtime != null">
  295. READTIME,
  296. </if>
  297. <if test="djlx != null">
  298. DJLX,
  299. </if>
  300. <if test="pzdl != null">
  301. PZDL,
  302. </if>
  303. </trim>
  304. <trim prefix="values (" suffix=")" suffixOverrides=",">
  305. <if test="gbsj != null">
  306. #{gbsj,jdbcType=VARCHAR},
  307. </if>
  308. <if test="cinvccode != null">
  309. #{cinvccode,jdbcType=VARCHAR},
  310. </if>
  311. <if test="cinvcode != null">
  312. #{cinvcode,jdbcType=VARCHAR},
  313. </if>
  314. <if test="cwhcode != null">
  315. #{cwhcode,jdbcType=VARCHAR},
  316. </if>
  317. <if test="cinvcname != null">
  318. #{cinvcname,jdbcType=VARCHAR},
  319. </if>
  320. <if test="cinvname != null">
  321. #{cinvname,jdbcType=VARCHAR},
  322. </if>
  323. <if test="cinvstd != null">
  324. #{cinvstd,jdbcType=VARCHAR},
  325. </if>
  326. <if test="cwhname != null">
  327. #{cwhname,jdbcType=VARCHAR},
  328. </if>
  329. <if test="mz != null">
  330. #{mz,jdbcType=DECIMAL},
  331. </if>
  332. <if test="pz != null">
  333. #{pz,jdbcType=DECIMAL},
  334. </if>
  335. <if test="jz != null">
  336. #{jz,jdbcType=DECIMAL},
  337. </if>
  338. <if test="tab != null">
  339. #{tab,jdbcType=VARCHAR},
  340. </if>
  341. <if test="createman != null">
  342. #{createman,jdbcType=VARCHAR},
  343. </if>
  344. <if test="createtime != null">
  345. #{createtime,jdbcType=VARCHAR},
  346. </if>
  347. <if test="updateman != null">
  348. #{updateman,jdbcType=VARCHAR},
  349. </if>
  350. <if test="updatetime != null">
  351. #{updatetime,jdbcType=VARCHAR},
  352. </if>
  353. <if test="readtime != null">
  354. #{readtime,jdbcType=VARCHAR},
  355. </if>
  356. <if test="djlx != null">
  357. #{djlx,jdbcType=VARCHAR},
  358. </if>
  359. <if test="pzdl != null">
  360. #{pzdl,jdbcType=VARCHAR},
  361. </if>
  362. </trim>
  363. </insert>
  364. <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
  365. update DZ_MATERIAL_SF
  366. set CINVCNAME = #{cinvcname,jdbcType=VARCHAR},
  367. CINVNAME = #{cinvname,jdbcType=VARCHAR},
  368. CINVSTD = #{cinvstd,jdbcType=VARCHAR},
  369. CWHNAME = #{cwhname,jdbcType=VARCHAR},
  370. MZ = #{mz,jdbcType=DECIMAL},
  371. PZ = #{pz,jdbcType=DECIMAL},
  372. JZ = #{jz,jdbcType=DECIMAL},
  373. TAB = #{tab,jdbcType=VARCHAR},
  374. CREATEMAN = #{createman,jdbcType=VARCHAR},
  375. CREATETIME = #{createtime,jdbcType=VARCHAR},
  376. UPDATEMAN = #{updateman,jdbcType=VARCHAR},
  377. UPDATETIME = #{updatetime,jdbcType=VARCHAR},
  378. READTIME = #{readtime,jdbcType=VARCHAR},
  379. DJLX = #{djlx,jdbcType=VARCHAR}
  380. where GBSJ = #{gbsj,jdbcType=VARCHAR}
  381. and CINVCCODE = #{cinvccode,jdbcType=VARCHAR}
  382. and CINVCODE = #{cinvcode,jdbcType=VARCHAR}
  383. and CWHCODE = #{cwhcode,jdbcType=VARCHAR}
  384. and TAB = #{tab,jdbcType=VARCHAR}
  385. and djlx = #{djlx,jdbcType=VARCHAR}
  386. </update>
  387. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
  388. update DZ_MATERIAL_SF
  389. <set>
  390. <if test="cinvcname != null">
  391. CINVCNAME = #{cinvcname,jdbcType=VARCHAR},
  392. </if>
  393. <if test="cinvname != null">
  394. CINVNAME = #{cinvname,jdbcType=VARCHAR},
  395. </if>
  396. <if test="cinvstd != null">
  397. CINVSTD = #{cinvstd,jdbcType=VARCHAR},
  398. </if>
  399. <if test="cwhname != null">
  400. CWHNAME = #{cwhname,jdbcType=VARCHAR},
  401. </if>
  402. <if test="mz != null">
  403. MZ = #{mz,jdbcType=DECIMAL},
  404. </if>
  405. <if test="pz != null">
  406. PZ = #{pz,jdbcType=DECIMAL},
  407. </if>
  408. <if test="jz != null">
  409. JZ = #{jz,jdbcType=DECIMAL},
  410. </if>
  411. <if test="tab != null">
  412. TAB = #{tab,jdbcType=VARCHAR},
  413. </if>
  414. <if test="createman != null">
  415. CREATEMAN = #{createman,jdbcType=VARCHAR},
  416. </if>
  417. <if test="createtime != null">
  418. CREATETIME = #{createtime,jdbcType=VARCHAR},
  419. </if>
  420. <if test="updateman != null">
  421. UPDATEMAN = #{updateman,jdbcType=VARCHAR},
  422. </if>
  423. <if test="updatetime != null">
  424. UPDATETIME = #{updatetime,jdbcType=VARCHAR},
  425. </if>
  426. <if test="readtime != null">
  427. READTIME = #{readtime,jdbcType=VARCHAR},
  428. </if>
  429. <if test="djlx != null">
  430. DJLX = #{djlx,jdbcType=VARCHAR},
  431. </if>
  432. <if test="pzdl != null">
  433. PZDL = #{pzdl,jdbcType=VARCHAR},
  434. </if>
  435. </set>
  436. where GBSJ = #{gbsj,jdbcType=VARCHAR}
  437. and CINVCCODE = #{cinvccode,jdbcType=VARCHAR}
  438. and CINVCODE = #{cinvcode,jdbcType=VARCHAR}
  439. and CWHCODE = #{cwhcode,jdbcType=VARCHAR}
  440. and TAB = #{tab,jdbcType=VARCHAR}
  441. and DJLX = #{djlx,jdbcType=VARCHAR}
  442. </update>
  443. <select id="selectByPrimaryKey" parameterType="map" resultMap="BaseResultMap">
  444. <include refid="select"/>
  445. where GBSJ = #{gbsj,jdbcType=VARCHAR}
  446. and CINVCCODE = #{cinvccode,jdbcType=VARCHAR}
  447. and CINVCODE = #{cinvcode,jdbcType=VARCHAR}
  448. and CWHCODE = #{cwhcode,jdbcType=VARCHAR}
  449. and TAB = #{tab,jdbcType=VARCHAR}
  450. and DJLX = #{djlx,jdbcType=VARCHAR}
  451. </select>
  452. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  453. <include refid="select"/>
  454. <include refid="where"/>
  455. </select>
  456. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  457. <include refid="select"/>
  458. <include refid="whereLike"/>
  459. </select>
  460. <insert id="batchInsert" parameterType="java.util.List">
  461. insert into DZ_MATERIAL_SF
  462. (GBSJ,
  463. CINVCCODE, CINVCODE, CWHCODE,
  464. CINVCNAME, CINVNAME, CINVSTD,
  465. CWHNAME, MZ, PZ,
  466. JZ, TAB, CREATEMAN,
  467. CREATETIME, UPDATEMAN, UPDATETIME,
  468. READTIME,DJLX,PZDL)
  469. ( <foreach collection="list" item="item" separator="union all">
  470. select
  471. #{item.gbsj,jdbcType=VARCHAR},
  472. #{item.cinvccode,jdbcType=VARCHAR}, #{item.cinvcode,jdbcType=VARCHAR}, #{item.cwhcode,jdbcType=VARCHAR},
  473. #{item.cinvcname,jdbcType=VARCHAR}, #{item.cinvname,jdbcType=VARCHAR}, #{item.cinvstd,jdbcType=VARCHAR},
  474. #{item.cwhname,jdbcType=VARCHAR}, #{item.mz,jdbcType=DECIMAL}, #{item.pz,jdbcType=DECIMAL},
  475. #{item.jz,jdbcType=DECIMAL}, #{item.tab,jdbcType=VARCHAR}, #{item.createman,jdbcType=VARCHAR},
  476. #{item.createtime,jdbcType=VARCHAR}, #{item.updateman,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=VARCHAR},
  477. #{item.readtime,jdbcType=VARCHAR},#{item.djlx,jdbcType=VARCHAR},#{item.pzdl,jdbcType=VARCHAR} from dual
  478. </foreach> )
  479. </insert>
  480. <update id="batchUpdate" parameterType="java.util.List">
  481. update DZ_MATERIAL_SF
  482. set
  483. GBSJ=
  484. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  485. when #{item.gbsj,jdbcType=VARCHAR} then #{item.gbsj,jdbcType=VARCHAR}
  486. </foreach>
  487. ,CINVCCODE=
  488. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  489. when #{item.gbsj,jdbcType=VARCHAR} then #{item.cinvccode,jdbcType=VARCHAR}
  490. </foreach>
  491. ,CINVCODE=
  492. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  493. when #{item.gbsj,jdbcType=VARCHAR} then #{item.cinvcode,jdbcType=VARCHAR}
  494. </foreach>
  495. ,CWHCODE=
  496. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  497. when #{item.gbsj,jdbcType=VARCHAR} then #{item.cwhcode,jdbcType=VARCHAR}
  498. </foreach>
  499. ,CINVCNAME=
  500. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  501. when #{item.gbsj,jdbcType=VARCHAR} then #{item.cinvcname,jdbcType=VARCHAR}
  502. </foreach>
  503. ,CINVNAME=
  504. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  505. when #{item.gbsj,jdbcType=VARCHAR} then #{item.cinvname,jdbcType=VARCHAR}
  506. </foreach>
  507. ,CINVSTD=
  508. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  509. when #{item.gbsj,jdbcType=VARCHAR} then #{item.cinvstd,jdbcType=VARCHAR}
  510. </foreach>
  511. ,CWHNAME=
  512. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  513. when #{item.gbsj,jdbcType=VARCHAR} then #{item.cwhname,jdbcType=VARCHAR}
  514. </foreach>
  515. ,MZ=
  516. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  517. when #{item.gbsj,jdbcType=VARCHAR} then #{item.mz,jdbcType=DECIMAL}
  518. </foreach>
  519. ,PZ=
  520. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  521. when #{item.gbsj,jdbcType=VARCHAR} then #{item.pz,jdbcType=DECIMAL}
  522. </foreach>
  523. ,JZ=
  524. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  525. when #{item.gbsj,jdbcType=VARCHAR} then #{item.jz,jdbcType=DECIMAL}
  526. </foreach>
  527. ,TAB=
  528. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  529. when #{item.gbsj,jdbcType=VARCHAR} then #{item.tab,jdbcType=VARCHAR}
  530. </foreach>
  531. ,CREATEMAN=
  532. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  533. when #{item.gbsj,jdbcType=VARCHAR} then #{item.createman,jdbcType=VARCHAR}
  534. </foreach>
  535. ,CREATETIME=
  536. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  537. when #{item.gbsj,jdbcType=VARCHAR} then #{item.createtime,jdbcType=VARCHAR}
  538. </foreach>
  539. ,UPDATEMAN=
  540. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  541. when #{item.gbsj,jdbcType=VARCHAR} then #{item.updateman,jdbcType=VARCHAR}
  542. </foreach>
  543. ,UPDATETIME=
  544. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  545. when #{item.gbsj,jdbcType=VARCHAR} then #{item.updatetime,jdbcType=VARCHAR}
  546. </foreach>
  547. ,READTIME=
  548. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  549. when #{item.gbsj,jdbcType=VARCHAR} then #{item.readtime,jdbcType=VARCHAR}
  550. </foreach>
  551. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  552. when #{item.gbsj,jdbcType=VARCHAR} then #{item.djlx,jdbcType=VARCHAR}
  553. </foreach>
  554. <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
  555. when #{item.gbsj,jdbcType=VARCHAR} then #{item.pzdl,jdbcType=VARCHAR}
  556. </foreach>
  557. where (GBSJ,CINVCCODE,CINVCODE,CWHCODE,TAB,DJLX) in
  558. <foreach collection="list" item="item" open="(" close=")" separator=",">
  559. (#{item.gbsj, jdbcType=VARCHAR},#{item.cinvccode, jdbcType=VARCHAR},#{item.cinvcode, jdbcType=VARCHAR},#{item.cwhcode, jdbcType=VARCHAR},#{item.tab, jdbcType=VARCHAR},#{item.djlx, jdbcType=VARCHAR})
  560. </foreach>
  561. </update>
  562. <delete id="batchDelete" parameterType="java.util.List">
  563. delete from DZ_MATERIAL_SF
  564. where (GBSJ,CINVCCODE,CINVCODE,CWHCODE,TAB,DJLX) in
  565. <foreach collection="list" item="item" open="(" close=")" separator=",">
  566. ( #{item.gbsj, jdbcType=VARCHAR}, #{item.cinvccode, jdbcType=VARCHAR}, #{item.cinvcode, jdbcType=VARCHAR}, #{item.cwhcode, jdbcType=VARCHAR},#{item.tab, jdbcType=VARCHAR},#{item.djlx, jdbcType=VARCHAR})
  567. </foreach>
  568. </delete>
  569. <!-- 友情提示!!!-->
  570. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  571. <select id="getDzMaterialSf" resultMap="BaseResultMap" parameterType="java.lang.String" >
  572. select * from (
  573. SELECT CONVERT(varchar(100), gbsj, 23) as gbsj, cInvCCode, cInvCName, cInvCode, cInvName,
  574. cInvStd, cWhCode, cWhName, sum(mz) as mz, sum(pz) as pz, sum(jz) as jz, djlx, pzdl, 'sh' as tab
  575. FROM v_nyjk_sh where gbsj >= #{gbsj,jdbcType=VARCHAR} and pzdl IS NOT NULL
  576. --cInvCName in('合金材料','国内矿粉','过滤材料','进口矿粉','原煤','外购精煤','国内球团','高炉干渣','进口块矿','石料')
  577. group by cInvCCode, cInvCName, cInvCode, cInvName, cInvStd, cWhCode, cWhName, CONVERT(varchar(100), gbsj, 23),djlx, pzdl
  578. ) as sh union all (
  579. SELECT CONVERT(varchar(100), gbsj, 23) as gbsj, cInvCCode, cInvCName, cInvCode, cInvName,
  580. cInvStd, cWhCode, cWhName, sum(mz) as mz, sum(pz) as pz, sum(jz) as jz, djlx, pzdl, 'fh' as tab
  581. FROM v_nyjk_fh where gbsj >= #{gbsj,jdbcType=VARCHAR} and pzdl IS NOT NULL
  582. --cInvCName in('合金材料','国内矿粉','过滤材料','进口矿粉','原煤','外购精煤','国内球团','高炉干渣','进口块矿','石料')
  583. group by cInvCCode, cInvCName, cInvCode, cInvName, cInvStd, cWhCode, cWhName, CONVERT(varchar(100), [gbsj], 23),djlx, pzdl)
  584. </select>
  585. </mapper>