OmstruckOrderMapper.xml 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  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.OmstruckOrderMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OmstruckOrder">
  5. <id column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
  6. <result column="ORDER_PLAN_ID" jdbcType="DECIMAL" property="orderPlanId" />
  7. <result column="ORDER_NUMBER" jdbcType="VARCHAR" property="orderNumber" />
  8. <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
  9. <result column="ORDER_ISSUE_TIME" jdbcType="TIMESTAMP" property="orderIssueTime" />
  10. <result column="ORDER_RECEIVE_STATUS" jdbcType="DECIMAL" property="orderReceiveStatus" />
  11. <result column="ORDER_RECEIVE_REFUSE_TIME" jdbcType="TIMESTAMP" property="orderReceiveRefuseTime" />
  12. <result column="ORDER_COMMUNICATION_DURATION" jdbcType="DECIMAL" property="orderCommunicationDuration" />
  13. <result column="ORDER_STATUS" jdbcType="DECIMAL" property="orderStatus" />
  14. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
  15. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
  16. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
  17. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  18. <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
  19. <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
  20. <result column="ORDER_TYPE" jdbcType="DECIMAL" property="orderType" />
  21. <result column="ORDER_LINE_SEQUENCE" jdbcType="DECIMAL" property="orderLineSequence" />
  22. <result column="LINE_ID" jdbcType="DECIMAL" property="lineId" />
  23. <result column="ORDER_ENTRY_TIME" jdbcType="TIMESTAMP" property="orderEntryTime" />
  24. <result column="UNLOAD_POINT_ID" jdbcType="DECIMAL" property="unloadPointId" />
  25. <result column="DRIVER_CONFIRMATION" jdbcType="DECIMAL" property="driverConfirmation" />
  26. </resultMap>
  27. <sql id="columns">
  28. ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
  29. ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION, ORDER_STATUS, INSERT_USERNAME,
  30. INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, ORDER_TYPE,
  31. ORDER_LINE_SEQUENCE, LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID, DRIVER_CONFIRMATION
  32. </sql>
  33. <sql id="columns_alias">
  34. t.ORDER_ID, t.ORDER_PLAN_ID, t.ORDER_NUMBER, t.CAPACITY_ID, t.ORDER_ISSUE_TIME, t.ORDER_RECEIVE_STATUS,
  35. t.ORDER_RECEIVE_REFUSE_TIME, t.ORDER_COMMUNICATION_DURATION, t.ORDER_STATUS, t.INSERT_USERNAME,
  36. t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
  37. t.ORDER_TYPE, t.ORDER_LINE_SEQUENCE, t.LINE_ID, t.ORDER_ENTRY_TIME, t.UNLOAD_POINT_ID,
  38. t.DRIVER_CONFIRMATION
  39. </sql>
  40. <sql id="select">
  41. SELECT <include refid="columns"/> FROM OMSTRUCK_ORDER
  42. </sql>
  43. <sql id="select_alias">
  44. SELECT <include refid="columns_alias"/> FROM OMSTRUCK_ORDER t
  45. </sql>
  46. <sql id="where">
  47. <where>
  48. <if test="orderId != null">
  49. and ORDER_ID = #{orderId}
  50. </if>
  51. <if test="orderPlanId != null">
  52. and ORDER_PLAN_ID = #{orderPlanId}
  53. </if>
  54. <if test="orderNumber != null and orderNumber != ''">
  55. and ORDER_NUMBER = #{orderNumber}
  56. </if>
  57. <if test="capacityId != null">
  58. and CAPACITY_ID = #{capacityId}
  59. </if>
  60. <if test="orderIssueTime != null">
  61. and TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = #{orderIssueTime}
  62. </if>
  63. <if test="orderReceiveStatus != null">
  64. and ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
  65. </if>
  66. <if test="orderReceiveRefuseTime != null">
  67. and TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = #{orderReceiveRefuseTime}
  68. </if>
  69. <if test="orderCommunicationDuration != null">
  70. and ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
  71. </if>
  72. <if test="orderStatus != null">
  73. and ORDER_STATUS = #{orderStatus}
  74. </if>
  75. <if test="insertUsername != null and insertUsername != ''">
  76. and INSERT_USERNAME = #{insertUsername}
  77. </if>
  78. <if test="insertTime != null">
  79. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  80. </if>
  81. <if test="updateUsername != null and updateUsername != ''">
  82. and UPDATE_USERNAME = #{updateUsername}
  83. </if>
  84. <if test="updateTime != null">
  85. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  86. </if>
  87. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  88. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  89. </if>
  90. <if test="deleted != null">
  91. and DELETED = #{deleted}
  92. </if>
  93. <if test="orderType != null">
  94. and ORDER_TYPE = #{orderType}
  95. </if>
  96. <if test="orderLineSequence != null">
  97. and ORDER_LINE_SEQUENCE = #{orderLineSequence}
  98. </if>
  99. <if test="lineId != null">
  100. and LINE_ID = #{lineId}
  101. </if>
  102. <if test="orderEntryTime != null">
  103. and TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = #{orderEntryTime}
  104. </if>
  105. <if test="unloadPointId != null">
  106. and UNLOAD_POINT_ID = #{unloadPointId}
  107. </if>
  108. <if test="driverConfirmation != null">
  109. and DRIVER_CONFIRMATION = #{driverConfirmation}
  110. </if>
  111. </where>
  112. </sql>
  113. <sql id="whereLike">
  114. <where>
  115. <if test="orderId != null">
  116. and ORDER_ID = #{orderId}
  117. </if>
  118. <if test="orderPlanId != null">
  119. and ORDER_PLAN_ID = #{orderPlanId}
  120. </if>
  121. <if test="orderNumber != null and orderNumber != ''">
  122. and ORDER_NUMBER LIKE '%${orderNumber}%'
  123. </if>
  124. <if test="capacityId != null">
  125. and CAPACITY_ID = #{capacityId}
  126. </if>
  127. <if test="orderIssueTime != null">
  128. and TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = #{orderIssueTime}
  129. </if>
  130. <if test="orderReceiveStatus != null">
  131. and ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
  132. </if>
  133. <if test="orderReceiveRefuseTime != null">
  134. and TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = #{orderReceiveRefuseTime}
  135. </if>
  136. <if test="orderCommunicationDuration != null">
  137. and ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
  138. </if>
  139. <if test="orderStatus != null">
  140. and ORDER_STATUS = #{orderStatus}
  141. </if>
  142. <if test="insertUsername != null and insertUsername != ''">
  143. and INSERT_USERNAME LIKE '%${insertUsername}%'
  144. </if>
  145. <if test="insertTime != null">
  146. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  147. </if>
  148. <if test="updateUsername != null and updateUsername != ''">
  149. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  150. </if>
  151. <if test="updateTime != null">
  152. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  153. </if>
  154. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  155. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  156. </if>
  157. <if test="deleted != null">
  158. and DELETED = #{deleted}
  159. </if>
  160. <if test="orderType != null">
  161. and ORDER_TYPE = #{orderType}
  162. </if>
  163. <if test="orderLineSequence != null">
  164. and ORDER_LINE_SEQUENCE = #{orderLineSequence}
  165. </if>
  166. <if test="lineId != null">
  167. and LINE_ID = #{lineId}
  168. </if>
  169. <if test="orderEntryTime != null">
  170. and TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = #{orderEntryTime}
  171. </if>
  172. <if test="unloadPointId != null">
  173. and UNLOAD_POINT_ID = #{unloadPointId}
  174. </if>
  175. <if test="driverConfirmation != null">
  176. and DRIVER_CONFIRMATION = #{driverConfirmation}
  177. </if>
  178. </where>
  179. </sql>
  180. <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
  181. delete from OMSTRUCK_ORDER
  182. where ORDER_ID = #{orderId,jdbcType=DECIMAL}
  183. </delete>
  184. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  185. delete from OMSTRUCK_ORDER
  186. where 1!=1
  187. <if test="orderPlanId != null">
  188. or ORDER_PLAN_ID = #{orderPlanId}
  189. </if>
  190. <if test="orderNumber != null and orderNumber != ''">
  191. or ORDER_NUMBER = #{orderNumber}
  192. </if>
  193. <if test="capacityId != null">
  194. or CAPACITY_ID = #{capacityId}
  195. </if>
  196. <if test="orderIssueTime != null">
  197. or TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = '#{orderIssueTime}'
  198. </if>
  199. <if test="orderReceiveStatus != null">
  200. or ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
  201. </if>
  202. <if test="orderReceiveRefuseTime != null">
  203. or TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = '#{orderReceiveRefuseTime}'
  204. </if>
  205. <if test="orderCommunicationDuration != null">
  206. or ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
  207. </if>
  208. <if test="orderStatus != null">
  209. or ORDER_STATUS = #{orderStatus}
  210. </if>
  211. <if test="insertUsername != null and insertUsername != ''">
  212. or INSERT_USERNAME = #{insertUsername}
  213. </if>
  214. <if test="insertTime != null">
  215. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  216. </if>
  217. <if test="updateUsername != null and updateUsername != ''">
  218. or UPDATE_USERNAME = #{updateUsername}
  219. </if>
  220. <if test="updateTime != null">
  221. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  222. </if>
  223. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  224. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  225. </if>
  226. <if test="deleted != null">
  227. or DELETED = #{deleted}
  228. </if>
  229. <if test="orderType != null">
  230. or ORDER_TYPE = #{orderType}
  231. </if>
  232. <if test="orderLineSequence != null">
  233. or ORDER_LINE_SEQUENCE = #{orderLineSequence}
  234. </if>
  235. <if test="lineId != null">
  236. or LINE_ID = #{lineId}
  237. </if>
  238. <if test="orderEntryTime != null">
  239. or TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = '#{orderEntryTime}'
  240. </if>
  241. <if test="unloadPointId != null">
  242. or UNLOAD_POINT_ID = #{unloadPointId}
  243. </if>
  244. <if test="driverConfirmation != null">
  245. or DRIVER_CONFIRMATION = #{driverConfirmation}
  246. </if>
  247. </delete>
  248. <insert id="insert" parameterType="com.steerinfo.dil.model.OmstruckOrder">
  249. insert into OMSTRUCK_ORDER (ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER,
  250. CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
  251. ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION,
  252. ORDER_STATUS, INSERT_USERNAME, INSERT_TIME,
  253. UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
  254. DELETED, ORDER_TYPE, ORDER_LINE_SEQUENCE,
  255. LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID,
  256. DRIVER_CONFIRMATION)
  257. values (#{orderId,jdbcType=DECIMAL}, #{orderPlanId,jdbcType=DECIMAL}, #{orderNumber,jdbcType=VARCHAR},
  258. #{capacityId,jdbcType=DECIMAL}, #{orderIssueTime,jdbcType=TIMESTAMP}, #{orderReceiveStatus,jdbcType=DECIMAL},
  259. #{orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{orderCommunicationDuration,jdbcType=DECIMAL},
  260. #{orderStatus,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
  261. #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
  262. #{deleted,jdbcType=DECIMAL}, #{orderType,jdbcType=DECIMAL}, #{orderLineSequence,jdbcType=DECIMAL},
  263. #{lineId,jdbcType=DECIMAL}, #{orderEntryTime,jdbcType=TIMESTAMP}, #{unloadPointId,jdbcType=DECIMAL},
  264. #{driverConfirmation,jdbcType=DECIMAL})
  265. </insert>
  266. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
  267. insert into OMSTRUCK_ORDER
  268. <trim prefix="(" suffix=")" suffixOverrides=",">
  269. <if test="orderId != null">
  270. ORDER_ID,
  271. </if>
  272. <if test="orderPlanId != null">
  273. ORDER_PLAN_ID,
  274. </if>
  275. <if test="orderNumber != null">
  276. ORDER_NUMBER,
  277. </if>
  278. <if test="capacityId != null">
  279. CAPACITY_ID,
  280. </if>
  281. <if test="orderIssueTime != null">
  282. ORDER_ISSUE_TIME,
  283. </if>
  284. <if test="orderReceiveStatus != null">
  285. ORDER_RECEIVE_STATUS,
  286. </if>
  287. <if test="orderReceiveRefuseTime != null">
  288. ORDER_RECEIVE_REFUSE_TIME,
  289. </if>
  290. <if test="orderCommunicationDuration != null">
  291. ORDER_COMMUNICATION_DURATION,
  292. </if>
  293. <if test="orderStatus != null">
  294. ORDER_STATUS,
  295. </if>
  296. <if test="insertUsername != null">
  297. INSERT_USERNAME,
  298. </if>
  299. <if test="insertTime != null">
  300. INSERT_TIME,
  301. </if>
  302. <if test="updateUsername != null">
  303. UPDATE_USERNAME,
  304. </if>
  305. <if test="updateTime != null">
  306. UPDATE_TIME,
  307. </if>
  308. <if test="insertUpdateRemark != null">
  309. INSERT_UPDATE_REMARK,
  310. </if>
  311. <if test="deleted != null">
  312. DELETED,
  313. </if>
  314. <if test="orderType != null">
  315. ORDER_TYPE,
  316. </if>
  317. <if test="orderLineSequence != null">
  318. ORDER_LINE_SEQUENCE,
  319. </if>
  320. <if test="lineId != null">
  321. LINE_ID,
  322. </if>
  323. <if test="orderEntryTime != null">
  324. ORDER_ENTRY_TIME,
  325. </if>
  326. <if test="unloadPointId != null">
  327. UNLOAD_POINT_ID,
  328. </if>
  329. <if test="driverConfirmation != null">
  330. DRIVER_CONFIRMATION,
  331. </if>
  332. </trim>
  333. <trim prefix="values (" suffix=")" suffixOverrides=",">
  334. <if test="orderId != null">
  335. #{orderId,jdbcType=DECIMAL},
  336. </if>
  337. <if test="orderPlanId != null">
  338. #{orderPlanId,jdbcType=DECIMAL},
  339. </if>
  340. <if test="orderNumber != null">
  341. #{orderNumber,jdbcType=VARCHAR},
  342. </if>
  343. <if test="capacityId != null">
  344. #{capacityId,jdbcType=DECIMAL},
  345. </if>
  346. <if test="orderIssueTime != null">
  347. #{orderIssueTime,jdbcType=TIMESTAMP},
  348. </if>
  349. <if test="orderReceiveStatus != null">
  350. #{orderReceiveStatus,jdbcType=DECIMAL},
  351. </if>
  352. <if test="orderReceiveRefuseTime != null">
  353. #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
  354. </if>
  355. <if test="orderCommunicationDuration != null">
  356. #{orderCommunicationDuration,jdbcType=DECIMAL},
  357. </if>
  358. <if test="orderStatus != null">
  359. #{orderStatus,jdbcType=DECIMAL},
  360. </if>
  361. <if test="insertUsername != null">
  362. #{insertUsername,jdbcType=VARCHAR},
  363. </if>
  364. <if test="insertTime != null">
  365. #{insertTime,jdbcType=TIMESTAMP},
  366. </if>
  367. <if test="updateUsername != null">
  368. #{updateUsername,jdbcType=VARCHAR},
  369. </if>
  370. <if test="updateTime != null">
  371. #{updateTime,jdbcType=TIMESTAMP},
  372. </if>
  373. <if test="insertUpdateRemark != null">
  374. #{insertUpdateRemark,jdbcType=VARCHAR},
  375. </if>
  376. <if test="deleted != null">
  377. #{deleted,jdbcType=DECIMAL},
  378. </if>
  379. <if test="orderType != null">
  380. #{orderType,jdbcType=DECIMAL},
  381. </if>
  382. <if test="orderLineSequence != null">
  383. #{orderLineSequence,jdbcType=DECIMAL},
  384. </if>
  385. <if test="lineId != null">
  386. #{lineId,jdbcType=DECIMAL},
  387. </if>
  388. <if test="orderEntryTime != null">
  389. #{orderEntryTime,jdbcType=TIMESTAMP},
  390. </if>
  391. <if test="unloadPointId != null">
  392. #{unloadPointId,jdbcType=DECIMAL},
  393. </if>
  394. <if test="driverConfirmation != null">
  395. #{driverConfirmation,jdbcType=DECIMAL},
  396. </if>
  397. </trim>
  398. </insert>
  399. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmstruckOrder">
  400. update OMSTRUCK_ORDER
  401. set ORDER_PLAN_ID = #{orderPlanId,jdbcType=DECIMAL},
  402. ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
  403. CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
  404. ORDER_ISSUE_TIME = #{orderIssueTime,jdbcType=TIMESTAMP},
  405. ORDER_RECEIVE_STATUS = #{orderReceiveStatus,jdbcType=DECIMAL},
  406. ORDER_RECEIVE_REFUSE_TIME = #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
  407. ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration,jdbcType=DECIMAL},
  408. ORDER_STATUS = #{orderStatus,jdbcType=DECIMAL},
  409. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  410. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  411. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  412. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  413. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  414. DELETED = #{deleted,jdbcType=DECIMAL},
  415. ORDER_TYPE = #{orderType,jdbcType=DECIMAL},
  416. ORDER_LINE_SEQUENCE = #{orderLineSequence,jdbcType=DECIMAL},
  417. LINE_ID = #{lineId,jdbcType=DECIMAL},
  418. ORDER_ENTRY_TIME = #{orderEntryTime,jdbcType=TIMESTAMP},
  419. UNLOAD_POINT_ID = #{unloadPointId,jdbcType=DECIMAL},
  420. DRIVER_CONFIRMATION = #{driverConfirmation,jdbcType=DECIMAL}
  421. where ORDER_ID = #{orderId,jdbcType=DECIMAL}
  422. </update>
  423. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
  424. update OMSTRUCK_ORDER
  425. <set>
  426. <if test="orderPlanId != null">
  427. ORDER_PLAN_ID = #{orderPlanId,jdbcType=DECIMAL},
  428. </if>
  429. <if test="orderNumber != null">
  430. ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
  431. </if>
  432. <if test="capacityId != null">
  433. CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
  434. </if>
  435. <if test="orderIssueTime != null">
  436. ORDER_ISSUE_TIME = #{orderIssueTime,jdbcType=TIMESTAMP},
  437. </if>
  438. <if test="orderReceiveStatus != null">
  439. ORDER_RECEIVE_STATUS = #{orderReceiveStatus,jdbcType=DECIMAL},
  440. </if>
  441. <if test="orderReceiveRefuseTime != null">
  442. ORDER_RECEIVE_REFUSE_TIME = #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
  443. </if>
  444. <if test="orderCommunicationDuration != null">
  445. ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration,jdbcType=DECIMAL},
  446. </if>
  447. <if test="orderStatus != null">
  448. ORDER_STATUS = #{orderStatus,jdbcType=DECIMAL},
  449. </if>
  450. <if test="insertUsername != null">
  451. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  452. </if>
  453. <if test="insertTime != null">
  454. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  455. </if>
  456. <if test="updateUsername != null">
  457. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  458. </if>
  459. <if test="updateTime != null">
  460. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  461. </if>
  462. <if test="insertUpdateRemark != null">
  463. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  464. </if>
  465. <if test="deleted != null">
  466. DELETED = #{deleted,jdbcType=DECIMAL},
  467. </if>
  468. <if test="orderType != null">
  469. ORDER_TYPE = #{orderType,jdbcType=DECIMAL},
  470. </if>
  471. <if test="orderLineSequence != null">
  472. ORDER_LINE_SEQUENCE = #{orderLineSequence,jdbcType=DECIMAL},
  473. </if>
  474. <if test="lineId != null">
  475. LINE_ID = #{lineId,jdbcType=DECIMAL},
  476. </if>
  477. <if test="orderEntryTime != null">
  478. ORDER_ENTRY_TIME = #{orderEntryTime,jdbcType=TIMESTAMP},
  479. </if>
  480. <if test="unloadPointId != null">
  481. UNLOAD_POINT_ID = #{unloadPointId,jdbcType=DECIMAL},
  482. </if>
  483. <if test="driverConfirmation != null">
  484. DRIVER_CONFIRMATION = #{driverConfirmation,jdbcType=DECIMAL},
  485. </if>
  486. </set>
  487. where ORDER_ID = #{orderId,jdbcType=DECIMAL}
  488. </update>
  489. <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
  490. <include refid="select"/>
  491. where ORDER_ID = #{orderId,jdbcType=DECIMAL}
  492. </select>
  493. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  494. <include refid="select"/>
  495. <include refid="where"/>
  496. </select>
  497. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  498. <include refid="select"/>
  499. <include refid="whereLike"/>
  500. </select>
  501. <insert id="batchInsert" parameterType="java.util.List">
  502. insert into OMSTRUCK_ORDER
  503. (ORDER_ID,
  504. ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID,
  505. ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
  506. ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION,
  507. ORDER_STATUS, INSERT_USERNAME,
  508. INSERT_TIME, UPDATE_USERNAME,
  509. UPDATE_TIME, INSERT_UPDATE_REMARK,
  510. DELETED, ORDER_TYPE, ORDER_LINE_SEQUENCE,
  511. LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID,
  512. DRIVER_CONFIRMATION)
  513. ( <foreach collection="list" item="item" separator="union all">
  514. select
  515. #{item.orderId,jdbcType=DECIMAL},
  516. #{item.orderPlanId,jdbcType=DECIMAL}, #{item.orderNumber,jdbcType=VARCHAR}, #{item.capacityId,jdbcType=DECIMAL},
  517. #{item.orderIssueTime,jdbcType=TIMESTAMP}, #{item.orderReceiveStatus,jdbcType=DECIMAL},
  518. #{item.orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{item.orderCommunicationDuration,jdbcType=DECIMAL},
  519. #{item.orderStatus,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
  520. #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
  521. #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
  522. #{item.deleted,jdbcType=DECIMAL}, #{item.orderType,jdbcType=DECIMAL}, #{item.orderLineSequence,jdbcType=DECIMAL},
  523. #{item.lineId,jdbcType=DECIMAL}, #{item.orderEntryTime,jdbcType=TIMESTAMP}, #{item.unloadPointId,jdbcType=DECIMAL},
  524. #{item.driverConfirmation,jdbcType=DECIMAL} from dual
  525. </foreach> )
  526. </insert>
  527. <update id="batchUpdate" parameterType="java.util.List">
  528. update OMSTRUCK_ORDER
  529. set
  530. ORDER_ID=
  531. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  532. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
  533. </foreach>
  534. ,ORDER_PLAN_ID=
  535. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  536. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderPlanId,jdbcType=DECIMAL}
  537. </foreach>
  538. ,ORDER_NUMBER=
  539. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  540. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderNumber,jdbcType=VARCHAR}
  541. </foreach>
  542. ,CAPACITY_ID=
  543. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  544. when #{item.orderId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
  545. </foreach>
  546. ,ORDER_ISSUE_TIME=
  547. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  548. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderIssueTime,jdbcType=TIMESTAMP}
  549. </foreach>
  550. ,ORDER_RECEIVE_STATUS=
  551. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  552. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderReceiveStatus,jdbcType=DECIMAL}
  553. </foreach>
  554. ,ORDER_RECEIVE_REFUSE_TIME=
  555. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  556. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderReceiveRefuseTime,jdbcType=TIMESTAMP}
  557. </foreach>
  558. ,ORDER_COMMUNICATION_DURATION=
  559. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  560. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderCommunicationDuration,jdbcType=DECIMAL}
  561. </foreach>
  562. ,ORDER_STATUS=
  563. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  564. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderStatus,jdbcType=DECIMAL}
  565. </foreach>
  566. ,INSERT_USERNAME=
  567. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  568. when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  569. </foreach>
  570. ,INSERT_TIME=
  571. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  572. when #{item.orderId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  573. </foreach>
  574. ,UPDATE_USERNAME=
  575. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  576. when #{item.orderId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  577. </foreach>
  578. ,UPDATE_TIME=
  579. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  580. when #{item.orderId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  581. </foreach>
  582. ,INSERT_UPDATE_REMARK=
  583. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  584. when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  585. </foreach>
  586. ,DELETED=
  587. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  588. when #{item.orderId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
  589. </foreach>
  590. ,ORDER_TYPE=
  591. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  592. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderType,jdbcType=DECIMAL}
  593. </foreach>
  594. ,ORDER_LINE_SEQUENCE=
  595. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  596. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderLineSequence,jdbcType=DECIMAL}
  597. </foreach>
  598. ,LINE_ID=
  599. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  600. when #{item.orderId,jdbcType=DECIMAL} then #{item.lineId,jdbcType=DECIMAL}
  601. </foreach>
  602. ,ORDER_ENTRY_TIME=
  603. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  604. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderEntryTime,jdbcType=TIMESTAMP}
  605. </foreach>
  606. ,UNLOAD_POINT_ID=
  607. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  608. when #{item.orderId,jdbcType=DECIMAL} then #{item.unloadPointId,jdbcType=DECIMAL}
  609. </foreach>
  610. ,DRIVER_CONFIRMATION=
  611. <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
  612. when #{item.orderId,jdbcType=DECIMAL} then #{item.driverConfirmation,jdbcType=DECIMAL}
  613. </foreach>
  614. where ORDER_ID in
  615. <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
  616. #{item.orderId,jdbcType=DECIMAL}
  617. </foreach>
  618. </update>
  619. <delete id="batchDelete" parameterType="java.util.List">
  620. delete from OMSTRUCK_ORDER
  621. where ORDER_ID in
  622. <foreach collection="list" item="id" open="(" close=")" separator=",">
  623. #{id}
  624. </foreach>
  625. </delete>
  626. <!-- 友情提示!!!-->
  627. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  628. <!--通过运输订单ID查询数据 用于websocket推送数据 如果订单实绩中有卸货点 没有卸货点通过传入的卸货点进行查询-->
  629. <select id="pushMesToWebsocket" parameterType="java.util.Map" resultType="java.util.Map">
  630. select OO.ORDER_NUMBER "orderNumber",
  631. RC.CAPACITY_NUMBER "capacityNumber"
  632. from OMSTRUCK_ORDER OO
  633. left join RMS_CAPACITY RC
  634. on RC.CAPACITY_ID = OO.CAPACITY_ID
  635. where OO.ORDER_ID = #{orderId}
  636. and rownum = 1
  637. </select>
  638. <select id="selectOrderTypeByOrderId" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
  639. select OO.ORDER_TYPE "orderType"
  640. from OMSTRUCK_ORDER OO
  641. WHERE OO.ORDER_ID=#{orderId}
  642. </select>
  643. </mapper>