AmsshipDeliveryAttorneyMapper.xml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  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.AmsshipDeliveryAttorneyMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
  5. <id column="ATTORNEY_ID" jdbcType="DECIMAL" property="attorneyId" />
  6. <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
  7. <result column="PORT_ID" jdbcType="DECIMAL" property="portId" />
  8. <result column="DOWN_SWIM_PORT_ID" jdbcType="DECIMAL" property="downSwimPortId" />
  9. <result column="ATTORNEY_PICKUP_CONTACT_PERSON" jdbcType="VARCHAR" property="attorneyPickupContactPerson" />
  10. <result column="ATTORENY_PICKUP_IDCARD" jdbcType="VARCHAR" property="attorenyPickupIdcard" />
  11. <result column="ATTORNEY_CONTACT_TELEPHONE" jdbcType="VARCHAR" property="attorneyContactTelephone" />
  12. <result column="ATTORNEY_TIME" jdbcType="TIMESTAMP" property="attorneyTime" />
  13. <result column="ATTORNEY_PDFFILE" jdbcType="VARCHAR" property="attorneyPdffile" />
  14. <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName" />
  15. <result column="DELETE_TIME" jdbcType="VARCHAR" property="deleteTime" />
  16. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
  17. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
  18. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
  19. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  20. <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
  21. <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
  22. <result column="ATTORNEY_DISTRIBUTION_STATUS" jdbcType="DECIMAL" property="attorneyDistributionStatus" />
  23. </resultMap>
  24. <sql id="columns">
  25. ATTORNEY_ID, BATCH_ID, PORT_ID, DOWN_SWIM_PORT_ID, ATTORNEY_PICKUP_CONTACT_PERSON,
  26. ATTORENY_PICKUP_IDCARD, ATTORNEY_CONTACT_TELEPHONE, ATTORNEY_TIME, ATTORNEY_PDFFILE,
  27. DELETE_NAME, DELETE_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
  28. INSERT_UPDATE_REMARK, DELETED, ATTORNEY_DISTRIBUTION_STATUS
  29. </sql>
  30. <sql id="columns_alias">
  31. t.ATTORNEY_ID, t.BATCH_ID, t.PORT_ID, t.DOWN_SWIM_PORT_ID, t.ATTORNEY_PICKUP_CONTACT_PERSON,
  32. t.ATTORENY_PICKUP_IDCARD, t.ATTORNEY_CONTACT_TELEPHONE, t.ATTORNEY_TIME, t.ATTORNEY_PDFFILE,
  33. t.DELETE_NAME, t.DELETE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
  34. t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.ATTORNEY_DISTRIBUTION_STATUS
  35. </sql>
  36. <sql id="select">
  37. SELECT <include refid="columns" /> FROM AMSSHIP_DELIVERY_ATTORNEY
  38. </sql>
  39. <sql id="select_alias">
  40. SELECT <include refid="columns_alias" /> FROM AMSSHIP_DELIVERY_ATTORNEY t
  41. </sql>
  42. <sql id="where">
  43. <where>
  44. <if test="attorneyId != null">
  45. and ATTORNEY_ID = #{attorneyId}
  46. </if>
  47. <if test="batchId != null">
  48. and BATCH_ID = #{batchId}
  49. </if>
  50. <if test="portId != null">
  51. and PORT_ID = #{portId}
  52. </if>
  53. <if test="downSwimPortId != null">
  54. and DOWN_SWIM_PORT_ID = #{downSwimPortId}
  55. </if>
  56. <if test="attorneyPickupContactPerson != null and attorneyPickupContactPerson != ''">
  57. and ATTORNEY_PICKUP_CONTACT_PERSON = #{attorneyPickupContactPerson}
  58. </if>
  59. <if test="attorenyPickupIdcard != null and attorenyPickupIdcard != ''">
  60. and ATTORENY_PICKUP_IDCARD = #{attorenyPickupIdcard}
  61. </if>
  62. <if test="attorneyContactTelephone != null and attorneyContactTelephone != ''">
  63. and ATTORNEY_CONTACT_TELEPHONE = #{attorneyContactTelephone}
  64. </if>
  65. <if test="attorneyTime != null">
  66. and TO_CHAR(ATTORNEY_TIME,'yyyy-MM-dd') = #{attorneyTime}
  67. </if>
  68. <if test="attorneyPdffile != null and attorneyPdffile != ''">
  69. and ATTORNEY_PDFFILE = #{attorneyPdffile}
  70. </if>
  71. <if test="deleteName != null and deleteName != ''">
  72. and DELETE_NAME = #{deleteName}
  73. </if>
  74. <if test="deleteTime != null and deleteTime != ''">
  75. and DELETE_TIME = #{deleteTime}
  76. </if>
  77. <if test="insertUsername != null and insertUsername != ''">
  78. and INSERT_USERNAME = #{insertUsername}
  79. </if>
  80. <if test="insertTime != null">
  81. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  82. </if>
  83. <if test="updateUsername != null and updateUsername != ''">
  84. and UPDATE_USERNAME = #{updateUsername}
  85. </if>
  86. <if test="updateTime != null">
  87. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  88. </if>
  89. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  90. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  91. </if>
  92. <if test="deleted != null">
  93. and DELETED = #{deleted}
  94. </if>
  95. <if test="attorneyDistributionStatus != null">
  96. and ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus}
  97. </if>
  98. </where>
  99. </sql>
  100. <sql id="whereLike">
  101. <where>
  102. <if test="attorneyId != null">
  103. and ATTORNEY_ID = #{attorneyId}
  104. </if>
  105. <if test="batchId != null">
  106. and BATCH_ID = #{batchId}
  107. </if>
  108. <if test="portId != null">
  109. and PORT_ID = #{portId}
  110. </if>
  111. <if test="downSwimPortId != null">
  112. and DOWN_SWIM_PORT_ID = #{downSwimPortId}
  113. </if>
  114. <if test="attorneyPickupContactPerson != null and attorneyPickupContactPerson != ''">
  115. and ATTORNEY_PICKUP_CONTACT_PERSON LIKE '%${attorneyPickupContactPerson}%'
  116. </if>
  117. <if test="attorenyPickupIdcard != null and attorenyPickupIdcard != ''">
  118. and ATTORENY_PICKUP_IDCARD LIKE '%${attorenyPickupIdcard}%'
  119. </if>
  120. <if test="attorneyContactTelephone != null and attorneyContactTelephone != ''">
  121. and ATTORNEY_CONTACT_TELEPHONE LIKE '%${attorneyContactTelephone}%'
  122. </if>
  123. <if test="attorneyTime != null">
  124. and TO_CHAR(ATTORNEY_TIME,'yyyy-MM-dd') = #{attorneyTime}
  125. </if>
  126. <if test="attorneyPdffile != null and attorneyPdffile != ''">
  127. and ATTORNEY_PDFFILE LIKE '%${attorneyPdffile}%'
  128. </if>
  129. <if test="deleteName != null and deleteName != ''">
  130. and DELETE_NAME LIKE '%${deleteName}%'
  131. </if>
  132. <if test="deleteTime != null and deleteTime != ''">
  133. and DELETE_TIME LIKE '%${deleteTime}%'
  134. </if>
  135. <if test="insertUsername != null and insertUsername != ''">
  136. and INSERT_USERNAME LIKE '%${insertUsername}%'
  137. </if>
  138. <if test="insertTime != null">
  139. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  140. </if>
  141. <if test="updateUsername != null and updateUsername != ''">
  142. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  143. </if>
  144. <if test="updateTime != null">
  145. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  146. </if>
  147. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  148. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  149. </if>
  150. <if test="deleted != null">
  151. and DELETED = #{deleted}
  152. </if>
  153. <if test="attorneyDistributionStatus != null">
  154. and ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus}
  155. </if>
  156. </where>
  157. </sql>
  158. <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
  159. delete from AMSSHIP_DELIVERY_ATTORNEY
  160. where ATTORNEY_ID = #{attorneyId,jdbcType=DECIMAL}
  161. </delete>
  162. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  163. delete from AMSSHIP_DELIVERY_ATTORNEY
  164. where 1!=1
  165. <if test="batchId != null">
  166. or BATCH_ID = #{batchId}
  167. </if>
  168. <if test="portId != null">
  169. or PORT_ID = #{portId}
  170. </if>
  171. <if test="downSwimPortId != null">
  172. or DOWN_SWIM_PORT_ID = #{downSwimPortId}
  173. </if>
  174. <if test="attorneyPickupContactPerson != null and attorneyPickupContactPerson != ''">
  175. or ATTORNEY_PICKUP_CONTACT_PERSON = #{attorneyPickupContactPerson}
  176. </if>
  177. <if test="attorenyPickupIdcard != null and attorenyPickupIdcard != ''">
  178. or ATTORENY_PICKUP_IDCARD = #{attorenyPickupIdcard}
  179. </if>
  180. <if test="attorneyContactTelephone != null and attorneyContactTelephone != ''">
  181. or ATTORNEY_CONTACT_TELEPHONE = #{attorneyContactTelephone}
  182. </if>
  183. <if test="attorneyTime != null">
  184. or TO_CHAR(ATTORNEY_TIME,'yyyy-MM-dd') = '#{attorneyTime}'
  185. </if>
  186. <if test="attorneyPdffile != null and attorneyPdffile != ''">
  187. or ATTORNEY_PDFFILE = #{attorneyPdffile}
  188. </if>
  189. <if test="deleteName != null and deleteName != ''">
  190. or DELETE_NAME = #{deleteName}
  191. </if>
  192. <if test="deleteTime != null and deleteTime != ''">
  193. or DELETE_TIME = #{deleteTime}
  194. </if>
  195. <if test="insertUsername != null and insertUsername != ''">
  196. or INSERT_USERNAME = #{insertUsername}
  197. </if>
  198. <if test="insertTime != null">
  199. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  200. </if>
  201. <if test="updateUsername != null and updateUsername != ''">
  202. or UPDATE_USERNAME = #{updateUsername}
  203. </if>
  204. <if test="updateTime != null">
  205. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  206. </if>
  207. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  208. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  209. </if>
  210. <if test="deleted != null">
  211. or DELETED = #{deleted}
  212. </if>
  213. <if test="attorneyDistributionStatus != null">
  214. or ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus}
  215. </if>
  216. </delete>
  217. <insert id="insert" parameterType="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
  218. insert into AMSSHIP_DELIVERY_ATTORNEY (ATTORNEY_ID, BATCH_ID, PORT_ID,
  219. DOWN_SWIM_PORT_ID, ATTORNEY_PICKUP_CONTACT_PERSON,
  220. ATTORENY_PICKUP_IDCARD, ATTORNEY_CONTACT_TELEPHONE,
  221. ATTORNEY_TIME, ATTORNEY_PDFFILE, DELETE_NAME,
  222. DELETE_TIME, INSERT_USERNAME, INSERT_TIME,
  223. UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
  224. DELETED, ATTORNEY_DISTRIBUTION_STATUS)
  225. values (#{attorneyId,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL}, #{portId,jdbcType=DECIMAL},
  226. #{downSwimPortId,jdbcType=DECIMAL}, #{attorneyPickupContactPerson,jdbcType=VARCHAR},
  227. #{attorenyPickupIdcard,jdbcType=VARCHAR}, #{attorneyContactTelephone,jdbcType=VARCHAR},
  228. #{attorneyTime,jdbcType=TIMESTAMP}, #{attorneyPdffile,jdbcType=VARCHAR}, #{deleteName,jdbcType=VARCHAR},
  229. #{deleteTime,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
  230. #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
  231. #{deleted,jdbcType=DECIMAL}, #{attorneyDistributionStatus,jdbcType=DECIMAL})
  232. </insert>
  233. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
  234. insert into AMSSHIP_DELIVERY_ATTORNEY
  235. <trim prefix="(" suffix=")" suffixOverrides=",">
  236. <if test="attorneyId != null">
  237. ATTORNEY_ID,
  238. </if>
  239. <if test="batchId != null">
  240. BATCH_ID,
  241. </if>
  242. <if test="portId != null">
  243. PORT_ID,
  244. </if>
  245. <if test="downSwimPortId != null">
  246. DOWN_SWIM_PORT_ID,
  247. </if>
  248. <if test="attorneyPickupContactPerson != null">
  249. ATTORNEY_PICKUP_CONTACT_PERSON,
  250. </if>
  251. <if test="attorenyPickupIdcard != null">
  252. ATTORENY_PICKUP_IDCARD,
  253. </if>
  254. <if test="attorneyContactTelephone != null">
  255. ATTORNEY_CONTACT_TELEPHONE,
  256. </if>
  257. <if test="attorneyTime != null">
  258. ATTORNEY_TIME,
  259. </if>
  260. <if test="attorneyPdffile != null">
  261. ATTORNEY_PDFFILE,
  262. </if>
  263. <if test="deleteName != null">
  264. DELETE_NAME,
  265. </if>
  266. <if test="deleteTime != null">
  267. DELETE_TIME,
  268. </if>
  269. <if test="insertUsername != null">
  270. INSERT_USERNAME,
  271. </if>
  272. <if test="insertTime != null">
  273. INSERT_TIME,
  274. </if>
  275. <if test="updateUsername != null">
  276. UPDATE_USERNAME,
  277. </if>
  278. <if test="updateTime != null">
  279. UPDATE_TIME,
  280. </if>
  281. <if test="insertUpdateRemark != null">
  282. INSERT_UPDATE_REMARK,
  283. </if>
  284. <if test="deleted != null">
  285. DELETED,
  286. </if>
  287. <if test="attorneyDistributionStatus != null">
  288. ATTORNEY_DISTRIBUTION_STATUS,
  289. </if>
  290. </trim>
  291. <trim prefix="values (" suffix=")" suffixOverrides=",">
  292. <if test="attorneyId != null">
  293. #{attorneyId,jdbcType=DECIMAL},
  294. </if>
  295. <if test="batchId != null">
  296. #{batchId,jdbcType=DECIMAL},
  297. </if>
  298. <if test="portId != null">
  299. #{portId,jdbcType=DECIMAL},
  300. </if>
  301. <if test="downSwimPortId != null">
  302. #{downSwimPortId,jdbcType=DECIMAL},
  303. </if>
  304. <if test="attorneyPickupContactPerson != null">
  305. #{attorneyPickupContactPerson,jdbcType=VARCHAR},
  306. </if>
  307. <if test="attorenyPickupIdcard != null">
  308. #{attorenyPickupIdcard,jdbcType=VARCHAR},
  309. </if>
  310. <if test="attorneyContactTelephone != null">
  311. #{attorneyContactTelephone,jdbcType=VARCHAR},
  312. </if>
  313. <if test="attorneyTime != null">
  314. #{attorneyTime,jdbcType=TIMESTAMP},
  315. </if>
  316. <if test="attorneyPdffile != null">
  317. #{attorneyPdffile,jdbcType=VARCHAR},
  318. </if>
  319. <if test="deleteName != null">
  320. #{deleteName,jdbcType=VARCHAR},
  321. </if>
  322. <if test="deleteTime != null">
  323. #{deleteTime,jdbcType=VARCHAR},
  324. </if>
  325. <if test="insertUsername != null">
  326. #{insertUsername,jdbcType=VARCHAR},
  327. </if>
  328. <if test="insertTime != null">
  329. #{insertTime,jdbcType=TIMESTAMP},
  330. </if>
  331. <if test="updateUsername != null">
  332. #{updateUsername,jdbcType=VARCHAR},
  333. </if>
  334. <if test="updateTime != null">
  335. #{updateTime,jdbcType=TIMESTAMP},
  336. </if>
  337. <if test="insertUpdateRemark != null">
  338. #{insertUpdateRemark,jdbcType=VARCHAR},
  339. </if>
  340. <if test="deleted != null">
  341. #{deleted,jdbcType=DECIMAL},
  342. </if>
  343. <if test="attorneyDistributionStatus != null">
  344. #{attorneyDistributionStatus,jdbcType=DECIMAL},
  345. </if>
  346. </trim>
  347. </insert>
  348. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
  349. update AMSSHIP_DELIVERY_ATTORNEY
  350. set BATCH_ID = #{batchId,jdbcType=DECIMAL},
  351. PORT_ID = #{portId,jdbcType=DECIMAL},
  352. DOWN_SWIM_PORT_ID = #{downSwimPortId,jdbcType=DECIMAL},
  353. ATTORNEY_PICKUP_CONTACT_PERSON = #{attorneyPickupContactPerson,jdbcType=VARCHAR},
  354. ATTORENY_PICKUP_IDCARD = #{attorenyPickupIdcard,jdbcType=VARCHAR},
  355. ATTORNEY_CONTACT_TELEPHONE = #{attorneyContactTelephone,jdbcType=VARCHAR},
  356. ATTORNEY_TIME = #{attorneyTime,jdbcType=TIMESTAMP},
  357. ATTORNEY_PDFFILE = #{attorneyPdffile,jdbcType=VARCHAR},
  358. DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
  359. DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
  360. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  361. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  362. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  363. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  364. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  365. DELETED = #{deleted,jdbcType=DECIMAL},
  366. ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus,jdbcType=DECIMAL}
  367. where ATTORNEY_ID = #{attorneyId,jdbcType=DECIMAL}
  368. </update>
  369. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
  370. update AMSSHIP_DELIVERY_ATTORNEY
  371. <set>
  372. <if test="batchId != null">
  373. BATCH_ID = #{batchId,jdbcType=DECIMAL},
  374. </if>
  375. <if test="portId != null">
  376. PORT_ID = #{portId,jdbcType=DECIMAL},
  377. </if>
  378. <if test="downSwimPortId != null">
  379. DOWN_SWIM_PORT_ID = #{downSwimPortId,jdbcType=DECIMAL},
  380. </if>
  381. <if test="attorneyPickupContactPerson != null">
  382. ATTORNEY_PICKUP_CONTACT_PERSON = #{attorneyPickupContactPerson,jdbcType=VARCHAR},
  383. </if>
  384. <if test="attorenyPickupIdcard != null">
  385. ATTORENY_PICKUP_IDCARD = #{attorenyPickupIdcard,jdbcType=VARCHAR},
  386. </if>
  387. <if test="attorneyContactTelephone != null">
  388. ATTORNEY_CONTACT_TELEPHONE = #{attorneyContactTelephone,jdbcType=VARCHAR},
  389. </if>
  390. <if test="attorneyTime != null">
  391. ATTORNEY_TIME = #{attorneyTime,jdbcType=TIMESTAMP},
  392. </if>
  393. <if test="attorneyPdffile != null">
  394. ATTORNEY_PDFFILE = #{attorneyPdffile,jdbcType=VARCHAR},
  395. </if>
  396. <if test="deleteName != null">
  397. DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
  398. </if>
  399. <if test="deleteTime != null">
  400. DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
  401. </if>
  402. <if test="insertUsername != null">
  403. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  404. </if>
  405. <if test="insertTime != null">
  406. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  407. </if>
  408. <if test="updateUsername != null">
  409. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  410. </if>
  411. <if test="updateTime != null">
  412. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  413. </if>
  414. <if test="insertUpdateRemark != null">
  415. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  416. </if>
  417. <if test="deleted != null">
  418. DELETED = #{deleted,jdbcType=DECIMAL},
  419. </if>
  420. <if test="attorneyDistributionStatus != null">
  421. ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus,jdbcType=DECIMAL},
  422. </if>
  423. </set>
  424. where ATTORNEY_ID = #{attorneyId,jdbcType=DECIMAL}
  425. </update>
  426. <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
  427. <include refid="select" />
  428. where ATTORNEY_ID = #{attorneyId,jdbcType=DECIMAL}
  429. </select>
  430. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  431. <include refid="select" />
  432. <include refid="where" />
  433. </select>
  434. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  435. <include refid="select" />
  436. <include refid="whereLike" />
  437. </select>
  438. <insert id="batchInsert" parameterType="java.util.List">
  439. insert into AMSSHIP_DELIVERY_ATTORNEY
  440. (ATTORNEY_ID,
  441. BATCH_ID, PORT_ID, DOWN_SWIM_PORT_ID,
  442. ATTORNEY_PICKUP_CONTACT_PERSON, ATTORENY_PICKUP_IDCARD,
  443. ATTORNEY_CONTACT_TELEPHONE, ATTORNEY_TIME,
  444. ATTORNEY_PDFFILE, DELETE_NAME,
  445. DELETE_TIME, INSERT_USERNAME, INSERT_TIME,
  446. UPDATE_USERNAME, UPDATE_TIME,
  447. INSERT_UPDATE_REMARK, DELETED,
  448. ATTORNEY_DISTRIBUTION_STATUS)
  449. ( <foreach collection="list" item="item" separator="union all">
  450. select
  451. #{item.attorneyId,jdbcType=DECIMAL},
  452. #{item.batchId,jdbcType=DECIMAL}, #{item.portId,jdbcType=DECIMAL}, #{item.downSwimPortId,jdbcType=DECIMAL},
  453. #{item.attorneyPickupContactPerson,jdbcType=VARCHAR}, #{item.attorenyPickupIdcard,jdbcType=VARCHAR},
  454. #{item.attorneyContactTelephone,jdbcType=VARCHAR}, #{item.attorneyTime,jdbcType=TIMESTAMP},
  455. #{item.attorneyPdffile,jdbcType=VARCHAR}, #{item.deleteName,jdbcType=VARCHAR},
  456. #{item.deleteTime,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
  457. #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
  458. #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
  459. #{item.attorneyDistributionStatus,jdbcType=DECIMAL} from dual
  460. </foreach> )
  461. </insert>
  462. <update id="batchUpdate" parameterType="java.util.List">
  463. update AMSSHIP_DELIVERY_ATTORNEY
  464. set
  465. ATTORNEY_ID=
  466. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  467. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyId,jdbcType=DECIMAL}
  468. </foreach>
  469. ,BATCH_ID=
  470. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  471. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
  472. </foreach>
  473. ,PORT_ID=
  474. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  475. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.portId,jdbcType=DECIMAL}
  476. </foreach>
  477. ,DOWN_SWIM_PORT_ID=
  478. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  479. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.downSwimPortId,jdbcType=DECIMAL}
  480. </foreach>
  481. ,ATTORNEY_PICKUP_CONTACT_PERSON=
  482. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  483. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyPickupContactPerson,jdbcType=VARCHAR}
  484. </foreach>
  485. ,ATTORENY_PICKUP_IDCARD=
  486. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  487. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorenyPickupIdcard,jdbcType=VARCHAR}
  488. </foreach>
  489. ,ATTORNEY_CONTACT_TELEPHONE=
  490. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  491. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyContactTelephone,jdbcType=VARCHAR}
  492. </foreach>
  493. ,ATTORNEY_TIME=
  494. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  495. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyTime,jdbcType=TIMESTAMP}
  496. </foreach>
  497. ,ATTORNEY_PDFFILE=
  498. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  499. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyPdffile,jdbcType=VARCHAR}
  500. </foreach>
  501. ,DELETE_NAME=
  502. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  503. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
  504. </foreach>
  505. ,DELETE_TIME=
  506. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  507. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
  508. </foreach>
  509. ,INSERT_USERNAME=
  510. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  511. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  512. </foreach>
  513. ,INSERT_TIME=
  514. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  515. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  516. </foreach>
  517. ,UPDATE_USERNAME=
  518. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  519. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  520. </foreach>
  521. ,UPDATE_TIME=
  522. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  523. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  524. </foreach>
  525. ,INSERT_UPDATE_REMARK=
  526. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  527. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  528. </foreach>
  529. ,DELETED=
  530. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  531. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
  532. </foreach>
  533. ,ATTORNEY_DISTRIBUTION_STATUS=
  534. <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
  535. when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyDistributionStatus,jdbcType=DECIMAL}
  536. </foreach>
  537. where ATTORNEY_ID in
  538. <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
  539. #{item.attorneyId,jdbcType=DECIMAL}
  540. </foreach>
  541. </update>
  542. <delete id="batchDelete" parameterType="java.util.List">
  543. delete from AMSSHIP_DELIVERY_ATTORNEY
  544. where ATTORNEY_ID in
  545. <foreach close=")" collection="list" item="id" open="(" separator=",">
  546. #{id}
  547. </foreach>
  548. </delete>
  549. <!-- 友情提示!!!-->
  550. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  551. <!--展示货权转移列表-->
  552. <select id="selectshipCargoTranferResult" resultType="java.util.Map">
  553. select *
  554. from(select
  555. t3.SHIPPER_NAME "shipperName",
  556. t4.CARRIER_NAME "carrierName",
  557. t6.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
  558. t8.MATERIAL_NAME "materialName",
  559. t5.PORT_NAME "portName",
  560. t5.PORT_NAME "portName1",
  561. t1.ATTORNEY_PICKUP_CONTACT_PERSON "attorneyPickupContactPerson",
  562. t1.ATTORENY_PICKUP_IDCARD "attorneyPickupIdcard",
  563. t1.ATTORNEY_CONTACT_TELEPHONE "attorneyContactTelephone",
  564. t1.ATTORNEY_TIME "attorneyTime",
  565. t2.CARRIER_ID "carrierId",
  566. t2.REQUESTER_GROUP_ID "groupId",
  567. t1.ATTORNEY_ID "attorneyId",
  568. t1.BATCH_ID "batchId",
  569. t1.INSERT_TIME "insertTime",
  570. ALUMINA_CONTENT "purchaseOrderMaterialNumber"
  571. from AMSSHIP_DELIVERY_ATTORNEY t1
  572. left join AMSSHIP_DELIVERY_NOTICE t2
  573. on t1.BATCH_ID=t2.BATCH_ID
  574. left join RMS_SHIPPER t3
  575. on t2.REQUESTER_GROUP_ID=t3.SHIPPER_ID
  576. left join RMS_CARRIER t4
  577. on t2.CARRIER_ID=t4.CARRIER_ID
  578. left join RMS_PORT t5
  579. on t1.PORT_ID=t5.PORT_ID
  580. left join DIL_BATCH t6
  581. on t1.BATCH_ID=t6.BATCH_ID
  582. left join AMS_PURCHASE_ORDER t7
  583. on t6.BATCH_ID=t7.BATCH_ID
  584. left join RMS_MATERIAL t8
  585. on t6.MATERIAL_ID=t8.MATERIAL_ID
  586. left join AMSSHIP_CARGO_TRANSFER_RESULT ACTR
  587. on t1.BATCH_ID = ACTR.BATCH_ID
  588. where t1.deleted = 0 and t1.ATTORNEY_DISTRIBUTION_STATUS=#{status}
  589. )
  590. <where>
  591. <if test="shipperName!= null">
  592. and t3.SHIPPER_NAME in
  593. <foreach close=")" collection="shipperName" item="item" open="(" separator=",">
  594. #{item}
  595. </foreach>
  596. </if>
  597. <if test="carrierName!= null">
  598. and t4.CARRIER_NAME in
  599. <foreach close=")" collection="carrierName" item="item" open="(" separator=",">
  600. #{item}
  601. </foreach>
  602. </if>
  603. <if test="materialName!= null">
  604. and t8.MATERIAL_NAME in
  605. <foreach close=")" collection="materialName" item="item" open="(" separator=",">
  606. #{item}
  607. </foreach>
  608. </if>
  609. <if test="portName!= null">
  610. and t5.PORT_NAME in
  611. <foreach close=")" collection="portName" item="item" open="(" separator=",">
  612. #{item}
  613. </foreach>
  614. </if>
  615. <if test="portName1!= null">
  616. and t5.PORT_NAME in
  617. <foreach close=")" collection="portName1" item="item" open="(" separator=",">
  618. #{item}
  619. </foreach>
  620. </if>
  621. </where>
  622. <include refid="orderByInsertTime" />
  623. </select>
  624. <!--根据时间排序-->
  625. <sql id="orderByInsertTime">
  626. <if test="orderField != null and orderField != ''">
  627. order by "${orderField}"
  628. <if test="orderType != null and orderType != ''">
  629. ${orderType}
  630. </if>
  631. </if>
  632. <if test="orderField == null ">
  633. order by "insertTime" desc
  634. </if>
  635. </sql>
  636. <!-- 下拉框中获取收货人单位 -->
  637. <select id="getPortName" resultType="java.util.LinkedHashMap">
  638. select RP.PORT_ID "id",
  639. RP.PORT_ID "value",
  640. RP.PORT_NAME "label"
  641. from RMS_PORT RP
  642. WHERE RP.PORT_TYPE_ID = 1
  643. </select>
  644. <!-- 下拉框中获取放货通知单id-->
  645. <select id="getNoticeId" resultType="java.util.LinkedHashMap">
  646. select ADN.NOTICE_ID "id",
  647. ADN.NOTICE_ID "value",
  648. ADN.NOTICE_ID "label"
  649. from AMSSHIP_DELIVERY_NOTICE ADN
  650. </select>
  651. <!-- 根据主键id进行查询-->
  652. <select id="getDeliveryAttorneyId" resultType="java.util.Map">
  653. select t1.BATCH_ID "batchId",
  654. t1.PORT_ID "portId",
  655. t1.DOWN_SWIM_PORT_ID "downSwimPortId",
  656. t1.ATTORNEY_PICKUP_CONTACT_PERSON "attorneyPickupContactPerson",
  657. t1.ATTORENY_PICKUP_IDCARD "attorneyPickupIdcard",
  658. t1.ATTORNEY_CONTACT_TELEPHONE "attorneyContactTelephone",
  659. t1.ATTORNEY_TIME "attorneytime",
  660. t1.ATTORNEY_PDFFILE "attorneyPdffile"
  661. from AMSSHIP_DELIVERY_ATTORNEY t1
  662. where t1.ATTORNEY_ID = #{attorneyId}
  663. </select>
  664. <!--得到提货通知单id-->
  665. <select id="getAttorneyId" resultType="java.util.LinkedHashMap">
  666. SELECT ada.ATTORNEY_ID "id",
  667. ada.ATTORNEY_ID "value",
  668. ada.ATTORNEY_PICKUP_CONTACT_PERSON "label"
  669. FROM AMSSHIP_DELIVERY_ATTORNEY ada
  670. </select>
  671. <!--得到发件人id(港口)-->
  672. <select id="getPortId" resultType="java.util.LinkedHashMap">
  673. SELECT rp.PORT_ID "id",
  674. rp.PORT_ID "value",
  675. rp.PORT_NAME "label"
  676. FROM RMS_PORT rp
  677. </select>
  678. <!--得到收件人id(下游码头)-->
  679. <select id="getPierId" resultType="java.util.LinkedHashMap">
  680. SELECT rp.PIER_ID "id",
  681. rp.PIER_ID "value",
  682. rp.PIER_NAME "label"
  683. FROM RMS_PIER rp
  684. </select>
  685. <select id="getRmRawId" resultType="java.util.LinkedHashMap">
  686. SELECT rrmr.GM_ID "id",
  687. rrmr.GM_ID "value",
  688. rrmr.GM_TONNAGE "label"
  689. FROM WMSH_GRID_MATERIAL rrmr
  690. </select>
  691. </mapper>