AmsshipDeliveryNoticeMapper.xml 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980
  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.AmsshipDeliveryNoticeMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmsshipDeliveryNotice">
  5. <id column="NOTICE_ID" jdbcType="DECIMAL" property="noticeId" />
  6. <result column="REQUESTER_GROUP_ID" jdbcType="DECIMAL" property="requesterGroupId" />
  7. <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
  8. <result column="NOTICE_COMMERCE_METHOD" jdbcType="VARCHAR" property="noticeCommerceMethod" />
  9. <result column="NOTICE_HANDOVER_METHOD" jdbcType="VARCHAR" property="noticeHandoverMethod" />
  10. <result column="PORT_ID" jdbcType="DECIMAL" property="portId" />
  11. <result column="NOTICE_PORT_CONSTRUCTION_FEE" jdbcType="DECIMAL" property="noticePortConstructionFee" />
  12. <result column="NOTICE_DELIVERY_TIME" jdbcType="TIMESTAMP" property="noticeDeliveryTime" />
  13. <result column="NOTICE_PILE_FREE_DAYS" jdbcType="DECIMAL" property="noticePileFreeDays" />
  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="NOTICE_DISTRIBUTION_STATUS" jdbcType="VARCHAR" property="noticeDistributionStatus" />
  22. <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
  23. <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
  24. <result column="PURCHASE_CONTRACT_UNIT_PRICE" jdbcType="DECIMAL" property="purchaseContractUnitPrice" />
  25. <result column="PURCHASE_CONTRACT_MOISTURE" jdbcType="VARCHAR" property="purchaseContractMoisture" />
  26. <result column="TFE_CONTENT" jdbcType="DECIMAL" property="tfeContent" />
  27. <result column="SILICA_CONTENT" jdbcType="DECIMAL" property="silicaContent" />
  28. <result column="ALUMINA_CONTENT" jdbcType="DECIMAL" property="aluminaContent" />
  29. <result column="PHOSPHORUS_CONTENT" jdbcType="DECIMAL" property="phosphorusContent" />
  30. <result column="MANGANESE_CONTENT" jdbcType="DECIMAL" property="manganeseContent" />
  31. </resultMap>
  32. <sql id="columns">
  33. NOTICE_ID, REQUESTER_GROUP_ID, CARRIER_ID, NOTICE_COMMERCE_METHOD, NOTICE_HANDOVER_METHOD,
  34. PORT_ID, NOTICE_PORT_CONSTRUCTION_FEE, NOTICE_DELIVERY_TIME, NOTICE_PILE_FREE_DAYS,
  35. DELETE_NAME, DELETE_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
  36. INSERT_UPDATE_REMARK, NOTICE_DISTRIBUTION_STATUS, DELETED, BATCH_ID, PURCHASE_CONTRACT_UNIT_PRICE,
  37. PURCHASE_CONTRACT_MOISTURE, TFE_CONTENT, SILICA_CONTENT,
  38. ALUMINA_CONTENT, PHOSPHORUS_CONTENT, MANGANESE_CONTENT
  39. </sql>
  40. <sql id="columns_alias">
  41. t.NOTICE_ID, t.REQUESTER_GROUP_ID, t.CARRIER_ID, t.NOTICE_COMMERCE_METHOD, t.NOTICE_HANDOVER_METHOD,
  42. t.PORT_ID, t.NOTICE_PORT_CONSTRUCTION_FEE, t.NOTICE_DELIVERY_TIME, t.NOTICE_PILE_FREE_DAYS,
  43. t.DELETE_NAME, t.DELETE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
  44. t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.NOTICE_DISTRIBUTION_STATUS, t.DELETED, t.BATCH_ID,
  45. t.PURCHASE_CONTRACT_UNIT_PRICE, t.PURCHASE_CONTRACT_MOISTURE, t.PURCHASE_CONTRACT_QUALITYINDEX,
  46. t.TFE_CONTENT, t.SILICA_CONTENT, t.ALUMINA_CONTENT, t.PHOSPHORUS_CONTENT, t.MANGANESE_CONTENT
  47. </sql>
  48. <sql id="select">
  49. SELECT <include refid="columns" /> FROM AMSSHIP_DELIVERY_NOTICE
  50. </sql>
  51. <sql id="select_alias">
  52. SELECT <include refid="columns_alias" /> FROM AMSSHIP_DELIVERY_NOTICE t
  53. </sql>
  54. <sql id="where">
  55. <where>
  56. <if test="noticeId != null">
  57. and NOTICE_ID = #{noticeId}
  58. </if>
  59. <if test="requesterGroupId != null">
  60. and REQUESTER_GROUP_ID = #{requesterGroupId}
  61. </if>
  62. <if test="carrierId != null">
  63. and CARRIER_ID = #{carrierId}
  64. </if>
  65. <if test="noticeCommerceMethod != null and noticeCommerceMethod != ''">
  66. and NOTICE_COMMERCE_METHOD = #{noticeCommerceMethod}
  67. </if>
  68. <if test="noticeHandoverMethod != null and noticeHandoverMethod != ''">
  69. and NOTICE_HANDOVER_METHOD = #{noticeHandoverMethod}
  70. </if>
  71. <if test="portId != null">
  72. and PORT_ID = #{portId}
  73. </if>
  74. <if test="noticePortConstructionFee != null">
  75. and NOTICE_PORT_CONSTRUCTION_FEE = #{noticePortConstructionFee}
  76. </if>
  77. <if test="noticeDeliveryTime != null">
  78. and TO_CHAR(NOTICE_DELIVERY_TIME,'yyyy-MM-dd') = #{noticeDeliveryTime}
  79. </if>
  80. <if test="noticePileFreeDays != null">
  81. and NOTICE_PILE_FREE_DAYS = #{noticePileFreeDays}
  82. </if>
  83. <if test="deleteName != null and deleteName != ''">
  84. and DELETE_NAME = #{deleteName}
  85. </if>
  86. <if test="deleteTime != null and deleteTime != ''">
  87. and DELETE_TIME = #{deleteTime}
  88. </if>
  89. <if test="insertUsername != null and insertUsername != ''">
  90. and INSERT_USERNAME = #{insertUsername}
  91. </if>
  92. <if test="insertTime != null">
  93. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  94. </if>
  95. <if test="updateUsername != null and updateUsername != ''">
  96. and UPDATE_USERNAME = #{updateUsername}
  97. </if>
  98. <if test="updateTime != null">
  99. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  100. </if>
  101. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  102. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  103. </if>
  104. <if test="noticeDistributionStatus != null and noticeDistributionStatus != ''">
  105. and NOTICE_DISTRIBUTION_STATUS = #{noticeDistributionStatus}
  106. </if>
  107. <if test="deleted != null">
  108. and DELETED = #{deleted}
  109. </if>
  110. <if test="batchId != null">
  111. and BATCH_ID = #{batchId}
  112. </if>
  113. <if test="purchaseContractUnitPrice != null">
  114. and PURCHASE_CONTRACT_UNIT_PRICE = #{purchaseContractUnitPrice}
  115. </if>
  116. <if test="purchaseContractMoisture != null and purchaseContractMoisture != ''">
  117. and PURCHASE_CONTRACT_MOISTURE = #{purchaseContractMoisture}
  118. </if>
  119. <if test="purchaseContractQualityindex != null and purchaseContractQualityindex != ''">
  120. and PURCHASE_CONTRACT_QUALITYINDEX = #{purchaseContractQualityindex}
  121. </if>
  122. <if test="tfeContent != null">
  123. and TFE_CONTENT = #{tfeContent}
  124. </if>
  125. <if test="silicaContent != null">
  126. and SILICA_CONTENT = #{silicaContent}
  127. </if>
  128. <if test="aluminaContent != null">
  129. and ALUMINA_CONTENT = #{aluminaContent}
  130. </if>
  131. <if test="phosphorusContent != null">
  132. and PHOSPHORUS_CONTENT = #{phosphorusContent}
  133. </if>
  134. <if test="manganeseContent != null">
  135. and MANGANESE_CONTENT = #{manganeseContent}
  136. </if>
  137. </where>
  138. </sql>
  139. <sql id="whereLike">
  140. <where>
  141. <if test="noticeId != null">
  142. and NOTICE_ID = #{noticeId}
  143. </if>
  144. <if test="requesterGroupId != null">
  145. and REQUESTER_GROUP_ID = #{requesterGroupId}
  146. </if>
  147. <if test="carrierId != null">
  148. and CARRIER_ID = #{carrierId}
  149. </if>
  150. <if test="noticeCommerceMethod != null and noticeCommerceMethod != ''">
  151. and NOTICE_COMMERCE_METHOD LIKE '%${noticeCommerceMethod}%'
  152. </if>
  153. <if test="noticeHandoverMethod != null and noticeHandoverMethod != ''">
  154. and NOTICE_HANDOVER_METHOD LIKE '%${noticeHandoverMethod}%'
  155. </if>
  156. <if test="portId != null">
  157. and PORT_ID = #{portId}
  158. </if>
  159. <if test="noticePortConstructionFee != null">
  160. and NOTICE_PORT_CONSTRUCTION_FEE = #{noticePortConstructionFee}
  161. </if>
  162. <if test="noticeDeliveryTime != null">
  163. and TO_CHAR(NOTICE_DELIVERY_TIME,'yyyy-MM-dd') = #{noticeDeliveryTime}
  164. </if>
  165. <if test="noticePileFreeDays != null">
  166. and NOTICE_PILE_FREE_DAYS = #{noticePileFreeDays}
  167. </if>
  168. <if test="deleteName != null and deleteName != ''">
  169. and DELETE_NAME LIKE '%${deleteName}%'
  170. </if>
  171. <if test="deleteTime != null and deleteTime != ''">
  172. and DELETE_TIME LIKE '%${deleteTime}%'
  173. </if>
  174. <if test="insertUsername != null and insertUsername != ''">
  175. and INSERT_USERNAME LIKE '%${insertUsername}%'
  176. </if>
  177. <if test="insertTime != null">
  178. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  179. </if>
  180. <if test="updateUsername != null and updateUsername != ''">
  181. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  182. </if>
  183. <if test="updateTime != null">
  184. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  185. </if>
  186. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  187. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  188. </if>
  189. <if test="noticeDistributionStatus != null and noticeDistributionStatus != ''">
  190. and NOTICE_DISTRIBUTION_STATUS LIKE '%${noticeDistributionStatus}%'
  191. </if>
  192. <if test="deleted != null">
  193. and DELETED = #{deleted}
  194. </if>
  195. <if test="batchId != null">
  196. and BATCH_ID = #{batchId}
  197. </if>
  198. <if test="purchaseContractUnitPrice != null">
  199. and PURCHASE_CONTRACT_UNIT_PRICE = #{purchaseContractUnitPrice}
  200. </if>
  201. <if test="purchaseContractMoisture != null and purchaseContractMoisture != ''">
  202. and PURCHASE_CONTRACT_MOISTURE LIKE '%${purchaseContractMoisture}%'
  203. </if>
  204. <if test="purchaseContractQualityindex != null and purchaseContractQualityindex != ''">
  205. and PURCHASE_CONTRACT_QUALITYINDEX LIKE '%${purchaseContractQualityindex}%'
  206. </if>
  207. <if test="tfeContent != null">
  208. and TFE_CONTENT = #{tfeContent}
  209. </if>
  210. <if test="silicaContent != null">
  211. and SILICA_CONTENT = #{silicaContent}
  212. </if>
  213. <if test="aluminaContent != null">
  214. and ALUMINA_CONTENT = #{aluminaContent}
  215. </if>
  216. <if test="phosphorusContent != null">
  217. and PHOSPHORUS_CONTENT = #{phosphorusContent}
  218. </if>
  219. <if test="manganeseContent != null">
  220. and MANGANESE_CONTENT = #{manganeseContent}
  221. </if>
  222. </where>
  223. </sql>
  224. <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
  225. delete from AMSSHIP_DELIVERY_NOTICE
  226. where NOTICE_ID = #{noticeId,jdbcType=DECIMAL}
  227. </delete>
  228. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  229. delete from AMSSHIP_DELIVERY_NOTICE
  230. where 1!=1
  231. <if test="requesterGroupId != null">
  232. or REQUESTER_GROUP_ID = #{requesterGroupId}
  233. </if>
  234. <if test="carrierId != null">
  235. or CARRIER_ID = #{carrierId}
  236. </if>
  237. <if test="noticeCommerceMethod != null and noticeCommerceMethod != ''">
  238. or NOTICE_COMMERCE_METHOD = #{noticeCommerceMethod}
  239. </if>
  240. <if test="noticeHandoverMethod != null and noticeHandoverMethod != ''">
  241. or NOTICE_HANDOVER_METHOD = #{noticeHandoverMethod}
  242. </if>
  243. <if test="portId != null">
  244. or PORT_ID = #{portId}
  245. </if>
  246. <if test="noticePortConstructionFee != null">
  247. or NOTICE_PORT_CONSTRUCTION_FEE = #{noticePortConstructionFee}
  248. </if>
  249. <if test="noticeDeliveryTime != null">
  250. or TO_CHAR(NOTICE_DELIVERY_TIME,'yyyy-MM-dd') = '#{noticeDeliveryTime}'
  251. </if>
  252. <if test="noticePileFreeDays != null">
  253. or NOTICE_PILE_FREE_DAYS = #{noticePileFreeDays}
  254. </if>
  255. <if test="deleteName != null and deleteName != ''">
  256. or DELETE_NAME = #{deleteName}
  257. </if>
  258. <if test="deleteTime != null and deleteTime != ''">
  259. or DELETE_TIME = #{deleteTime}
  260. </if>
  261. <if test="insertUsername != null and insertUsername != ''">
  262. or INSERT_USERNAME = #{insertUsername}
  263. </if>
  264. <if test="insertTime != null">
  265. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  266. </if>
  267. <if test="updateUsername != null and updateUsername != ''">
  268. or UPDATE_USERNAME = #{updateUsername}
  269. </if>
  270. <if test="updateTime != null">
  271. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  272. </if>
  273. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  274. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  275. </if>
  276. <if test="noticeDistributionStatus != null and noticeDistributionStatus != ''">
  277. or NOTICE_DISTRIBUTION_STATUS = #{noticeDistributionStatus}
  278. </if>
  279. <if test="deleted != null">
  280. or DELETED = #{deleted}
  281. </if>
  282. <if test="batchId != null">
  283. or BATCH_ID = #{batchId}
  284. </if>
  285. <if test="purchaseContractUnitPrice != null">
  286. or PURCHASE_CONTRACT_UNIT_PRICE = #{purchaseContractUnitPrice}
  287. </if>
  288. <if test="purchaseContractMoisture != null and purchaseContractMoisture != ''">
  289. or PURCHASE_CONTRACT_MOISTURE = #{purchaseContractMoisture}
  290. </if>
  291. <if test="purchaseContractQualityindex != null and purchaseContractQualityindex != ''">
  292. or PURCHASE_CONTRACT_QUALITYINDEX = #{purchaseContractQualityindex}
  293. </if>
  294. <if test="tfeContent != null">
  295. or TFE_CONTENT = #{tfeContent}
  296. </if>
  297. <if test="silicaContent != null">
  298. or SILICA_CONTENT = #{silicaContent}
  299. </if>
  300. <if test="aluminaContent != null">
  301. or ALUMINA_CONTENT = #{aluminaContent}
  302. </if>
  303. <if test="phosphorusContent != null">
  304. or PHOSPHORUS_CONTENT = #{phosphorusContent}
  305. </if>
  306. <if test="manganeseContent != null">
  307. or MANGANESE_CONTENT = #{manganeseContent}
  308. </if>
  309. </delete>
  310. <insert id="insert" parameterType="com.steerinfo.dil.model.AmsshipDeliveryNotice">
  311. insert into AMSSHIP_DELIVERY_NOTICE (NOTICE_ID, REQUESTER_GROUP_ID, CARRIER_ID,
  312. NOTICE_COMMERCE_METHOD, NOTICE_HANDOVER_METHOD,
  313. PORT_ID, NOTICE_PORT_CONSTRUCTION_FEE, NOTICE_DELIVERY_TIME,
  314. NOTICE_PILE_FREE_DAYS, DELETE_NAME, DELETE_TIME,
  315. INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
  316. UPDATE_TIME, INSERT_UPDATE_REMARK, NOTICE_DISTRIBUTION_STATUS,
  317. DELETED, BATCH_ID, PURCHASE_CONTRACT_UNIT_PRICE,
  318. PURCHASE_CONTRACT_MOISTURE, PURCHASE_CONTRACT_QUALITYINDEX,
  319. TFE_CONTENT, "SILICA_CONTENT", ALUMINA_CONTENT,
  320. PHOSPHORUS_CONTENT, MANGANESE_CONTENT)
  321. values (#{noticeId,jdbcType=DECIMAL}, #{requesterGroupId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
  322. #{noticeCommerceMethod,jdbcType=VARCHAR}, #{noticeHandoverMethod,jdbcType=VARCHAR},
  323. #{portId,jdbcType=DECIMAL}, #{noticePortConstructionFee,jdbcType=DECIMAL}, #{noticeDeliveryTime,jdbcType=TIMESTAMP},
  324. #{noticePileFreeDays,jdbcType=DECIMAL}, #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=VARCHAR},
  325. #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
  326. #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{noticeDistributionStatus,jdbcType=VARCHAR},
  327. #{deleted,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL}, #{purchaseContractUnitPrice,jdbcType=DECIMAL},
  328. #{purchaseContractMoisture,jdbcType=VARCHAR}, #{purchaseContractQualityindex,jdbcType=VARCHAR},
  329. #{tfeContent,jdbcType=DECIMAL}, #{silicaContent,jdbcType=DECIMAL}, #{aluminaContent,jdbcType=DECIMAL},
  330. #{phosphorusContent,jdbcType=DECIMAL}, #{manganeseContent,jdbcType=DECIMAL})
  331. </insert>
  332. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsshipDeliveryNotice">
  333. insert into AMSSHIP_DELIVERY_NOTICE
  334. <trim prefix="(" suffix=")" suffixOverrides=",">
  335. <if test="noticeId != null">
  336. NOTICE_ID,
  337. </if>
  338. <if test="requesterGroupId != null">
  339. REQUESTER_GROUP_ID,
  340. </if>
  341. <if test="carrierId != null">
  342. CARRIER_ID,
  343. </if>
  344. <if test="noticeCommerceMethod != null">
  345. NOTICE_COMMERCE_METHOD,
  346. </if>
  347. <if test="noticeHandoverMethod != null">
  348. NOTICE_HANDOVER_METHOD,
  349. </if>
  350. <if test="portId != null">
  351. PORT_ID,
  352. </if>
  353. <if test="noticePortConstructionFee != null">
  354. NOTICE_PORT_CONSTRUCTION_FEE,
  355. </if>
  356. <if test="noticeDeliveryTime != null">
  357. NOTICE_DELIVERY_TIME,
  358. </if>
  359. <if test="noticePileFreeDays != null">
  360. NOTICE_PILE_FREE_DAYS,
  361. </if>
  362. <if test="deleteName != null">
  363. DELETE_NAME,
  364. </if>
  365. <if test="deleteTime != null">
  366. DELETE_TIME,
  367. </if>
  368. <if test="insertUsername != null">
  369. INSERT_USERNAME,
  370. </if>
  371. <if test="insertTime != null">
  372. INSERT_TIME,
  373. </if>
  374. <if test="updateUsername != null">
  375. UPDATE_USERNAME,
  376. </if>
  377. <if test="updateTime != null">
  378. UPDATE_TIME,
  379. </if>
  380. <if test="insertUpdateRemark != null">
  381. INSERT_UPDATE_REMARK,
  382. </if>
  383. <if test="noticeDistributionStatus != null">
  384. NOTICE_DISTRIBUTION_STATUS,
  385. </if>
  386. <if test="deleted != null">
  387. DELETED,
  388. </if>
  389. <if test="batchId != null">
  390. BATCH_ID,
  391. </if>
  392. <if test="purchaseContractUnitPrice != null">
  393. PURCHASE_CONTRACT_UNIT_PRICE,
  394. </if>
  395. <if test="purchaseContractMoisture != null">
  396. PURCHASE_CONTRACT_MOISTURE,
  397. </if>
  398. <if test="purchaseContractQualityindex != null">
  399. PURCHASE_CONTRACT_QUALITYINDEX,
  400. </if>
  401. <if test="tfeContent != null">
  402. TFE_CONTENT,
  403. </if>
  404. <if test="silicaContent != null">
  405. "SILICA_CONTENT",
  406. </if>
  407. <if test="aluminaContent != null">
  408. ALUMINA_CONTENT,
  409. </if>
  410. <if test="phosphorusContent != null">
  411. PHOSPHORUS_CONTENT,
  412. </if>
  413. <if test="manganeseContent != null">
  414. MANGANESE_CONTENT,
  415. </if>
  416. </trim>
  417. <trim prefix="values (" suffix=")" suffixOverrides=",">
  418. <if test="noticeId != null">
  419. #{noticeId,jdbcType=DECIMAL},
  420. </if>
  421. <if test="requesterGroupId != null">
  422. #{requesterGroupId,jdbcType=DECIMAL},
  423. </if>
  424. <if test="carrierId != null">
  425. #{carrierId,jdbcType=DECIMAL},
  426. </if>
  427. <if test="noticeCommerceMethod != null">
  428. #{noticeCommerceMethod,jdbcType=VARCHAR},
  429. </if>
  430. <if test="noticeHandoverMethod != null">
  431. #{noticeHandoverMethod,jdbcType=VARCHAR},
  432. </if>
  433. <if test="portId != null">
  434. #{portId,jdbcType=DECIMAL},
  435. </if>
  436. <if test="noticePortConstructionFee != null">
  437. #{noticePortConstructionFee,jdbcType=DECIMAL},
  438. </if>
  439. <if test="noticeDeliveryTime != null">
  440. #{noticeDeliveryTime,jdbcType=TIMESTAMP},
  441. </if>
  442. <if test="noticePileFreeDays != null">
  443. #{noticePileFreeDays,jdbcType=DECIMAL},
  444. </if>
  445. <if test="deleteName != null">
  446. #{deleteName,jdbcType=VARCHAR},
  447. </if>
  448. <if test="deleteTime != null">
  449. #{deleteTime,jdbcType=VARCHAR},
  450. </if>
  451. <if test="insertUsername != null">
  452. #{insertUsername,jdbcType=VARCHAR},
  453. </if>
  454. <if test="insertTime != null">
  455. #{insertTime,jdbcType=TIMESTAMP},
  456. </if>
  457. <if test="updateUsername != null">
  458. #{updateUsername,jdbcType=VARCHAR},
  459. </if>
  460. <if test="updateTime != null">
  461. #{updateTime,jdbcType=TIMESTAMP},
  462. </if>
  463. <if test="insertUpdateRemark != null">
  464. #{insertUpdateRemark,jdbcType=VARCHAR},
  465. </if>
  466. <if test="noticeDistributionStatus != null">
  467. #{noticeDistributionStatus,jdbcType=VARCHAR},
  468. </if>
  469. <if test="deleted != null">
  470. #{deleted,jdbcType=DECIMAL},
  471. </if>
  472. <if test="batchId != null">
  473. #{batchId,jdbcType=DECIMAL},
  474. </if>
  475. <if test="purchaseContractUnitPrice != null">
  476. #{purchaseContractUnitPrice,jdbcType=DECIMAL},
  477. </if>
  478. <if test="purchaseContractMoisture != null">
  479. #{purchaseContractMoisture,jdbcType=VARCHAR},
  480. </if>
  481. <if test="purchaseContractQualityindex != null">
  482. #{purchaseContractQualityindex,jdbcType=VARCHAR},
  483. </if>
  484. <if test="tfeContent != null">
  485. #{tfeContent,jdbcType=DECIMAL},
  486. </if>
  487. <if test="silicaContent != null">
  488. #{silicaContent,jdbcType=DECIMAL},
  489. </if>
  490. <if test="aluminaContent != null">
  491. #{aluminaContent,jdbcType=DECIMAL},
  492. </if>
  493. <if test="phosphorusContent != null">
  494. #{phosphorusContent,jdbcType=DECIMAL},
  495. </if>
  496. <if test="manganeseContent != null">
  497. #{manganeseContent,jdbcType=DECIMAL},
  498. </if>
  499. </trim>
  500. </insert>
  501. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsshipDeliveryNotice">
  502. update AMSSHIP_DELIVERY_NOTICE
  503. set REQUESTER_GROUP_ID = #{requesterGroupId,jdbcType=DECIMAL},
  504. CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
  505. NOTICE_COMMERCE_METHOD = #{noticeCommerceMethod,jdbcType=VARCHAR},
  506. NOTICE_HANDOVER_METHOD = #{noticeHandoverMethod,jdbcType=VARCHAR},
  507. PORT_ID = #{portId,jdbcType=DECIMAL},
  508. NOTICE_PORT_CONSTRUCTION_FEE = #{noticePortConstructionFee,jdbcType=DECIMAL},
  509. NOTICE_DELIVERY_TIME = #{noticeDeliveryTime,jdbcType=TIMESTAMP},
  510. NOTICE_PILE_FREE_DAYS = #{noticePileFreeDays,jdbcType=DECIMAL},
  511. DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
  512. DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
  513. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  514. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  515. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  516. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  517. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  518. NOTICE_DISTRIBUTION_STATUS = #{noticeDistributionStatus,jdbcType=VARCHAR},
  519. DELETED = #{deleted,jdbcType=DECIMAL},
  520. BATCH_ID = #{batchId,jdbcType=DECIMAL},
  521. PURCHASE_CONTRACT_UNIT_PRICE = #{purchaseContractUnitPrice,jdbcType=DECIMAL},
  522. PURCHASE_CONTRACT_MOISTURE = #{purchaseContractMoisture,jdbcType=VARCHAR},
  523. PURCHASE_CONTRACT_QUALITYINDEX = #{purchaseContractQualityindex,jdbcType=VARCHAR},
  524. TFE_CONTENT = #{tfeContent,jdbcType=DECIMAL},
  525. SILICA_CONTENT = #{silicaContent,jdbcType=DECIMAL},
  526. ALUMINA_CONTENT = #{aluminaContent,jdbcType=DECIMAL},
  527. PHOSPHORUS_CONTENT = #{phosphorusContent,jdbcType=DECIMAL},
  528. MANGANESE_CONTENT = #{manganeseContent,jdbcType=DECIMAL}
  529. where NOTICE_ID = #{noticeId,jdbcType=DECIMAL}
  530. </update>
  531. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsshipDeliveryNotice">
  532. update AMSSHIP_DELIVERY_NOTICE
  533. <set>
  534. <if test="requesterGroupId != null">
  535. REQUESTER_GROUP_ID = #{requesterGroupId,jdbcType=DECIMAL},
  536. </if>
  537. <if test="carrierId != null">
  538. CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
  539. </if>
  540. <if test="noticeCommerceMethod != null">
  541. NOTICE_COMMERCE_METHOD = #{noticeCommerceMethod,jdbcType=VARCHAR},
  542. </if>
  543. <if test="noticeHandoverMethod != null">
  544. NOTICE_HANDOVER_METHOD = #{noticeHandoverMethod,jdbcType=VARCHAR},
  545. </if>
  546. <if test="portId != null">
  547. PORT_ID = #{portId,jdbcType=DECIMAL},
  548. </if>
  549. <if test="noticePortConstructionFee != null">
  550. NOTICE_PORT_CONSTRUCTION_FEE = #{noticePortConstructionFee,jdbcType=DECIMAL},
  551. </if>
  552. <if test="noticeDeliveryTime != null">
  553. NOTICE_DELIVERY_TIME = #{noticeDeliveryTime,jdbcType=TIMESTAMP},
  554. </if>
  555. <if test="noticePileFreeDays != null">
  556. NOTICE_PILE_FREE_DAYS = #{noticePileFreeDays,jdbcType=DECIMAL},
  557. </if>
  558. <if test="deleteName != null">
  559. DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
  560. </if>
  561. <if test="deleteTime != null">
  562. DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
  563. </if>
  564. <if test="insertUsername != null">
  565. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  566. </if>
  567. <if test="insertTime != null">
  568. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  569. </if>
  570. <if test="updateUsername != null">
  571. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  572. </if>
  573. <if test="updateTime != null">
  574. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  575. </if>
  576. <if test="insertUpdateRemark != null">
  577. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  578. </if>
  579. <if test="noticeDistributionStatus != null">
  580. NOTICE_DISTRIBUTION_STATUS = #{noticeDistributionStatus,jdbcType=VARCHAR},
  581. </if>
  582. <if test="deleted != null">
  583. DELETED = #{deleted,jdbcType=DECIMAL},
  584. </if>
  585. <if test="batchId != null">
  586. BATCH_ID = #{batchId,jdbcType=DECIMAL},
  587. </if>
  588. <if test="purchaseContractUnitPrice != null">
  589. PURCHASE_CONTRACT_UNIT_PRICE = #{purchaseContractUnitPrice,jdbcType=DECIMAL},
  590. </if>
  591. <if test="purchaseContractMoisture != null">
  592. PURCHASE_CONTRACT_MOISTURE = #{purchaseContractMoisture,jdbcType=VARCHAR},
  593. </if>
  594. <if test="purchaseContractQualityindex != null">
  595. PURCHASE_CONTRACT_QUALITYINDEX = #{purchaseContractQualityindex,jdbcType=VARCHAR},
  596. </if>
  597. <if test="tfeContent != null">
  598. TFE_CONTENT = #{tfeContent,jdbcType=DECIMAL},
  599. </if>
  600. <if test="silicaContent != null">
  601. SILICA_CONTENT = #{silicaContent,jdbcType=DECIMAL},
  602. </if>
  603. <if test="aluminaContent != null">
  604. ALUMINA_CONTENT = #{aluminaContent,jdbcType=DECIMAL},
  605. </if>
  606. <if test="phosphorusContent != null">
  607. PHOSPHORUS_CONTENT = #{phosphorusContent,jdbcType=DECIMAL},
  608. </if>
  609. <if test="manganeseContent != null">
  610. MANGANESE_CONTENT = #{manganeseContent,jdbcType=DECIMAL},
  611. </if>
  612. </set>
  613. where NOTICE_ID = #{noticeId,jdbcType=DECIMAL}
  614. </update>
  615. <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
  616. <include refid="select" />
  617. where NOTICE_ID = #{noticeId,jdbcType=DECIMAL}
  618. </select>
  619. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  620. <include refid="select" />
  621. <include refid="where" />
  622. </select>
  623. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  624. <include refid="select" />
  625. <include refid="whereLike" />
  626. </select>
  627. <insert id="batchInsert" parameterType="java.util.List">
  628. insert into AMSSHIP_DELIVERY_NOTICE
  629. (NOTICE_ID,
  630. REQUESTER_GROUP_ID, CARRIER_ID,
  631. NOTICE_COMMERCE_METHOD, NOTICE_HANDOVER_METHOD,
  632. PORT_ID, NOTICE_PORT_CONSTRUCTION_FEE,
  633. NOTICE_DELIVERY_TIME, NOTICE_PILE_FREE_DAYS,
  634. DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
  635. INSERT_TIME, UPDATE_USERNAME,
  636. UPDATE_TIME, INSERT_UPDATE_REMARK,
  637. NOTICE_DISTRIBUTION_STATUS, DELETED,
  638. BATCH_ID, PURCHASE_CONTRACT_UNIT_PRICE,
  639. PURCHASE_CONTRACT_MOISTURE, PURCHASE_CONTRACT_QUALITYINDEX,
  640. TFE_CONTENT, SILICA_CONTENT, ALUMINA_CONTENT,
  641. PHOSPHORUS_CONTENT, MANGANESE_CONTENT
  642. )
  643. ( <foreach collection="list" item="item" separator="union all">
  644. select
  645. #{item.noticeId,jdbcType=DECIMAL},
  646. #{item.requesterGroupId,jdbcType=DECIMAL}, #{item.carrierId,jdbcType=DECIMAL},
  647. #{item.noticeCommerceMethod,jdbcType=VARCHAR}, #{item.noticeHandoverMethod,jdbcType=VARCHAR},
  648. #{item.portId,jdbcType=DECIMAL}, #{item.noticePortConstructionFee,jdbcType=DECIMAL},
  649. #{item.noticeDeliveryTime,jdbcType=TIMESTAMP}, #{item.noticePileFreeDays,jdbcType=DECIMAL},
  650. #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
  651. #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
  652. #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
  653. #{item.noticeDistributionStatus,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
  654. #{item.batchId,jdbcType=DECIMAL}, #{item.purchaseContractUnitPrice,jdbcType=DECIMAL},
  655. #{item.purchaseContractMoisture,jdbcType=VARCHAR}, #{item.purchaseContractQualityindex,jdbcType=VARCHAR},
  656. #{item.tfeContent,jdbcType=DECIMAL}, #{item.silicaContent,jdbcType=DECIMAL}, #{item.aluminaContent,jdbcType=DECIMAL},
  657. #{item.phosphorusContent,jdbcType=DECIMAL}, #{item.manganeseContent,jdbcType=DECIMAL}
  658. from dual
  659. </foreach> )
  660. </insert>
  661. <update id="batchUpdate" parameterType="java.util.List">
  662. update AMSSHIP_DELIVERY_NOTICE
  663. set
  664. NOTICE_ID=
  665. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  666. when #{item.noticeId,jdbcType=DECIMAL} then #{item.noticeId,jdbcType=DECIMAL}
  667. </foreach>
  668. ,REQUESTER_GROUP_ID=
  669. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  670. when #{item.noticeId,jdbcType=DECIMAL} then #{item.requesterGroupId,jdbcType=DECIMAL}
  671. </foreach>
  672. ,CARRIER_ID=
  673. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  674. when #{item.noticeId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
  675. </foreach>
  676. ,NOTICE_COMMERCE_METHOD=
  677. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  678. when #{item.noticeId,jdbcType=DECIMAL} then #{item.noticeCommerceMethod,jdbcType=VARCHAR}
  679. </foreach>
  680. ,NOTICE_HANDOVER_METHOD=
  681. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  682. when #{item.noticeId,jdbcType=DECIMAL} then #{item.noticeHandoverMethod,jdbcType=VARCHAR}
  683. </foreach>
  684. ,PORT_ID=
  685. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  686. when #{item.noticeId,jdbcType=DECIMAL} then #{item.portId,jdbcType=DECIMAL}
  687. </foreach>
  688. ,NOTICE_PORT_CONSTRUCTION_FEE=
  689. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  690. when #{item.noticeId,jdbcType=DECIMAL} then #{item.noticePortConstructionFee,jdbcType=DECIMAL}
  691. </foreach>
  692. ,NOTICE_DELIVERY_TIME=
  693. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  694. when #{item.noticeId,jdbcType=DECIMAL} then #{item.noticeDeliveryTime,jdbcType=TIMESTAMP}
  695. </foreach>
  696. ,NOTICE_PILE_FREE_DAYS=
  697. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  698. when #{item.noticeId,jdbcType=DECIMAL} then #{item.noticePileFreeDays,jdbcType=DECIMAL}
  699. </foreach>
  700. ,DELETE_NAME=
  701. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  702. when #{item.noticeId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
  703. </foreach>
  704. ,DELETE_TIME=
  705. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  706. when #{item.noticeId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
  707. </foreach>
  708. ,INSERT_USERNAME=
  709. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  710. when #{item.noticeId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  711. </foreach>
  712. ,INSERT_TIME=
  713. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  714. when #{item.noticeId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  715. </foreach>
  716. ,UPDATE_USERNAME=
  717. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  718. when #{item.noticeId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  719. </foreach>
  720. ,UPDATE_TIME=
  721. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  722. when #{item.noticeId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  723. </foreach>
  724. ,INSERT_UPDATE_REMARK=
  725. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  726. when #{item.noticeId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  727. </foreach>
  728. ,NOTICE_DISTRIBUTION_STATUS=
  729. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  730. when #{item.noticeId,jdbcType=DECIMAL} then #{item.noticeDistributionStatus,jdbcType=VARCHAR}
  731. </foreach>
  732. ,DELETED=
  733. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  734. when #{item.noticeId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
  735. </foreach>
  736. ,BATCH_ID=
  737. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  738. when #{item.noticeId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
  739. </foreach>
  740. ,PURCHASE_CONTRACT_UNIT_PRICE=
  741. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  742. when #{item.noticeId,jdbcType=DECIMAL} then #{item.purchaseContractUnitPrice,jdbcType=DECIMAL}
  743. </foreach>
  744. ,PURCHASE_CONTRACT_MOISTURE=
  745. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  746. when #{item.noticeId,jdbcType=DECIMAL} then #{item.purchaseContractMoisture,jdbcType=VARCHAR}
  747. </foreach>
  748. ,PURCHASE_CONTRACT_QUALITYINDEX=
  749. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  750. when #{item.noticeId,jdbcType=DECIMAL} then #{item.purchaseContractQualityindex,jdbcType=VARCHAR}
  751. </foreach>
  752. ,TFE_CONTENT=
  753. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  754. when #{item.noticeId,jdbcType=DECIMAL} then #{item.tfeContent,jdbcType=DECIMAL}
  755. </foreach>
  756. ,SILICA_CONTENT=
  757. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  758. when #{item.noticeId,jdbcType=DECIMAL} then #{item.silicaContent,jdbcType=DECIMAL}
  759. </foreach>
  760. ,ALUMINA_CONTENT=
  761. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  762. when #{item.noticeId,jdbcType=DECIMAL} then #{item.aluminaContent,jdbcType=DECIMAL}
  763. </foreach>
  764. ,PHOSPHORUS_CONTENT=
  765. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  766. when #{item.noticeId,jdbcType=DECIMAL} then #{item.phosphorusContent,jdbcType=DECIMAL}
  767. </foreach>
  768. ,MANGANESE_CONTENT=
  769. <foreach close="end" collection="list" index="index" item="item" open="case NOTICE_ID" separator=" ">
  770. when #{item.noticeId,jdbcType=DECIMAL} then #{item.manganeseContent,jdbcType=DECIMAL}
  771. </foreach>
  772. where NOTICE_ID in
  773. <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
  774. #{item.noticeId,jdbcType=DECIMAL}
  775. </foreach>
  776. </update>
  777. <delete id="batchDelete" parameterType="java.util.List">
  778. delete from AMSSHIP_DELIVERY_NOTICE
  779. where NOTICE_ID in
  780. <foreach close=")" collection="list" item="id" open="(" separator=",">
  781. #{id}
  782. </foreach>
  783. </delete>
  784. <!-- 友情提示!!!-->
  785. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  786. <!--展示提货委托通知 -->
  787. <select id="selectShipDeliveryNotice" resultType="java.util.Map">
  788. select *
  789. from
  790. (
  791. select
  792. t3.SHIPPER_NAME "shipperName",
  793. t4.CARRIER_NAME "carrierName",
  794. t1.NOTICE_COMMERCE_METHOD "noticeCommerceMethod",
  795. t1.NOTICE_HANDOVER_METHOD "noticeHandoverMethod",
  796. t1.NOTICE_PORT_CONSTRUCTION_FEE "noticePortConstructionFee",
  797. t1.NOTICE_DELIVERY_TIME "noticeDeliveryTime",
  798. t1.NOTICE_PILE_FREE_DAYS "noticePileFreeDays",
  799. t1.PURCHASE_CONTRACT_UNIT_PRICE "purchaseContractUnitPrice",
  800. t1.PURCHASE_CONTRACT_MOISTURE "purchaseContractMoisture",
  801. t1.TFE_CONTENT "tfeContent",
  802. t1.PHOSPHORUS_CONTENT "phosphorusContent",
  803. t1.ALUMINA_CONTENT "aluminaContent",
  804. t1.MANGANESE_CONTENT "manganeseContent",
  805. t1.SILICA_CONTENT "silicaContent",
  806. t8.MATERIAL_NAME "materialName",
  807. t7.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
  808. t5.RESULT_NUMBER_OF_LOANS "resultNumberOfLoans",
  809. t6.PORT_NAME "portName",
  810. t1.NOTICE_ID "noticeId",
  811. t1.BATCH_ID "batchId",
  812. t1.INSERT_TIME "insertTime"
  813. from AMSSHIP_DELIVERY_NOTICE t1
  814. left join RMS_SHIPPER t3
  815. on t1.REQUESTER_GROUP_ID=t3.SHIPPER_ID
  816. left join RMS_CARRIER t4
  817. on t1.CARRIER_ID=t4.CARRIER_ID
  818. left join AMSSHIP_CARGO_TRANSFER_RESULT t5
  819. on t1.BATCH_ID=t5.BATCH_ID
  820. left join RMS_PORT t6
  821. on t1.PORT_ID=t6.PORT_ID
  822. left join DIL_BATCH t7
  823. on t1.BATCH_ID=t7.BATCH_ID
  824. left join RMS_MATERIAL t8
  825. on t7.MATERIAL_ID=t8.MATERIAL_ID
  826. where t1.deleted = 0 and t1.NOTICE_DISTRIBUTION_STATUS=#{status}
  827. )
  828. <where>
  829. <if test="materialCapacityName!= null">
  830. and t1.MATERIAL_CAPACITY_NAME in
  831. <foreach close=")" collection="resultNumber" item="item" open="(" separator=",">
  832. #{item}
  833. </foreach>
  834. </if>
  835. </where>
  836. <where>
  837. <if test="noticeCommerceMethod!= null">
  838. and t1.NOTICE_COMMERCE_METHOD in
  839. <foreach close=")" collection="resultNumber" item="item" open="(" separator=",">
  840. #{item}
  841. </foreach>
  842. </if>
  843. </where>
  844. <where>
  845. <if test="noticeHandoverMethod!= null">
  846. and t1.NOTICE_HANDOVER_METHOD in
  847. <foreach close=")" collection="resultNumber" item="item" open="(" separator=",">
  848. #{item}
  849. </foreach>
  850. </if>
  851. </where>
  852. <where>
  853. <if test="noticePortConstructionFee!= null">
  854. and t1.NOTICE_PORT_CONSTRUCTION_FEE in
  855. <foreach close=")" collection="resultNumber" item="item" open="(" separator=",">
  856. #{item}
  857. </foreach>
  858. </if>
  859. </where>
  860. <where>
  861. <if test="noticeDeliveryTime!= null">
  862. and t1.NOTICE_DELIVERY_TIME in
  863. <foreach close=")" collection="resultNumber" item="item" open="(" separator=",">
  864. #{item}
  865. </foreach>
  866. </if>
  867. </where>
  868. <where>
  869. <if test="noticePileFreeDays!= null">
  870. and t1.NOTICE_PILE_FREE_DAYS in
  871. <foreach close=")" collection="resultNumber" item="item" open="(" separator=",">
  872. #{item}
  873. </foreach>
  874. </if>
  875. </where>
  876. <where>
  877. <if test="shipperName!= null">
  878. and t3.SHIPPER_NAME in
  879. <foreach close=")" collection="resultNumber" item="item" open="(" separator=",">
  880. #{item}
  881. </foreach>
  882. </if>
  883. </where>
  884. <where>
  885. <if test="carrierName!= null">
  886. and t4.CARRIER_NAME in
  887. <foreach close=")" collection="resultNumber" item="item" open="(" separator=",">
  888. #{item}
  889. </foreach>
  890. </if>
  891. </where>
  892. <where>
  893. <if test="resultNumberOfLoans!= null">
  894. and t5.RESULT_NUMBER_OF_LOANS in
  895. <foreach close=")" collection="resultNumber" item="item" open="(" separator=",">
  896. #{item}
  897. </foreach>
  898. </if>
  899. </where>
  900. <where>
  901. <if test="portName!= null">
  902. and t6.PORT_NAME in
  903. <foreach close=")" collection="resultNumber" item="item" open="(" separator=",">
  904. #{item}
  905. </foreach>
  906. </if>
  907. </where>
  908. <include refid="orderByInsertTime" />
  909. </select>
  910. <sql id="orderByInsertTime">
  911. <if test="orderField != null and orderField != ''">
  912. order by "${orderField}"
  913. <if test="orderType != null and orderType != ''">
  914. ${orderType}
  915. </if>
  916. </if>
  917. <if test="orderField == null ">
  918. order by "insertTime" desc
  919. </if>
  920. </sql>
  921. <!-- 自动生成id-->
  922. <select id="selectMaxId" resultType="DECIMAL">
  923. SELECT MAX(NOTICE_ID)+1 FROM AMSSHIP_DELIVERY_NOTICE
  924. </select>
  925. <!-- 下拉框中获取货权转移编号 -->
  926. <select id="getResultNumber" resultType="java.util.LinkedHashMap">
  927. select
  928. CARGO.CARGO_TRANSFER_RESULT_ID "id",
  929. CARGO.CARGO_TRANSFER_RESULT_ID "value",
  930. CARGO.RESULT_NUMBER "label"
  931. from
  932. AMSSHIP_CARGO_TRANSFER_RESULT CARGO
  933. </select>
  934. <!-- 下拉框中获取承运单位 -->
  935. <select id="getcarrier" resultType="java.util.LinkedHashMap">
  936. select
  937. RC.CARRIER_ID "id",
  938. RC.CARRIER_ID "value",
  939. RC.CARRIER_NAME "label"
  940. from
  941. RMS_CARRIER RC
  942. </select>
  943. <!-- 下拉框中获取托运单位 -->
  944. <select id="getShipper" resultType="java.util.LinkedHashMap">
  945. select
  946. RS.SHIPPER_ID "id",
  947. RS.SHIPPER_ID "value",
  948. RS.SHIPPER_NAME "label"
  949. from
  950. RMS_SHIPPER RS
  951. </select>
  952. <!--渲染数据-->
  953. <select id="selectByNoticeId" resultType="java.util.Map">
  954. select
  955. t1.BATCH_ID "batchId",
  956. t1.REQUESTER_GROUP_ID "requesterGroupId",
  957. t1.CARRIER_ID "carrierId",
  958. t1.NOTICE_COMMERCE_METHOD "noticeCommerceMethod",
  959. t1.NOTICE_HANDOVER_METHOD "noticeHandoverMethod",
  960. t1.PORT_ID "portId",
  961. t1.NOTICE_PORT_CONSTRUCTION_FEE "noticePortConstructionFee",
  962. t1.NOTICE_DELIVERY_TIME "noticeDeliveryTime",
  963. t1.NOTICE_PILE_FREE_DAYS "noticePileFreeDays",
  964. t1.PURCHASE_CONTRACT_UNIT_PRICE "purchaseContractUnitPrice",
  965. t1.PURCHASE_CONTRACT_MOISTURE "purchaseContractMoisture",
  966. t1.NOTICE_DISTRIBUTION_STATUS "noticeDistrbutionStatus",
  967. t1.ALUMINA_CONTENT "aluminaContent",
  968. t1.MANGANESE_CONTENT "manganeseContent",
  969. t1.PHOSPHORUS_CONTENT "phosphorusContent",
  970. t1.TFE_CONTENT "tfeContent",
  971. t1.SILICA_CONTENT "silicaContent"
  972. from
  973. AMSSHIP_DELIVERY_NOTICE t1
  974. where
  975. t1.NOTICE_ID=#{noticeId}
  976. </select>
  977. </mapper>