TmstrainPleaseApproveResultMapper.xml 42 KB

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