TmsshipLoadShipResultMapper.xml 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  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.TmsshipLoadShipResultMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmsshipLoadShipResult">
  5. <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
  6. <result column="TOTAL_RESULT_ID" jdbcType="DECIMAL" property="totalResultId"/>
  7. <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId"/>
  8. <result column="RESULT_DELIVERY_DATE" jdbcType="TIMESTAMP" property="resultDeliveryDate"/>
  9. <result column="RESULT_ACTUAL_INSTALLATIONS" jdbcType="DECIMAL" property="resultActualInstallations"/>
  10. <result column="RESULT_NUMBER" jdbcType="VARCHAR" property="resultNumber"/>
  11. <result column="RWAREHOUSE_MATERIAL_ID" jdbcType="DECIMAL" property="rwarehouseMaterialId"/>
  12. <result column="RESULT_ARRIVAL_PORT_TIME" jdbcType="TIMESTAMP" property="resultArrivalPortTime"/>
  13. <result column="RESULT_OUT_PORT_TIME" jdbcType="TIMESTAMP" property="resultOutPortTime"/>
  14. <result column="RESULT_LOAD_SHIP_DATE" jdbcType="TIMESTAMP" property="resultLoadShipDate"/>
  15. <result column="RESULT_ISCLEAR" jdbcType="VARCHAR" property="resultIsclear"/>
  16. <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName"/>
  17. <result column="DELETE_TIME" jdbcType="VARCHAR" property="deleteTime"/>
  18. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
  19. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
  20. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
  21. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
  22. <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark"/>
  23. <result column="DELETED" jdbcType="DECIMAL" property="deleted"/>
  24. </resultMap>
  25. <sql id="columns">
  26. RESULT_ID, TOTAL_RESULT_ID, BATCH_ID, RESULT_DELIVERY_DATE,
  27. RESULT_ACTUAL_INSTALLATIONS, RESULT_NUMBER, RWAREHOUSE_MATERIAL_ID, RESULT_ARRIVAL_PORT_TIME,
  28. RESULT_OUT_PORT_TIME, RESULT_LOAD_SHIP_DATE, RESULT_ISCLEAR, DELETE_NAME, DELETE_TIME,
  29. INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
  30. DELETED
  31. </sql>
  32. <sql id="columns_alias">
  33. t.RESULT_ID, t.TOTAL_RESULT_ID, t.BATCH_ID,
  34. t.RESULT_DELIVERY_DATE, t.RESULT_ACTUAL_INSTALLATIONS, t.RESULT_NUMBER, t.RWAREHOUSE_MATERIAL_ID,
  35. t.RESULT_ARRIVAL_PORT_TIME, t.RESULT_OUT_PORT_TIME, t.RESULT_LOAD_SHIP_DATE, t.RESULT_ISCLEAR,
  36. t.DELETE_NAME, t.DELETE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
  37. t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED
  38. </sql>
  39. <sql id="select">
  40. SELECT
  41. <include refid="columns"/>
  42. FROM TMSSHIP_LOAD_SHIP_RESULT
  43. </sql>
  44. <sql id="select_alias">
  45. SELECT
  46. <include refid="columns_alias"/>
  47. FROM TMSSHIP_LOAD_SHIP_RESULT t
  48. </sql>
  49. <sql id="where">
  50. <where>
  51. <if test="resultId != null">
  52. and RESULT_ID = #{resultId}
  53. </if>
  54. <if test="totalResultId != null">
  55. and TOTAL_RESULT_ID = #{totalResultId}
  56. </if>
  57. <if test="batchId != null">
  58. and BATCH_ID = #{batchId}
  59. </if>
  60. <if test="resultDeliveryDate != null">
  61. and TO_CHAR(RESULT_DELIVERY_DATE,'yyyy-MM-dd') = #{resultDeliveryDate}
  62. </if>
  63. <if test="resultActualInstallations != null">
  64. and RESULT_ACTUAL_INSTALLATIONS = #{resultActualInstallations}
  65. </if>
  66. <if test="resultNumber != null and resultNumber != ''">
  67. and RESULT_NUMBER = #{resultNumber}
  68. </if>
  69. <if test="rwarehouseMaterialId != null">
  70. and RWAREHOUSE_MATERIAL_ID = #{rwarehouseMaterialId}
  71. </if>
  72. <if test="resultArrivalPortTime != null">
  73. and TO_CHAR(RESULT_ARRIVAL_PORT_TIME,'yyyy-MM-dd') = #{resultArrivalPortTime}
  74. </if>
  75. <if test="resultOutPortTime != null">
  76. and TO_CHAR(RESULT_OUT_PORT_TIME,'yyyy-MM-dd') = #{resultOutPortTime}
  77. </if>
  78. <if test="resultLoadShipDate != null">
  79. and TO_CHAR(RESULT_LOAD_SHIP_DATE,'yyyy-MM-dd') = #{resultLoadShipDate}
  80. </if>
  81. <if test="resultIsclear != null and resultIsclear != ''">
  82. and RESULT_ISCLEAR = #{resultIsclear}
  83. </if>
  84. <if test="deleteName != null and deleteName != ''">
  85. and DELETE_NAME = #{deleteName}
  86. </if>
  87. <if test="deleteTime != null and deleteTime != ''">
  88. and DELETE_TIME = #{deleteTime}
  89. </if>
  90. <if test="insertUsername != null and insertUsername != ''">
  91. and INSERT_USERNAME = #{insertUsername}
  92. </if>
  93. <if test="insertTime != null">
  94. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  95. </if>
  96. <if test="updateUsername != null and updateUsername != ''">
  97. and UPDATE_USERNAME = #{updateUsername}
  98. </if>
  99. <if test="updateTime != null">
  100. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  101. </if>
  102. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  103. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  104. </if>
  105. <if test="deleted != null">
  106. and DELETED = #{deleted}
  107. </if>
  108. </where>
  109. </sql>
  110. <sql id="whereLike">
  111. <where>
  112. <if test="resultId != null">
  113. and RESULT_ID = #{resultId}
  114. </if>
  115. <if test="totalResultId != null">
  116. and TOTAL_RESULT_ID = #{totalResultId}
  117. </if>
  118. <if test="batchId != null">
  119. and BATCH_ID = #{batchId}
  120. </if>
  121. <if test="resultDeliveryDate != null">
  122. and TO_CHAR(RESULT_DELIVERY_DATE,'yyyy-MM-dd') = #{resultDeliveryDate}
  123. </if>
  124. <if test="resultActualInstallations != null">
  125. and RESULT_ACTUAL_INSTALLATIONS = #{resultActualInstallations}
  126. </if>
  127. <if test="resultNumber != null and resultNumber != ''">
  128. and RESULT_NUMBER LIKE '%${resultNumber}%'
  129. </if>
  130. <if test="rwarehouseMaterialId != null">
  131. and RWAREHOUSE_MATERIAL_ID = #{rwarehouseMaterialId}
  132. </if>
  133. <if test="resultArrivalPortTime != null">
  134. and TO_CHAR(RESULT_ARRIVAL_PORT_TIME,'yyyy-MM-dd') = #{resultArrivalPortTime}
  135. </if>
  136. <if test="resultOutPortTime != null">
  137. and TO_CHAR(RESULT_OUT_PORT_TIME,'yyyy-MM-dd') = #{resultOutPortTime}
  138. </if>
  139. <if test="resultLoadShipDate != null">
  140. and TO_CHAR(RESULT_LOAD_SHIP_DATE,'yyyy-MM-dd') = #{resultLoadShipDate}
  141. </if>
  142. <if test="resultIsclear != null and resultIsclear != ''">
  143. and RESULT_ISCLEAR LIKE '%${resultIsclear}%'
  144. </if>
  145. <if test="deleteName != null and deleteName != ''">
  146. and DELETE_NAME LIKE '%${deleteName}%'
  147. </if>
  148. <if test="deleteTime != null and deleteTime != ''">
  149. and DELETE_TIME LIKE '%${deleteTime}%'
  150. </if>
  151. <if test="insertUsername != null and insertUsername != ''">
  152. and INSERT_USERNAME LIKE '%${insertUsername}%'
  153. </if>
  154. <if test="insertTime != null">
  155. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  156. </if>
  157. <if test="updateUsername != null and updateUsername != ''">
  158. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  159. </if>
  160. <if test="updateTime != null">
  161. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  162. </if>
  163. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  164. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  165. </if>
  166. <if test="deleted != null">
  167. and DELETED = #{deleted}
  168. </if>
  169. </where>
  170. </sql>
  171. <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
  172. delete
  173. from TMSSHIP_LOAD_SHIP_RESULT
  174. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  175. </delete>
  176. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  177. delete from TMSSHIP_LOAD_SHIP_RESULT
  178. where 1!=1
  179. <if test="totalResultId != null">
  180. or TOTAL_RESULT_ID = #{totalResultId}
  181. </if>
  182. <if test="batchId != null">
  183. or BATCH_ID = #{batchId}
  184. </if>
  185. <if test="resultDeliveryDate != null">
  186. or TO_CHAR(RESULT_DELIVERY_DATE,'yyyy-MM-dd') = '#{resultDeliveryDate}'
  187. </if>
  188. <if test="resultActualInstallations != null">
  189. or RESULT_ACTUAL_INSTALLATIONS = #{resultActualInstallations}
  190. </if>
  191. <if test="resultNumber != null and resultNumber != ''">
  192. or RESULT_NUMBER = #{resultNumber}
  193. </if>
  194. <if test="rwarehouseMaterialId != null">
  195. or RWAREHOUSE_MATERIAL_ID = #{rwarehouseMaterialId}
  196. </if>
  197. <if test="resultArrivalPortTime != null">
  198. or TO_CHAR(RESULT_ARRIVAL_PORT_TIME,'yyyy-MM-dd') = '#{resultArrivalPortTime}'
  199. </if>
  200. <if test="resultOutPortTime != null">
  201. or TO_CHAR(RESULT_OUT_PORT_TIME,'yyyy-MM-dd') = '#{resultOutPortTime}'
  202. </if>
  203. <if test="resultLoadShipDate != null">
  204. or TO_CHAR(RESULT_LOAD_SHIP_DATE,'yyyy-MM-dd') = '#{resultLoadShipDate}'
  205. </if>
  206. <if test="resultIsclear != null and resultIsclear != ''">
  207. or RESULT_ISCLEAR = #{resultIsclear}
  208. </if>
  209. <if test="deleteName != null and deleteName != ''">
  210. or DELETE_NAME = #{deleteName}
  211. </if>
  212. <if test="deleteTime != null and deleteTime != ''">
  213. or DELETE_TIME = #{deleteTime}
  214. </if>
  215. <if test="insertUsername != null and insertUsername != ''">
  216. or INSERT_USERNAME = #{insertUsername}
  217. </if>
  218. <if test="insertTime != null">
  219. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  220. </if>
  221. <if test="updateUsername != null and updateUsername != ''">
  222. or UPDATE_USERNAME = #{updateUsername}
  223. </if>
  224. <if test="updateTime != null">
  225. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  226. </if>
  227. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  228. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  229. </if>
  230. <if test="deleted != null">
  231. or DELETED = #{deleted}
  232. </if>
  233. </delete>
  234. <insert id="insert" parameterType="com.steerinfo.dil.model.TmsshipLoadShipResult">
  235. insert into TMSSHIP_LOAD_SHIP_RESULT (RESULT_ID, TOTAL_RESULT_ID,
  236. BATCH_ID, RESULT_DELIVERY_DATE,
  237. RESULT_ACTUAL_INSTALLATIONS, RESULT_NUMBER,
  238. RWAREHOUSE_MATERIAL_ID, RESULT_ARRIVAL_PORT_TIME,
  239. RESULT_OUT_PORT_TIME, RESULT_LOAD_SHIP_DATE,
  240. RESULT_ISCLEAR, DELETE_NAME, DELETE_TIME,
  241. INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
  242. UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED)
  243. values (#{resultId,jdbcType=DECIMAL}, #{totalResultId,jdbcType=DECIMAL},
  244. #{batchId,jdbcType=DECIMAL},
  245. #{resultDeliveryDate,jdbcType=TIMESTAMP},
  246. #{resultActualInstallations,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR},
  247. #{rwarehouseMaterialId,jdbcType=DECIMAL}, #{resultArrivalPortTime,jdbcType=TIMESTAMP},
  248. #{resultOutPortTime,jdbcType=TIMESTAMP}, #{resultLoadShipDate,jdbcType=TIMESTAMP},
  249. #{resultIsclear,jdbcType=VARCHAR}, #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=VARCHAR},
  250. #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
  251. #{updateUsername,jdbcType=VARCHAR},
  252. #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL})
  253. </insert>
  254. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmsshipLoadShipResult">
  255. insert into TMSSHIP_LOAD_SHIP_RESULT
  256. <trim prefix="(" suffix=")" suffixOverrides=",">
  257. <if test="resultId != null">
  258. RESULT_ID,
  259. </if>
  260. <if test="totalResultId != null">
  261. TOTAL_RESULT_ID,
  262. </if>
  263. <if test="batchId != null">
  264. BATCH_ID,
  265. </if>
  266. <if test="resultDeliveryDate != null">
  267. RESULT_DELIVERY_DATE,
  268. </if>
  269. <if test="resultActualInstallations != null">
  270. RESULT_ACTUAL_INSTALLATIONS,
  271. </if>
  272. <if test="resultNumber != null">
  273. RESULT_NUMBER,
  274. </if>
  275. <if test="rwarehouseMaterialId != null">
  276. RWAREHOUSE_MATERIAL_ID,
  277. </if>
  278. <if test="resultArrivalPortTime != null">
  279. RESULT_ARRIVAL_PORT_TIME,
  280. </if>
  281. <if test="resultOutPortTime != null">
  282. RESULT_OUT_PORT_TIME,
  283. </if>
  284. <if test="resultLoadShipDate != null">
  285. RESULT_LOAD_SHIP_DATE,
  286. </if>
  287. <if test="resultIsclear != null">
  288. RESULT_ISCLEAR,
  289. </if>
  290. <if test="deleteName != null">
  291. DELETE_NAME,
  292. </if>
  293. <if test="deleteTime != null">
  294. DELETE_TIME,
  295. </if>
  296. <if test="insertUsername != null">
  297. INSERT_USERNAME,
  298. </if>
  299. <if test="insertTime != null">
  300. INSERT_TIME,
  301. </if>
  302. <if test="updateUsername != null">
  303. UPDATE_USERNAME,
  304. </if>
  305. <if test="updateTime != null">
  306. UPDATE_TIME,
  307. </if>
  308. <if test="insertUpdateRemark != null">
  309. INSERT_UPDATE_REMARK,
  310. </if>
  311. <if test="deleted != null">
  312. DELETED,
  313. </if>
  314. </trim>
  315. <trim prefix="values (" suffix=")" suffixOverrides=",">
  316. <if test="resultId != null">
  317. #{resultId,jdbcType=DECIMAL},
  318. </if>
  319. <if test="totalResultId != null">
  320. #{totalResultId,jdbcType=DECIMAL},
  321. </if>
  322. <if test="batchId != null">
  323. #{batchId,jdbcType=DECIMAL},
  324. </if>
  325. <if test="resultDeliveryDate != null">
  326. #{resultDeliveryDate,jdbcType=TIMESTAMP},
  327. </if>
  328. <if test="resultActualInstallations != null">
  329. #{resultActualInstallations,jdbcType=DECIMAL},
  330. </if>
  331. <if test="resultNumber != null">
  332. #{resultNumber,jdbcType=VARCHAR},
  333. </if>
  334. <if test="rwarehouseMaterialId != null">
  335. #{rwarehouseMaterialId,jdbcType=DECIMAL},
  336. </if>
  337. <if test="resultArrivalPortTime != null">
  338. #{resultArrivalPortTime,jdbcType=TIMESTAMP},
  339. </if>
  340. <if test="resultOutPortTime != null">
  341. #{resultOutPortTime,jdbcType=TIMESTAMP},
  342. </if>
  343. <if test="resultLoadShipDate != null">
  344. #{resultLoadShipDate,jdbcType=TIMESTAMP},
  345. </if>
  346. <if test="resultIsclear != null">
  347. #{resultIsclear,jdbcType=VARCHAR},
  348. </if>
  349. <if test="deleteName != null">
  350. #{deleteName,jdbcType=VARCHAR},
  351. </if>
  352. <if test="deleteTime != null">
  353. #{deleteTime,jdbcType=VARCHAR},
  354. </if>
  355. <if test="insertUsername != null">
  356. #{insertUsername,jdbcType=VARCHAR},
  357. </if>
  358. <if test="insertTime != null">
  359. #{insertTime,jdbcType=TIMESTAMP},
  360. </if>
  361. <if test="updateUsername != null">
  362. #{updateUsername,jdbcType=VARCHAR},
  363. </if>
  364. <if test="updateTime != null">
  365. #{updateTime,jdbcType=TIMESTAMP},
  366. </if>
  367. <if test="insertUpdateRemark != null">
  368. #{insertUpdateRemark,jdbcType=VARCHAR},
  369. </if>
  370. <if test="deleted != null">
  371. #{deleted,jdbcType=DECIMAL},
  372. </if>
  373. </trim>
  374. </insert>
  375. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmsshipLoadShipResult">
  376. update TMSSHIP_LOAD_SHIP_RESULT
  377. set TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
  378. BATCH_ID = #{batchId,jdbcType=DECIMAL},
  379. RESULT_DELIVERY_DATE = #{resultDeliveryDate,jdbcType=TIMESTAMP},
  380. RESULT_ACTUAL_INSTALLATIONS = #{resultActualInstallations,jdbcType=DECIMAL},
  381. RESULT_NUMBER = #{resultNumber,jdbcType=VARCHAR},
  382. RWAREHOUSE_MATERIAL_ID = #{rwarehouseMaterialId,jdbcType=DECIMAL},
  383. RESULT_ARRIVAL_PORT_TIME = #{resultArrivalPortTime,jdbcType=TIMESTAMP},
  384. RESULT_OUT_PORT_TIME = #{resultOutPortTime,jdbcType=TIMESTAMP},
  385. RESULT_LOAD_SHIP_DATE = #{resultLoadShipDate,jdbcType=TIMESTAMP},
  386. RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
  387. DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
  388. DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
  389. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  390. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  391. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  392. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  393. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  394. DELETED = #{deleted,jdbcType=DECIMAL}
  395. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  396. </update>
  397. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmsshipLoadShipResult">
  398. update TMSSHIP_LOAD_SHIP_RESULT
  399. <set>
  400. <if test="totalResultId != null">
  401. TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
  402. </if>
  403. <if test="batchId != null">
  404. BATCH_ID = #{batchId,jdbcType=DECIMAL},
  405. </if>
  406. <if test="resultDeliveryDate != null">
  407. RESULT_DELIVERY_DATE = #{resultDeliveryDate,jdbcType=TIMESTAMP},
  408. </if>
  409. <if test="resultActualInstallations != null">
  410. RESULT_ACTUAL_INSTALLATIONS = #{resultActualInstallations,jdbcType=DECIMAL},
  411. </if>
  412. <if test="resultNumber != null">
  413. RESULT_NUMBER = #{resultNumber,jdbcType=VARCHAR},
  414. </if>
  415. <if test="rwarehouseMaterialId != null">
  416. RWAREHOUSE_MATERIAL_ID = #{rwarehouseMaterialId,jdbcType=DECIMAL},
  417. </if>
  418. <if test="resultArrivalPortTime != null">
  419. RESULT_ARRIVAL_PORT_TIME = #{resultArrivalPortTime,jdbcType=TIMESTAMP},
  420. </if>
  421. <if test="resultOutPortTime != null">
  422. RESULT_OUT_PORT_TIME = #{resultOutPortTime,jdbcType=TIMESTAMP},
  423. </if>
  424. <if test="resultLoadShipDate != null">
  425. RESULT_LOAD_SHIP_DATE = #{resultLoadShipDate,jdbcType=TIMESTAMP},
  426. </if>
  427. <if test="resultIsclear != null">
  428. RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
  429. </if>
  430. <if test="deleteName != null">
  431. DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
  432. </if>
  433. <if test="deleteTime != null">
  434. DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
  435. </if>
  436. <if test="insertUsername != null">
  437. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  438. </if>
  439. <if test="insertTime != null">
  440. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  441. </if>
  442. <if test="updateUsername != null">
  443. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  444. </if>
  445. <if test="updateTime != null">
  446. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  447. </if>
  448. <if test="insertUpdateRemark != null">
  449. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  450. </if>
  451. <if test="deleted != null">
  452. DELETED = #{deleted,jdbcType=DECIMAL},
  453. </if>
  454. </set>
  455. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  456. </update>
  457. <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
  458. <include refid="select"/>
  459. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  460. </select>
  461. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  462. <include refid="select"/>
  463. <include refid="where"/>
  464. </select>
  465. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  466. <include refid="select"/>
  467. <include refid="whereLike"/>
  468. </select>
  469. <insert id="batchInsert" parameterType="java.util.List">
  470. insert into TMSSHIP_LOAD_SHIP_RESULT
  471. (RESULT_ID,
  472. TOTAL_RESULT_ID,
  473. BATCH_ID, RESULT_DELIVERY_DATE,
  474. RESULT_ACTUAL_INSTALLATIONS, RESULT_NUMBER,
  475. RWAREHOUSE_MATERIAL_ID, RESULT_ARRIVAL_PORT_TIME,
  476. RESULT_OUT_PORT_TIME, RESULT_LOAD_SHIP_DATE,
  477. RESULT_ISCLEAR, DELETE_NAME, DELETE_TIME,
  478. INSERT_USERNAME, INSERT_TIME,
  479. UPDATE_USERNAME, UPDATE_TIME,
  480. INSERT_UPDATE_REMARK, DELETED)
  481. ( <foreach collection="list" item="item" separator="union all">
  482. select
  483. #{item.resultId,jdbcType=DECIMAL},
  484. #{item.totalResultId,jdbcType=DECIMAL},
  485. #{item.resultDeliveryDate,jdbcType=TIMESTAMP},
  486. #{item.resultActualInstallations,jdbcType=DECIMAL}, #{item.resultNumber,jdbcType=VARCHAR},
  487. #{item.rwarehouseMaterialId,jdbcType=DECIMAL}, #{item.resultArrivalPortTime,jdbcType=TIMESTAMP},
  488. #{item.resultOutPortTime,jdbcType=TIMESTAMP}, #{item.resultLoadShipDate,jdbcType=TIMESTAMP},
  489. #{item.resultIsclear,jdbcType=VARCHAR}, #{item.deleteName,jdbcType=VARCHAR},
  490. #{item.deleteTime,jdbcType=VARCHAR},
  491. #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
  492. #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
  493. #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL} from dual
  494. </foreach> )
  495. </insert>
  496. <update id="batchUpdate" parameterType="java.util.List">
  497. update TMSSHIP_LOAD_SHIP_RESULT
  498. set
  499. RESULT_ID=
  500. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  501. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
  502. </foreach>
  503. ,TOTAL_RESULT_ID=
  504. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  505. when #{item.resultId,jdbcType=DECIMAL} then #{item.totalResultId,jdbcType=DECIMAL}
  506. </foreach>
  507. ,BATCH_ID=
  508. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  509. when #{item.resultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
  510. </foreach>
  511. ,RESULT_DELIVERY_DATE=
  512. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  513. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDeliveryDate,jdbcType=TIMESTAMP}
  514. </foreach>
  515. ,RESULT_ACTUAL_INSTALLATIONS=
  516. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  517. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultActualInstallations,jdbcType=DECIMAL}
  518. </foreach>
  519. ,RESULT_NUMBER=
  520. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  521. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultNumber,jdbcType=VARCHAR}
  522. </foreach>
  523. ,RWAREHOUSE_MATERIAL_ID=
  524. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  525. when #{item.resultId,jdbcType=DECIMAL} then #{item.rwarehouseMaterialId,jdbcType=DECIMAL}
  526. </foreach>
  527. ,RESULT_ARRIVAL_PORT_TIME=
  528. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  529. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultArrivalPortTime,jdbcType=TIMESTAMP}
  530. </foreach>
  531. ,RESULT_OUT_PORT_TIME=
  532. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  533. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultOutPortTime,jdbcType=TIMESTAMP}
  534. </foreach>
  535. ,RESULT_LOAD_SHIP_DATE=
  536. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  537. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadShipDate,jdbcType=TIMESTAMP}
  538. </foreach>
  539. ,RESULT_ISCLEAR=
  540. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  541. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultIsclear,jdbcType=VARCHAR}
  542. </foreach>
  543. ,DELETE_NAME=
  544. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  545. when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
  546. </foreach>
  547. ,DELETE_TIME=
  548. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  549. when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
  550. </foreach>
  551. ,INSERT_USERNAME=
  552. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  553. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  554. </foreach>
  555. ,INSERT_TIME=
  556. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  557. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  558. </foreach>
  559. ,UPDATE_USERNAME=
  560. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  561. when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  562. </foreach>
  563. ,UPDATE_TIME=
  564. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  565. when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  566. </foreach>
  567. ,INSERT_UPDATE_REMARK=
  568. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  569. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  570. </foreach>
  571. ,DELETED=
  572. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  573. when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
  574. </foreach>
  575. where RESULT_ID in
  576. <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
  577. #{item.resultId,jdbcType=DECIMAL}
  578. </foreach>
  579. </update>
  580. <delete id="batchDelete" parameterType="java.util.List">
  581. delete from TMSSHIP_LOAD_SHIP_RESULT
  582. where RESULT_ID in
  583. <foreach collection="list" item="id" open="(" close=")" separator=",">
  584. #{id}
  585. </foreach>
  586. </delete>
  587. <!-- 友情提示!!!-->
  588. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  589. <select id="selectMaxId" resultType="DECIMAL">
  590. SELECT MAX(RESULT_ID) + 1
  591. FROM TMSSHIP_LOAD_SHIP_RESULT
  592. </select>
  593. <!--查询所有装船信息-->
  594. <sql id="orderByInsertTime">
  595. <if test="orderField != null and orderField != ''">
  596. order by "${orderField}"
  597. <if test="orderType != null and orderType != ''">
  598. ${orderType}
  599. </if>
  600. </if>
  601. <if test="orderField == null ">
  602. order by "insertTime" desc
  603. </if>
  604. </sql>
  605. <select id="selectLoadShipList" resultType="java.util.Map">
  606. SELECT * FROM(
  607. SELECT DISTINCT ttr.ORDER_ID as "orderId",
  608. tlsr.INSERT_TIME as "insertTime",
  609. tlsr.RESULT_ID as "resultId",
  610. rp.PORT_NAME as "noticePort",
  611. adn.NOTICE_DELIVERY_TIME as "noticeTime",
  612. rm.MATERIAL_NAME as "materialName",
  613. dbi.INFACTORY_SHIP_NAME as "infactoryShipName",--进厂船名
  614. db.RESULT_FOREIGN_SHIP_NAME as "foreignShipName",
  615. adn.RESULT_NUMBER_OF_LOANS as "amount",
  616. rrmr.GM_TONNAGE as "portAmount",
  617. rc.CAPACITY_NUMBER as "capacityName",
  618. oic.INSTRUCTION_PLANNED_LOADING as "planWeight",
  619. tsl.LOCATION_STATUS as "nowLocation",
  620. tlsr.RESULT_ACTUAL_INSTALLATIONS as "realWeight",
  621. tlsr.RESULT_ARRIVAL_PORT_TIME as "arriveTime",
  622. tlsr.RESULT_OUT_PORT_TIME as "liveTime",
  623. rps.PORT_NAME as "startPortName",
  624. rpe.PORT_NAME as "arrivePortName",
  625. tlsr.RESULT_LOAD_SHIP_DATE as "loadTime",
  626. tlsr.RESULT_ISCLEAR as "isClear",
  627. tlsr.INSERT_UPDATE_REMARK as "memo"
  628. FROM TMSSHIP_LOAD_SHIP_RESULT tlsr
  629. LEFT JOIN TMSSHIP_TOTAL_RESULT ttr
  630. ON tlsr.TOTAL_RESULT_ID = ttr.RESULT_ID
  631. LEFT JOIN OMSSHIP_INSTRUCTIONS_CAPACITY oic
  632. ON oic.INSTRUCTIONS_CAPACITY_ID = ttr.ORDER_ID
  633. LEFT JOIN OMSSHIP_SHIPMENT_INSTRUCTIONS osi
  634. ON osi.SHIPMENT_INSTRUCTIONS_ID = oic.INSTRUCTIONS_ID
  635. LEFT JOIN RMS_CAPACITY rc
  636. ON rc.CAPACITY_ID = oic.CAPACITY_ID
  637. left join DIL_BATCH_INFACOTRY dbi --批次中间表
  638. on tlsr.BATCH_ID=dbi.BATCH_INFACOTRY_ID
  639. LEFT JOIN DIL_BATCH db
  640. ON dbi.BATCH_ID = db.BATCH_ID
  641. LEFT JOIN RMS_MATERIAL rm
  642. ON db.MATERIAL_ID = rm.MATERIAL_ID
  643. LEFT JOIN AMSSHIP_DELIVERY_ATTORNEY ada
  644. ON ada.BATCH_ID = osi.BATCH_ID
  645. LEFT JOIN AMSSHIP_DELIVERY_NOTICE adn
  646. ON ada.BATCH_ID = adn.BATCH_ID
  647. LEFT JOIN RMS_PORT rp
  648. ON rp.PORT_ID = adn.PORT_ID
  649. LEFT JOIN WMSH_GRID_MATERIAL rrmr
  650. ON tlsr.RWAREHOUSE_MATERIAL_ID = rrmr.GM_ID
  651. LEFT JOIN TMSSHIP_SHIP_LOCATION tsl
  652. ON ttr.RESULT_ID = tsl.TOTAL_RESULT_ID
  653. LEFT JOIN TMSSHIP_ENTRY_WHARY_RESULT TEWR
  654. ON ttr.RESULT_ID=TEWR.TOTAL_RESULT_ID
  655. LEFT JOIN RMS_PORT rps
  656. ON ada.DOWN_SWIM_PORT_ID = rps.PORT_ID
  657. LEFT JOIN RMS_PORT rpe
  658. ON ada.PORT_ID = rpe.PORT_ID
  659. WHERE tlsr.DELETED = 0 AND adn.DELETED=0 AND ada.DELETED=0
  660. <if test="con != null" >
  661. and dbi.INFACTORY_SHIP_NAME || rm.MATERIAL_NAME || db.RESULT_FOREIGN_SHIP_NAME like #{con}
  662. </if>
  663. )
  664. <where>
  665. <if test="noticePort != null">
  666. and
  667. <foreach collection="noticePort" item="item" open="(" separator="," close=")">
  668. "noticePort" in #{item}
  669. </foreach>
  670. </if>
  671. <if test="noticeTime != null">
  672. and
  673. <foreach collection="noticeTime" item="item" open="(" separator="," close=")">
  674. "noticeTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
  675. </foreach>
  676. </if>
  677. <if test="materialName != null">
  678. and
  679. <foreach collection="materialName" item="item" open="(" separator="," close=")">
  680. "materialName" in #{item}
  681. </foreach>
  682. </if>
  683. <if test="foreignShipName != null">
  684. and
  685. <foreach collection="foreignShipName" item="item" open="(" separator="," close=")">
  686. "foreignShipName" in #{item}
  687. </foreach>
  688. </if>
  689. <if test="amount != null">
  690. and
  691. <foreach collection="amount" item="item" open="(" separator="," close=")">
  692. "amount" in #{item}
  693. </foreach>
  694. </if>
  695. <if test="portAmount != null">
  696. and
  697. <foreach collection="portAmount" item="item" open="(" separator="," close=")">
  698. "portAmount" in #{item}
  699. </foreach>
  700. </if>
  701. <if test="capacityName != null">
  702. and
  703. <foreach collection="capacityName" item="item" open="(" separator="," close=")">
  704. "capacityName" in #{item}
  705. </foreach>
  706. </if>
  707. <if test="planWeight != null">
  708. and
  709. <foreach collection="planWeight" item="item" open="(" separator="," close=")">
  710. "planWeight" in #{item}
  711. </foreach>
  712. </if>
  713. <if test="nowLocation != null">
  714. and
  715. <foreach collection="nowLocation" item="item" open="(" separator="," close=")">
  716. "nowLocation" in #{item}
  717. </foreach>
  718. </if>
  719. <if test="realWeight != null">
  720. and
  721. <foreach collection="realWeight" item="item" open="(" separator="," close=")">
  722. "realWeight" in #{item}
  723. </foreach>
  724. </if>
  725. <if test="arriveTime != null">
  726. and
  727. <foreach collection="arriveTime" item="item" open="(" separator="," close=")">
  728. "arriveTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
  729. </foreach>
  730. </if>
  731. <if test="liveTime != null">
  732. and
  733. <foreach collection="liveTime" item="item" open="(" separator="," close=")">
  734. "liveTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
  735. </foreach>
  736. </if>
  737. <if test="startPortName != null">
  738. and
  739. <foreach collection="startPortName" item="item" open="(" separator="," close=")">
  740. "startPortName" in #{item}
  741. </foreach>
  742. </if>
  743. <if test="arrivePortName != null">
  744. and
  745. <foreach collection="arrivePortName" item="item" open="(" separator="," close=")">
  746. "arrivePortName" in #{item}
  747. </foreach>
  748. </if>
  749. <if test="loadTime != null">
  750. and
  751. <foreach collection="loadTime" item="item" open="(" separator="," close=")">
  752. "loadTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
  753. </foreach>
  754. </if>
  755. <if test="isClear != null">
  756. and
  757. <foreach collection="isClear" item="item" open="(" separator="," close=")">
  758. "isClear" in #{item}
  759. </foreach>
  760. </if>
  761. <if test="memo != null">
  762. and
  763. <foreach collection="memo" item="item" open="(" separator="," close=")">
  764. "memo" in #{item}
  765. </foreach>
  766. </if>
  767. </where>
  768. <include refid="orderByInsertTime"></include>
  769. </select>
  770. <select id="selectAllWeight" resultType="DECIMAL" parameterType="DECIMAL">
  771. select SUM(t_loadShip.RESULT_ACTUAL_INSTALLATIONS) "sumWeight"
  772. from OMSSHIP_INSTRUCTIONS_CAPACITY oi_capacity
  773. left join TMSSHIP_TOTAL_RESULT t_total
  774. on oi_capacity.INSTRUCTIONS_CAPACITY_ID = t_total.ORDER_ID
  775. left join TMSSHIP_LOAD_SHIP_RESULT t_loadShip
  776. on t_total.RESULT_ID = t_loadShip.TOTAL_RESULT_ID
  777. where oi_capacity.INSTRUCTIONS_ID = #{instructionsId}
  778. </select>
  779. <select id="selectLoadShip" parameterType="DECIMAL" resultType="java.util.Map">
  780. SELECT
  781. TLSR.BATCH_ID "batchId",
  782. TLSR.RESULT_DELIVERY_DATE "resultDeliveryDate",
  783. TLSR.RESULT_ACTUAL_INSTALLATIONS "resultActualInstallations",
  784. TLSR.RWAREHOUSE_MATERIAL_ID "rwarehouseMaterialId",
  785. TLSR.RESULT_ARRIVAL_PORT_TIME "resultArrivalPortTime",
  786. TLSR.RESULT_OUT_PORT_TIME "resultOutPortTime",
  787. TLSR.RESULT_LOAD_SHIP_DATE "resultLoadShipDate",
  788. TLSR.RESULT_ISCLEAR "resultIsClear",
  789. TWQR.RESULT_ES_DELIVERY_DATE "planDeliveryDate",
  790. TWQR.RESULT_PLANNED_DATE "planDate",
  791. TWQR.RESULT_EMPTY_HEAVY_WATER_METER "resultHeavyWeight",
  792. TWQR.RESULT_ID "waterQualiyResultId",
  793. TOWR.RESULT_ID "outWharyResultId",
  794. TOWR.RESULT_OUT_WHARY_NAME "resultOutPortName"
  795. FROM TMSSHIP_LOAD_SHIP_RESULT TLSR
  796. left join TMSSHIP_WATER_QUALITY_RESULT TWQR
  797. ON TLSR.TOTAL_RESULT_ID=TWQR.TOTAL_RESULT_ID
  798. left join TMSSHIP_OUT_WHARY_RESULT TOWR
  799. ON TOWR.TOTAL_RESULT_ID=TLSR.TOTAL_RESULT_ID
  800. WHERE TLSR.RESULT_ID = #{resultId}
  801. </select>
  802. <!-- 通过外轮船名和物资名称得到批次id -->
  803. <select id="getBatchId" parameterType="java.util.Map" resultType="DECIMAL">
  804. SELECT BATCH_ID
  805. FROM DIL_BATCH db
  806. LEFT JOIN RMS_MATERIAL rm
  807. ON rm.MATERIAL_ID = db.MATERIAL_ID
  808. WHERE rm.MATERIAL_NAME = #{materialName}
  809. AND db.RESULT_FOREIGN_SHIP_NAME = #{resultForeignShipName}
  810. </select>
  811. <!-- 得到码头和港口 -->
  812. <select id="getPortAndPier" parameterType="DECIMAL" resultType="java.util.Map">
  813. SELECT DISTINCT
  814. ADN.PORT_ID AS "startPortId",
  815. ADA.DOWN_SWIM_PORT_ID AS "arrivePortId",
  816. ADN.GROUP_ID AS "pierId",
  817. ADN.NOTICE_DELIVERY_TIME AS "noticeDeliveryTime"
  818. FROM AMSSHIP_DELIVERY_NOTICE ADN
  819. LEFT JOIN AMSSHIP_DELIVERY_ATTORNEY ADA
  820. ON ADA.BATCH_ID = ADN.BATCH_ID
  821. WHERE ADA.BATCH_ID = #{batchInfactoryId} AND ADA.DELETED=0 AND ADN.DELETED=0 FETCH NEXT 1 row only
  822. </select>
  823. <!-- 通过港口查询港存库实时库存id -->
  824. <select id="selectGmIdByPortId" parameterType="java.util.Map" resultType="java.util.Map">
  825. select WGM.GM_ID "gmId",
  826. WGM.GM_TONNAGE "tonnage"
  827. from WMSH_GRID_MATERIAL WGM
  828. left join DIL_BATCH DB
  829. on WGM.BATCH_ID=DB.BATCH_ID
  830. WHERE WGM.BATCH_ID=#{batchInfactoryId} and WGM.PORT_ID=#{downSwimPortId}
  831. </select>
  832. <select id="getBatchIdForOut" resultType="java.util.Map">
  833. select DB.BATCH_ID "batchId",
  834. TLSR.RESULT_ACTUAL_INSTALLATIONS "resultMaterialNumber"
  835. from TMSSHIP_LOAD_SHIP_RESULT TLSR
  836. left join DIL_BATCH_INFACOTRY DBI
  837. on TLSR.BATCH_ID=DBI.BATCH_INFACOTRY_ID
  838. left join DIL_BATCH DB
  839. on DBI.BATCH_ID=DB.BATCH_ID
  840. where TLSR.TOTAL_RESULT_ID=#{totalResultId}
  841. </select>
  842. </mapper>