TmstruckReceiptResultMapper.xml 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923
  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.TmstruckReceiptResultMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckReceiptResult">
  5. <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
  6. <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
  7. <result column="RESULT_EMPTY_CONTAINER_PHOTO" jdbcType="VARCHAR" property="resultEmptyContainerPhoto" />
  8. <result column="RESULT_SIGNED_NOTE_PHOTO" jdbcType="VARCHAR" property="resultSignedNotePhoto" />
  9. <result column="RESULT_RECEIVE_NOTE_PHOTO" jdbcType="VARCHAR" property="resultReceiveNotePhoto" />
  10. <result column="WAREHOUSE_ID" jdbcType="DECIMAL" property="warehouseId" />
  11. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
  12. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
  13. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
  14. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  15. <result column="STATUS" jdbcType="DECIMAL" property="status" />
  16. <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
  17. <result column="RESULT_ARRIVAL_ADDRESS" jdbcType="VARCHAR" property="resultArrivalAddress" />
  18. </resultMap>
  19. <sql id="columns">
  20. RESULT_ID, RESULT_TOTAL_ID, RESULT_EMPTY_CONTAINER_PHOTO, RESULT_SIGNED_NOTE_PHOTO,
  21. RESULT_RECEIVE_NOTE_PHOTO, WAREHOUSE_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
  22. UPDATE_TIME,STATUS, INSERT_UPDATE_REMARK, RESULT_ARRIVAL_ADDRESS
  23. </sql>
  24. <sql id="columns_alias">
  25. t.RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_EMPTY_CONTAINER_PHOTO, t.RESULT_SIGNED_NOTE_PHOTO,
  26. t.RESULT_RECEIVE_NOTE_PHOTO, t.WAREHOUSE_ID, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
  27. t.UPDATE_TIME,STATUS, t.INSERT_UPDATE_REMARK, t.RESULT_ARRIVAL_ADDRESS
  28. </sql>
  29. <sql id="select">
  30. SELECT <include refid="columns" /> FROM TMSTRUCK_RECEIPT_RESULT
  31. </sql>
  32. <sql id="select_alias">
  33. SELECT <include refid="columns_alias" /> FROM TMSTRUCK_RECEIPT_RESULT t
  34. </sql>
  35. <sql id="where">
  36. <where>
  37. <if test="resultId != null">
  38. and RESULT_ID = #{resultId}
  39. </if>
  40. <if test="resultTotalId != null">
  41. and RESULT_TOTAL_ID = #{resultTotalId}
  42. </if>
  43. <if test="resultEmptyContainerPhoto != null and resultEmptyContainerPhoto != ''">
  44. and RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto}
  45. </if>
  46. <if test="resultSignedNotePhoto != null and resultSignedNotePhoto != ''">
  47. and RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto}
  48. </if>
  49. <if test="resultReceiveNotePhoto != null and resultReceiveNotePhoto != ''">
  50. and RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto}
  51. </if>
  52. <if test="warehouseId != null">
  53. and WAREHOUSE_ID = #{warehouseId}
  54. </if>
  55. <if test="insertUsername != null and insertUsername != ''">
  56. and INSERT_USERNAME = #{insertUsername}
  57. </if>
  58. <if test="insertTime != null">
  59. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  60. </if>
  61. <if test="updateUsername != null and updateUsername != ''">
  62. and UPDATE_USERNAME = #{updateUsername}
  63. </if>
  64. <if test="updateTime != null">
  65. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  66. </if>
  67. <if test="status != null">
  68. and STATUS = #{status}
  69. </if>
  70. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  71. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  72. </if>
  73. <if test="resultArrivalAddress != null and resultArrivalAddress != ''">
  74. and RESULT_ARRIVAL_ADDRESS = #{resultArrivalAddress}
  75. </if>
  76. </where>
  77. </sql>
  78. <sql id="whereLike">
  79. <where>
  80. <if test="resultId != null">
  81. and RESULT_ID = #{resultId}
  82. </if>
  83. <if test="resultTotalId != null">
  84. and RESULT_TOTAL_ID = #{resultTotalId}
  85. </if>
  86. <if test="resultEmptyContainerPhoto != null and resultEmptyContainerPhoto != ''">
  87. and RESULT_EMPTY_CONTAINER_PHOTO LIKE '%${resultEmptyContainerPhoto}%'
  88. </if>
  89. <if test="resultSignedNotePhoto != null and resultSignedNotePhoto != ''">
  90. and RESULT_SIGNED_NOTE_PHOTO LIKE '%${resultSignedNotePhoto}%'
  91. </if>
  92. <if test="resultReceiveNotePhoto != null and resultReceiveNotePhoto != ''">
  93. and RESULT_RECEIVE_NOTE_PHOTO LIKE '%${resultReceiveNotePhoto}%'
  94. </if>
  95. <if test="warehouseId != null">
  96. and WAREHOUSE_ID = #{warehouseId}
  97. </if>
  98. <if test="insertUsername != null and insertUsername != ''">
  99. and INSERT_USERNAME LIKE '%${insertUsername}%'
  100. </if>
  101. <if test="insertTime != null">
  102. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  103. </if>
  104. <if test="updateUsername != null and updateUsername != ''">
  105. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  106. </if>
  107. <if test="updateTime != null">
  108. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  109. </if>
  110. <if test="status != null">
  111. and STATUS = #{status}
  112. </if>
  113. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  114. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  115. </if>
  116. <if test="resultArrivalAddress != null and resultArrivalAddress != ''">
  117. and RESULT_ARRIVAL_ADDRESS LIKE '%${resultArrivalAddress}%'
  118. </if>
  119. </where>
  120. </sql>
  121. <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
  122. delete from TMSTRUCK_RECEIPT_RESULT
  123. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  124. </delete>
  125. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  126. delete from TMSTRUCK_RECEIPT_RESULT
  127. where 1!=1
  128. <if test="resultTotalId != null">
  129. or RESULT_TOTAL_ID = #{resultTotalId}
  130. </if>
  131. <if test="resultEmptyContainerPhoto != null and resultEmptyContainerPhoto != ''">
  132. or RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto}
  133. </if>
  134. <if test="resultSignedNotePhoto != null and resultSignedNotePhoto != ''">
  135. or RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto}
  136. </if>
  137. <if test="resultReceiveNotePhoto != null and resultReceiveNotePhoto != ''">
  138. or RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto}
  139. </if>
  140. <if test="warehouseId != null">
  141. or WAREHOUSE_ID = #{warehouseId}
  142. </if>
  143. <if test="insertUsername != null and insertUsername != ''">
  144. or INSERT_USERNAME = #{insertUsername}
  145. </if>
  146. <if test="insertTime != null">
  147. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  148. </if>
  149. <if test="updateUsername != null and updateUsername != ''">
  150. or UPDATE_USERNAME = #{updateUsername}
  151. </if>
  152. <if test="updateTime != null">
  153. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  154. </if>
  155. <if test="status != null">
  156. or STATUS = '#{status}'
  157. </if>
  158. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  159. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  160. </if>
  161. <if test="resultArrivalAddress != null and resultArrivalAddress != ''">
  162. or RESULT_ARRIVAL_ADDRESS = #{resultArrivalAddress}
  163. </if>
  164. </delete>
  165. <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
  166. insert into TMSTRUCK_RECEIPT_RESULT (RESULT_ID, RESULT_TOTAL_ID, RESULT_EMPTY_CONTAINER_PHOTO,
  167. RESULT_SIGNED_NOTE_PHOTO, RESULT_RECEIVE_NOTE_PHOTO,
  168. WAREHOUSE_ID, INSERT_USERNAME, INSERT_TIME,
  169. UPDATE_USERNAME, UPDATE_TIME,STATUS, INSERT_UPDATE_REMARK,
  170. RESULT_ARRIVAL_ADDRESS)
  171. values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
  172. #{resultSignedNotePhoto,jdbcType=VARCHAR}, #{resultReceiveNotePhoto,jdbcType=VARCHAR},
  173. #{warehouseId,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
  174. #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},#{status,jdbcType=DECIMAL}, #{insertUpdateRemark,jdbcType=VARCHAR},
  175. #{resultArrivalAddress,jdbcType=VARCHAR})
  176. </insert>
  177. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
  178. insert into TMSTRUCK_RECEIPT_RESULT
  179. <trim prefix="(" suffix=")" suffixOverrides=",">
  180. <if test="resultId != null">
  181. RESULT_ID,
  182. </if>
  183. <if test="resultTotalId != null">
  184. RESULT_TOTAL_ID,
  185. </if>
  186. <if test="resultEmptyContainerPhoto != null">
  187. RESULT_EMPTY_CONTAINER_PHOTO,
  188. </if>
  189. <if test="resultSignedNotePhoto != null">
  190. RESULT_SIGNED_NOTE_PHOTO,
  191. </if>
  192. <if test="resultReceiveNotePhoto != null">
  193. RESULT_RECEIVE_NOTE_PHOTO,
  194. </if>
  195. <if test="warehouseId != null">
  196. WAREHOUSE_ID,
  197. </if>
  198. <if test="insertUsername != null">
  199. INSERT_USERNAME,
  200. </if>
  201. <if test="insertTime != null">
  202. INSERT_TIME,
  203. </if>
  204. <if test="updateUsername != null">
  205. UPDATE_USERNAME,
  206. </if>
  207. <if test="updateTime != null">
  208. UPDATE_TIME,
  209. </if>
  210. <if test="status != null">
  211. STATUS,
  212. </if>
  213. <if test="insertUpdateRemark != null">
  214. INSERT_UPDATE_REMARK,
  215. </if>
  216. <if test="resultArrivalAddress != null">
  217. RESULT_ARRIVAL_ADDRESS,
  218. </if>
  219. </trim>
  220. <trim prefix="values (" suffix=")" suffixOverrides=",">
  221. <if test="resultId != null">
  222. #{resultId,jdbcType=DECIMAL},
  223. </if>
  224. <if test="resultTotalId != null">
  225. #{resultTotalId,jdbcType=DECIMAL},
  226. </if>
  227. <if test="resultEmptyContainerPhoto != null">
  228. #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
  229. </if>
  230. <if test="resultSignedNotePhoto != null">
  231. #{resultSignedNotePhoto,jdbcType=VARCHAR},
  232. </if>
  233. <if test="resultReceiveNotePhoto != null">
  234. #{resultReceiveNotePhoto,jdbcType=VARCHAR},
  235. </if>
  236. <if test="warehouseId != null">
  237. #{warehouseId,jdbcType=DECIMAL},
  238. </if>
  239. <if test="insertUsername != null">
  240. #{insertUsername,jdbcType=VARCHAR},
  241. </if>
  242. <if test="insertTime != null">
  243. #{insertTime,jdbcType=TIMESTAMP},
  244. </if>
  245. <if test="updateUsername != null">
  246. #{updateUsername,jdbcType=VARCHAR},
  247. </if>
  248. <if test="updateTime != null">
  249. #{updateTime,jdbcType=TIMESTAMP},
  250. </if>
  251. <if test="status != null">
  252. #{status,jdbcType=TIMESTAMP},
  253. </if>
  254. <if test="insertUpdateRemark != null">
  255. #{insertUpdateRemark,jdbcType=VARCHAR},
  256. </if>
  257. <if test="resultArrivalAddress != null">
  258. #{resultArrivalAddress,jdbcType=VARCHAR},
  259. </if>
  260. </trim>
  261. </insert>
  262. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
  263. update TMSTRUCK_RECEIPT_RESULT
  264. set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
  265. RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
  266. RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=VARCHAR},
  267. RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=VARCHAR},
  268. WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
  269. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  270. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  271. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  272. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  273. STATUS = #{status,jdbcType=DECIMAL},
  274. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  275. RESULT_ARRIVAL_ADDRESS = #{resultArrivalAddress,jdbcType=VARCHAR}
  276. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  277. </update>
  278. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
  279. update TMSTRUCK_RECEIPT_RESULT
  280. <set>
  281. <if test="resultTotalId != null">
  282. RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
  283. </if>
  284. <if test="resultEmptyContainerPhoto != null">
  285. RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
  286. </if>
  287. <if test="resultSignedNotePhoto != null">
  288. RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=VARCHAR},
  289. </if>
  290. <if test="resultReceiveNotePhoto != null">
  291. RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=VARCHAR},
  292. </if>
  293. <if test="warehouseId != null">
  294. WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
  295. </if>
  296. <if test="insertUsername != null">
  297. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  298. </if>
  299. <if test="insertTime != null">
  300. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  301. </if>
  302. <if test="updateUsername != null">
  303. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  304. </if>
  305. <if test="updateTime != null">
  306. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  307. </if>
  308. <if test="status != null">
  309. STATUS = #{status,jdbcType=DECIMAL},
  310. </if>
  311. <if test="insertUpdateRemark != null">
  312. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  313. </if>
  314. <if test="resultArrivalAddress != null">
  315. RESULT_ARRIVAL_ADDRESS = #{resultArrivalAddress,jdbcType=VARCHAR},
  316. </if>
  317. </set>
  318. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  319. </update>
  320. <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
  321. <include refid="select" />
  322. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  323. </select>
  324. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  325. <include refid="select" />
  326. <include refid="where" />
  327. </select>
  328. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  329. <include refid="select" />
  330. <include refid="whereLike" />
  331. </select>
  332. <insert id="batchInsert" parameterType="java.util.List">
  333. insert into TMSTRUCK_RECEIPT_RESULT
  334. (RESULT_ID,
  335. RESULT_TOTAL_ID, RESULT_EMPTY_CONTAINER_PHOTO,
  336. RESULT_SIGNED_NOTE_PHOTO, RESULT_RECEIVE_NOTE_PHOTO,
  337. WAREHOUSE_ID, INSERT_USERNAME,
  338. INSERT_TIME, UPDATE_USERNAME,
  339. UPDATE_TIME, STATUS,INSERT_UPDATE_REMARK,
  340. RESULT_ARRIVAL_ADDRESS)
  341. ( <foreach collection="list" item="item" separator="union all">
  342. select
  343. #{item.resultId,jdbcType=DECIMAL},
  344. #{item.resultTotalId,jdbcType=DECIMAL}, #{item.resultEmptyContainerPhoto,jdbcType=VARCHAR},
  345. #{item.resultSignedNotePhoto,jdbcType=VARCHAR}, #{item.resultReceiveNotePhoto,jdbcType=VARCHAR},
  346. #{item.warehouseId,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
  347. #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
  348. #{item.updateTime,jdbcType=TIMESTAMP},#{item.status,jdbcType=DECIMAL}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
  349. #{item.resultArrivalAddress,jdbcType=VARCHAR} from dual
  350. </foreach> )
  351. </insert>
  352. <update id="batchUpdate" parameterType="java.util.List">
  353. update TMSTRUCK_RECEIPT_RESULT
  354. set
  355. RESULT_ID=
  356. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  357. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
  358. </foreach>
  359. ,RESULT_TOTAL_ID=
  360. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  361. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
  362. </foreach>
  363. ,RESULT_EMPTY_CONTAINER_PHOTO=
  364. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  365. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEmptyContainerPhoto,jdbcType=VARCHAR}
  366. </foreach>
  367. ,RESULT_SIGNED_NOTE_PHOTO=
  368. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  369. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultSignedNotePhoto,jdbcType=VARCHAR}
  370. </foreach>
  371. ,RESULT_RECEIVE_NOTE_PHOTO=
  372. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  373. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultReceiveNotePhoto,jdbcType=VARCHAR}
  374. </foreach>
  375. ,WAREHOUSE_ID=
  376. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  377. when #{item.resultId,jdbcType=DECIMAL} then #{item.warehouseId,jdbcType=DECIMAL}
  378. </foreach>
  379. ,INSERT_USERNAME=
  380. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  381. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  382. </foreach>
  383. ,INSERT_TIME=
  384. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  385. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  386. </foreach>
  387. ,UPDATE_USERNAME=
  388. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  389. when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  390. </foreach>
  391. ,UPDATE_TIME=
  392. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  393. when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  394. </foreach>
  395. ,STATUS=
  396. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  397. when #{item.resultId,jdbcType=DECIMAL} then #{item.status,jdbcType=DECIMAL}
  398. </foreach>
  399. ,INSERT_UPDATE_REMARK=
  400. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  401. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  402. </foreach>
  403. ,RESULT_ARRIVAL_ADDRESS=
  404. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  405. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultArrivalAddress,jdbcType=VARCHAR}
  406. </foreach>
  407. where RESULT_ID in
  408. <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
  409. #{item.resultId,jdbcType=DECIMAL}
  410. </foreach>
  411. </update>
  412. <delete id="batchDelete" parameterType="java.util.List">
  413. delete from TMSTRUCK_RECEIPT_RESULT
  414. where RESULT_ID in
  415. <foreach close=")" collection="list" item="id" open="(" separator=",">
  416. #{id}
  417. </foreach>
  418. </delete>
  419. <!-- 友情提示!!!-->
  420. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  421. <!-- 获取最大ID值 -->
  422. <!-- 通过总实绩ID 查询签收实绩ID -->
  423. <select id="getIdByTotalResultId" parameterType="int" resultType="int">
  424. select TRR.RESULT_ID from TMSTRUCK_RECEIPT_RESULT TRR where TRR.RESULT_TOTAL_ID = #{totalResultId}
  425. </select>
  426. <!--通过总实绩Id 更新 状态码 为 1 已签收-->
  427. <update id="updateByTotalResultId" parameterType="java.util.Map">
  428. update TMSTRUCK_RECEIPT_RESULT
  429. <set>
  430. <if test="warehouseId != null">
  431. WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
  432. </if>
  433. <if test="insertUsername != null">
  434. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  435. </if>
  436. <if test="insertTime != null">
  437. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  438. </if>
  439. <if test="updateUsername != null">
  440. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  441. </if>
  442. <if test="updateTime != null">
  443. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  444. </if>
  445. <if test="insertUpdateRemark != null">
  446. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  447. </if>
  448. <if test="status != null">
  449. STATUS = #{status,jdbcType=DECIMAL},
  450. </if>
  451. <if test="resultEmptyContainerPhoto != null">
  452. RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=BLOB},
  453. </if>
  454. <if test="resultSignedNotePhoto != null">
  455. RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=BLOB},
  456. </if>
  457. <if test="resultReceiveNotePhoto != null">
  458. RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=BLOB},
  459. </if>
  460. </set>
  461. where RESULT_TOTAL_ID = #{resultTotalId}
  462. </update>
  463. <!-- 通过签收时间排序 -->
  464. <sql id="orderBy">
  465. <if test="orderField != null and orderField != ''">
  466. order by "${orderField}"
  467. <if test="orderType != null and orderType != ''">
  468. ${orderType}
  469. </if>
  470. </if>
  471. <if test="orderField == null ">
  472. order by "insertTime" desc
  473. </if>
  474. </sql>
  475. <!-- 查询所有签收实绩 -->
  476. <select id="getCGReceiptResult" parameterType="java.util.Map" resultType="java.util.Map">
  477. select
  478. *
  479. from (
  480. select
  481. OO.ORDER_ID "orderId",
  482. TRR.RESULT_ID "resultId",
  483. APO.PURCHASE_ORDER_NO "purchaseOrderNo",
  484. RM.MATERIAL_NAME "materialName",
  485. OO.ORDER_NUMBER "orderNumber",
  486. RC.CAPACITY_NUMBER "capacityNumber",
  487. DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
  488. TUR.UNLOAD_STATUS "unloadStatus",
  489. TWR.RESULT_NET_WEIGHT "resultNetWeight",
  490. RW.WAREHOUSE_NAME "warehouseName",
  491. TRR.INSERT_USERNAME "insertUsername",
  492. TRR.INSERT_TIME "insertTime"
  493. from TMSTRUCK_RECEIPT_RESULT TRR
  494. left join TMSTRUCK_TOTAL_RESULT TTR
  495. on TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
  496. left join OMSTRUCK_ORDER OO
  497. on OO.ORDER_ID = TTR.ORDER_ID
  498. left join AMS_PURCHASE_ORDER APO
  499. on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
  500. left join DIL_BATCH DB
  501. on DB.BATCH_ID = APO.BATCH_ID
  502. left join RMS_CAPACITY RC
  503. on RC.CAPACITY_ID = OO.CAPACITY_ID
  504. left join TMSTRUCK_WEIGHT_RESULT TWR
  505. on TWR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
  506. left join TMSTRUCK_UNLOAD_RESULT TUR
  507. on TUR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
  508. left join OMSTRUCK_ORDER_MATERIAL OOM
  509. on OOM.ORDER_ID = OO.ORDER_ID
  510. left join RMS_MATERIAL RM
  511. on OOM.MATERIAL_ID = RM.MATERIAL_ID
  512. left join RMS_WAREHOUSE RW
  513. on RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
  514. where TRR.STATUS = 1 and OO.ORDER_TYPE = #{orderTypee}
  515. )
  516. <where>
  517. <if test="purchaseOrderNo != null">
  518. <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
  519. "purchaseOrderNo" like '%${item}%'
  520. </foreach>
  521. </if>
  522. <if test="materialName != null">
  523. and
  524. <foreach collection="materialName" item="item" open="(" separator="or" close=")">
  525. "materialName" like '%${item}%'
  526. </foreach>
  527. </if>
  528. <if test="orderNumber != null">
  529. and
  530. <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
  531. "orderNumber" like '%${item}%'
  532. </foreach>
  533. </if>
  534. <if test="capacityNumber != null">
  535. and
  536. <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
  537. "capacityNumber" like '%${item}%'
  538. </foreach>
  539. </if>
  540. <if test="resultForeignShipName != null">
  541. and
  542. <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
  543. "resultForeignShipName" like '%${item}%'
  544. </foreach>
  545. </if>
  546. <if test="unloadStatus != null">
  547. and
  548. <foreach collection="unloadStatus" item="item" open="(" separator="or" close=")">
  549. "unloadStatus" like '%${item}%'
  550. </foreach>
  551. </if>
  552. <if test="resultNetWeight != null">
  553. and
  554. <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
  555. "resultNetWeight" like '%${item}%'
  556. </foreach>
  557. </if>
  558. <if test="warehouseName != null">
  559. and
  560. <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
  561. "warehouseName" like '%${item}%'
  562. </foreach>
  563. </if>
  564. <if test="insertUsername != null">
  565. and
  566. <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
  567. "insertUsername" like '%${item}%'
  568. </foreach>
  569. </if>
  570. </where>
  571. <include refid="orderBy"></include>
  572. </select>
  573. <!-- 查询内转钢材到异地库收货实绩-->
  574. <select id="getSteelNzReceiptResult" parameterType="java.util.Map" resultType="java.util.Map">
  575. SELECT *
  576. FROM (
  577. SELECT TRR.RESULT_ID "resultId",
  578. OO.ORDER_NUMBER "orderNumber",
  579. RC.CAPACITY_NUMBER "capacityNumber",
  580. RW.WAREHOUSE_NAME "warehouseName",
  581. TRR.INSERT_TIME "insertTime",
  582. TRR.INSERT_USERNAME "insertUsername"
  583. FROM TMSTRUCK_RECEIPT_RESULT TRR
  584. LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
  585. ON TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
  586. LEFT JOIN OMSTRUCK_ORDER OO
  587. ON OO.ORDER_ID = TTR.ORDER_ID
  588. LEFT JOIN RMS_WAREHOUSE RW
  589. ON RW.WAREHOUSE_ID = TRR.WAREHOUSE_ID
  590. LEFT JOIN RMS_CAPACITY RC
  591. ON RC.CAPACITY_ID = OO.CAPACITY_ID
  592. WHERE OO.ORDER_TYPE = 4 AND TRR.STATUS = 1
  593. )
  594. <where>
  595. <if test="orderNumber != null">
  596. <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
  597. "orderNumber" like '%${item}%'
  598. </foreach>
  599. </if>
  600. <if test="capacityNumber != null">
  601. and
  602. <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
  603. "capacityNumber" like '%${item}%'
  604. </foreach>
  605. </if>
  606. <if test="warehouseName != null">
  607. and
  608. <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
  609. "warehouseName" like '%${item}%'
  610. </foreach>
  611. </if>
  612. <if test="insertTime != null">
  613. and
  614. <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
  615. "insertTime" like '%${item}%'
  616. </foreach>
  617. </if>
  618. <if test="insertUsername != null">
  619. and
  620. <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
  621. "insertUsername" like '%${item}%'
  622. </foreach>
  623. </if>
  624. </where>
  625. <include refid="orderBy"></include>
  626. </select>
  627. <select id="getInwardReceipt" parameterType="java.util.Map" resultType="java.util.Map">
  628. select *
  629. from (
  630. select TRR.RESULT_ID "resultId",
  631. APO.PURCHASE_ORDER_NO "purchaseOrderNo",
  632. RM.MATERIAL_NAME "materialName",
  633. OO.ORDER_NUMBER "orderNumber",
  634. RC.CAPACITY_NUMBER "capacityNumber",
  635. DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
  636. TUR.UNLOAD_STATUS "unloadStatus",
  637. TWR.RESULT_NET_WEIGHT "resultNetWeight",
  638. tqr.result_issampling "issampling",
  639. TRR.INSERT_USERNAME "insertUsername",
  640. TRR.INSERT_TIME "insertTime",
  641. RW.WAREHOUSE_NAME "warehouseName"
  642. from TMSTRUCK_RECEIPT_RESULT TRR
  643. left join TMSTRUCK_TOTAL_RESULT TTR
  644. on TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
  645. left join OMSTRUCK_ORDER OO
  646. on OO.ORDER_ID = TTR.ORDER_ID
  647. left join AMSTRUCK_INWARD_PLAN AIP
  648. on AIP.PLAN_ID = OO.ORDER_PLAN_ID
  649. left join AMSTRUCK_REQUIREMENT_PLAN ARP
  650. on ARP.PLAN_ID = AIP.PLAN_ID
  651. left join AMSTRUCK_INWARD_REQUIREMENT AIR
  652. on AIR.REQUIREMENT_ID = ARP.REQUIREMENT_ID
  653. left join AMS_PURCHASE_ORDER APO
  654. on APO.PURCHASE_ORDER_ID = AIR.PURCHASE_ORDER_ID
  655. left join DIL_BATCH DB
  656. on DB.BATCH_ID = APO.BATCH_ID
  657. left join RMS_CAPACITY RC
  658. on RC.CAPACITY_ID = OO.CAPACITY_ID
  659. left join TMSTRUCK_WEIGHT_RESULT TWR
  660. on TWR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
  661. left join TMSTRUCK_UNLOAD_RESULT TUR
  662. on TUR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
  663. left join OMSTRUCK_ORDER_MATERIAL OOM
  664. on OOM.ORDER_ID = OO.ORDER_ID
  665. left join RMS_MATERIAL RM
  666. on OOM.MATERIAL_ID = RM.MATERIAL_ID
  667. left join tmstruck_quality_result tqr
  668. on tqr.total_result_id = ttr.result_total_id
  669. left join RMS_WAREHOUSE RW
  670. on TUR.RESULT_UNLOAD_PLACE_ID = RW.WAREHOUSE_ID
  671. where TRR.STATUS = 1
  672. and OO.ORDER_TYPE = #{orderTypee}
  673. )
  674. <where>
  675. <if test="materialName != null">
  676. <foreach collection="materialName" item="item" open="(" separator="or" close=")">
  677. "materialName" like '%${item}%'
  678. </foreach>
  679. </if>
  680. <if test="purchaseOrderNo != null">
  681. and
  682. <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
  683. "purchaseOrderNo" like '%${item}%'
  684. </foreach>
  685. </if>
  686. <if test="orderNumber != null">
  687. and
  688. <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
  689. "orderNumber" like '%${item}%'
  690. </foreach>
  691. </if>
  692. <if test="capacityNumber != null">
  693. and
  694. <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
  695. "capacityNumber" like '%${item}%'
  696. </foreach>
  697. </if>
  698. <if test="resultForeignShipName != null">
  699. and
  700. <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
  701. "resultForeignShipName" like '%${item}%'
  702. </foreach>
  703. </if>
  704. <if test="unloadStatus != null">
  705. and
  706. <foreach collection="unloadStatus" item="item" open="(" separator="or" close=")">
  707. "unloadStatus" like '%${item}%'
  708. </foreach>
  709. </if>
  710. <if test="resultNetWeight != null">
  711. and
  712. <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
  713. "resultNetWeight" like '%${item}%'
  714. </foreach>
  715. </if>
  716. <if test="issampling != null">
  717. and
  718. <foreach collection="issampling" item="item" open="(" separator="or" close=")">
  719. "issampling" like '%${item}%'
  720. </foreach>
  721. </if>
  722. <if test="insertUsername != null">
  723. and
  724. <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
  725. "insertUsername" like '%${item}%'
  726. </foreach>
  727. </if>
  728. <if test="insertTime != null">
  729. and
  730. <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
  731. "insertTime" like '%${item}%'
  732. </foreach>
  733. </if>
  734. </where>
  735. <include refid="orderBy"></include>
  736. </select>
  737. <!-- 查询是否已收过货 -->
  738. <select id="getReceiptResult" parameterType="java.math.BigDecimal" resultType="java.lang.Integer">
  739. select TRR.RESULT_ID
  740. from TMSTRUCK_RECEIPT_RESULT TRR
  741. where TRR.RESULT_TOTAL_ID = #{resultTotalId}
  742. </select>
  743. <!-- <select id="selectMaxId" resultType="java.math.BigDecimal">-->
  744. <!-- select max(RESULT_ID) from TMSTRUCK_RECEIPT_RESULT-->
  745. <!-- </select>-->
  746. <select id="getReceiptResultInfo" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
  747. select * from(
  748. select distinct a_s_order.SALE_NUMBER "saleNumber",
  749. o_torder.ORDER_NUMBER "orderNumber",
  750. r_material.MATERIAL_NAME "materialName",
  751. r_material.MATERIAL_MODEL "materialModel",
  752. r_capacity.CAPACITY_NUMBER "capacityNumber",
  753. r_shipper.SHIPPER_NAME "shipperName",
  754. r_consignee.CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
  755. t_receipt.RESULT_ARRIVAL_ADDRESS "resultReceiptAddress",
  756. receive_address.ADDRESS_DELIVERY_ADDRESS "addressDeliveryAddress",
  757. t_receipt.RESULT_EMPTY_CONTAINER_PHOTO "resultEmptyContainerPhoto",
  758. t_arrival.RESULT_FULL_CONTAINER_PHOTO "resultFullContainerPhoto",
  759. t_receipt.RESULT_SIGNED_NOTE_PHOTO "resultSignedNotePhoto",
  760. t_receipt.RESULT_RECEIVE_NOTE_PHOTO "resultReceiveNotePhoto",
  761. t_receiptchild.OTHER_PHOTO1 "otherPhoto1",
  762. t_receiptchild.OTHER_PHOTO2 "otherPhoto2",
  763. t_receiptchild.OTHER_PHOTO3 "otherPhoto3",
  764. t_receipt.INSERT_TIME "receiptTime",
  765. r_carrier.CARRIER_NAME "carrierName",
  766. r_gatepost.GATEPOST_NAME "gatepostName"
  767. from TMSTRUCK_RECEIPT_RESULT t_receipt
  768. left join TMSTRUCK_TOTAL_RESULT t_total
  769. on t_receipt.RESULT_TOTAL_ID=t_total.RESULT_TOTAL_ID
  770. left join OMSTRUCK_ORDER o_torder
  771. on t_total.ORDER_ID=o_torder.ORDER_ID
  772. left join RMS_CAPACITY r_capacity
  773. on o_torder.CAPACITY_ID=r_capacity.CAPACITY_ID
  774. left join RMS_DRIVER_CAPACITY r_d_capacity
  775. on r_capacity.CAPACITY_ID=r_d_capacity.CAPACITY_ID
  776. left join RMS_CARRIER r_carrier
  777. on o_torder.CARRIER_ID=r_carrier.CARRIER_ID
  778. left join RMS_CAR_DRIVER r_driver
  779. on r_d_capacity.DRIVER_ID=r_driver.DRIVER_ID
  780. left join AMS_SALE_ORDER_MATERIAL sale_material
  781. on o_torder.ORDER_PLAN_ID=sale_material.SALE_ORDER_MATERIAL_ID
  782. left join RMS_RECEIVE_ADDRESS receive_address
  783. on sale_material.SALE_SHIPPING_ADDRESS_ID=receive_address.ADDRESS_ID
  784. left join RMS_MATERIAL r_material
  785. on sale_material.MATERIAL_ID=r_material.MATERIAL_ID
  786. left join AMS_SALE_ORDER a_s_order
  787. on sale_material.SALE_ORDER_ID=a_s_order.SALE_ORDER_ID
  788. left join RMS_SHIPPER r_shipper
  789. on a_s_order.SHIPPER_ID=r_shipper.SHIPPER_ID
  790. left join RMS_CONSIGNEE r_consignee
  791. on a_s_order.CONSIGNEE_ID=r_consignee.CONSIGNEE_ID
  792. left join TMSTRUCK_RECEIPT_RESULT_CHILD t_receiptchild
  793. on t_receipt.RESULT_ID=t_receiptchild.RECEIPT_RESULT_ID
  794. left join TMSTRUCK_LEAVE_FACTORY_RESULT t_leave
  795. on t_total.RESULT_TOTAL_ID=t_leave.RESULT_TOTAL_ID
  796. LEFT JOIN RMS_GATEPOST r_gatepost
  797. ON t_leave.GATEPOST_ID = r_gatepost.GATEPOST_ID
  798. left join TMSTRUCK_ARRIVAL_RESULT t_arrival
  799. on t_total.RESULT_TOTAL_ID=t_arrival.RESULT_TOTAL_ID
  800. order by t_receipt.INSERT_TIME desc)
  801. <where>
  802. <if test="productClassification != null and productClassification != '其他' and productClassification != '螺纹钢'">
  803. and "materialName" like '%${productClassification}%'
  804. </if>
  805. <if test="productClassification != null and '螺纹钢' == productClassification">
  806. and ("materialName" like '%螺纹钢%' or "materialName" like '%盘螺%'
  807. or "materialName" like '%盘圆%' or "materialName" like '%非定尺材%')
  808. </if>
  809. <if test="productClassification != null and '其他' == productClassification">
  810. and "materialName" not like '%带钢%' and "materialName" not like '%微粉%'
  811. and "materialName" not like '%螺纹钢%' and "materialName" not like '%非定尺材%' and "materialName" not like '%钢坯%'
  812. and "materialName" not like '%盘螺%' and "materialName" not like '%盘圆%'
  813. </if>
  814. <if test="carrierName1 != null">
  815. and "carrierName" like '%${carrierName1}%'
  816. </if>
  817. <if test="gatepostName1 !=null">
  818. and "gatepostName" like '%${gatepostName1}%'
  819. </if>
  820. <if test="capacityNumber1 != null">
  821. and "capacityNumber" like '%${capacityNumber1}%'
  822. </if>
  823. <if test="consigneeCompanyName1 != null">
  824. and "consigneeCompanyName" like '%${consigneeCompanyName1}%'
  825. </if>
  826. <if test="startTime != null">
  827. and "receiptTime" &gt;= to_date('${startTime}','yyyy-mm-dd')
  828. </if>
  829. <if test="endTime != null">
  830. and "receiptTime" &lt;= to_date('${endTime}','yyyy-mm-dd')
  831. </if>
  832. <if test="saleNumber != null">
  833. and
  834. <foreach collection="saleNumber" item="item" open="(" separator="or" close=")">
  835. "saleNumber" like '%${item}%'
  836. </foreach>
  837. </if>
  838. <if test="orderNumber != null">
  839. and
  840. <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
  841. "orderNumber" like '%${item}%'
  842. </foreach>
  843. </if>
  844. <if test="materialName != null">
  845. and
  846. <foreach collection="materialName" item="item" open="(" separator="or" close=")">
  847. "materialName" like '%${item}%'
  848. </foreach>
  849. </if>
  850. <if test="materialModel != null">
  851. and
  852. <foreach collection="materialModel" item="item" open="(" separator="or" close=")">
  853. "materialModel" like '%${item}%'
  854. </foreach>
  855. </if>
  856. <if test="capacityNumber != null">
  857. and
  858. <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
  859. "capacityNumber" like '%${item}%'
  860. </foreach>
  861. </if>
  862. <if test="shipperName != null">
  863. and
  864. <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
  865. "shipperName" like '%${item}%'
  866. </foreach>
  867. </if>
  868. <if test="consigneeCompanyName != null">
  869. and
  870. <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
  871. "consigneeCompanyName" like '%${item}%'
  872. </foreach>
  873. </if>
  874. <if test="resultReceiptAddress != null">
  875. and
  876. <foreach collection="resultReceiptAddress" item="item" open="(" separator="or" close=")">
  877. "resultReceiptAddress" like '%${item}%'
  878. </foreach>
  879. </if>
  880. <if test="addressDeliveryAddress != null">
  881. and
  882. <foreach collection="addressDeliveryAddress" item="item" open="(" separator="or" close=")">
  883. "addressDeliveryAddress" like '%${item}%'
  884. </foreach>
  885. </if>
  886. <if test="receiptTime != null">
  887. and
  888. <foreach collection="receiptTime" item="item" open="(" separator="or" close=")">
  889. "receiptTime" like '%${item}%'
  890. </foreach>
  891. </if>
  892. <if test="carrierName != null">
  893. and
  894. <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
  895. "carrierName" like '%${item}%'
  896. </foreach>
  897. </if>
  898. <if test="gatepostName != null">
  899. and
  900. <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
  901. "gatepostName" like '%${item}%'
  902. </foreach>
  903. </if>
  904. </where>
  905. <include refid="orderBy"></include>
  906. </select>
  907. </mapper>