OmstruckOrderMapper.xml 33 KB

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