OmstrainOrderMapper.xml 22 KB

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