StatisticalReportMapper.xml 22 KB

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