OmstruckOrderMapper.xml 48 KB

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