OmstruckOrderMapper.xml 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953
  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. <result column="TRIP_ID" jdbcType="VARCHAR" property="tripId" />
  29. <result column="ORDER_PRINT_STATUS" jdbcType="DECIMAL" property="orderPrintStatus" />
  30. <result column="DRIVER_TEL" jdbcType="VARCHAR" property="driverTel" />
  31. <result column="OPTIONER_CODE" jdbcType="VARCHAR" property="optionerCode" />
  32. <result column="CAN_WORK" jdbcType="DECIMAL" property="canWork" />
  33. </resultMap>
  34. <sql id="columns">
  35. ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
  36. ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION, ORDER_STATUS, INSERT_USERNAME,
  37. INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, ORDER_TYPE,
  38. ORDER_LINE_SEQUENCE, LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID, DRIVER_CONFIRMATION,
  39. PRICE_ID, CARRIER_ID, TRIP_ID, ORDER_PRINT_STATUS, DRIVER_TEL, OPTIONER_CODE, CAN_WORK
  40. </sql>
  41. <sql id="columns_alias">
  42. t.ORDER_ID, t.ORDER_PLAN_ID, t.ORDER_NUMBER, t.CAPACITY_ID, t.ORDER_ISSUE_TIME, t.ORDER_RECEIVE_STATUS,
  43. t.ORDER_RECEIVE_REFUSE_TIME, t.ORDER_COMMUNICATION_DURATION, t.ORDER_STATUS, t.INSERT_USERNAME,
  44. t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
  45. t.ORDER_TYPE, t.ORDER_LINE_SEQUENCE, t.LINE_ID, t.ORDER_ENTRY_TIME, t.UNLOAD_POINT_ID,
  46. t.DRIVER_CONFIRMATION, t.PRICE_ID, t.CARRIER_ID, t.TRIP_ID, t.ORDER_PRINT_STATUS,
  47. t.DRIVER_TEL, t.OPTIONER_CODE, t.CAN_WORK
  48. </sql>
  49. <sql id="select">
  50. SELECT <include refid="columns" /> FROM OMSTRUCK_ORDER
  51. </sql>
  52. <sql id="select_alias">
  53. SELECT <include refid="columns_alias" /> FROM OMSTRUCK_ORDER t
  54. </sql>
  55. <sql id="where">
  56. <where>
  57. <if test="orderId != null">
  58. and ORDER_ID = #{orderId}
  59. </if>
  60. <if test="orderPlanId != null">
  61. and ORDER_PLAN_ID = #{orderPlanId}
  62. </if>
  63. <if test="orderNumber != null and orderNumber != ''">
  64. and ORDER_NUMBER = #{orderNumber}
  65. </if>
  66. <if test="capacityId != null">
  67. and CAPACITY_ID = #{capacityId}
  68. </if>
  69. <if test="orderIssueTime != null">
  70. and TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = #{orderIssueTime}
  71. </if>
  72. <if test="orderReceiveStatus != null">
  73. and ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
  74. </if>
  75. <if test="orderReceiveRefuseTime != null">
  76. and TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = #{orderReceiveRefuseTime}
  77. </if>
  78. <if test="orderCommunicationDuration != null">
  79. and ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
  80. </if>
  81. <if test="orderStatus != null">
  82. and ORDER_STATUS = #{orderStatus}
  83. </if>
  84. <if test="insertUsername != null and insertUsername != ''">
  85. and INSERT_USERNAME = #{insertUsername}
  86. </if>
  87. <if test="insertTime != null">
  88. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  89. </if>
  90. <if test="updateUsername != null and updateUsername != ''">
  91. and UPDATE_USERNAME = #{updateUsername}
  92. </if>
  93. <if test="updateTime != null">
  94. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  95. </if>
  96. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  97. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  98. </if>
  99. <if test="deleted != null">
  100. and DELETED = #{deleted}
  101. </if>
  102. <if test="orderType != null">
  103. and ORDER_TYPE = #{orderType}
  104. </if>
  105. <if test="orderLineSequence != null">
  106. and ORDER_LINE_SEQUENCE = #{orderLineSequence}
  107. </if>
  108. <if test="lineId != null">
  109. and LINE_ID = #{lineId}
  110. </if>
  111. <if test="orderEntryTime != null">
  112. and TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = #{orderEntryTime}
  113. </if>
  114. <if test="unloadPointId != null">
  115. and UNLOAD_POINT_ID = #{unloadPointId}
  116. </if>
  117. <if test="driverConfirmation != null">
  118. and DRIVER_CONFIRMATION = #{driverConfirmation}
  119. </if>
  120. <if test="priceId != null">
  121. and PRICE_ID = #{priceId}
  122. </if>
  123. <if test="carrierId != null">
  124. and CARRIER_ID = #{carrierId}
  125. </if>
  126. <if test="tripId != null and tripId != ''">
  127. and TRIP_ID = #{tripId}
  128. </if>
  129. <if test="orderPrintStatus != null">
  130. and ORDER_PRINT_STATUS = #{orderPrintStatus}
  131. </if>
  132. <if test="driverTel != null and driverTel != ''">
  133. and DRIVER_TEL = #{driverTel}
  134. </if>
  135. <if test="optionerCode != null and optionerCode != ''">
  136. and OPTIONER_CODE = #{optionerCode}
  137. </if>
  138. <if test="canWork != null">
  139. and CAN_WORK = #{canWork}
  140. </if>
  141. </where>
  142. </sql>
  143. <sql id="whereLike">
  144. <where>
  145. <if test="orderId != null">
  146. and ORDER_ID = #{orderId}
  147. </if>
  148. <if test="orderPlanId != null">
  149. and ORDER_PLAN_ID = #{orderPlanId}
  150. </if>
  151. <if test="orderNumber != null and orderNumber != ''">
  152. and ORDER_NUMBER LIKE '%${orderNumber}%'
  153. </if>
  154. <if test="capacityId != null">
  155. and CAPACITY_ID = #{capacityId}
  156. </if>
  157. <if test="orderIssueTime != null">
  158. and TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = #{orderIssueTime}
  159. </if>
  160. <if test="orderReceiveStatus != null">
  161. and ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
  162. </if>
  163. <if test="orderReceiveRefuseTime != null">
  164. and TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = #{orderReceiveRefuseTime}
  165. </if>
  166. <if test="orderCommunicationDuration != null">
  167. and ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
  168. </if>
  169. <if test="orderStatus != null">
  170. and ORDER_STATUS = #{orderStatus}
  171. </if>
  172. <if test="insertUsername != null and insertUsername != ''">
  173. and INSERT_USERNAME LIKE '%${insertUsername}%'
  174. </if>
  175. <if test="insertTime != null">
  176. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  177. </if>
  178. <if test="updateUsername != null and updateUsername != ''">
  179. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  180. </if>
  181. <if test="updateTime != null">
  182. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  183. </if>
  184. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  185. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  186. </if>
  187. <if test="deleted != null">
  188. and DELETED = #{deleted}
  189. </if>
  190. <if test="orderType != null">
  191. and ORDER_TYPE = #{orderType}
  192. </if>
  193. <if test="orderLineSequence != null">
  194. and ORDER_LINE_SEQUENCE = #{orderLineSequence}
  195. </if>
  196. <if test="lineId != null">
  197. and LINE_ID = #{lineId}
  198. </if>
  199. <if test="orderEntryTime != null">
  200. and TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = #{orderEntryTime}
  201. </if>
  202. <if test="unloadPointId != null">
  203. and UNLOAD_POINT_ID = #{unloadPointId}
  204. </if>
  205. <if test="driverConfirmation != null">
  206. and DRIVER_CONFIRMATION = #{driverConfirmation}
  207. </if>
  208. <if test="priceId != null">
  209. and PRICE_ID = #{priceId}
  210. </if>
  211. <if test="carrierId != null">
  212. and CARRIER_ID = #{carrierId}
  213. </if>
  214. <if test="tripId != null and tripId != ''">
  215. and TRIP_ID LIKE '%${tripId}%'
  216. </if>
  217. <if test="orderPrintStatus != null">
  218. and ORDER_PRINT_STATUS = #{orderPrintStatus}
  219. </if>
  220. <if test="driverTel != null and driverTel != ''">
  221. and DRIVER_TEL LIKE '%${driverTel}%'
  222. </if>
  223. <if test="optionerCode != null and optionerCode != ''">
  224. and OPTIONER_CODE LIKE '%${optionerCode}%'
  225. </if>
  226. <if test="canWork != null">
  227. and CAN_WORK = #{canWork}
  228. </if>
  229. </where>
  230. </sql>
  231. <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
  232. delete from OMSTRUCK_ORDER
  233. where ORDER_ID = #{orderId,jdbcType=DECIMAL}
  234. </delete>
  235. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  236. delete from OMSTRUCK_ORDER
  237. where 1!=1
  238. <if test="orderPlanId != null">
  239. or ORDER_PLAN_ID = #{orderPlanId}
  240. </if>
  241. <if test="orderNumber != null and orderNumber != ''">
  242. or ORDER_NUMBER = #{orderNumber}
  243. </if>
  244. <if test="capacityId != null">
  245. or CAPACITY_ID = #{capacityId}
  246. </if>
  247. <if test="orderIssueTime != null">
  248. or TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = '#{orderIssueTime}'
  249. </if>
  250. <if test="orderReceiveStatus != null">
  251. or ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
  252. </if>
  253. <if test="orderReceiveRefuseTime != null">
  254. or TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = '#{orderReceiveRefuseTime}'
  255. </if>
  256. <if test="orderCommunicationDuration != null">
  257. or ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
  258. </if>
  259. <if test="orderStatus != null">
  260. or ORDER_STATUS = #{orderStatus}
  261. </if>
  262. <if test="insertUsername != null and insertUsername != ''">
  263. or INSERT_USERNAME = #{insertUsername}
  264. </if>
  265. <if test="insertTime != null">
  266. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  267. </if>
  268. <if test="updateUsername != null and updateUsername != ''">
  269. or UPDATE_USERNAME = #{updateUsername}
  270. </if>
  271. <if test="updateTime != null">
  272. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  273. </if>
  274. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  275. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  276. </if>
  277. <if test="deleted != null">
  278. or DELETED = #{deleted}
  279. </if>
  280. <if test="orderType != null">
  281. or ORDER_TYPE = #{orderType}
  282. </if>
  283. <if test="orderLineSequence != null">
  284. or ORDER_LINE_SEQUENCE = #{orderLineSequence}
  285. </if>
  286. <if test="lineId != null">
  287. or LINE_ID = #{lineId}
  288. </if>
  289. <if test="orderEntryTime != null">
  290. or TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = '#{orderEntryTime}'
  291. </if>
  292. <if test="unloadPointId != null">
  293. or UNLOAD_POINT_ID = #{unloadPointId}
  294. </if>
  295. <if test="driverConfirmation != null">
  296. or DRIVER_CONFIRMATION = #{driverConfirmation}
  297. </if>
  298. <if test="priceId != null">
  299. or PRICE_ID = #{priceId}
  300. </if>
  301. <if test="carrierId != null">
  302. or CARRIER_ID = #{carrierId}
  303. </if>
  304. <if test="tripId != null and tripId != ''">
  305. or TRIP_ID = #{tripId}
  306. </if>
  307. <if test="orderPrintStatus != null">
  308. or ORDER_PRINT_STATUS = #{orderPrintStatus}
  309. </if>
  310. <if test="driverTel != null and driverTel != ''">
  311. or DRIVER_TEL = #{driverTel}
  312. </if>
  313. <if test="optionerCode != null and optionerCode != ''">
  314. or OPTIONER_CODE = #{optionerCode}
  315. </if>
  316. <if test="canWork != null">
  317. or CAN_WORK = #{canWork}
  318. </if>
  319. </delete>
  320. <insert id="insert" parameterType="com.steerinfo.dil.model.OmstruckOrder">
  321. insert into OMSTRUCK_ORDER (ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER,
  322. CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
  323. ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION,
  324. ORDER_STATUS, INSERT_USERNAME, INSERT_TIME,
  325. UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
  326. DELETED, ORDER_TYPE, ORDER_LINE_SEQUENCE,
  327. LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID,
  328. DRIVER_CONFIRMATION, PRICE_ID, CARRIER_ID,
  329. TRIP_ID, ORDER_PRINT_STATUS, DRIVER_TEL,
  330. OPTIONER_CODE, CAN_WORK)
  331. values (#{orderId,jdbcType=DECIMAL}, #{orderPlanId,jdbcType=DECIMAL}, #{orderNumber,jdbcType=VARCHAR},
  332. #{capacityId,jdbcType=DECIMAL}, #{orderIssueTime,jdbcType=TIMESTAMP}, #{orderReceiveStatus,jdbcType=DECIMAL},
  333. #{orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{orderCommunicationDuration,jdbcType=DECIMAL},
  334. #{orderStatus,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
  335. #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
  336. #{deleted,jdbcType=DECIMAL}, #{orderType,jdbcType=DECIMAL}, #{orderLineSequence,jdbcType=DECIMAL},
  337. #{lineId,jdbcType=DECIMAL}, #{orderEntryTime,jdbcType=TIMESTAMP}, #{unloadPointId,jdbcType=DECIMAL},
  338. #{driverConfirmation,jdbcType=DECIMAL}, #{priceId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
  339. #{tripId,jdbcType=VARCHAR}, #{orderPrintStatus,jdbcType=DECIMAL}, #{driverTel,jdbcType=VARCHAR},
  340. #{optionerCode,jdbcType=VARCHAR}, #{canWork,jdbcType=DECIMAL})
  341. </insert>
  342. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
  343. insert into OMSTRUCK_ORDER
  344. <trim prefix="(" suffix=")" suffixOverrides=",">
  345. <if test="orderId != null">
  346. ORDER_ID,
  347. </if>
  348. <if test="orderPlanId != null">
  349. ORDER_PLAN_ID,
  350. </if>
  351. <if test="orderNumber != null">
  352. ORDER_NUMBER,
  353. </if>
  354. <if test="capacityId != null">
  355. CAPACITY_ID,
  356. </if>
  357. <if test="orderIssueTime != null">
  358. ORDER_ISSUE_TIME,
  359. </if>
  360. <if test="orderReceiveStatus != null">
  361. ORDER_RECEIVE_STATUS,
  362. </if>
  363. <if test="orderReceiveRefuseTime != null">
  364. ORDER_RECEIVE_REFUSE_TIME,
  365. </if>
  366. <if test="orderCommunicationDuration != null">
  367. ORDER_COMMUNICATION_DURATION,
  368. </if>
  369. <if test="orderStatus != null">
  370. ORDER_STATUS,
  371. </if>
  372. <if test="insertUsername != null">
  373. INSERT_USERNAME,
  374. </if>
  375. <if test="insertTime != null">
  376. INSERT_TIME,
  377. </if>
  378. <if test="updateUsername != null">
  379. UPDATE_USERNAME,
  380. </if>
  381. <if test="updateTime != null">
  382. UPDATE_TIME,
  383. </if>
  384. <if test="insertUpdateRemark != null">
  385. INSERT_UPDATE_REMARK,
  386. </if>
  387. <if test="deleted != null">
  388. DELETED,
  389. </if>
  390. <if test="orderType != null">
  391. ORDER_TYPE,
  392. </if>
  393. <if test="orderLineSequence != null">
  394. ORDER_LINE_SEQUENCE,
  395. </if>
  396. <if test="lineId != null">
  397. LINE_ID,
  398. </if>
  399. <if test="orderEntryTime != null">
  400. ORDER_ENTRY_TIME,
  401. </if>
  402. <if test="unloadPointId != null">
  403. UNLOAD_POINT_ID,
  404. </if>
  405. <if test="driverConfirmation != null">
  406. DRIVER_CONFIRMATION,
  407. </if>
  408. <if test="priceId != null">
  409. PRICE_ID,
  410. </if>
  411. <if test="carrierId != null">
  412. CARRIER_ID,
  413. </if>
  414. <if test="tripId != null">
  415. TRIP_ID,
  416. </if>
  417. <if test="orderPrintStatus != null">
  418. ORDER_PRINT_STATUS,
  419. </if>
  420. <if test="driverTel != null">
  421. DRIVER_TEL,
  422. </if>
  423. <if test="optionerCode != null">
  424. OPTIONER_CODE,
  425. </if>
  426. <if test="canWork != null">
  427. CAN_WORK,
  428. </if>
  429. </trim>
  430. <trim prefix="values (" suffix=")" suffixOverrides=",">
  431. <if test="orderId != null">
  432. #{orderId,jdbcType=DECIMAL},
  433. </if>
  434. <if test="orderPlanId != null">
  435. #{orderPlanId,jdbcType=DECIMAL},
  436. </if>
  437. <if test="orderNumber != null">
  438. #{orderNumber,jdbcType=VARCHAR},
  439. </if>
  440. <if test="capacityId != null">
  441. #{capacityId,jdbcType=DECIMAL},
  442. </if>
  443. <if test="orderIssueTime != null">
  444. #{orderIssueTime,jdbcType=TIMESTAMP},
  445. </if>
  446. <if test="orderReceiveStatus != null">
  447. #{orderReceiveStatus,jdbcType=DECIMAL},
  448. </if>
  449. <if test="orderReceiveRefuseTime != null">
  450. #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
  451. </if>
  452. <if test="orderCommunicationDuration != null">
  453. #{orderCommunicationDuration,jdbcType=DECIMAL},
  454. </if>
  455. <if test="orderStatus != null">
  456. #{orderStatus,jdbcType=DECIMAL},
  457. </if>
  458. <if test="insertUsername != null">
  459. #{insertUsername,jdbcType=VARCHAR},
  460. </if>
  461. <if test="insertTime != null">
  462. #{insertTime,jdbcType=TIMESTAMP},
  463. </if>
  464. <if test="updateUsername != null">
  465. #{updateUsername,jdbcType=VARCHAR},
  466. </if>
  467. <if test="updateTime != null">
  468. #{updateTime,jdbcType=TIMESTAMP},
  469. </if>
  470. <if test="insertUpdateRemark != null">
  471. #{insertUpdateRemark,jdbcType=VARCHAR},
  472. </if>
  473. <if test="deleted != null">
  474. #{deleted,jdbcType=DECIMAL},
  475. </if>
  476. <if test="orderType != null">
  477. #{orderType,jdbcType=DECIMAL},
  478. </if>
  479. <if test="orderLineSequence != null">
  480. #{orderLineSequence,jdbcType=DECIMAL},
  481. </if>
  482. <if test="lineId != null">
  483. #{lineId,jdbcType=DECIMAL},
  484. </if>
  485. <if test="orderEntryTime != null">
  486. #{orderEntryTime,jdbcType=TIMESTAMP},
  487. </if>
  488. <if test="unloadPointId != null">
  489. #{unloadPointId,jdbcType=DECIMAL},
  490. </if>
  491. <if test="driverConfirmation != null">
  492. #{driverConfirmation,jdbcType=DECIMAL},
  493. </if>
  494. <if test="priceId != null">
  495. #{priceId,jdbcType=DECIMAL},
  496. </if>
  497. <if test="carrierId != null">
  498. #{carrierId,jdbcType=DECIMAL},
  499. </if>
  500. <if test="tripId != null">
  501. #{tripId,jdbcType=VARCHAR},
  502. </if>
  503. <if test="orderPrintStatus != null">
  504. #{orderPrintStatus,jdbcType=DECIMAL},
  505. </if>
  506. <if test="driverTel != null">
  507. #{driverTel,jdbcType=VARCHAR},
  508. </if>
  509. <if test="optionerCode != null">
  510. #{optionerCode,jdbcType=VARCHAR},
  511. </if>
  512. <if test="canWork != null">
  513. #{canWork,jdbcType=DECIMAL},
  514. </if>
  515. </trim>
  516. </insert>
  517. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmstruckOrder">
  518. update OMSTRUCK_ORDER
  519. set ORDER_PLAN_ID = #{orderPlanId,jdbcType=DECIMAL},
  520. ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
  521. CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
  522. ORDER_ISSUE_TIME = #{orderIssueTime,jdbcType=TIMESTAMP},
  523. ORDER_RECEIVE_STATUS = #{orderReceiveStatus,jdbcType=DECIMAL},
  524. ORDER_RECEIVE_REFUSE_TIME = #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
  525. ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration,jdbcType=DECIMAL},
  526. ORDER_STATUS = #{orderStatus,jdbcType=DECIMAL},
  527. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  528. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  529. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  530. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  531. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  532. DELETED = #{deleted,jdbcType=DECIMAL},
  533. ORDER_TYPE = #{orderType,jdbcType=DECIMAL},
  534. ORDER_LINE_SEQUENCE = #{orderLineSequence,jdbcType=DECIMAL},
  535. LINE_ID = #{lineId,jdbcType=DECIMAL},
  536. ORDER_ENTRY_TIME = #{orderEntryTime,jdbcType=TIMESTAMP},
  537. UNLOAD_POINT_ID = #{unloadPointId,jdbcType=DECIMAL},
  538. DRIVER_CONFIRMATION = #{driverConfirmation,jdbcType=DECIMAL},
  539. PRICE_ID = #{priceId,jdbcType=DECIMAL},
  540. CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
  541. TRIP_ID = #{tripId,jdbcType=VARCHAR},
  542. ORDER_PRINT_STATUS = #{orderPrintStatus,jdbcType=DECIMAL},
  543. DRIVER_TEL = #{driverTel,jdbcType=VARCHAR},
  544. OPTIONER_CODE = #{optionerCode,jdbcType=VARCHAR},
  545. CAN_WORK = #{canWork,jdbcType=DECIMAL}
  546. where ORDER_ID = #{orderId,jdbcType=DECIMAL}
  547. </update>
  548. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
  549. update OMSTRUCK_ORDER
  550. <set>
  551. <if test="orderPlanId != null">
  552. ORDER_PLAN_ID = #{orderPlanId,jdbcType=DECIMAL},
  553. </if>
  554. <if test="orderNumber != null">
  555. ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
  556. </if>
  557. <if test="capacityId != null">
  558. CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
  559. </if>
  560. <if test="orderIssueTime != null">
  561. ORDER_ISSUE_TIME = #{orderIssueTime,jdbcType=TIMESTAMP},
  562. </if>
  563. <if test="orderReceiveStatus != null">
  564. ORDER_RECEIVE_STATUS = #{orderReceiveStatus,jdbcType=DECIMAL},
  565. </if>
  566. <if test="orderReceiveRefuseTime != null">
  567. ORDER_RECEIVE_REFUSE_TIME = #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
  568. </if>
  569. <if test="orderCommunicationDuration != null">
  570. ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration,jdbcType=DECIMAL},
  571. </if>
  572. <if test="orderStatus != null">
  573. ORDER_STATUS = #{orderStatus,jdbcType=DECIMAL},
  574. </if>
  575. <if test="insertUsername != null">
  576. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  577. </if>
  578. <if test="insertTime != null">
  579. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  580. </if>
  581. <if test="updateUsername != null">
  582. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  583. </if>
  584. <if test="updateTime != null">
  585. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  586. </if>
  587. <if test="insertUpdateRemark != null">
  588. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  589. </if>
  590. <if test="deleted != null">
  591. DELETED = #{deleted,jdbcType=DECIMAL},
  592. </if>
  593. <if test="orderType != null">
  594. ORDER_TYPE = #{orderType,jdbcType=DECIMAL},
  595. </if>
  596. <if test="orderLineSequence != null">
  597. ORDER_LINE_SEQUENCE = #{orderLineSequence,jdbcType=DECIMAL},
  598. </if>
  599. <if test="lineId != null">
  600. LINE_ID = #{lineId,jdbcType=DECIMAL},
  601. </if>
  602. <if test="orderEntryTime != null">
  603. ORDER_ENTRY_TIME = #{orderEntryTime,jdbcType=TIMESTAMP},
  604. </if>
  605. <if test="unloadPointId != null">
  606. UNLOAD_POINT_ID = #{unloadPointId,jdbcType=DECIMAL},
  607. </if>
  608. <if test="driverConfirmation != null">
  609. DRIVER_CONFIRMATION = #{driverConfirmation,jdbcType=DECIMAL},
  610. </if>
  611. <if test="priceId != null">
  612. PRICE_ID = #{priceId,jdbcType=DECIMAL},
  613. </if>
  614. <if test="carrierId != null">
  615. CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
  616. </if>
  617. <if test="tripId != null">
  618. TRIP_ID = #{tripId,jdbcType=VARCHAR},
  619. </if>
  620. <if test="orderPrintStatus != null">
  621. ORDER_PRINT_STATUS = #{orderPrintStatus,jdbcType=DECIMAL},
  622. </if>
  623. <if test="driverTel != null">
  624. DRIVER_TEL = #{driverTel,jdbcType=VARCHAR},
  625. </if>
  626. <if test="optionerCode != null">
  627. OPTIONER_CODE = #{optionerCode,jdbcType=VARCHAR},
  628. </if>
  629. <if test="canWork != null">
  630. CAN_WORK = #{canWork,jdbcType=DECIMAL},
  631. </if>
  632. </set>
  633. where ORDER_ID = #{orderId,jdbcType=DECIMAL}
  634. </update>
  635. <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
  636. <include refid="select" />
  637. where ORDER_ID = #{orderId,jdbcType=DECIMAL}
  638. </select>
  639. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  640. <include refid="select" />
  641. <include refid="where" />
  642. </select>
  643. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  644. <include refid="select" />
  645. <include refid="whereLike" />
  646. </select>
  647. <insert id="batchInsert" parameterType="java.util.List">
  648. insert into OMSTRUCK_ORDER
  649. (ORDER_ID,
  650. ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID,
  651. ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
  652. ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION,
  653. ORDER_STATUS, INSERT_USERNAME,
  654. INSERT_TIME, UPDATE_USERNAME,
  655. UPDATE_TIME, INSERT_UPDATE_REMARK,
  656. DELETED, ORDER_TYPE, ORDER_LINE_SEQUENCE,
  657. LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID,
  658. DRIVER_CONFIRMATION, PRICE_ID,
  659. CARRIER_ID, TRIP_ID, ORDER_PRINT_STATUS,
  660. DRIVER_TEL, OPTIONER_CODE, CAN_WORK
  661. )
  662. ( <foreach collection="list" item="item" separator="union all">
  663. select
  664. #{item.orderId,jdbcType=DECIMAL},
  665. #{item.orderPlanId,jdbcType=DECIMAL}, #{item.orderNumber,jdbcType=VARCHAR}, #{item.capacityId,jdbcType=DECIMAL},
  666. #{item.orderIssueTime,jdbcType=TIMESTAMP}, #{item.orderReceiveStatus,jdbcType=DECIMAL},
  667. #{item.orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{item.orderCommunicationDuration,jdbcType=DECIMAL},
  668. #{item.orderStatus,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
  669. #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
  670. #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
  671. #{item.deleted,jdbcType=DECIMAL}, #{item.orderType,jdbcType=DECIMAL}, #{item.orderLineSequence,jdbcType=DECIMAL},
  672. #{item.lineId,jdbcType=DECIMAL}, #{item.orderEntryTime,jdbcType=TIMESTAMP}, #{item.unloadPointId,jdbcType=DECIMAL},
  673. #{item.driverConfirmation,jdbcType=DECIMAL}, #{item.priceId,jdbcType=DECIMAL},
  674. #{item.carrierId,jdbcType=DECIMAL}, #{item.tripId,jdbcType=VARCHAR}, #{item.orderPrintStatus,jdbcType=DECIMAL},
  675. #{item.driverTel,jdbcType=VARCHAR}, #{item.optionerCode,jdbcType=VARCHAR}, #{item.canWork,jdbcType=DECIMAL}
  676. from dual
  677. </foreach> )
  678. </insert>
  679. <update id="batchUpdate" parameterType="java.util.List">
  680. update OMSTRUCK_ORDER
  681. set
  682. ORDER_ID=
  683. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  684. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
  685. </foreach>
  686. ,ORDER_PLAN_ID=
  687. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  688. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderPlanId,jdbcType=DECIMAL}
  689. </foreach>
  690. ,ORDER_NUMBER=
  691. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  692. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderNumber,jdbcType=VARCHAR}
  693. </foreach>
  694. ,CAPACITY_ID=
  695. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  696. when #{item.orderId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
  697. </foreach>
  698. ,ORDER_ISSUE_TIME=
  699. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  700. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderIssueTime,jdbcType=TIMESTAMP}
  701. </foreach>
  702. ,ORDER_RECEIVE_STATUS=
  703. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  704. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderReceiveStatus,jdbcType=DECIMAL}
  705. </foreach>
  706. ,ORDER_RECEIVE_REFUSE_TIME=
  707. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  708. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderReceiveRefuseTime,jdbcType=TIMESTAMP}
  709. </foreach>
  710. ,ORDER_COMMUNICATION_DURATION=
  711. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  712. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderCommunicationDuration,jdbcType=DECIMAL}
  713. </foreach>
  714. ,ORDER_STATUS=
  715. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  716. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderStatus,jdbcType=DECIMAL}
  717. </foreach>
  718. ,INSERT_USERNAME=
  719. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  720. when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  721. </foreach>
  722. ,INSERT_TIME=
  723. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  724. when #{item.orderId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  725. </foreach>
  726. ,UPDATE_USERNAME=
  727. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  728. when #{item.orderId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  729. </foreach>
  730. ,UPDATE_TIME=
  731. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  732. when #{item.orderId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  733. </foreach>
  734. ,INSERT_UPDATE_REMARK=
  735. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  736. when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  737. </foreach>
  738. ,DELETED=
  739. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  740. when #{item.orderId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
  741. </foreach>
  742. ,ORDER_TYPE=
  743. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  744. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderType,jdbcType=DECIMAL}
  745. </foreach>
  746. ,ORDER_LINE_SEQUENCE=
  747. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  748. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderLineSequence,jdbcType=DECIMAL}
  749. </foreach>
  750. ,LINE_ID=
  751. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  752. when #{item.orderId,jdbcType=DECIMAL} then #{item.lineId,jdbcType=DECIMAL}
  753. </foreach>
  754. ,ORDER_ENTRY_TIME=
  755. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  756. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderEntryTime,jdbcType=TIMESTAMP}
  757. </foreach>
  758. ,UNLOAD_POINT_ID=
  759. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  760. when #{item.orderId,jdbcType=DECIMAL} then #{item.unloadPointId,jdbcType=DECIMAL}
  761. </foreach>
  762. ,DRIVER_CONFIRMATION=
  763. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  764. when #{item.orderId,jdbcType=DECIMAL} then #{item.driverConfirmation,jdbcType=DECIMAL}
  765. </foreach>
  766. ,PRICE_ID=
  767. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  768. when #{item.orderId,jdbcType=DECIMAL} then #{item.priceId,jdbcType=DECIMAL}
  769. </foreach>
  770. ,CARRIER_ID=
  771. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  772. when #{item.orderId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
  773. </foreach>
  774. ,TRIP_ID=
  775. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  776. when #{item.orderId,jdbcType=DECIMAL} then #{item.tripId,jdbcType=VARCHAR}
  777. </foreach>
  778. ,ORDER_PRINT_STATUS=
  779. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  780. when #{item.orderId,jdbcType=DECIMAL} then #{item.orderPrintStatus,jdbcType=DECIMAL}
  781. </foreach>
  782. ,DRIVER_TEL=
  783. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  784. when #{item.orderId,jdbcType=DECIMAL} then #{item.driverTel,jdbcType=VARCHAR}
  785. </foreach>
  786. ,OPTIONER_CODE=
  787. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  788. when #{item.orderId,jdbcType=DECIMAL} then #{item.optionerCode,jdbcType=VARCHAR}
  789. </foreach>
  790. ,CAN_WORK=
  791. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  792. when #{item.orderId,jdbcType=DECIMAL} then #{item.canWork,jdbcType=DECIMAL}
  793. </foreach>
  794. where ORDER_ID in
  795. <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
  796. #{item.orderId,jdbcType=DECIMAL}
  797. </foreach>
  798. </update>
  799. <delete id="batchDelete" parameterType="java.util.List">
  800. delete from OMSTRUCK_ORDER
  801. where ORDER_ID in
  802. <foreach close=")" collection="list" item="id" open="(" separator=",">
  803. #{id}
  804. </foreach>
  805. </delete>
  806. <!-- 友情提示!!!-->
  807. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  808. <!--通过运输订单ID查询数据 用于websocket推送数据 如果订单实绩中有卸货点 没有卸货点通过传入的卸货点进行查询-->
  809. <select id="pushMesToWebsocket" parameterType="java.util.Map" resultType="java.util.Map">
  810. select OO.ORDER_NUMBER "orderNumber",
  811. RC.CAPACITY_NUMBER "capacityNumber"
  812. from OMSTRUCK_ORDER OO
  813. left join RMS_CAPACITY RC
  814. on RC.CAPACITY_ID = OO.CAPACITY_ID
  815. where OO.ORDER_ID = #{orderId}
  816. and rownum = 1
  817. </select>
  818. <select id="selectOrderTypeByOrderId" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
  819. select OO.ORDER_TYPE "orderType"
  820. from OMSTRUCK_ORDER OO
  821. WHERE OO.ORDER_ID=#{orderId}
  822. </select>
  823. <select id="getPriceId" parameterType="java.util.Map" resultType="DECIMAL">
  824. SELECT ACTP.PRICE_ID AS "priceId"
  825. FROM AMS_CONTRACT_TRANSPORT_PRICE ACTP
  826. LEFT JOIN RMS_RECEIVE_PLACE RRP
  827. ON RRP.PLACE_ID = ACTP.PLACE_ID
  828. LEFT JOIN RMS_RECEIVE_ADDRESS RRA
  829. ON RRA.ADDRESS_ID = RRP.ADDRESS_ID
  830. WHERE RRP.ADDRESS_DELIVERY_ADDRESS = #{place}
  831. AND RRA.ADDRESS_ID = #{addressId}
  832. AND ACTP.DELETED = 0
  833. </select>
  834. <select id="findMaxPrice" parameterType="Object" resultType="DECIMAL" >
  835. SELECT
  836. MAX(ACTP.PRICE_VALUE) AS "priceValue"
  837. FROM AMS_CONTRACT_TRANSPORT_PRICE ACTP
  838. LEFT JOIN RMS_RECEIVE_PLACE RRP
  839. ON RRP.PLACE_ID = ACTP.PLACE_ID
  840. LEFT JOIN RMS_RECEIVE_ADDRESS RRA
  841. ON RRA.ADDRESS_ID = RRP.ADDRESS_ID
  842. WHERE RRA.ADDRESS_ID = #{addressId}
  843. </select>
  844. <select id="findMaxPriceId" parameterType="java.util.Map" resultType="java.util.Map" >
  845. SELECT
  846. ACTP.PRICE_ID AS "priceId"
  847. FROM AMS_CONTRACT_TRANSPORT_PRICE ACTP
  848. LEFT JOIN RMS_RECEIVE_PLACE RRP
  849. ON RRP.PLACE_ID = ACTP.PLACE_ID
  850. LEFT JOIN RMS_RECEIVE_ADDRESS RRA
  851. ON RRA.ADDRESS_ID = RRP.ADDRESS_ID
  852. WHERE RRA.ADDRESS_ID = #{addressId}
  853. AND ACTP.PRICE_VALUE = #{priceValue}
  854. </select>
  855. <select id="findCarNumberByOrderId" parameterType="DECIMAL" resultType="java.lang.String" >
  856. SELECT RC.CAPACITY_NUMBER AS "capacityNumber"
  857. FROM OMSTRUCK_ORDER OO
  858. LEFT JOIN RMS_CAPACITY RC
  859. ON RC.CAPACITY_ID = OO.CAPACITY_ID
  860. WHERE OO.ORDER_ID = #{orderId}
  861. </select>
  862. <select id="getOldCapacityId" resultType="java.math.BigDecimal" parameterType="decimal">
  863. SELECT OO.CAPACITY_ID FROM OMSTRUCK_ORDER OO
  864. WHERE OO.ORDER_ID = #{orderId}
  865. </select>
  866. <select id="getCapacityTel" resultType="java.math.BigDecimal">
  867. select nvl(RC.CAPACITY_TEL,0) "capacityTel" from RMS_CAPACITY RC
  868. WHERE RC.CAPACITY_NUMBER=#{capacityNo}
  869. AND ROWNUM =1
  870. </select>
  871. <select id="getSteelIsSpelling" resultType="java.util.Map" parameterType="java.math.BigDecimal">
  872. select LIST_ID "listId",
  873. IS_SPELLING "isSpelling",
  874. RESULT_ID "resultId"
  875. from QMS_QUEUE_RESULT where RESULT_TOTAL_ID = (select ttr.RESULT_TOTAL_ID from TMSTRUCK_TOTAL_RESULT ttr where ttr.ORDER_ID = #{orderId})
  876. </select>
  877. <delete id="deleteWeightResult" parameterType="java.math.BigDecimal">
  878. delete from TMSTRUCK_WEIGHT_RESULT
  879. where RESULT_TOTAL_ID = #{resultTotalId}
  880. </delete>
  881. <!-- 删除装车实绩 -->
  882. <delete id="deleteLoadResult" parameterType="java.math.BigDecimal">
  883. delete from TMSTRUCK_LOAD_RESULT
  884. where RESULT_TOTAL_ID = #{resultTotalId}
  885. </delete>
  886. <!-- 删除出厂实绩-->
  887. <delete id="deleteLeaveResult" parameterType="java.math.BigDecimal">
  888. delete from TMSTRUCK_LEAVE_FACTORY_RESULT
  889. where RESULT_TOTAL_ID = #{resultTotalId}
  890. </delete>
  891. <!--删除进厂实绩-->
  892. <delete id="deleteEnResult" parameterType="java.math.BigDecimal">
  893. delete from TMSTRUCK_ENFACTORY_RESULT
  894. where RESULT_TOTAL_ID = #{resultTotalId}
  895. </delete>
  896. <delete id="deleteSpellingList" >
  897. delete from QMS_QUEUE_SPELLING_LIST QQSL
  898. where QQSL.SPELLING_RESULT_ID = #{listId}
  899. </delete>
  900. <delete id="deleteQueuingPerformance">
  901. delete from QMS_QUEUE_RESULT QQR
  902. where QQR.RESULT_TOTAL_ID=#{resultTotalId}
  903. </delete>
  904. <delete id="deleteQueueList" >
  905. delete from QMS_QUEUE_LIST QQL
  906. where qql.LIST_ID = #{listId}
  907. </delete>
  908. <select id="getResultCount" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
  909. SELECT count(TER.RESULT_ID) FROM TMSTRUCK_TOTAL_RESULT TTR
  910. LEFT JOIN TMSTRUCK_ENFACTORY_RESULT TER
  911. ON TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  912. WHERE TTR.ORDER_ID = #{orderId}
  913. </select>
  914. <select id="getOrderStatus" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
  915. SELECT ORDER_STATUS FROM OMSTRUCK_ORDER WHERE ORDER_ID = #{orderId}
  916. </select>
  917. <select id="getOrderMaterialNum" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
  918. SELECT count(oom.ORDER_MATERIAL_ID) FROM OMSTRUCK_ORDER_MATERIAL OOM
  919. WHERE OOM.ORDER_ID = #{orderId}
  920. </select>
  921. <select id="getWeightResultNum" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
  922. SELECT COUNT(TWR.WEIGHT_TASK_RESULT_ID) FROM TMSTRUCK_TOTAL_RESULT TTR
  923. LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
  924. ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  925. WHERE TTR.ORDER_ID = #{orderId}
  926. </select>
  927. <select id="selectNetWeightCount" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
  928. SELECT COUNT(TWR.WEIGHT_TASK_RESULT_ID) FROM TMSTRUCK_TOTAL_RESULT TTR
  929. LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
  930. ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  931. WHERE
  932. TWR.RESULT_NET_WEIGHT IS NOT NULL
  933. AND TTR.ORDER_ID = #{orderId}
  934. </select>
  935. <select id="getOrderIdsBySale" resultType="java.math.BigDecimal" parameterType="java.math.BigDecimal">
  936. SELECT OO.ORDER_ID FROM OMSTRUCK_ORDER OO
  937. WHERE OO.ORDER_PLAN_ID = #{toSplitSaleOrderMaterialID}
  938. and OO.ORDER_TYPE = 1
  939. </select>
  940. <select id="getOrderCapacityHistory" resultType="java.lang.String" parameterType="java.math.BigDecimal">
  941. SELECT OO.CAPACITYIDS FROM OMSTRUCK_ORDER OO
  942. WHERE OO.ORDER_ID = #{orderId}
  943. </select>
  944. </mapper>