TmsshipBargeOperationMapper.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  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.TmsshipBargeOperationMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmsshipBargeOperation">
  5. <id column="BARGE_OPERATION_ID" jdbcType="DECIMAL" property="bargeOperationId" />
  6. <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
  7. <result column="BARGE_SMALLSHIP_LOAD_WEIGHT" jdbcType="DECIMAL" property="bargeSmallshipLoadWeight" />
  8. <result column="SMALL_CAPACITY_ID" jdbcType="DECIMAL" property="smallCapacityId" />
  9. <result column="BARGE_REFUTE_DATE" jdbcType="TIMESTAMP" property="bargeRefuteDate" />
  10. <result column="BARGE_REFUTE_LOCATION" jdbcType="VARCHAR" property="bargeRefuteLocation" />
  11. <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName" />
  12. <result column="DELETE_TIME" jdbcType="VARCHAR" property="deleteTime" />
  13. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
  14. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
  15. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
  16. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  17. <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
  18. <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
  19. <result column="BARGE_BACK_DATE" jdbcType="TIMESTAMP" property="bargeBackDate" />
  20. <result column="BARGE_BACK_LOCATION" jdbcType="VARCHAR" property="bargeBackLocation" />
  21. </resultMap>
  22. <sql id="columns">
  23. BARGE_OPERATION_ID, RESULT_TOTAL_ID, BARGE_SMALLSHIP_LOAD_WEIGHT, SMALL_CAPACITY_ID,
  24. BARGE_REFUTE_DATE, BARGE_REFUTE_LOCATION, DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
  25. INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, BARGE_BACK_DATE,
  26. BARGE_BACK_LOCATION
  27. </sql>
  28. <sql id="columns_alias">
  29. t.BARGE_OPERATION_ID, t.RESULT_TOTAL_ID, t.BARGE_SMALLSHIP_LOAD_WEIGHT, t.SMALL_CAPACITY_ID,
  30. t.BARGE_REFUTE_DATE, t.BARGE_REFUTE_LOCATION, t.DELETE_NAME, t.DELETE_TIME, t.INSERT_USERNAME,
  31. t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
  32. t.BARGE_BACK_DATE, t.BARGE_BACK_LOCATION
  33. </sql>
  34. <sql id="select">
  35. SELECT <include refid="columns"/> FROM TMSSHIP_BARGE_OPERATION
  36. </sql>
  37. <sql id="select_alias">
  38. SELECT <include refid="columns_alias"/> FROM TMSSHIP_BARGE_OPERATION t
  39. </sql>
  40. <sql id="where">
  41. <where>
  42. <if test="bargeOperationId != null">
  43. and BARGE_OPERATION_ID = #{bargeOperationId}
  44. </if>
  45. <if test="resultTotalId != null">
  46. and RESULT_TOTAL_ID = #{resultTotalId}
  47. </if>
  48. <if test="bargeSmallshipLoadWeight != null">
  49. and BARGE_SMALLSHIP_LOAD_WEIGHT = #{bargeSmallshipLoadWeight}
  50. </if>
  51. <if test="smallCapacityId != null">
  52. and SMALL_CAPACITY_ID = #{smallCapacityId}
  53. </if>
  54. <if test="bargeRefuteDate != null">
  55. and TO_CHAR(BARGE_REFUTE_DATE,'yyyy-MM-dd') = #{bargeRefuteDate}
  56. </if>
  57. <if test="bargeRefuteLocation != null and bargeRefuteLocation != ''">
  58. and BARGE_REFUTE_LOCATION = #{bargeRefuteLocation}
  59. </if>
  60. <if test="deleteName != null and deleteName != ''">
  61. and DELETE_NAME = #{deleteName}
  62. </if>
  63. <if test="deleteTime != null and deleteTime != ''">
  64. and DELETE_TIME = #{deleteTime}
  65. </if>
  66. <if test="insertUsername != null and insertUsername != ''">
  67. and INSERT_USERNAME = #{insertUsername}
  68. </if>
  69. <if test="insertTime != null">
  70. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  71. </if>
  72. <if test="updateUsername != null and updateUsername != ''">
  73. and UPDATE_USERNAME = #{updateUsername}
  74. </if>
  75. <if test="updateTime != null">
  76. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  77. </if>
  78. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  79. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  80. </if>
  81. <if test="deleted != null">
  82. and DELETED = #{deleted}
  83. </if>
  84. <if test="bargeBackDate != null">
  85. and TO_CHAR(BARGE_BACK_DATE,'yyyy-MM-dd') = #{bargeBackDate}
  86. </if>
  87. <if test="bargeBackLocation != null and bargeBackLocation != ''">
  88. and BARGE_BACK_LOCATION = #{bargeBackLocation}
  89. </if>
  90. </where>
  91. </sql>
  92. <sql id="whereLike">
  93. <where>
  94. <if test="bargeOperationId != null">
  95. and BARGE_OPERATION_ID = #{bargeOperationId}
  96. </if>
  97. <if test="resultTotalId != null">
  98. and RESULT_TOTAL_ID = #{resultTotalId}
  99. </if>
  100. <if test="bargeSmallshipLoadWeight != null">
  101. and BARGE_SMALLSHIP_LOAD_WEIGHT = #{bargeSmallshipLoadWeight}
  102. </if>
  103. <if test="smallCapacityId != null">
  104. and SMALL_CAPACITY_ID = #{smallCapacityId}
  105. </if>
  106. <if test="bargeRefuteDate != null">
  107. and TO_CHAR(BARGE_REFUTE_DATE,'yyyy-MM-dd') = #{bargeRefuteDate}
  108. </if>
  109. <if test="bargeRefuteLocation != null and bargeRefuteLocation != ''">
  110. and BARGE_REFUTE_LOCATION LIKE '%${bargeRefuteLocation}%'
  111. </if>
  112. <if test="deleteName != null and deleteName != ''">
  113. and DELETE_NAME LIKE '%${deleteName}%'
  114. </if>
  115. <if test="deleteTime != null and deleteTime != ''">
  116. and DELETE_TIME LIKE '%${deleteTime}%'
  117. </if>
  118. <if test="insertUsername != null and insertUsername != ''">
  119. and INSERT_USERNAME LIKE '%${insertUsername}%'
  120. </if>
  121. <if test="insertTime != null">
  122. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  123. </if>
  124. <if test="updateUsername != null and updateUsername != ''">
  125. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  126. </if>
  127. <if test="updateTime != null">
  128. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  129. </if>
  130. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  131. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  132. </if>
  133. <if test="deleted != null">
  134. and DELETED = #{deleted}
  135. </if>
  136. <if test="bargeBackDate != null">
  137. and TO_CHAR(BARGE_BACK_DATE,'yyyy-MM-dd') = #{bargeBackDate}
  138. </if>
  139. <if test="bargeBackLocation != null and bargeBackLocation != ''">
  140. and BARGE_BACK_LOCATION LIKE '%${bargeBackLocation}%'
  141. </if>
  142. </where>
  143. </sql>
  144. <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
  145. delete from TMSSHIP_BARGE_OPERATION
  146. where BARGE_OPERATION_ID = #{bargeOperationId,jdbcType=DECIMAL}
  147. </delete>
  148. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  149. delete from TMSSHIP_BARGE_OPERATION
  150. where 1!=1
  151. <if test="resultTotalId != null">
  152. or RESULT_TOTAL_ID = #{resultTotalId}
  153. </if>
  154. <if test="bargeSmallshipLoadWeight != null">
  155. or BARGE_SMALLSHIP_LOAD_WEIGHT = #{bargeSmallshipLoadWeight}
  156. </if>
  157. <if test="smallCapacityId != null">
  158. or SMALL_CAPACITY_ID = #{smallCapacityId}
  159. </if>
  160. <if test="bargeRefuteDate != null">
  161. or TO_CHAR(BARGE_REFUTE_DATE,'yyyy-MM-dd') = '#{bargeRefuteDate}'
  162. </if>
  163. <if test="bargeRefuteLocation != null and bargeRefuteLocation != ''">
  164. or BARGE_REFUTE_LOCATION = #{bargeRefuteLocation}
  165. </if>
  166. <if test="deleteName != null and deleteName != ''">
  167. or DELETE_NAME = #{deleteName}
  168. </if>
  169. <if test="deleteTime != null and deleteTime != ''">
  170. or DELETE_TIME = #{deleteTime}
  171. </if>
  172. <if test="insertUsername != null and insertUsername != ''">
  173. or INSERT_USERNAME = #{insertUsername}
  174. </if>
  175. <if test="insertTime != null">
  176. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  177. </if>
  178. <if test="updateUsername != null and updateUsername != ''">
  179. or UPDATE_USERNAME = #{updateUsername}
  180. </if>
  181. <if test="updateTime != null">
  182. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  183. </if>
  184. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  185. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  186. </if>
  187. <if test="deleted != null">
  188. or DELETED = #{deleted}
  189. </if>
  190. <if test="bargeBackDate != null">
  191. or TO_CHAR(BARGE_BACK_DATE,'yyyy-MM-dd') = '#{bargeBackDate}'
  192. </if>
  193. <if test="bargeBackLocation != null and bargeBackLocation != ''">
  194. or BARGE_BACK_LOCATION = #{bargeBackLocation}
  195. </if>
  196. </delete>
  197. <insert id="insert" parameterType="com.steerinfo.dil.model.TmsshipBargeOperation">
  198. insert into TMSSHIP_BARGE_OPERATION (BARGE_OPERATION_ID, RESULT_TOTAL_ID,
  199. BARGE_SMALLSHIP_LOAD_WEIGHT, SMALL_CAPACITY_ID,
  200. BARGE_REFUTE_DATE, BARGE_REFUTE_LOCATION,
  201. DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
  202. INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
  203. INSERT_UPDATE_REMARK, DELETED, BARGE_BACK_DATE,
  204. BARGE_BACK_LOCATION)
  205. values (#{bargeOperationId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL},
  206. #{bargeSmallshipLoadWeight,jdbcType=DECIMAL}, #{smallCapacityId,jdbcType=DECIMAL},
  207. #{bargeRefuteDate,jdbcType=TIMESTAMP}, #{bargeRefuteLocation,jdbcType=VARCHAR},
  208. #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
  209. #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
  210. #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{bargeBackDate,jdbcType=TIMESTAMP},
  211. #{bargeBackLocation,jdbcType=VARCHAR})
  212. </insert>
  213. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmsshipBargeOperation">
  214. insert into TMSSHIP_BARGE_OPERATION
  215. <trim prefix="(" suffix=")" suffixOverrides=",">
  216. <if test="bargeOperationId != null">
  217. BARGE_OPERATION_ID,
  218. </if>
  219. <if test="resultTotalId != null">
  220. RESULT_TOTAL_ID,
  221. </if>
  222. <if test="bargeSmallshipLoadWeight != null">
  223. BARGE_SMALLSHIP_LOAD_WEIGHT,
  224. </if>
  225. <if test="smallCapacityId != null">
  226. SMALL_CAPACITY_ID,
  227. </if>
  228. <if test="bargeRefuteDate != null">
  229. BARGE_REFUTE_DATE,
  230. </if>
  231. <if test="bargeRefuteLocation != null">
  232. BARGE_REFUTE_LOCATION,
  233. </if>
  234. <if test="deleteName != null">
  235. DELETE_NAME,
  236. </if>
  237. <if test="deleteTime != null">
  238. DELETE_TIME,
  239. </if>
  240. <if test="insertUsername != null">
  241. INSERT_USERNAME,
  242. </if>
  243. <if test="insertTime != null">
  244. INSERT_TIME,
  245. </if>
  246. <if test="updateUsername != null">
  247. UPDATE_USERNAME,
  248. </if>
  249. <if test="updateTime != null">
  250. UPDATE_TIME,
  251. </if>
  252. <if test="insertUpdateRemark != null">
  253. INSERT_UPDATE_REMARK,
  254. </if>
  255. <if test="deleted != null">
  256. DELETED,
  257. </if>
  258. <if test="bargeBackDate != null">
  259. BARGE_BACK_DATE,
  260. </if>
  261. <if test="bargeBackLocation != null">
  262. BARGE_BACK_LOCATION,
  263. </if>
  264. </trim>
  265. <trim prefix="values (" suffix=")" suffixOverrides=",">
  266. <if test="bargeOperationId != null">
  267. #{bargeOperationId,jdbcType=DECIMAL},
  268. </if>
  269. <if test="resultTotalId != null">
  270. #{resultTotalId,jdbcType=DECIMAL},
  271. </if>
  272. <if test="bargeSmallshipLoadWeight != null">
  273. #{bargeSmallshipLoadWeight,jdbcType=DECIMAL},
  274. </if>
  275. <if test="smallCapacityId != null">
  276. #{smallCapacityId,jdbcType=DECIMAL},
  277. </if>
  278. <if test="bargeRefuteDate != null">
  279. #{bargeRefuteDate,jdbcType=TIMESTAMP},
  280. </if>
  281. <if test="bargeRefuteLocation != null">
  282. #{bargeRefuteLocation,jdbcType=VARCHAR},
  283. </if>
  284. <if test="deleteName != null">
  285. #{deleteName,jdbcType=VARCHAR},
  286. </if>
  287. <if test="deleteTime != null">
  288. #{deleteTime,jdbcType=VARCHAR},
  289. </if>
  290. <if test="insertUsername != null">
  291. #{insertUsername,jdbcType=VARCHAR},
  292. </if>
  293. <if test="insertTime != null">
  294. #{insertTime,jdbcType=TIMESTAMP},
  295. </if>
  296. <if test="updateUsername != null">
  297. #{updateUsername,jdbcType=VARCHAR},
  298. </if>
  299. <if test="updateTime != null">
  300. #{updateTime,jdbcType=TIMESTAMP},
  301. </if>
  302. <if test="insertUpdateRemark != null">
  303. #{insertUpdateRemark,jdbcType=VARCHAR},
  304. </if>
  305. <if test="deleted != null">
  306. #{deleted,jdbcType=DECIMAL},
  307. </if>
  308. <if test="bargeBackDate != null">
  309. #{bargeBackDate,jdbcType=TIMESTAMP},
  310. </if>
  311. <if test="bargeBackLocation != null">
  312. #{bargeBackLocation,jdbcType=VARCHAR},
  313. </if>
  314. </trim>
  315. </insert>
  316. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmsshipBargeOperation">
  317. update TMSSHIP_BARGE_OPERATION
  318. set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
  319. BARGE_SMALLSHIP_LOAD_WEIGHT = #{bargeSmallshipLoadWeight,jdbcType=DECIMAL},
  320. SMALL_CAPACITY_ID = #{smallCapacityId,jdbcType=DECIMAL},
  321. BARGE_REFUTE_DATE = #{bargeRefuteDate,jdbcType=TIMESTAMP},
  322. BARGE_REFUTE_LOCATION = #{bargeRefuteLocation,jdbcType=VARCHAR},
  323. DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
  324. DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
  325. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  326. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  327. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  328. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  329. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  330. DELETED = #{deleted,jdbcType=DECIMAL},
  331. BARGE_BACK_DATE = #{bargeBackDate,jdbcType=TIMESTAMP},
  332. BARGE_BACK_LOCATION = #{bargeBackLocation,jdbcType=VARCHAR}
  333. where BARGE_OPERATION_ID = #{bargeOperationId,jdbcType=DECIMAL}
  334. </update>
  335. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmsshipBargeOperation">
  336. update TMSSHIP_BARGE_OPERATION
  337. <set>
  338. <if test="resultTotalId != null">
  339. RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
  340. </if>
  341. <if test="bargeSmallshipLoadWeight != null">
  342. BARGE_SMALLSHIP_LOAD_WEIGHT = #{bargeSmallshipLoadWeight,jdbcType=DECIMAL},
  343. </if>
  344. <if test="smallCapacityId != null">
  345. SMALL_CAPACITY_ID = #{smallCapacityId,jdbcType=DECIMAL},
  346. </if>
  347. <if test="bargeRefuteDate != null">
  348. BARGE_REFUTE_DATE = #{bargeRefuteDate,jdbcType=TIMESTAMP},
  349. </if>
  350. <if test="bargeRefuteLocation != null">
  351. BARGE_REFUTE_LOCATION = #{bargeRefuteLocation,jdbcType=VARCHAR},
  352. </if>
  353. <if test="deleteName != null">
  354. DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
  355. </if>
  356. <if test="deleteTime != null">
  357. DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
  358. </if>
  359. <if test="insertUsername != null">
  360. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  361. </if>
  362. <if test="insertTime != null">
  363. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  364. </if>
  365. <if test="updateUsername != null">
  366. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  367. </if>
  368. <if test="updateTime != null">
  369. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  370. </if>
  371. <if test="insertUpdateRemark != null">
  372. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  373. </if>
  374. <if test="deleted != null">
  375. DELETED = #{deleted,jdbcType=DECIMAL},
  376. </if>
  377. <if test="bargeBackDate != null">
  378. BARGE_BACK_DATE = #{bargeBackDate,jdbcType=TIMESTAMP},
  379. </if>
  380. <if test="bargeBackLocation != null">
  381. BARGE_BACK_LOCATION = #{bargeBackLocation,jdbcType=VARCHAR},
  382. </if>
  383. </set>
  384. where BARGE_OPERATION_ID = #{bargeOperationId,jdbcType=DECIMAL}
  385. </update>
  386. <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
  387. <include refid="select"/>
  388. where BARGE_OPERATION_ID = #{bargeOperationId,jdbcType=DECIMAL}
  389. </select>
  390. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  391. <include refid="select"/>
  392. <include refid="where"/>
  393. </select>
  394. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  395. <include refid="select"/>
  396. <include refid="whereLike"/>
  397. </select>
  398. <insert id="batchInsert" parameterType="java.util.List">
  399. insert into TMSSHIP_BARGE_OPERATION
  400. (BARGE_OPERATION_ID,
  401. RESULT_TOTAL_ID, BARGE_SMALLSHIP_LOAD_WEIGHT,
  402. SMALL_CAPACITY_ID, BARGE_REFUTE_DATE,
  403. BARGE_REFUTE_LOCATION, DELETE_NAME,
  404. DELETE_TIME, INSERT_USERNAME, INSERT_TIME,
  405. UPDATE_USERNAME, UPDATE_TIME,
  406. INSERT_UPDATE_REMARK, DELETED,
  407. BARGE_BACK_DATE, BARGE_BACK_LOCATION
  408. )
  409. ( <foreach collection="list" item="item" separator="union all">
  410. select
  411. #{item.bargeOperationId,jdbcType=DECIMAL},
  412. #{item.resultTotalId,jdbcType=DECIMAL}, #{item.bargeSmallshipLoadWeight,jdbcType=DECIMAL},
  413. #{item.smallCapacityId,jdbcType=DECIMAL}, #{item.bargeRefuteDate,jdbcType=TIMESTAMP},
  414. #{item.bargeRefuteLocation,jdbcType=VARCHAR}, #{item.deleteName,jdbcType=VARCHAR},
  415. #{item.deleteTime,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
  416. #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
  417. #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
  418. #{item.bargeBackDate,jdbcType=TIMESTAMP}, #{item.bargeBackLocation,jdbcType=VARCHAR}
  419. from dual
  420. </foreach> )
  421. </insert>
  422. <update id="batchUpdate" parameterType="java.util.List">
  423. update TMSSHIP_BARGE_OPERATION
  424. set
  425. BARGE_OPERATION_ID=
  426. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  427. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.bargeOperationId,jdbcType=DECIMAL}
  428. </foreach>
  429. ,RESULT_TOTAL_ID=
  430. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  431. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
  432. </foreach>
  433. ,BARGE_SMALLSHIP_LOAD_WEIGHT=
  434. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  435. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.bargeSmallshipLoadWeight,jdbcType=DECIMAL}
  436. </foreach>
  437. ,SMALL_CAPACITY_ID=
  438. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  439. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.smallCapacityId,jdbcType=DECIMAL}
  440. </foreach>
  441. ,BARGE_REFUTE_DATE=
  442. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  443. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.bargeRefuteDate,jdbcType=TIMESTAMP}
  444. </foreach>
  445. ,BARGE_REFUTE_LOCATION=
  446. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  447. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.bargeRefuteLocation,jdbcType=VARCHAR}
  448. </foreach>
  449. ,DELETE_NAME=
  450. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  451. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
  452. </foreach>
  453. ,DELETE_TIME=
  454. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  455. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
  456. </foreach>
  457. ,INSERT_USERNAME=
  458. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  459. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  460. </foreach>
  461. ,INSERT_TIME=
  462. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  463. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  464. </foreach>
  465. ,UPDATE_USERNAME=
  466. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  467. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  468. </foreach>
  469. ,UPDATE_TIME=
  470. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  471. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  472. </foreach>
  473. ,INSERT_UPDATE_REMARK=
  474. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  475. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  476. </foreach>
  477. ,DELETED=
  478. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  479. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
  480. </foreach>
  481. ,BARGE_BACK_DATE=
  482. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  483. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.bargeBackDate,jdbcType=TIMESTAMP}
  484. </foreach>
  485. ,BARGE_BACK_LOCATION=
  486. <foreach collection="list" item="item" index="index" separator=" " open="case BARGE_OPERATION_ID" close="end">
  487. when #{item.bargeOperationId,jdbcType=DECIMAL} then #{item.bargeBackLocation,jdbcType=VARCHAR}
  488. </foreach>
  489. where BARGE_OPERATION_ID in
  490. <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
  491. #{item.bargeOperationId,jdbcType=DECIMAL}
  492. </foreach>
  493. </update>
  494. <delete id="batchDelete" parameterType="java.util.List">
  495. delete from TMSSHIP_BARGE_OPERATION
  496. where BARGE_OPERATION_ID in
  497. <foreach collection="list" item="id" open="(" close=")" separator=",">
  498. #{id}
  499. </foreach>
  500. </delete>
  501. <!-- 友情提示!!!-->
  502. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  503. <select id="selectMaxId" resultType="DECIMAL">
  504. SELECT MAX(BARGE_OPERATION_ID)+1 FROM TMSSHIP_BARGE_OPERATION
  505. </select>
  506. <!--查询驳船作业列表-->
  507. <sql id="orderByInsertTime">
  508. <if test="orderField != null and orderField != ''">
  509. order by "${orderField}"
  510. <if test="orderType != null and orderType != ''">
  511. ${orderType}
  512. </if>
  513. </if>
  514. <if test="orderField == null ">
  515. order by "insertTime" desc
  516. </if>
  517. </sql>
  518. <select id="selectBargeOperationList" resultType="java.util.Map">
  519. select * from(
  520. SELECT DISTINCT ttr.ORDER_ID as "orderId",
  521. tbo.INSERT_TIME as "insertTime",
  522. tbo.BARGE_OPERATION_ID as "bargeOperationId",
  523. rm.MATERIAL_NAME as "materialName",
  524. db.RESULT_FOREIGN_SHIP_NAME as "foreignShipName",
  525. rcb.CAPACITY_NUMBER as "bigCapacityName",
  526. tlsr.RESULT_ACTUAL_INSTALLATIONS as "bigCapacityWeight",
  527. rcs.CAPACITY_NUMBER as "smallCapacityName",
  528. tbo.BARGE_SMALLSHIP_LOAD_WEIGHT as "smallCapacityWeight",
  529. tbo.BARGE_REFUTE_DATE as "bargeRefuteTime",
  530. tbo.BARGE_REFUTE_LOCATION as "bargeRefuteLocation",
  531. tbo.BARGE_BACK_DATE as "bargeBackTime",
  532. tbo.BARGE_BACK_LOCATION as "bargeBackLocation"
  533. FROM TMSSHIP_BARGE_OPERATION tbo
  534. LEFT JOIN TMSSHIP_TOTAL_RESULT ttr
  535. ON tbo.RESULT_TOTAL_ID = ttr.RESULT_ID
  536. LEFT JOIN OMSSHIP_INSTRUCTIONS_CAPACITY oic
  537. ON oic.INSTRUCTIONS_CAPACITY_ID = ttr.ORDER_ID
  538. LEFT JOIN OMSSHIP_SHIPMENT_INSTRUCTIONS osi
  539. ON oic.INSTRUCTIONS_ID = osi.SHIPMENT_INSTRUCTIONS_ID
  540. LEFT JOIN DIL_BATCH db
  541. ON osi.BATCH_ID = db.BATCH_ID
  542. LEFT JOIN RMS_MATERIAL rm
  543. ON db.MATERIAL_ID = rm.MATERIAL_ID
  544. LEFT JOIN RMS_CAPACITY rcb
  545. ON oic.CAPACITY_ID = rcb.CAPACITY_ID
  546. LEFT JOIN RMS_CAPACITY rcs
  547. ON tbo.SMALL_CAPACITY_ID = rcs.CAPACITY_ID
  548. LEFT JOIN TMSSHIP_LOAD_SHIP_RESULT tlsr
  549. ON ttr.RESULT_ID = tlsr.TOTAL_RESULT_ID
  550. where tbo.DELETED = 0)
  551. <where>
  552. <if test="materialName != null">
  553. and
  554. <foreach collection="materialName" item="item" open="(" separator="," close=")">
  555. "materialName" in #{item}
  556. </foreach>
  557. </if>
  558. <if test="foreignShipName != null">
  559. and
  560. <foreach collection="foreignShipName" item="item" open="(" separator="," close=")">
  561. "foreignShipName" in #{item}
  562. </foreach>
  563. </if>
  564. <if test="bigCapacityName != null">
  565. and
  566. <foreach collection="bigCapacityName" item="item" open="(" separator="," close=")">
  567. "bigCapacityName" in #{item}
  568. </foreach>
  569. </if>
  570. <if test="bigCapacityWeight != null">
  571. and
  572. <foreach collection="bigCapacityWeight" item="item" open="(" separator="," close=")">
  573. "bigCapacityWeight" in #{item}
  574. </foreach>
  575. </if>
  576. <if test="smallCapacityId != null">
  577. and
  578. <foreach collection="smallCapacityId" item="item" open="(" separator="," close=")">
  579. "smallCapacityId" in #{item}
  580. </foreach>
  581. </if>
  582. <if test="smallCapacityWeight != null">
  583. and
  584. <foreach collection="smallCapacityWeight" item="item" open="(" separator="," close=")">
  585. "smallCapacityWeight" in #{item}
  586. </foreach>
  587. </if>
  588. <if test="bargeRefuteTime != null">
  589. and
  590. <foreach collection="bargeRefuteTime" item="item" open="(" separator="," close=")">
  591. "bargeRefuteTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
  592. </foreach>
  593. </if>
  594. <if test="bargeRefuteLocation != null">
  595. and
  596. <foreach collection="bargeRefuteLocation" item="item" open="(" separator="," close=")">
  597. "bargeRefuteLocation" in #{item}
  598. </foreach>
  599. </if>
  600. <if test="bargeBackTime != null">
  601. and
  602. <foreach collection="bargeBackTime" item="item" open="(" separator="," close=")">
  603. "bargeBackTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
  604. </foreach>
  605. </if>
  606. <if test="bargeBackLocation != null">
  607. and
  608. <foreach collection="bargeBackLocation" item="item" open="(" separator="," close=")">
  609. "bargeBackLocation" in #{item}
  610. </foreach>
  611. </if>
  612. </where>
  613. <include refid="orderByInsertTime"></include>
  614. </select>
  615. <select id="selectBargeOperation" parameterType="DECIMAL" resultType="java.util.Map">
  616. SELECT
  617. SMALL_CAPACITY_ID "smallCapacityId",
  618. BARGE_SMALLSHIP_LOAD_WEIGHT "bargeSmallshipLoadWeight",
  619. BARGE_REFUTE_DATE "bargeRefuteDate",
  620. BARGE_REFUTE_LOCATION "bargeRefuteLocation",
  621. BARGE_BACK_DATE "bargeBackDate",
  622. BARGE_BACK_LOCATION "bargeBackLocation"
  623. FROM TMSSHIP_BARGE_OPERATION
  624. WHERE BARGE_OPERATION_ID = #{bargeOperationId}
  625. </select>
  626. </mapper>