TmstrainLoadingResultMapper.xml 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883
  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.TmstrainLoadingResultMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstrainLoadingResult">
  5. <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
  6. <result column="PURCHASE_ORDER_RAIL_PLAN_ID" jdbcType="DECIMAL" property="purchaseOrderRailPlanId" />
  7. <result column="RESULT_WAGON_NO" jdbcType="VARCHAR" property="resultWagonNo" />
  8. <result column="RESULT_BILLABLE_TONNAGE" jdbcType="DECIMAL" property="resultBillableTonnage" />
  9. <result column="RESULT_ISCLEAR" jdbcType="VARCHAR" property="resultIsclear" />
  10. <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
  11. <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
  12. <result column="RESULT_MATERIAL_NUMBER" jdbcType="DECIMAL" property="resultMaterialNumber" />
  13. <result column="RESULT_MATERIAL_THEORYWEIGHT" jdbcType="DECIMAL" property="resultMaterialTheoryweight" />
  14. <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
  15. <result column="RESULT_CLASS" jdbcType="VARCHAR" property="resultClass" />
  16. <result column="RESULT_LOADING_DATE" jdbcType="TIMESTAMP" property="resultLoadingDate" />
  17. <result column="RESULT_REMARKS" jdbcType="VARCHAR" property="resultRemarks" />
  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. <result column="SEND_STATION_ID" jdbcType="DECIMAL" property="sendStationId" />
  25. <result column="ARRIVAL_STATION_ID" jdbcType="DECIMAL" property="arrivalStationId" />
  26. </resultMap>
  27. <sql id="columns">
  28. RESULT_ID, PURCHASE_ORDER_RAIL_PLAN_ID, RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE,
  29. RESULT_ISCLEAR, CAPACITY_ID, MATERIAL_ID, RESULT_MATERIAL_NUMBER, RESULT_MATERIAL_THEORYWEIGHT,
  30. BATCH_ID, RESULT_CLASS, RESULT_LOADING_DATE, RESULT_REMARKS, INSERT_USERNAME, INSERT_TIME,
  31. UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, SEND_STATION_ID, ARRIVAL_STATION_ID
  32. </sql>
  33. <sql id="columns_alias">
  34. t.RESULT_ID, t.PURCHASE_ORDER_RAIL_PLAN_ID, t.RESULT_WAGON_NO, t.RESULT_BILLABLE_TONNAGE,
  35. t.RESULT_ISCLEAR, t.CAPACITY_ID, t.MATERIAL_ID, t.RESULT_MATERIAL_NUMBER, t.RESULT_MATERIAL_THEORYWEIGHT,
  36. t.BATCH_ID, t.RESULT_CLASS, t.RESULT_LOADING_DATE, t.RESULT_REMARKS, t.INSERT_USERNAME,
  37. t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
  38. t.SEND_STATION_ID, t.ARRIVAL_STATION_ID
  39. </sql>
  40. <sql id="select">
  41. SELECT <include refid="columns"/> FROM TMSTRAIN_LOADING_RESULT
  42. </sql>
  43. <sql id="select_alias">
  44. SELECT <include refid="columns_alias"/> FROM TMSTRAIN_LOADING_RESULT t
  45. </sql>
  46. <sql id="where">
  47. <where>
  48. <if test="resultId != null">
  49. and RESULT_ID = #{resultId}
  50. </if>
  51. <if test="purchaseOrderRailPlanId != null">
  52. and PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
  53. </if>
  54. <if test="resultWagonNo != null and resultWagonNo != ''">
  55. and RESULT_WAGON_NO = #{resultWagonNo}
  56. </if>
  57. <if test="resultBillableTonnage != null">
  58. and RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
  59. </if>
  60. <if test="resultIsclear != null and resultIsclear != ''">
  61. and RESULT_ISCLEAR = #{resultIsclear}
  62. </if>
  63. <if test="capacityId != null">
  64. and CAPACITY_ID = #{capacityId}
  65. </if>
  66. <if test="materialId != null">
  67. and MATERIAL_ID = #{materialId}
  68. </if>
  69. <if test="resultMaterialNumber != null">
  70. and RESULT_MATERIAL_NUMBER = #{resultMaterialNumber}
  71. </if>
  72. <if test="resultMaterialTheoryweight != null">
  73. and RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight}
  74. </if>
  75. <if test="batchId != null">
  76. and BATCH_ID = #{batchId}
  77. </if>
  78. <if test="resultClass != null and resultClass != ''">
  79. and RESULT_CLASS = #{resultClass}
  80. </if>
  81. <if test="resultLoadingDate != null">
  82. and TO_CHAR(RESULT_LOADING_DATE,'yyyy-MM-dd') = #{resultLoadingDate}
  83. </if>
  84. <if test="resultRemarks != null and resultRemarks != ''">
  85. and RESULT_REMARKS = #{resultRemarks}
  86. </if>
  87. <if test="insertUsername != null and insertUsername != ''">
  88. and INSERT_USERNAME = #{insertUsername}
  89. </if>
  90. <if test="insertTime != null">
  91. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  92. </if>
  93. <if test="updateUsername != null and updateUsername != ''">
  94. and UPDATE_USERNAME = #{updateUsername}
  95. </if>
  96. <if test="updateTime != null">
  97. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  98. </if>
  99. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  100. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  101. </if>
  102. <if test="deleted != null">
  103. and DELETED = #{deleted}
  104. </if>
  105. <if test="sendStationId != null">
  106. and SEND_STATION_ID = #{sendStationId}
  107. </if>
  108. <if test="arrivalStationId != null">
  109. and ARRIVAL_STATION_ID = #{arrivalStationId}
  110. </if>
  111. </where>
  112. </sql>
  113. <sql id="whereLike">
  114. <where>
  115. <if test="resultId != null">
  116. and RESULT_ID = #{resultId}
  117. </if>
  118. <if test="purchaseOrderRailPlanId != null">
  119. and PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
  120. </if>
  121. <if test="resultWagonNo != null and resultWagonNo != ''">
  122. and RESULT_WAGON_NO LIKE '%${resultWagonNo}%'
  123. </if>
  124. <if test="resultBillableTonnage != null">
  125. and RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
  126. </if>
  127. <if test="resultIsclear != null and resultIsclear != ''">
  128. and RESULT_ISCLEAR LIKE '%${resultIsclear}%'
  129. </if>
  130. <if test="capacityId != null">
  131. and CAPACITY_ID = #{capacityId}
  132. </if>
  133. <if test="materialId != null">
  134. and MATERIAL_ID = #{materialId}
  135. </if>
  136. <if test="resultMaterialNumber != null">
  137. and RESULT_MATERIAL_NUMBER = #{resultMaterialNumber}
  138. </if>
  139. <if test="resultMaterialTheoryweight != null">
  140. and RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight}
  141. </if>
  142. <if test="batchId != null">
  143. and BATCH_ID = #{batchId}
  144. </if>
  145. <if test="resultClass != null and resultClass != ''">
  146. and RESULT_CLASS LIKE '%${resultClass}%'
  147. </if>
  148. <if test="resultLoadingDate != null">
  149. and TO_CHAR(RESULT_LOADING_DATE,'yyyy-MM-dd') = #{resultLoadingDate}
  150. </if>
  151. <if test="resultRemarks != null and resultRemarks != ''">
  152. and RESULT_REMARKS LIKE '%${resultRemarks}%'
  153. </if>
  154. <if test="insertUsername != null and insertUsername != ''">
  155. and INSERT_USERNAME LIKE '%${insertUsername}%'
  156. </if>
  157. <if test="insertTime != null">
  158. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  159. </if>
  160. <if test="updateUsername != null and updateUsername != ''">
  161. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  162. </if>
  163. <if test="updateTime != null">
  164. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  165. </if>
  166. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  167. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  168. </if>
  169. <if test="deleted != null">
  170. and DELETED = #{deleted}
  171. </if>
  172. <if test="sendStationId != null">
  173. and SEND_STATION_ID = #{sendStationId}
  174. </if>
  175. <if test="arrivalStationId != null">
  176. and ARRIVAL_STATION_ID = #{arrivalStationId}
  177. </if>
  178. </where>
  179. </sql>
  180. <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
  181. delete from TMSTRAIN_LOADING_RESULT
  182. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  183. </delete>
  184. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  185. delete from TMSTRAIN_LOADING_RESULT
  186. where 1!=1
  187. <if test="purchaseOrderRailPlanId != null">
  188. or PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
  189. </if>
  190. <if test="resultWagonNo != null and resultWagonNo != ''">
  191. or RESULT_WAGON_NO = #{resultWagonNo}
  192. </if>
  193. <if test="resultBillableTonnage != null">
  194. or RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
  195. </if>
  196. <if test="resultIsclear != null and resultIsclear != ''">
  197. or RESULT_ISCLEAR = #{resultIsclear}
  198. </if>
  199. <if test="capacityId != null">
  200. or CAPACITY_ID = #{capacityId}
  201. </if>
  202. <if test="materialId != null">
  203. or MATERIAL_ID = #{materialId}
  204. </if>
  205. <if test="resultMaterialNumber != null">
  206. or RESULT_MATERIAL_NUMBER = #{resultMaterialNumber}
  207. </if>
  208. <if test="resultMaterialTheoryweight != null">
  209. or RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight}
  210. </if>
  211. <if test="batchId != null">
  212. or BATCH_ID = #{batchId}
  213. </if>
  214. <if test="resultClass != null and resultClass != ''">
  215. or RESULT_CLASS = #{resultClass}
  216. </if>
  217. <if test="resultLoadingDate != null">
  218. or TO_CHAR(RESULT_LOADING_DATE,'yyyy-MM-dd') = '#{resultLoadingDate}'
  219. </if>
  220. <if test="resultRemarks != null and resultRemarks != ''">
  221. or RESULT_REMARKS = #{resultRemarks}
  222. </if>
  223. <if test="insertUsername != null and insertUsername != ''">
  224. or INSERT_USERNAME = #{insertUsername}
  225. </if>
  226. <if test="insertTime != null">
  227. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  228. </if>
  229. <if test="updateUsername != null and updateUsername != ''">
  230. or UPDATE_USERNAME = #{updateUsername}
  231. </if>
  232. <if test="updateTime != null">
  233. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  234. </if>
  235. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  236. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  237. </if>
  238. <if test="deleted != null">
  239. or DELETED = #{deleted}
  240. </if>
  241. <if test="sendStationId != null">
  242. or SEND_STATION_ID = #{sendStationId}
  243. </if>
  244. <if test="arrivalStationId != null">
  245. or ARRIVAL_STATION_ID = #{arrivalStationId}
  246. </if>
  247. </delete>
  248. <insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
  249. insert into TMSTRAIN_LOADING_RESULT (RESULT_ID, PURCHASE_ORDER_RAIL_PLAN_ID,
  250. RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE, RESULT_ISCLEAR,
  251. CAPACITY_ID, MATERIAL_ID, RESULT_MATERIAL_NUMBER,
  252. RESULT_MATERIAL_THEORYWEIGHT, BATCH_ID, RESULT_CLASS,
  253. RESULT_LOADING_DATE, RESULT_REMARKS, INSERT_USERNAME,
  254. INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
  255. INSERT_UPDATE_REMARK, DELETED, SEND_STATION_ID,
  256. ARRIVAL_STATION_ID)
  257. values (#{resultId,jdbcType=DECIMAL}, #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
  258. #{resultWagonNo,jdbcType=VARCHAR}, #{resultBillableTonnage,jdbcType=DECIMAL}, #{resultIsclear,jdbcType=VARCHAR},
  259. #{capacityId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, #{resultMaterialNumber,jdbcType=DECIMAL},
  260. #{resultMaterialTheoryweight,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL}, #{resultClass,jdbcType=VARCHAR},
  261. #{resultLoadingDate,jdbcType=TIMESTAMP}, #{resultRemarks,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
  262. #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
  263. #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{sendStationId,jdbcType=DECIMAL},
  264. #{arrivalStationId,jdbcType=DECIMAL})
  265. </insert>
  266. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
  267. insert into TMSTRAIN_LOADING_RESULT
  268. <trim prefix="(" suffix=")" suffixOverrides=",">
  269. <if test="resultId != null">
  270. RESULT_ID,
  271. </if>
  272. <if test="purchaseOrderRailPlanId != null">
  273. PURCHASE_ORDER_RAIL_PLAN_ID,
  274. </if>
  275. <if test="resultWagonNo != null">
  276. RESULT_WAGON_NO,
  277. </if>
  278. <if test="resultBillableTonnage != null">
  279. RESULT_BILLABLE_TONNAGE,
  280. </if>
  281. <if test="resultIsclear != null">
  282. RESULT_ISCLEAR,
  283. </if>
  284. <if test="capacityId != null">
  285. CAPACITY_ID,
  286. </if>
  287. <if test="materialId != null">
  288. MATERIAL_ID,
  289. </if>
  290. <if test="resultMaterialNumber != null">
  291. RESULT_MATERIAL_NUMBER,
  292. </if>
  293. <if test="resultMaterialTheoryweight != null">
  294. RESULT_MATERIAL_THEORYWEIGHT,
  295. </if>
  296. <if test="batchId != null">
  297. BATCH_ID,
  298. </if>
  299. <if test="resultClass != null">
  300. RESULT_CLASS,
  301. </if>
  302. <if test="resultLoadingDate != null">
  303. RESULT_LOADING_DATE,
  304. </if>
  305. <if test="resultRemarks != null">
  306. RESULT_REMARKS,
  307. </if>
  308. <if test="insertUsername != null">
  309. INSERT_USERNAME,
  310. </if>
  311. <if test="insertTime != null">
  312. INSERT_TIME,
  313. </if>
  314. <if test="updateUsername != null">
  315. UPDATE_USERNAME,
  316. </if>
  317. <if test="updateTime != null">
  318. UPDATE_TIME,
  319. </if>
  320. <if test="insertUpdateRemark != null">
  321. INSERT_UPDATE_REMARK,
  322. </if>
  323. <if test="deleted != null">
  324. DELETED,
  325. </if>
  326. <if test="sendStationId != null">
  327. SEND_STATION_ID,
  328. </if>
  329. <if test="arrivalStationId != null">
  330. ARRIVAL_STATION_ID,
  331. </if>
  332. </trim>
  333. <trim prefix="values (" suffix=")" suffixOverrides=",">
  334. <if test="resultId != null">
  335. #{resultId,jdbcType=DECIMAL},
  336. </if>
  337. <if test="purchaseOrderRailPlanId != null">
  338. #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
  339. </if>
  340. <if test="resultWagonNo != null">
  341. #{resultWagonNo,jdbcType=VARCHAR},
  342. </if>
  343. <if test="resultBillableTonnage != null">
  344. #{resultBillableTonnage,jdbcType=DECIMAL},
  345. </if>
  346. <if test="resultIsclear != null">
  347. #{resultIsclear,jdbcType=VARCHAR},
  348. </if>
  349. <if test="capacityId != null">
  350. #{capacityId,jdbcType=DECIMAL},
  351. </if>
  352. <if test="materialId != null">
  353. #{materialId,jdbcType=DECIMAL},
  354. </if>
  355. <if test="resultMaterialNumber != null">
  356. #{resultMaterialNumber,jdbcType=DECIMAL},
  357. </if>
  358. <if test="resultMaterialTheoryweight != null">
  359. #{resultMaterialTheoryweight,jdbcType=DECIMAL},
  360. </if>
  361. <if test="batchId != null">
  362. #{batchId,jdbcType=DECIMAL},
  363. </if>
  364. <if test="resultClass != null">
  365. #{resultClass,jdbcType=VARCHAR},
  366. </if>
  367. <if test="resultLoadingDate != null">
  368. #{resultLoadingDate,jdbcType=TIMESTAMP},
  369. </if>
  370. <if test="resultRemarks != null">
  371. #{resultRemarks,jdbcType=VARCHAR},
  372. </if>
  373. <if test="insertUsername != null">
  374. #{insertUsername,jdbcType=VARCHAR},
  375. </if>
  376. <if test="insertTime != null">
  377. #{insertTime,jdbcType=TIMESTAMP},
  378. </if>
  379. <if test="updateUsername != null">
  380. #{updateUsername,jdbcType=VARCHAR},
  381. </if>
  382. <if test="updateTime != null">
  383. #{updateTime,jdbcType=TIMESTAMP},
  384. </if>
  385. <if test="insertUpdateRemark != null">
  386. #{insertUpdateRemark,jdbcType=VARCHAR},
  387. </if>
  388. <if test="deleted != null">
  389. #{deleted,jdbcType=DECIMAL},
  390. </if>
  391. <if test="sendStationId != null">
  392. #{sendStationId,jdbcType=DECIMAL},
  393. </if>
  394. <if test="arrivalStationId != null">
  395. #{arrivalStationId,jdbcType=DECIMAL},
  396. </if>
  397. </trim>
  398. </insert>
  399. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
  400. update TMSTRAIN_LOADING_RESULT
  401. set PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
  402. RESULT_WAGON_NO = #{resultWagonNo,jdbcType=VARCHAR},
  403. RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage,jdbcType=DECIMAL},
  404. RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
  405. CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
  406. MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
  407. RESULT_MATERIAL_NUMBER = #{resultMaterialNumber,jdbcType=DECIMAL},
  408. RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight,jdbcType=DECIMAL},
  409. BATCH_ID = #{batchId,jdbcType=DECIMAL},
  410. RESULT_CLASS = #{resultClass,jdbcType=VARCHAR},
  411. RESULT_LOADING_DATE = #{resultLoadingDate,jdbcType=TIMESTAMP},
  412. RESULT_REMARKS = #{resultRemarks,jdbcType=VARCHAR},
  413. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  414. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  415. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  416. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  417. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  418. DELETED = #{deleted,jdbcType=DECIMAL},
  419. SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
  420. ARRIVAL_STATION_ID = #{arrivalStationId,jdbcType=DECIMAL}
  421. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  422. </update>
  423. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
  424. update TMSTRAIN_LOADING_RESULT
  425. <set>
  426. <if test="purchaseOrderRailPlanId != null">
  427. PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
  428. </if>
  429. <if test="resultWagonNo != null">
  430. RESULT_WAGON_NO = #{resultWagonNo,jdbcType=VARCHAR},
  431. </if>
  432. <if test="resultBillableTonnage != null">
  433. RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage,jdbcType=DECIMAL},
  434. </if>
  435. <if test="resultIsclear != null">
  436. RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
  437. </if>
  438. <if test="capacityId != null">
  439. CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
  440. </if>
  441. <if test="materialId != null">
  442. MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
  443. </if>
  444. <if test="resultMaterialNumber != null">
  445. RESULT_MATERIAL_NUMBER = #{resultMaterialNumber,jdbcType=DECIMAL},
  446. </if>
  447. <if test="resultMaterialTheoryweight != null">
  448. RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight,jdbcType=DECIMAL},
  449. </if>
  450. <if test="batchId != null">
  451. BATCH_ID = #{batchId,jdbcType=DECIMAL},
  452. </if>
  453. <if test="resultClass != null">
  454. RESULT_CLASS = #{resultClass,jdbcType=VARCHAR},
  455. </if>
  456. <if test="resultLoadingDate != null">
  457. RESULT_LOADING_DATE = #{resultLoadingDate,jdbcType=TIMESTAMP},
  458. </if>
  459. <if test="resultRemarks != null">
  460. RESULT_REMARKS = #{resultRemarks,jdbcType=VARCHAR},
  461. </if>
  462. <if test="insertUsername != null">
  463. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  464. </if>
  465. <if test="insertTime != null">
  466. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  467. </if>
  468. <if test="updateUsername != null">
  469. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  470. </if>
  471. <if test="updateTime != null">
  472. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  473. </if>
  474. <if test="insertUpdateRemark != null">
  475. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  476. </if>
  477. <if test="deleted != null">
  478. DELETED = #{deleted,jdbcType=DECIMAL},
  479. </if>
  480. <if test="sendStationId != null">
  481. SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
  482. </if>
  483. <if test="arrivalStationId != null">
  484. ARRIVAL_STATION_ID = #{arrivalStationId,jdbcType=DECIMAL},
  485. </if>
  486. </set>
  487. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  488. </update>
  489. <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
  490. <include refid="select"/>
  491. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  492. </select>
  493. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  494. <include refid="select"/>
  495. <include refid="where"/>
  496. </select>
  497. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  498. <include refid="select"/>
  499. <include refid="whereLike"/>
  500. </select>
  501. <insert id="batchInsert" parameterType="java.util.List">
  502. insert into TMSTRAIN_LOADING_RESULT
  503. (RESULT_ID,
  504. PURCHASE_ORDER_RAIL_PLAN_ID, RESULT_WAGON_NO,
  505. RESULT_BILLABLE_TONNAGE, RESULT_ISCLEAR,
  506. CAPACITY_ID, MATERIAL_ID, RESULT_MATERIAL_NUMBER,
  507. RESULT_MATERIAL_THEORYWEIGHT, BATCH_ID,
  508. RESULT_CLASS, RESULT_LOADING_DATE,
  509. RESULT_REMARKS, INSERT_USERNAME,
  510. INSERT_TIME, UPDATE_USERNAME,
  511. UPDATE_TIME, INSERT_UPDATE_REMARK,
  512. DELETED, SEND_STATION_ID, ARRIVAL_STATION_ID
  513. )
  514. ( <foreach collection="list" item="item" separator="union all">
  515. select
  516. #{item.resultId,jdbcType=DECIMAL},
  517. #{item.purchaseOrderRailPlanId,jdbcType=DECIMAL}, #{item.resultWagonNo,jdbcType=VARCHAR},
  518. #{item.resultBillableTonnage,jdbcType=DECIMAL}, #{item.resultIsclear,jdbcType=VARCHAR},
  519. #{item.capacityId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.resultMaterialNumber,jdbcType=DECIMAL},
  520. #{item.resultMaterialTheoryweight,jdbcType=DECIMAL}, #{item.batchId,jdbcType=DECIMAL},
  521. #{item.resultClass,jdbcType=VARCHAR}, #{item.resultLoadingDate,jdbcType=TIMESTAMP},
  522. #{item.resultRemarks,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
  523. #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
  524. #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
  525. #{item.deleted,jdbcType=DECIMAL}, #{item.sendStationId,jdbcType=DECIMAL}, #{item.arrivalStationId,jdbcType=DECIMAL}
  526. from dual
  527. </foreach> )
  528. </insert>
  529. <update id="batchUpdate" parameterType="java.util.List">
  530. update TMSTRAIN_LOADING_RESULT
  531. set
  532. RESULT_ID=
  533. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  534. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
  535. </foreach>
  536. ,PURCHASE_ORDER_RAIL_PLAN_ID=
  537. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  538. when #{item.resultId,jdbcType=DECIMAL} then #{item.purchaseOrderRailPlanId,jdbcType=DECIMAL}
  539. </foreach>
  540. ,RESULT_WAGON_NO=
  541. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  542. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultWagonNo,jdbcType=VARCHAR}
  543. </foreach>
  544. ,RESULT_BILLABLE_TONNAGE=
  545. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  546. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultBillableTonnage,jdbcType=DECIMAL}
  547. </foreach>
  548. ,RESULT_ISCLEAR=
  549. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  550. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultIsclear,jdbcType=VARCHAR}
  551. </foreach>
  552. ,CAPACITY_ID=
  553. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  554. when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
  555. </foreach>
  556. ,MATERIAL_ID=
  557. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  558. when #{item.resultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
  559. </foreach>
  560. ,RESULT_MATERIAL_NUMBER=
  561. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  562. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterialNumber,jdbcType=DECIMAL}
  563. </foreach>
  564. ,RESULT_MATERIAL_THEORYWEIGHT=
  565. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  566. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterialTheoryweight,jdbcType=DECIMAL}
  567. </foreach>
  568. ,BATCH_ID=
  569. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  570. when #{item.resultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
  571. </foreach>
  572. ,RESULT_CLASS=
  573. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  574. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultClass,jdbcType=VARCHAR}
  575. </foreach>
  576. ,RESULT_LOADING_DATE=
  577. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  578. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadingDate,jdbcType=TIMESTAMP}
  579. </foreach>
  580. ,RESULT_REMARKS=
  581. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  582. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultRemarks,jdbcType=VARCHAR}
  583. </foreach>
  584. ,INSERT_USERNAME=
  585. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  586. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  587. </foreach>
  588. ,INSERT_TIME=
  589. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  590. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  591. </foreach>
  592. ,UPDATE_USERNAME=
  593. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  594. when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  595. </foreach>
  596. ,UPDATE_TIME=
  597. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  598. when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  599. </foreach>
  600. ,INSERT_UPDATE_REMARK=
  601. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  602. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  603. </foreach>
  604. ,DELETED=
  605. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  606. when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
  607. </foreach>
  608. ,SEND_STATION_ID=
  609. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  610. when #{item.resultId,jdbcType=DECIMAL} then #{item.sendStationId,jdbcType=DECIMAL}
  611. </foreach>
  612. ,ARRIVAL_STATION_ID=
  613. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  614. when #{item.resultId,jdbcType=DECIMAL} then #{item.arrivalStationId,jdbcType=DECIMAL}
  615. </foreach>
  616. where RESULT_ID in
  617. <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
  618. #{item.resultId,jdbcType=DECIMAL}
  619. </foreach>
  620. </update>
  621. <delete id="batchDelete" parameterType="java.util.List">
  622. delete from TMSTRAIN_LOADING_RESULT
  623. where RESULT_ID in
  624. <foreach collection="list" item="id" open="(" close=")" separator=",">
  625. #{id}
  626. </foreach>
  627. </delete>
  628. <!-- 友情提示!!!-->
  629. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  630. <select id="getTmsWagonLoadInfo" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
  631. select * from(
  632. select t_load.RESULT_ID "resultId",
  633. a_order.PURCHASE_ORDER_NO "purchaseOrderNo",
  634. t_load.RESULT_WAGON_NO "resultWagonNo",
  635. t_load.RESULT_LOADING_DATE "resultLoadingDate",
  636. t_load.RESULT_CLASS "resultClass",
  637. d_batch.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
  638. r_material.MATERIAL_NAME "materialName",
  639. r_s_arrival.ARRIVAL_NAME "sendStationName",
  640. r_a_arrival.ARRIVAL_NAME "arrivalStationName",
  641. t_load.RESULT_BILLABLE_TONNAGE "resultBillableTonnage",
  642. t_load.RESULT_ISCLEAR "resultIsclear",
  643. t_load.RESULT_REMARKS "resultRemarks",
  644. t_load.INSERT_TIME "insertTime"
  645. from TMSTRAIN_LOADING_RESULT t_load
  646. left join AMS_PURCHASE_ORDER a_order
  647. on t_load.PURCHASE_ORDER_RAIL_PLAN_ID=a_order.PURCHASE_ORDER_ID
  648. left join DIL_BATCH d_batch
  649. on t_load.BATCH_ID=d_batch.BATCH_ID
  650. left join RMS_MATERIAL r_material
  651. on t_load.MATERIAL_ID=r_material.MATERIAL_ID
  652. left join RMSTRAIN_ARRIVAL_SEND r_s_arrival
  653. on r_s_arrival.ARRIVAL_ID=t_load.SEND_STATION_ID
  654. left join RMSTRAIN_ARRIVAL_SEND r_a_arrival
  655. on r_a_arrival.ARRIVAL_ID=t_load.ARRIVAL_STATION_ID
  656. where t_load.DELETED=0 order by t_load.RESULT_LOADING_DATE desc
  657. )
  658. <where>
  659. <if test="purchaseOrderNo != null">
  660. and
  661. <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
  662. "purchaseOrderNo" like '%${item}%'
  663. </foreach>
  664. </if>
  665. <if test="resultWagonNo != null">
  666. and
  667. <foreach collection="resultWagonNo" item="item" open="(" separator="or" close=")">
  668. "resultWagonNo" like '%${item}%'
  669. </foreach>
  670. </if>
  671. <if test="resultLoadingDate != null">
  672. and
  673. <foreach collection="resultLoadingDate" item="item" open="(" separator="or" close=")">
  674. "resultLoadingDate" like '%${item}%'
  675. </foreach>
  676. </if>
  677. <if test="resultClass != null">
  678. and
  679. <foreach collection="resultClass" item="item" open="(" separator="or" close=")">
  680. "resultClass" like '%${item}%'
  681. </foreach>
  682. </if>
  683. <if test="resultForeignShipName != null">
  684. and
  685. <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
  686. "resultForeignShipName" like '%${item}%'
  687. </foreach>
  688. </if>
  689. <if test="materialName != null">
  690. and
  691. <foreach collection="materialName" item="item" open="(" separator="or" close=")">
  692. materialName like '%${item}%'
  693. </foreach>
  694. </if>
  695. <if test="sendStationName != null">
  696. and
  697. <foreach collection="sendStationName" item="item" open="(" separator="or" close=")">
  698. "sendStationName" like '%${item}%'
  699. </foreach>
  700. </if>
  701. <if test="arrivalStationName != null">
  702. and
  703. <foreach collection="arrivalStationName" item="item" open="(" separator="or" close=")">
  704. arrivalStationName like '%${item}%'
  705. </foreach>
  706. </if>
  707. <if test="resultBillableTonnage != null">
  708. and
  709. <foreach collection="resultBillableTonnage" item="item" open="(" separator="or" close=")">
  710. "resultBillableTonnage" like '%${item}%'
  711. </foreach>
  712. </if>
  713. <if test="resultIsclear != null">
  714. and
  715. <foreach collection="resultIsclear" item="item" open="(" separator="or" close=")">
  716. "resultIsclear" like '%${item}%'
  717. </foreach>
  718. </if>
  719. <if test="resultRemarks != null">
  720. and
  721. <foreach collection="resultRemarks" item="item" open="(" separator="or" close=")">
  722. "resultRemarks" like '%${item}%'
  723. </foreach>
  724. </if>
  725. </where>
  726. <include refid="orderBy"></include>
  727. <if test="orderField == null ">
  728. order by "insertTime" desc
  729. </if>
  730. </select>
  731. <sql id="orderBy">
  732. <if test="orderField != null and orderField != ''">
  733. order by "${orderField}"
  734. <if test="orderType != null and orderType != ''">
  735. ${orderType}
  736. </if>
  737. </if>
  738. </sql>
  739. <select id="getResultForeignShipName" parameterType="java.math.BigDecimal" resultType="String">
  740. select RESULT_FOREIGN_SHIP_NAME
  741. FROM DIL_BATCH d_batch
  742. where d_batch.BATCH_ID = #{batchId}
  743. </select>
  744. <select id="getMaterialID" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
  745. select MATERIAL_ID
  746. FROM DIL_BATCH d_batch
  747. where d_batch.BATCH_ID = #{batchId}
  748. </select>
  749. <select id="getPurchaseOrderId" parameterType="java.util.Map" resultType="java.math.BigDecimal">
  750. select
  751. APO.PURCHASE_ORDER_ID
  752. from AMS_PURCHASE_ORDER APO
  753. left join DIL_BATCH DB
  754. on DB.BATCH_ID = APO.BATCH_ID
  755. where DB.BATCH_ID = #{batchId}
  756. </select>
  757. <select id="getSendStationName" resultType="java.util.LinkedHashMap">
  758. select
  759. ARRIVAL_ID "id",
  760. ARRIVAL_ID "value",
  761. ARRIVAL_NAME "label"
  762. from RMSTRAIN_ARRIVAL_SEND
  763. </select>
  764. <select id="getArrivalStationName" resultType="java.util.LinkedHashMap">
  765. select
  766. ras.ARRIVAL_ID "id",
  767. ras.ARRIVAL_ID "value",
  768. ras.ARRIVAL_NAME "label"
  769. from RMSTRAIN_ARRIVAL_SEND ras
  770. </select>
  771. <select id="getBatchId" resultType="java.util.LinkedHashMap">
  772. select
  773. BATCH_ID "id",
  774. BATCH_ID "value",
  775. CONCAT(CONCAT(RM.MATERIAL_NAME, '"'), CONCAT(DB.RESULT_FOREIGN_SHIP_NAME, '"')) "label"
  776. from DIL_BATCH DB
  777. left join RMS_MATERIAL RM
  778. on RM.MATERIAL_ID = DB.MATERIAL_ID
  779. </select>
  780. <select id="getWagonNo" resultType="java.util.LinkedHashMap">
  781. select
  782. t_load.RESULT_WAGON_NO "id",
  783. t_load.RESULT_WAGON_NO "value",
  784. t_load.RESULT_WAGON_NO "label"
  785. from TMSTRAIN_LOADING_RESULT t_load
  786. left join TMSTRAIN_WAGON_UNLOAD_RESULT t_unload
  787. on t_load.RESULT_WAGON_NO = t_unload.RESULT_WAGON_NO
  788. where t_load.RESULT_WAGON_NO not in (select RESULT_WAGON_NO from TMSTRAIN_WAGON_UNLOAD_RESULT) and t_load.DELETED = 0
  789. </select>
  790. <select id="selectByResultId" parameterType="java.math.BigDecimal" resultType="java.util.LinkedHashMap">
  791. select
  792. t_load.RESULT_WAGON_NO "resultWagonNo",
  793. t_load.RESULT_BILLABLE_TONNAGE "resultBillableTonnage",
  794. t_load.RESULT_ISCLEAR "resultIsclear",
  795. t_load.RESULT_CLASS "resultClass",
  796. t_load.SEND_STATION_ID "sendStationId",
  797. t_load.ARRIVAL_STATION_ID "arrivalStationId",
  798. t_load.RESULT_LOADING_DATE "resultLoadingDate",
  799. t_load.BATCH_ID "batchId",
  800. t_load.RESULT_REMARKS "resultRemarks"
  801. from TMSTRAIN_LOADING_RESULT t_load
  802. where t_load.RESULT_ID = #{resultId}
  803. </select>
  804. <select id="getPortIdBySendStationId" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
  805. select RAS.OWNED_PORT_ID from RMSTRAIN_ARRIVAL_SEND RAS where RAS.ARRIVAL_ID = #{sendStationId}
  806. </select>
  807. <!-- 通过发运计划号查找物资信息 -->
  808. <select id="getMaterialInfoByRailPlanId" resultType="java.util.Map" parameterType="java.lang.Integer">
  809. SELECT RM.MATERIAL_NAME "materialName",
  810. AROM.OFFSET_MATERIAL_NUMBER "materialNumber",
  811. AROM.OFFSET_MATERIAL_WEIGHT "materialWeight",
  812. AROM.MATERIAL_ID "materialId"
  813. FROM AMS_RAIL_OFFSET_DAYPLAN AROD
  814. LEFT JOIN AMS_RAIL_OFFSET_MATERIAL AROM
  815. ON AROM.DAYPLAN_ID=AROD.DAYPLAN_ID
  816. LEFT JOIN RMS_MATERIAL RM
  817. ON RM.MATERIAL_ID=AROM.MATERIAL_ID
  818. WHERE AROD.DAYPLAN_ID=#{dayPlanId}
  819. </select>
  820. <!-- 内转物流查询装车作业 -->
  821. <select id="selectLoadedForConverted" resultType="java.util.Map">
  822. select TLR.RESULT_BILLABLE_TONNAGE "tonnage",
  823. TLR.RESULT_MATERIAL_THEORYWEIGHT "meterialTheoryweight",
  824. AROD.DAYPLAN_NO "dayplanNo",
  825. TLR.RESULT_CLASS "resultClass",
  826. TLR.INSERT_UPDATE_REMARK "remark",
  827. TLR.RESULT_LOADING_DATE "date",
  828. TLR.RESULT_WAGON_NO "wagonNo",
  829. RAS.ARRIVAL_NAME "arrivalName",
  830. RAS2.ARRIVAL_NAME "arrivalName2",
  831. RM.MATERIAL_NAME "materialName",
  832. TLR.RESULT_MATERIAL_NUMBER "materialNumber",
  833. RC2.CONSIGNEE_COMPANY_NAME "companyName",
  834. AROD.DAYPLAN_CONSIGNEE_NAME "consigeeName",
  835. AROD.DAYPLAN_CONSIGNEE_TEL "tel",
  836. RAS2.DAYPLAN_DEDICATED_LINE "line",
  837. RC.CAPACITY_NUMBER "capacityNumber"
  838. from TMSTRAIN_LOADING_RESULT TLR
  839. LEFT JOIN AMS_RAIL_OFFSET_DAYPLAN AROD
  840. ON AROD.DAYPLAN_ID=TLR.PURCHASE_ORDER_RAIL_PLAN_ID
  841. LEFT JOIN RMSTRAIN_ARRIVAL_SEND RAS
  842. ON RAS.ARRIVAL_ID=TLR.ARRIVAL_STATION_ID
  843. LEFT JOIN RMSTRAIN_ARRIVAL_SEND RAS2
  844. ON TLR.SEND_STATION_ID=RAS2.ARRIVAL_ID
  845. LEFT JOIN RMS_CAPACITY RC
  846. ON RC.CAPACITY_ID=TLR.CAPACITY_ID
  847. LEFT JOIN RMS_MATERIAL RM
  848. ON RM.MATERIAL_ID=TLR.MATERIAL_ID
  849. LEFT JOIN RMS_CONSIGNEE RC2
  850. ON RC2.CONSIGNEE_ID=AROD.RECEIVING_UNIT_ID
  851. WHERE TLR.DELETED=0
  852. </select>
  853. <select id="selectLoadByResultId" parameterType="java.math.BigDecimal" resultType="java.util.LinkedHashMap">
  854. select
  855. t_load.RESULT_WAGON_NO "resultWagonNo",
  856. t_load.RESULT_BILLABLE_TONNAGE "resultBillableTonnage",
  857. t_load.RESULT_CLASS "resultClass",
  858. t_load.SEND_STATION_ID "sendStationId",
  859. t_load.ARRIVAL_STATION_ID "arrivalStationId",
  860. t_load.RESULT_LOADING_DATE "resultLoadingDate",
  861. t_load.RESULT_REMARKS "resultRemarks",
  862. t_load.RESULT_MATERIAL_NUMBER "materialNumber",
  863. t_load.RESULT_MATERIAL_THEORYWEIGHT "materialTheoryWeight"
  864. from TMSTRAIN_LOADING_RESULT t_load
  865. where t_load.RESULT_ID = #{resultId}
  866. </select>
  867. </mapper>