StatisticalReportMapper.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  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.StatisticalReportMapper">
  4. <sql id="orderBy">
  5. <if test="orderField != null and orderField != ''">
  6. order by "${orderField}"
  7. <if test="orderType != null and orderType != ''">
  8. ${orderType}
  9. </if>
  10. </if>
  11. </sql>
  12. <!--查询采购统计报表-->
  13. <select id="getAllPurchaseFLRLReport" parameterType="map" resultType="java.util.Map">
  14. select *
  15. from (select
  16. OO.ORDER_NUMBER "orderNumber",
  17. RC.CAPACITY_NUMBER "capacityNumber",
  18. TER.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
  19. TWR.RESULT_NET_WEIGHT "resultNetWeight",
  20. TQR.RESULT_DEDUCTION "resultDeduction",
  21. TUR.RESULT_END_TIME "resultEndTime",
  22. RW.WAREHOUSE_NAME "warehouseName",
  23. TRR.INSERT_TIME "insertTime",
  24. TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
  25. OO.INSERT_TIME "insertTimee",
  26. RGEN.GATEPOST_NAME "enGatepostName",
  27. RGOUT.GATEPOST_NAME "outGatepostName",
  28. RTCMAO.TRUCK_CALCULATE_NUMBER "grossCalculateNum",
  29. RTCPI.TRUCK_CALCULATE_NUMBER "tareCalculateNum",
  30. TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
  31. <if test="orderTypee == 17 or orderTypee == 18">
  32. RS.SUPPLIER_NAME "supplierName",
  33. </if>
  34. TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime"
  35. from OMSTRUCK_ORDER OO
  36. left join TMSTRUCK_TOTAL_RESULT TTR
  37. on TTR.ORDER_ID = OO.ORDER_ID
  38. left join RMS_CAPACITY RC
  39. on RC.CAPACITY_ID = OO.CAPACITY_ID
  40. left join TMSTRUCK_ENFACTORY_RESULT TER
  41. on TTR.RESULT_TOTAL_ID = TER.RESULT_TOTAL_ID
  42. left join RMS_GATEPOST RGEN --进厂门岗
  43. on RGEN.GATEPOST_ID = TER.GATEPOST_ID
  44. left join OMSTRUCK_ORDER_MATERIAL OOM
  45. on OOM.ORDER_ID = OO.ORDER_ID
  46. left join TMSTRUCK_WEIGHT_RESULT TWR
  47. on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  48. left join RMS_TRUCK_CALCULATE RTCMAO --毛重汽车衡
  49. on RTCMAO.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
  50. left join RMS_TRUCK_CALCULATE RTCPI --皮重汽车衡
  51. on RTCPI.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
  52. left join TMSTRUCK_UNLOAD_RESULT TUR
  53. on TUR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  54. left join RMS_WAREHOUSE RW
  55. on RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
  56. left join TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
  57. on TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  58. left join RMS_GATEPOST RGOUT --出厂门岗
  59. on RGOUT.GATEPOST_ID = TLFR.GATEPOST_ID
  60. left join TMSTRUCK_RECEIPT_RESULT TRR
  61. on TRR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  62. left join TMSTRUCK_QUALITY_RESULT TQR
  63. on TQR.TOTAL_RESULT_ID = TTR.RESULT_TOTAL_ID
  64. <if test="orderTypee == 17 or orderTypee == 18">
  65. left join AMS_PURCHASE_ORDER APO
  66. on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
  67. left join RMS_SUPPLIER RS
  68. on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
  69. </if>
  70. where OO.ORDER_STATUS in (5, 8, 9, 1, 2)
  71. and OO.ORDER_TYPE = #{orderTypee}
  72. )
  73. <where>
  74. <if test="orderNumber != null">
  75. <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
  76. "orderNumber" like '%${item}%'
  77. </foreach>
  78. </if>
  79. <if test="capacityNumber != null">
  80. and
  81. <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
  82. "capacityNumber" like '%${item}%'
  83. </foreach>
  84. </if>
  85. <if test="resultEntryGateTime != null">
  86. and
  87. <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
  88. "resultEntryGateTime" like '%${item}%'
  89. </foreach>
  90. </if>
  91. <if test="resultNetWeight != null">
  92. and
  93. <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
  94. "resultNetWeight" like '%${item}%'
  95. </foreach>
  96. </if>
  97. <if test="resultDeduction != null">
  98. and
  99. <foreach collection="resultDeduction" item="item" open="(" separator="or" close=")">
  100. "resultDeduction" like '%${item}%'
  101. </foreach>
  102. </if>
  103. <if test="resultEndTime != null">
  104. and
  105. <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
  106. "resultEndTime" like '%${item}%'
  107. </foreach>
  108. </if>
  109. <if test="warehouseName != null">
  110. and
  111. <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
  112. "warehouseName" like '%${item}%'
  113. </foreach>
  114. </if>
  115. <if test="insertTime != null">
  116. and
  117. <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
  118. "insertTime" like '%${item}%'
  119. </foreach>
  120. </if>
  121. <if test="resultOutGateTime != null">
  122. and
  123. <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
  124. "resultOutGateTime" like '%${item}%'
  125. </foreach>
  126. </if>
  127. </where>
  128. <include refid="orderBy"></include>
  129. <if test="orderField == null">
  130. order by "insertTimee" desc
  131. </if>
  132. </select>
  133. <!-- 查询销售统计报表 -->
  134. <select id="getAllSaleReport" parameterType="java.util.Map" resultType="java.util.Map">
  135. select
  136. *
  137. from (
  138. select OO.ORDER_NUMBER "orderNumber",
  139. RC.CAPACITY_NUMBER "capacityNumber",
  140. TER.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
  141. TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
  142. TWR.RESULT_TARE_WEIGHT "resultTareWeight",
  143. TLR.RESULT_LOAD_END_TIME "resultLoadEndTime",
  144. RW.WAREHOUSE_NAME "warehouseName",
  145. TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
  146. TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
  147. TWR.RESULT_NET_WEIGHT "resultNetWeight",
  148. TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
  149. RTCMAO.TRUCK_CALCULATE_NUMBER "maoCalculate",
  150. RTCPI.TRUCK_CALCULATE_NUMBER "piCalculate",
  151. RGEN.GATEPOST_NAME "enGatepostName",
  152. RGOUT.GATEPOST_NAME "outGatepostName",
  153. RCON.CONSIGNEE_COMPANY_NAME "receiveName"
  154. from OMSTRUCK_ORDER OO
  155. left join AMS_SALE_ORDER_MATERIAL ASOM
  156. on ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
  157. left join AMS_SALE_ORDER ASO
  158. on ASO.SALE_ORDER_ID = ASOM.SALE_ORDER_ID
  159. left join RMS_CONSIGNEE RCON
  160. on RCON.CONSIGNEE_ID = ASO.RECEIVE_ID
  161. join TMSTRUCK_TOTAL_RESULT TTR
  162. on TTR.ORDER_ID = OO.ORDER_ID
  163. join TMSTRUCK_LOAD_RESULT TLR
  164. on TLR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  165. left join RMS_WAREHOUSE RW
  166. on RW.WAREHOUSE_ID = TLR.LOADING_ID
  167. join TMSTRUCK_WEIGHT_RESULT TWR
  168. on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  169. left join RMS_TRUCK_CALCULATE RTCMAO
  170. on TWR.RESULT_GROSS_PLACE_ID = RTCMAO.TRUCK_CALCULATE_ID
  171. left join RMS_TRUCK_CALCULATE RTCPI
  172. on TWR.RESULT_TARE_PLACE_ID = RTCPI.TRUCK_CALCULATE_ID
  173. join TMSTRUCK_ENFACTORY_RESULT TER
  174. on TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  175. left join RMS_GATEPOST RGEN
  176. on RGEN.GATEPOST_ID = TER.GATEPOST_ID
  177. join TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
  178. on TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  179. left join RMS_GATEPOST RGOUT
  180. on RGOUT.GATEPOST_ID = TLFR.GATEPOST_ID
  181. join RMS_CAPACITY RC
  182. on RC.CAPACITY_ID = OO.CAPACITY_ID
  183. <if test="carrierSsoId != null">
  184. join RMS_CARRIER RCA
  185. on RCA.CARRIER_ID = RC.CARRIER_ID
  186. </if>
  187. where OO.ORDER_TYPE in (1, 2)
  188. <if test="carrierSsoId != null">
  189. and RCA.CARRIER_SSO_ID = #{carrierSsoId}
  190. </if>
  191. )
  192. <where>
  193. <if test="orderNumber != null">
  194. <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
  195. "orderNumber" like '%${item}%'
  196. </foreach>
  197. </if>
  198. <if test="capacityNumber != null">
  199. and
  200. <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
  201. "capacityNumber" like '%${item}%'
  202. </foreach>
  203. </if>
  204. <if test="resultEntryGateTime != null">
  205. and
  206. <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
  207. "resultEntryGateTime" like '%${item}%'
  208. </foreach>
  209. </if>
  210. <if test="resultTareWeightTime != null">
  211. and
  212. <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
  213. "resultTareWeightTime" like '%${item}%'
  214. </foreach>
  215. </if>
  216. <if test="resultTareWeight != null">
  217. and
  218. <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
  219. "resultTareWeight" like '%${item}%'
  220. </foreach>
  221. </if>
  222. <if test="resultLoadEndTime != null">
  223. and
  224. <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
  225. "resultLoadEndTime" like '%${item}%'
  226. </foreach>
  227. </if>
  228. <if test="warehouseName != null">
  229. and
  230. <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
  231. "warehouseName" like '%${item}%'
  232. </foreach>
  233. </if>
  234. <if test="resultGrossWeightTime != null">
  235. and
  236. <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
  237. "resultGrossWeightTime" like '%${item}%'
  238. </foreach>
  239. </if>
  240. <if test="resultGrossWeight != null">
  241. and
  242. <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
  243. "resultGrossWeight" like '%${item}%'
  244. </foreach>
  245. </if>
  246. <if test="resultNetWeight != null">
  247. and
  248. <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
  249. "resultNetWeight" like '%${item}%'
  250. </foreach>
  251. </if>
  252. <if test="resultOutGateTime != null">
  253. and
  254. <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
  255. "resultOutGateTime" like '%${item}%'
  256. </foreach>
  257. </if>
  258. </where>
  259. <include refid="orderBy"></include>
  260. <if test="orderField == null">
  261. order by "resultOutGateTime" desc, "resultEntryGateTime" desc
  262. </if>
  263. </select>
  264. <!-- 查询零星进厂物资统计报表-->
  265. <select id="getSporadicSuppliesReport1" resultType="java.util.Map">
  266. select
  267. *
  268. from (
  269. select OO.ORDER_NUMBER "orderNumber",
  270. RC.CAPACITY_NUMBER "capacityNumber",
  271. TER.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
  272. TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
  273. TWR.RESULT_TARE_WEIGHT "resultTareWeight",
  274. TUR.RESULT_END_TIME "resultEndTime",
  275. RW.WAREHOUSE_NAME "warehouseName",
  276. TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
  277. TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
  278. TWR.RESULT_NET_WEIGHT "resultNetWeight",
  279. TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
  280. -- 查询进厂门岗
  281. RG2.GATEPOST_NAME "gatepostEntryName",
  282. -- 出厂门岗
  283. RG.GATEPOST_NAME "gatepostOutName",
  284. -- 计皮汽车衡
  285. RTC1.TRUCK_CALCULATE_NUMBER "truckTareCalculate",
  286. -- 计毛汽车衡
  287. RTC2.TRUCK_CALCULATE_NUMBER "truckCrossCalculate"
  288. from OMSTRUCK_ORDER OO
  289. join TMSTRUCK_TOTAL_RESULT TTR
  290. on TTR.ORDER_ID = OO.ORDER_ID
  291. join TMSTRUCK_UNLOAD_RESULT TUR
  292. on TUR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  293. left join RMS_WAREHOUSE RW
  294. on RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
  295. join TMSTRUCK_WEIGHT_RESULT TWR
  296. on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  297. left join RMS_TRUCK_CALCULATE RTC2
  298. on RTC2.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
  299. left join RMS_TRUCK_CALCULATE RTC1
  300. on RTC1.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
  301. join TMSTRUCK_ENFACTORY_RESULT TER
  302. on TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  303. left join RMS_GATEPOST RG2
  304. on RG2.GATEPOST_ID =TER.GATEPOST_ID
  305. join TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
  306. on TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  307. left join RMS_GATEPOST RG
  308. on TLFR.GATEPOST_ID =RG.GATEPOST_ID
  309. left join RMS_CAPACITY RC
  310. on RC.CAPACITY_ID = OO.CAPACITY_ID
  311. <if test="carrierSsoId != null">
  312. join RMS_CARRIER RCA
  313. on RCA.CARRIER_ID = RC.CARRIER_ID
  314. </if>
  315. where OO.ORDER_TYPE in (12,15)
  316. <if test="carrierSsoId != null">
  317. and RCA.CARRIER_SSO_ID = #{carrierSsoId}
  318. </if>
  319. )
  320. <where>
  321. <if test="orderNumber != null">
  322. <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
  323. "orderNumber" like '%${item}%'
  324. </foreach>
  325. </if>
  326. <if test="capacityNumber != null">
  327. and
  328. <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
  329. "capacityNumber" like '%${item}%'
  330. </foreach>
  331. </if>
  332. <if test="resultEntryGateTime != null">
  333. and
  334. <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
  335. "resultEntryGateTime" like '%${item}%'
  336. </foreach>
  337. </if>
  338. <if test="resultTareWeightTime != null">
  339. and
  340. <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
  341. "resultTareWeightTime" like '%${item}%'
  342. </foreach>
  343. </if>
  344. <if test="resultTareWeight != null">
  345. and
  346. <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
  347. "resultTareWeight" like '%${item}%'
  348. </foreach>
  349. </if>
  350. <if test="resultEndTime != null">
  351. and
  352. <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
  353. "resultEndTime" like '%${item}%'
  354. </foreach>
  355. </if>
  356. <if test="warehouseName != null">
  357. and
  358. <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
  359. "warehouseName" like '%${item}%'
  360. </foreach>
  361. </if>
  362. <if test="resultGrossWeightTime != null">
  363. and
  364. <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
  365. "resultGrossWeightTime" like '%${item}%'
  366. </foreach>
  367. </if>
  368. <if test="resultGrossWeight != null">
  369. and
  370. <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
  371. "resultGrossWeight" like '%${item}%'
  372. </foreach>
  373. </if>
  374. <if test="resultNetWeight != null">
  375. and
  376. <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
  377. "resultNetWeight" like '%${item}%'
  378. </foreach>
  379. </if>
  380. <if test="resultOutGateTime != null">
  381. and
  382. <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
  383. "resultOutGateTime" like '%${item}%'
  384. </foreach>
  385. </if>
  386. </where>
  387. <include refid="orderBy"></include>
  388. <if test="orderField == null">
  389. order by "resultOutGateTime" desc, "resultEntryGateTime" desc
  390. </if>
  391. </select>
  392. <!-- 查询零星出厂物资统计报表-->
  393. <select id="getSporadicSuppliesReport2" resultType="java.util.Map">
  394. select
  395. *
  396. from (
  397. select OO.ORDER_NUMBER "orderNumber",
  398. RC.CAPACITY_NUMBER "capacityNumber",
  399. TER.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
  400. TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
  401. TWR.RESULT_TARE_WEIGHT "resultTareWeight",
  402. TLR.RESULT_LOAD_END_TIME "resultLoadEndTime",
  403. RW.WAREHOUSE_NAME "warehouseName",
  404. TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
  405. TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
  406. TWR.RESULT_NET_WEIGHT "resultNetWeight",
  407. TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
  408. -- 查询进厂门岗
  409. RG2.GATEPOST_NAME "gatepostEntryName",
  410. -- 出厂门岗
  411. RG.GATEPOST_NAME "gatepostOutName",
  412. -- 计皮汽车衡
  413. RTC1.TRUCK_CALCULATE_NUMBER "truckTareCalculate",
  414. -- 计毛汽车衡
  415. RTC2.TRUCK_CALCULATE_NUMBER "truckCrossCalculate"
  416. from OMSTRUCK_ORDER OO
  417. join TMSTRUCK_TOTAL_RESULT TTR
  418. on TTR.ORDER_ID = OO.ORDER_ID
  419. join TMSTRUCK_LOAD_RESULT TLR
  420. on TLR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  421. left join RMS_WAREHOUSE RW
  422. on RW.WAREHOUSE_ID = TLR.LOADING_ID
  423. join TMSTRUCK_WEIGHT_RESULT TWR
  424. on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  425. left join RMS_TRUCK_CALCULATE RTC2
  426. on RTC2.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
  427. left join RMS_TRUCK_CALCULATE RTC1
  428. on RTC1.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
  429. join TMSTRUCK_ENFACTORY_RESULT TER
  430. on TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  431. left join RMS_GATEPOST RG2
  432. on RG2.GATEPOST_ID =TER.GATEPOST_ID
  433. join TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
  434. on TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
  435. left join RMS_GATEPOST RG
  436. on TLFR.GATEPOST_ID =RG.GATEPOST_ID
  437. left join RMS_CAPACITY RC
  438. on RC.CAPACITY_ID = OO.CAPACITY_ID
  439. <if test="carrierSsoId != null">
  440. join RMS_CARRIER RCA
  441. on RCA.CARRIER_ID = RC.CARRIER_ID
  442. </if>
  443. where OO.ORDER_TYPE in (13,16)
  444. <if test="carrierSsoId != null">
  445. and RCA.CARRIER_SSO_ID = #{carrierSsoId}
  446. </if>
  447. )
  448. <where>
  449. <if test="orderNumber != null">
  450. <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
  451. "orderNumber" like '%${item}%'
  452. </foreach>
  453. </if>
  454. <if test="capacityNumber != null">
  455. and
  456. <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
  457. "capacityNumber" like '%${item}%'
  458. </foreach>
  459. </if>
  460. <if test="resultEntryGateTime != null">
  461. and
  462. <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
  463. "resultEntryGateTime" like '%${item}%'
  464. </foreach>
  465. </if>
  466. <if test="resultTareWeightTime != null">
  467. and
  468. <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
  469. "resultTareWeightTime" like '%${item}%'
  470. </foreach>
  471. </if>
  472. <if test="resultTareWeight != null">
  473. and
  474. <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
  475. "resultTareWeight" like '%${item}%'
  476. </foreach>
  477. </if>
  478. <if test="resultLoadEndTime != null">
  479. and
  480. <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
  481. "resultLoadEndTime" like '%${item}%'
  482. </foreach>
  483. </if>
  484. <if test="warehouseName != null">
  485. and
  486. <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
  487. "warehouseName" like '%${item}%'
  488. </foreach>
  489. </if>
  490. <if test="resultGrossWeightTime != null">
  491. and
  492. <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
  493. "resultGrossWeightTime" like '%${item}%'
  494. </foreach>
  495. </if>
  496. <if test="resultGrossWeight != null">
  497. and
  498. <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
  499. "resultGrossWeight" like '%${item}%'
  500. </foreach>
  501. </if>
  502. <if test="resultNetWeight != null">
  503. and
  504. <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
  505. "resultNetWeight" like '%${item}%'
  506. </foreach>
  507. </if>
  508. <if test="resultOutGateTime != null">
  509. and
  510. <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
  511. "resultOutGateTime" like '%${item}%'
  512. </foreach>
  513. </if>
  514. </where>
  515. <include refid="orderBy"></include>
  516. <if test="orderField == null">
  517. order by "resultOutGateTime" desc, "resultEntryGateTime" desc
  518. </if>
  519. </select>
  520. </mapper>