OmstruckOrderMaterialMapper.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  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.dil.mapper.OmstruckOrderMaterialMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OmstruckOrderMaterial">
  5. <id column="ORDER_MATERIAL_ID" jdbcType="DECIMAL" property="orderMaterialId" />
  6. <result column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
  7. <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
  8. <result column="ORDER_MATERIAL_NUMBER" jdbcType="DECIMAL" property="orderMaterialNumber" />
  9. <result column="ORDER_MATERIAL_WEIGHT" jdbcType="DECIMAL" property="orderMaterialWeight" />
  10. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
  11. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
  12. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
  13. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  14. <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
  15. <result column="MATERIAL_DIRECTION" jdbcType="DECIMAL" property="materialDirection" />
  16. <result column="MATERIAL_PRIORITY" jdbcType="DECIMAL" property="materialPriority" />
  17. <result column="MATERIAL_MEASSION" jdbcType="DECIMAL" property="materialMeassion" />
  18. <result column="MATERIAL_LUNO" jdbcType="VARCHAR" property="materialLuno" />
  19. </resultMap>
  20. <sql id="columns">
  21. ORDER_MATERIAL_ID, ORDER_ID, MATERIAL_ID, ORDER_MATERIAL_NUMBER, ORDER_MATERIAL_WEIGHT,
  22. INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
  23. MATERIAL_DIRECTION, MATERIAL_PRIORITY, MATERIAL_MEASSION, MATERIAL_LUNO
  24. </sql>
  25. <sql id="columns_alias">
  26. t.ORDER_MATERIAL_ID, t.ORDER_ID, t.MATERIAL_ID, t.ORDER_MATERIAL_NUMBER, t.ORDER_MATERIAL_WEIGHT,
  27. t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK,
  28. t.MATERIAL_DIRECTION, t.MATERIAL_PRIORITY, t.MATERIAL_MEASSION, t.MATERIAL_LUNO
  29. </sql>
  30. <sql id="select">
  31. SELECT <include refid="columns" /> FROM OMSTRUCK_ORDER_MATERIAL
  32. </sql>
  33. <sql id="select_alias">
  34. SELECT <include refid="columns_alias" /> FROM OMSTRUCK_ORDER_MATERIAL t
  35. </sql>
  36. <sql id="where">
  37. <where>
  38. <if test="orderMaterialId != null">
  39. and ORDER_MATERIAL_ID = #{orderMaterialId}
  40. </if>
  41. <if test="orderId != null">
  42. and ORDER_ID = #{orderId}
  43. </if>
  44. <if test="materialId != null">
  45. and MATERIAL_ID = #{materialId}
  46. </if>
  47. <if test="orderMaterialNumber != null">
  48. and ORDER_MATERIAL_NUMBER = #{orderMaterialNumber}
  49. </if>
  50. <if test="orderMaterialWeight != null">
  51. and ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight}
  52. </if>
  53. <if test="insertUsername != null and insertUsername != ''">
  54. and INSERT_USERNAME = #{insertUsername}
  55. </if>
  56. <if test="insertTime != null">
  57. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  58. </if>
  59. <if test="updateUsername != null and updateUsername != ''">
  60. and UPDATE_USERNAME = #{updateUsername}
  61. </if>
  62. <if test="updateTime != null">
  63. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  64. </if>
  65. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  66. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  67. </if>
  68. <if test="materialDirection != null">
  69. and MATERIAL_DIRECTION = #{materialDirection}
  70. </if>
  71. <if test="materialPriority != null">
  72. and MATERIAL_PRIORITY = #{materialPriority}
  73. </if>
  74. <if test="materialMeassion != null">
  75. and MATERIAL_MEASSION = #{materialMeassion}
  76. </if>
  77. <if test="materialLuno != null and materialLuno != ''">
  78. and MATERIAL_LUNO = #{materialLuno}
  79. </if>
  80. </where>
  81. </sql>
  82. <sql id="whereLike">
  83. <where>
  84. <if test="orderMaterialId != null">
  85. and ORDER_MATERIAL_ID = #{orderMaterialId}
  86. </if>
  87. <if test="orderId != null">
  88. and ORDER_ID = #{orderId}
  89. </if>
  90. <if test="materialId != null">
  91. and MATERIAL_ID = #{materialId}
  92. </if>
  93. <if test="orderMaterialNumber != null">
  94. and ORDER_MATERIAL_NUMBER = #{orderMaterialNumber}
  95. </if>
  96. <if test="orderMaterialWeight != null">
  97. and ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight}
  98. </if>
  99. <if test="insertUsername != null and insertUsername != ''">
  100. and INSERT_USERNAME LIKE '%${insertUsername}%'
  101. </if>
  102. <if test="insertTime != null">
  103. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  104. </if>
  105. <if test="updateUsername != null and updateUsername != ''">
  106. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  107. </if>
  108. <if test="updateTime != null">
  109. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  110. </if>
  111. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  112. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  113. </if>
  114. <if test="materialDirection != null">
  115. and MATERIAL_DIRECTION = #{materialDirection}
  116. </if>
  117. <if test="materialPriority != null">
  118. and MATERIAL_PRIORITY = #{materialPriority}
  119. </if>
  120. <if test="materialMeassion != null">
  121. and MATERIAL_MEASSION = #{materialMeassion}
  122. </if>
  123. <if test="materialLuno != null and materialLuno != ''">
  124. and MATERIAL_LUNO LIKE '%${materialLuno}%'
  125. </if>
  126. </where>
  127. </sql>
  128. <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
  129. delete from OMSTRUCK_ORDER_MATERIAL
  130. where ORDER_MATERIAL_ID = #{orderMaterialId,jdbcType=DECIMAL}
  131. </delete>
  132. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  133. delete from OMSTRUCK_ORDER_MATERIAL
  134. where 1!=1
  135. <if test="orderId != null">
  136. or ORDER_ID = #{orderId}
  137. </if>
  138. <if test="materialId != null">
  139. or MATERIAL_ID = #{materialId}
  140. </if>
  141. <if test="orderMaterialNumber != null">
  142. or ORDER_MATERIAL_NUMBER = #{orderMaterialNumber}
  143. </if>
  144. <if test="orderMaterialWeight != null">
  145. or ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight}
  146. </if>
  147. <if test="insertUsername != null and insertUsername != ''">
  148. or INSERT_USERNAME = #{insertUsername}
  149. </if>
  150. <if test="insertTime != null">
  151. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  152. </if>
  153. <if test="updateUsername != null and updateUsername != ''">
  154. or UPDATE_USERNAME = #{updateUsername}
  155. </if>
  156. <if test="updateTime != null">
  157. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  158. </if>
  159. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  160. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  161. </if>
  162. <if test="materialDirection != null">
  163. or MATERIAL_DIRECTION = #{materialDirection}
  164. </if>
  165. <if test="materialPriority != null">
  166. or MATERIAL_PRIORITY = #{materialPriority}
  167. </if>
  168. <if test="materialMeassion != null">
  169. or MATERIAL_MEASSION = #{materialMeassion}
  170. </if>
  171. <if test="materialLuno != null and materialLuno != ''">
  172. or MATERIAL_LUNO = #{materialLuno}
  173. </if>
  174. </delete>
  175. <insert id="insert" parameterType="com.steerinfo.dil.model.OmstruckOrderMaterial">
  176. insert into OMSTRUCK_ORDER_MATERIAL (ORDER_MATERIAL_ID, ORDER_ID, MATERIAL_ID,
  177. ORDER_MATERIAL_NUMBER, ORDER_MATERIAL_WEIGHT,
  178. INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
  179. UPDATE_TIME, INSERT_UPDATE_REMARK, MATERIAL_DIRECTION,
  180. MATERIAL_PRIORITY, MATERIAL_MEASSION, MATERIAL_LUNO
  181. )
  182. values (#{orderMaterialId,jdbcType=DECIMAL}, #{orderId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL},
  183. #{orderMaterialNumber,jdbcType=DECIMAL}, #{orderMaterialWeight,jdbcType=DECIMAL},
  184. #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
  185. #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{materialDirection,jdbcType=DECIMAL},
  186. #{materialPriority,jdbcType=DECIMAL}, #{materialMeassion,jdbcType=DECIMAL}, #{materialLuno,jdbcType=VARCHAR}
  187. )
  188. </insert>
  189. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmstruckOrderMaterial">
  190. insert into OMSTRUCK_ORDER_MATERIAL
  191. <trim prefix="(" suffix=")" suffixOverrides=",">
  192. <if test="orderMaterialId != null">
  193. ORDER_MATERIAL_ID,
  194. </if>
  195. <if test="orderId != null">
  196. ORDER_ID,
  197. </if>
  198. <if test="materialId != null">
  199. MATERIAL_ID,
  200. </if>
  201. <if test="orderMaterialNumber != null">
  202. ORDER_MATERIAL_NUMBER,
  203. </if>
  204. <if test="orderMaterialWeight != null">
  205. ORDER_MATERIAL_WEIGHT,
  206. </if>
  207. <if test="insertUsername != null">
  208. INSERT_USERNAME,
  209. </if>
  210. <if test="insertTime != null">
  211. INSERT_TIME,
  212. </if>
  213. <if test="updateUsername != null">
  214. UPDATE_USERNAME,
  215. </if>
  216. <if test="updateTime != null">
  217. UPDATE_TIME,
  218. </if>
  219. <if test="insertUpdateRemark != null">
  220. INSERT_UPDATE_REMARK,
  221. </if>
  222. <if test="materialDirection != null">
  223. MATERIAL_DIRECTION,
  224. </if>
  225. <if test="materialPriority != null">
  226. MATERIAL_PRIORITY,
  227. </if>
  228. <if test="materialMeassion != null">
  229. MATERIAL_MEASSION,
  230. </if>
  231. <if test="materialLuno != null">
  232. MATERIAL_LUNO,
  233. </if>
  234. </trim>
  235. <trim prefix="values (" suffix=")" suffixOverrides=",">
  236. <if test="orderMaterialId != null">
  237. #{orderMaterialId,jdbcType=DECIMAL},
  238. </if>
  239. <if test="orderId != null">
  240. #{orderId,jdbcType=DECIMAL},
  241. </if>
  242. <if test="materialId != null">
  243. #{materialId,jdbcType=DECIMAL},
  244. </if>
  245. <if test="orderMaterialNumber != null">
  246. #{orderMaterialNumber,jdbcType=DECIMAL},
  247. </if>
  248. <if test="orderMaterialWeight != null">
  249. #{orderMaterialWeight,jdbcType=DECIMAL},
  250. </if>
  251. <if test="insertUsername != null">
  252. #{insertUsername,jdbcType=VARCHAR},
  253. </if>
  254. <if test="insertTime != null">
  255. #{insertTime,jdbcType=TIMESTAMP},
  256. </if>
  257. <if test="updateUsername != null">
  258. #{updateUsername,jdbcType=VARCHAR},
  259. </if>
  260. <if test="updateTime != null">
  261. #{updateTime,jdbcType=TIMESTAMP},
  262. </if>
  263. <if test="insertUpdateRemark != null">
  264. #{insertUpdateRemark,jdbcType=VARCHAR},
  265. </if>
  266. <if test="materialDirection != null">
  267. #{materialDirection,jdbcType=DECIMAL},
  268. </if>
  269. <if test="materialPriority != null">
  270. #{materialPriority,jdbcType=DECIMAL},
  271. </if>
  272. <if test="materialMeassion != null">
  273. #{materialMeassion,jdbcType=DECIMAL},
  274. </if>
  275. <if test="materialLuno != null">
  276. #{materialLuno,jdbcType=VARCHAR},
  277. </if>
  278. </trim>
  279. </insert>
  280. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmstruckOrderMaterial">
  281. update OMSTRUCK_ORDER_MATERIAL
  282. set ORDER_ID = #{orderId,jdbcType=DECIMAL},
  283. MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
  284. ORDER_MATERIAL_NUMBER = #{orderMaterialNumber,jdbcType=DECIMAL},
  285. ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight,jdbcType=DECIMAL},
  286. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  287. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  288. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  289. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  290. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  291. MATERIAL_DIRECTION = #{materialDirection,jdbcType=DECIMAL},
  292. MATERIAL_PRIORITY = #{materialPriority,jdbcType=DECIMAL},
  293. MATERIAL_MEASSION = #{materialMeassion,jdbcType=DECIMAL},
  294. MATERIAL_LUNO = #{materialLuno,jdbcType=VARCHAR}
  295. where ORDER_MATERIAL_ID = #{orderMaterialId,jdbcType=DECIMAL}
  296. </update>
  297. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstruckOrderMaterial">
  298. update OMSTRUCK_ORDER_MATERIAL
  299. <set>
  300. <if test="orderId != null">
  301. ORDER_ID = #{orderId,jdbcType=DECIMAL},
  302. </if>
  303. <if test="materialId != null">
  304. MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
  305. </if>
  306. <if test="orderMaterialNumber != null">
  307. ORDER_MATERIAL_NUMBER = #{orderMaterialNumber,jdbcType=DECIMAL},
  308. </if>
  309. <if test="orderMaterialWeight != null">
  310. ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight,jdbcType=DECIMAL},
  311. </if>
  312. <if test="insertUsername != null">
  313. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  314. </if>
  315. <if test="insertTime != null">
  316. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  317. </if>
  318. <if test="updateUsername != null">
  319. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  320. </if>
  321. <if test="updateTime != null">
  322. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  323. </if>
  324. <if test="insertUpdateRemark != null">
  325. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  326. </if>
  327. <if test="materialDirection != null">
  328. MATERIAL_DIRECTION = #{materialDirection,jdbcType=DECIMAL},
  329. </if>
  330. <if test="materialPriority != null">
  331. MATERIAL_PRIORITY = #{materialPriority,jdbcType=DECIMAL},
  332. </if>
  333. <if test="materialMeassion != null">
  334. MATERIAL_MEASSION = #{materialMeassion,jdbcType=DECIMAL},
  335. </if>
  336. <if test="materialLuno != null">
  337. MATERIAL_LUNO = #{materialLuno,jdbcType=VARCHAR},
  338. </if>
  339. </set>
  340. where ORDER_MATERIAL_ID = #{orderMaterialId,jdbcType=DECIMAL}
  341. </update>
  342. <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
  343. <include refid="select" />
  344. where ORDER_MATERIAL_ID = #{orderMaterialId,jdbcType=DECIMAL}
  345. </select>
  346. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  347. <include refid="select" />
  348. <include refid="where" />
  349. </select>
  350. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  351. <include refid="select" />
  352. <include refid="whereLike" />
  353. </select>
  354. <insert id="batchInsert" parameterType="java.util.List">
  355. insert into OMSTRUCK_ORDER_MATERIAL
  356. (ORDER_MATERIAL_ID,
  357. ORDER_ID, MATERIAL_ID, ORDER_MATERIAL_NUMBER,
  358. ORDER_MATERIAL_WEIGHT, INSERT_USERNAME,
  359. INSERT_TIME, UPDATE_USERNAME,
  360. UPDATE_TIME, INSERT_UPDATE_REMARK,
  361. MATERIAL_DIRECTION, MATERIAL_PRIORITY,
  362. MATERIAL_MEASSION, MATERIAL_LUNO
  363. )
  364. ( <foreach collection="list" item="item" separator="union all">
  365. select
  366. #{item.orderMaterialId,jdbcType=DECIMAL},
  367. #{item.orderId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.orderMaterialNumber,jdbcType=DECIMAL},
  368. #{item.orderMaterialWeight,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
  369. #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
  370. #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
  371. #{item.materialDirection,jdbcType=DECIMAL}, #{item.materialPriority,jdbcType=DECIMAL},
  372. #{item.materialMeassion,jdbcType=DECIMAL}, #{item.materialLuno,jdbcType=VARCHAR}
  373. from dual
  374. </foreach> )
  375. </insert>
  376. <update id="batchUpdate" parameterType="java.util.List">
  377. update OMSTRUCK_ORDER_MATERIAL
  378. set
  379. ORDER_MATERIAL_ID=
  380. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  381. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.orderMaterialId,jdbcType=DECIMAL}
  382. </foreach>
  383. ,ORDER_ID=
  384. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  385. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
  386. </foreach>
  387. ,MATERIAL_ID=
  388. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  389. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
  390. </foreach>
  391. ,ORDER_MATERIAL_NUMBER=
  392. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  393. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.orderMaterialNumber,jdbcType=DECIMAL}
  394. </foreach>
  395. ,ORDER_MATERIAL_WEIGHT=
  396. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  397. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.orderMaterialWeight,jdbcType=DECIMAL}
  398. </foreach>
  399. ,INSERT_USERNAME=
  400. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  401. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  402. </foreach>
  403. ,INSERT_TIME=
  404. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  405. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  406. </foreach>
  407. ,UPDATE_USERNAME=
  408. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  409. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  410. </foreach>
  411. ,UPDATE_TIME=
  412. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  413. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  414. </foreach>
  415. ,INSERT_UPDATE_REMARK=
  416. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  417. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  418. </foreach>
  419. ,MATERIAL_DIRECTION=
  420. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  421. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.materialDirection,jdbcType=DECIMAL}
  422. </foreach>
  423. ,MATERIAL_PRIORITY=
  424. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  425. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.materialPriority,jdbcType=DECIMAL}
  426. </foreach>
  427. ,MATERIAL_MEASSION=
  428. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  429. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.materialMeassion,jdbcType=DECIMAL}
  430. </foreach>
  431. ,MATERIAL_LUNO=
  432. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_MATERIAL_ID" separator=" ">
  433. when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.materialLuno,jdbcType=VARCHAR}
  434. </foreach>
  435. where ORDER_MATERIAL_ID in
  436. <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
  437. #{item.orderMaterialId,jdbcType=DECIMAL}
  438. </foreach>
  439. </update>
  440. <delete id="batchDelete" parameterType="java.util.List">
  441. delete from OMSTRUCK_ORDER_MATERIAL
  442. where ORDER_MATERIAL_ID in
  443. <foreach close=")" collection="list" item="id" open="(" separator=",">
  444. #{id}
  445. </foreach>
  446. </delete>
  447. <!-- 友情提示!!!-->
  448. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  449. <!-- 友情提示!!!-->
  450. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  451. <select id="getMaterialList" parameterType="DECIMAL" resultType="java.util.Map">
  452. SELECT OOM.MATERIAL_ID "materialId",
  453. OOM.ORDER_MATERIAL_NUMBER "materialNumber",
  454. OOM.ORDER_MATERIAL_ID "orderMaterialId"
  455. FROM OMSTRUCK_ORDER_MATERIAL OOM
  456. WHERE OOM.ORDER_ID = #{orderId}
  457. </select>
  458. </mapper>