TmstrainQualityResultMapper.xml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714
  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.TmstrainQualityResultMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstrainQualityResult">
  5. <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
  6. <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
  7. <result column="WZ_INPUT_ID" jdbcType="VARCHAR" property="wzInputId" />
  8. <result column="WZ_ID" jdbcType="VARCHAR" property="wzId" />
  9. <result column="MINE_ID " jdbcType="VARCHAR" property="mineId" />
  10. <result column="CONTRANCT_NO" jdbcType="VARCHAR" property="contranctNo" />
  11. <result column="SUPLIER_ID" jdbcType="VARCHAR" property="suplierId" />
  12. <result column="MINE_NAME" jdbcType="VARCHAR" property="mineName" />
  13. <result column="IS_IMPORT" jdbcType="VARCHAR" property="isImport" />
  14. <result column="POUND_NO" jdbcType="VARCHAR" property="poundNo" />
  15. <result column="CARGO_NO" jdbcType="VARCHAR" property="cargoNo" />
  16. <result column="SATION_NAME" jdbcType="VARCHAR" property="sationName" />
  17. <result column="PURCHASE_UNIT_NAME" jdbcType="VARCHAR" property="purchaseUnitName" />
  18. <result column="SHIP_NAME" jdbcType="VARCHAR" property="shipName" />
  19. <result column="SAMPLE_DATE" jdbcType="TIMESTAMP" property="sampleDate" />
  20. <result column="SAMPLE_PLACE_NAME" jdbcType="VARCHAR" property="samplePlaceName" />
  21. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
  22. <result column="INSERT_REMARK" jdbcType="VARCHAR" property="insertRemark" />
  23. <result column="INPUT_DATE" jdbcType="VARCHAR" property="inputDate" />
  24. <result column="NET_WEIGHT" jdbcType="VARCHAR" property="netWeight" />
  25. <result column="ISQUALITY" jdbcType="VARCHAR" property="isquality" />
  26. <result column="UNLOAD_ID" jdbcType="DECIMAL" property="unloadId" />
  27. <result column="DEDUCT_NUMBER" jdbcType="DECIMAL" property="deductNumber" />
  28. <result column="ELEMENT_VALUE" jdbcType="VARCHAR" property="elementValue" />
  29. </resultMap>
  30. <sql id="columns">
  31. RESULT_ID, RESULT_TOTAL_ID, WZ_INPUT_ID, WZ_ID, "MINE_ID ", CONTRANCT_NO, SUPLIER_ID,
  32. MINE_NAME, IS_IMPORT, POUND_NO, CARGO_NO, SATION_NAME, PURCHASE_UNIT_NAME, SHIP_NAME,
  33. SAMPLE_DATE, SAMPLE_PLACE_NAME, INSERT_TIME, INSERT_REMARK, INPUT_DATE, NET_WEIGHT,
  34. ISQUALITY, UNLOAD_ID, DEDUCT_NUMBER, ELEMENT_VALUE
  35. </sql>
  36. <sql id="columns_alias">
  37. t.RESULT_ID, t.RESULT_TOTAL_ID, t.WZ_INPUT_ID, t.WZ_ID, t."MINE_ID ", t.CONTRANCT_NO,
  38. t.SUPLIER_ID, t.MINE_NAME, t.IS_IMPORT, t.POUND_NO, t.CARGO_NO, t.SATION_NAME, t.PURCHASE_UNIT_NAME,
  39. t.SHIP_NAME, t.SAMPLE_DATE, t.SAMPLE_PLACE_NAME, t.INSERT_TIME, t.INSERT_REMARK,
  40. t.INPUT_DATE, t.NET_WEIGHT, t.ISQUALITY, t.UNLOAD_ID, t.DEDUCT_NUMBER, t.ELEMENT_VALUE
  41. </sql>
  42. <sql id="select">
  43. SELECT <include refid="columns" /> FROM TMSTRAIN_QUALITY_RESULT
  44. </sql>
  45. <sql id="select_alias">
  46. SELECT <include refid="columns_alias" /> FROM TMSTRAIN_QUALITY_RESULT t
  47. </sql>
  48. <sql id="where">
  49. <where>
  50. <if test="resultId != null">
  51. and RESULT_ID = #{resultId}
  52. </if>
  53. <if test="resultTotalId != null">
  54. and RESULT_TOTAL_ID = #{resultTotalId}
  55. </if>
  56. <if test="wzInputId != null and wzInputId != ''">
  57. and WZ_INPUT_ID = #{wzInputId}
  58. </if>
  59. <if test="wzId != null and wzId != ''">
  60. and WZ_ID = #{wzId}
  61. </if>
  62. <if test="mineId != null and mineId != ''">
  63. and MINE_ID = #{mineId}
  64. </if>
  65. <if test="contranctNo != null and contranctNo != ''">
  66. and CONTRANCT_NO = #{contranctNo}
  67. </if>
  68. <if test="suplierId != null and suplierId != ''">
  69. and SUPLIER_ID = #{suplierId}
  70. </if>
  71. <if test="mineName != null and mineName != ''">
  72. and MINE_NAME = #{mineName}
  73. </if>
  74. <if test="isImport != null and isImport != ''">
  75. and IS_IMPORT = #{isImport}
  76. </if>
  77. <if test="poundNo != null and poundNo != ''">
  78. and POUND_NO = #{poundNo}
  79. </if>
  80. <if test="cargoNo != null and cargoNo != ''">
  81. and CARGO_NO = #{cargoNo}
  82. </if>
  83. <if test="sationName != null and sationName != ''">
  84. and SATION_NAME = #{sationName}
  85. </if>
  86. <if test="purchaseUnitName != null and purchaseUnitName != ''">
  87. and PURCHASE_UNIT_NAME = #{purchaseUnitName}
  88. </if>
  89. <if test="shipName != null and shipName != ''">
  90. and SHIP_NAME = #{shipName}
  91. </if>
  92. <if test="sampleDate != null">
  93. and TO_CHAR(SAMPLE_DATE,'yyyy-MM-dd') = #{sampleDate}
  94. </if>
  95. <if test="samplePlaceName != null and samplePlaceName != ''">
  96. and SAMPLE_PLACE_NAME = #{samplePlaceName}
  97. </if>
  98. <if test="insertTime != null">
  99. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  100. </if>
  101. <if test="insertRemark != null and insertRemark != ''">
  102. and INSERT_REMARK = #{insertRemark}
  103. </if>
  104. <if test="inputDate != null and inputDate != ''">
  105. and INPUT_DATE = #{inputDate}
  106. </if>
  107. <if test="netWeight != null and netWeight != ''">
  108. and NET_WEIGHT = #{netWeight}
  109. </if>
  110. <if test="isquality != null and isquality != ''">
  111. and ISQUALITY = #{isquality}
  112. </if>
  113. <if test="unloadId != null">
  114. and UNLOAD_ID = #{unloadId}
  115. </if>
  116. <if test="deductNumber != null">
  117. and DEDUCT_NUMBER = #{deductNumber}
  118. </if>
  119. <if test="elementValue != null and elementValue != ''">
  120. and ELEMENT_VALUE = #{elementValue}
  121. </if>
  122. </where>
  123. </sql>
  124. <sql id="whereLike">
  125. <where>
  126. <if test="resultId != null">
  127. and RESULT_ID = #{resultId}
  128. </if>
  129. <if test="resultTotalId != null">
  130. and RESULT_TOTAL_ID = #{resultTotalId}
  131. </if>
  132. <if test="wzInputId != null and wzInputId != ''">
  133. and WZ_INPUT_ID LIKE '%${wzInputId}%'
  134. </if>
  135. <if test="wzId != null and wzId != ''">
  136. and WZ_ID LIKE '%${wzId}%'
  137. </if>
  138. <if test="mineId != null and mineId != ''">
  139. and MINE_ID LIKE '%${mineId}%'
  140. </if>
  141. <if test="contranctNo != null and contranctNo != ''">
  142. and CONTRANCT_NO LIKE '%${contranctNo}%'
  143. </if>
  144. <if test="suplierId != null and suplierId != ''">
  145. and SUPLIER_ID LIKE '%${suplierId}%'
  146. </if>
  147. <if test="mineName != null and mineName != ''">
  148. and MINE_NAME LIKE '%${mineName}%'
  149. </if>
  150. <if test="isImport != null and isImport != ''">
  151. and IS_IMPORT LIKE '%${isImport}%'
  152. </if>
  153. <if test="poundNo != null and poundNo != ''">
  154. and POUND_NO LIKE '%${poundNo}%'
  155. </if>
  156. <if test="cargoNo != null and cargoNo != ''">
  157. and CARGO_NO LIKE '%${cargoNo}%'
  158. </if>
  159. <if test="sationName != null and sationName != ''">
  160. and SATION_NAME LIKE '%${sationName}%'
  161. </if>
  162. <if test="purchaseUnitName != null and purchaseUnitName != ''">
  163. and PURCHASE_UNIT_NAME LIKE '%${purchaseUnitName}%'
  164. </if>
  165. <if test="shipName != null and shipName != ''">
  166. and SHIP_NAME LIKE '%${shipName}%'
  167. </if>
  168. <if test="sampleDate != null">
  169. and TO_CHAR(SAMPLE_DATE,'yyyy-MM-dd') = #{sampleDate}
  170. </if>
  171. <if test="samplePlaceName != null and samplePlaceName != ''">
  172. and SAMPLE_PLACE_NAME LIKE '%${samplePlaceName}%'
  173. </if>
  174. <if test="insertTime != null">
  175. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  176. </if>
  177. <if test="insertRemark != null and insertRemark != ''">
  178. and INSERT_REMARK LIKE '%${insertRemark}%'
  179. </if>
  180. <if test="inputDate != null and inputDate != ''">
  181. and INPUT_DATE LIKE '%${inputDate}%'
  182. </if>
  183. <if test="netWeight != null and netWeight != ''">
  184. and NET_WEIGHT LIKE '%${netWeight}%'
  185. </if>
  186. <if test="isquality != null and isquality != ''">
  187. and ISQUALITY LIKE '%${isquality}%'
  188. </if>
  189. <if test="unloadId != null">
  190. and UNLOAD_ID = #{unloadId}
  191. </if>
  192. <if test="deductNumber != null">
  193. and DEDUCT_NUMBER = #{deductNumber}
  194. </if>
  195. <if test="elementValue != null and elementValue != ''">
  196. and ELEMENT_VALUE LIKE '%${elementValue}%'
  197. </if>
  198. </where>
  199. </sql>
  200. <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
  201. delete from TMSTRAIN_QUALITY_RESULT
  202. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  203. </delete>
  204. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  205. delete from TMSTRAIN_QUALITY_RESULT
  206. where 1!=1
  207. <if test="resultTotalId != null">
  208. or RESULT_TOTAL_ID = #{resultTotalId}
  209. </if>
  210. <if test="wzInputId != null and wzInputId != ''">
  211. or WZ_INPUT_ID = #{wzInputId}
  212. </if>
  213. <if test="wzId != null and wzId != ''">
  214. or WZ_ID = #{wzId}
  215. </if>
  216. <if test="mineId != null and mineId != ''">
  217. or MINE_ID = #{mineId}
  218. </if>
  219. <if test="contranctNo != null and contranctNo != ''">
  220. or CONTRANCT_NO = #{contranctNo}
  221. </if>
  222. <if test="suplierId != null and suplierId != ''">
  223. or SUPLIER_ID = #{suplierId}
  224. </if>
  225. <if test="mineName != null and mineName != ''">
  226. or MINE_NAME = #{mineName}
  227. </if>
  228. <if test="isImport != null and isImport != ''">
  229. or IS_IMPORT = #{isImport}
  230. </if>
  231. <if test="poundNo != null and poundNo != ''">
  232. or POUND_NO = #{poundNo}
  233. </if>
  234. <if test="cargoNo != null and cargoNo != ''">
  235. or CARGO_NO = #{cargoNo}
  236. </if>
  237. <if test="sationName != null and sationName != ''">
  238. or SATION_NAME = #{sationName}
  239. </if>
  240. <if test="purchaseUnitName != null and purchaseUnitName != ''">
  241. or PURCHASE_UNIT_NAME = #{purchaseUnitName}
  242. </if>
  243. <if test="shipName != null and shipName != ''">
  244. or SHIP_NAME = #{shipName}
  245. </if>
  246. <if test="sampleDate != null">
  247. or TO_CHAR(SAMPLE_DATE,'yyyy-MM-dd') = '#{sampleDate}'
  248. </if>
  249. <if test="samplePlaceName != null and samplePlaceName != ''">
  250. or SAMPLE_PLACE_NAME = #{samplePlaceName}
  251. </if>
  252. <if test="insertTime != null">
  253. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  254. </if>
  255. <if test="insertRemark != null and insertRemark != ''">
  256. or INSERT_REMARK = #{insertRemark}
  257. </if>
  258. <if test="inputDate != null and inputDate != ''">
  259. or INPUT_DATE = #{inputDate}
  260. </if>
  261. <if test="netWeight != null and netWeight != ''">
  262. or NET_WEIGHT = #{netWeight}
  263. </if>
  264. <if test="isquality != null and isquality != ''">
  265. or ISQUALITY = #{isquality}
  266. </if>
  267. <if test="unloadId != null">
  268. or UNLOAD_ID = #{unloadId}
  269. </if>
  270. <if test="deductNumber != null">
  271. or DEDUCT_NUMBER = #{deductNumber}
  272. </if>
  273. <if test="elementValue != null and elementValue != ''">
  274. or ELEMENT_VALUE = #{elementValue}
  275. </if>
  276. </delete>
  277. <insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainQualityResult">
  278. insert into TMSTRAIN_QUALITY_RESULT (RESULT_ID, RESULT_TOTAL_ID, WZ_INPUT_ID,
  279. WZ_ID, "MINE_ID ", CONTRANCT_NO,
  280. SUPLIER_ID, MINE_NAME, IS_IMPORT,
  281. POUND_NO, CARGO_NO, SATION_NAME,
  282. PURCHASE_UNIT_NAME, SHIP_NAME, SAMPLE_DATE,
  283. SAMPLE_PLACE_NAME, INSERT_TIME, INSERT_REMARK,
  284. INPUT_DATE, NET_WEIGHT, ISQUALITY,
  285. UNLOAD_ID, DEDUCT_NUMBER, ELEMENT_VALUE
  286. )
  287. values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{wzInputId,jdbcType=VARCHAR},
  288. #{wzId,jdbcType=VARCHAR}, #{mineId,jdbcType=VARCHAR}, #{contranctNo,jdbcType=VARCHAR},
  289. #{suplierId,jdbcType=VARCHAR}, #{mineName,jdbcType=VARCHAR}, #{isImport,jdbcType=VARCHAR},
  290. #{poundNo,jdbcType=VARCHAR}, #{cargoNo,jdbcType=VARCHAR}, #{sationName,jdbcType=VARCHAR},
  291. #{purchaseUnitName,jdbcType=VARCHAR}, #{shipName,jdbcType=VARCHAR}, #{sampleDate,jdbcType=TIMESTAMP},
  292. #{samplePlaceName,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{insertRemark,jdbcType=VARCHAR},
  293. #{inputDate,jdbcType=VARCHAR}, #{netWeight,jdbcType=VARCHAR}, #{isquality,jdbcType=VARCHAR},
  294. #{unloadId,jdbcType=DECIMAL}, #{deductNumber,jdbcType=DECIMAL}, #{elementValue,jdbcType=VARCHAR}
  295. )
  296. </insert>
  297. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainQualityResult">
  298. insert into TMSTRAIN_QUALITY_RESULT
  299. <trim prefix="(" suffix=")" suffixOverrides=",">
  300. <if test="resultId != null">
  301. RESULT_ID,
  302. </if>
  303. <if test="resultTotalId != null">
  304. RESULT_TOTAL_ID,
  305. </if>
  306. <if test="wzInputId != null">
  307. WZ_INPUT_ID,
  308. </if>
  309. <if test="wzId != null">
  310. WZ_ID,
  311. </if>
  312. <if test="mineId != null">
  313. "MINE_ID ",
  314. </if>
  315. <if test="contranctNo != null">
  316. CONTRANCT_NO,
  317. </if>
  318. <if test="suplierId != null">
  319. SUPLIER_ID,
  320. </if>
  321. <if test="mineName != null">
  322. MINE_NAME,
  323. </if>
  324. <if test="isImport != null">
  325. IS_IMPORT,
  326. </if>
  327. <if test="poundNo != null">
  328. POUND_NO,
  329. </if>
  330. <if test="cargoNo != null">
  331. CARGO_NO,
  332. </if>
  333. <if test="sationName != null">
  334. SATION_NAME,
  335. </if>
  336. <if test="purchaseUnitName != null">
  337. PURCHASE_UNIT_NAME,
  338. </if>
  339. <if test="shipName != null">
  340. SHIP_NAME,
  341. </if>
  342. <if test="sampleDate != null">
  343. SAMPLE_DATE,
  344. </if>
  345. <if test="samplePlaceName != null">
  346. SAMPLE_PLACE_NAME,
  347. </if>
  348. <if test="insertTime != null">
  349. INSERT_TIME,
  350. </if>
  351. <if test="insertRemark != null">
  352. INSERT_REMARK,
  353. </if>
  354. <if test="inputDate != null">
  355. INPUT_DATE,
  356. </if>
  357. <if test="netWeight != null">
  358. NET_WEIGHT,
  359. </if>
  360. <if test="isquality != null">
  361. ISQUALITY,
  362. </if>
  363. <if test="unloadId != null">
  364. UNLOAD_ID,
  365. </if>
  366. <if test="deductNumber != null">
  367. DEDUCT_NUMBER,
  368. </if>
  369. <if test="elementValue != null">
  370. ELEMENT_VALUE,
  371. </if>
  372. </trim>
  373. <trim prefix="values (" suffix=")" suffixOverrides=",">
  374. <if test="resultId != null">
  375. #{resultId,jdbcType=DECIMAL},
  376. </if>
  377. <if test="resultTotalId != null">
  378. #{resultTotalId,jdbcType=DECIMAL},
  379. </if>
  380. <if test="wzInputId != null">
  381. #{wzInputId,jdbcType=VARCHAR},
  382. </if>
  383. <if test="wzId != null">
  384. #{wzId,jdbcType=VARCHAR},
  385. </if>
  386. <if test="mineId != null">
  387. #{mineId,jdbcType=VARCHAR},
  388. </if>
  389. <if test="contranctNo != null">
  390. #{contranctNo,jdbcType=VARCHAR},
  391. </if>
  392. <if test="suplierId != null">
  393. #{suplierId,jdbcType=VARCHAR},
  394. </if>
  395. <if test="mineName != null">
  396. #{mineName,jdbcType=VARCHAR},
  397. </if>
  398. <if test="isImport != null">
  399. #{isImport,jdbcType=VARCHAR},
  400. </if>
  401. <if test="poundNo != null">
  402. #{poundNo,jdbcType=VARCHAR},
  403. </if>
  404. <if test="cargoNo != null">
  405. #{cargoNo,jdbcType=VARCHAR},
  406. </if>
  407. <if test="sationName != null">
  408. #{sationName,jdbcType=VARCHAR},
  409. </if>
  410. <if test="purchaseUnitName != null">
  411. #{purchaseUnitName,jdbcType=VARCHAR},
  412. </if>
  413. <if test="shipName != null">
  414. #{shipName,jdbcType=VARCHAR},
  415. </if>
  416. <if test="sampleDate != null">
  417. #{sampleDate,jdbcType=TIMESTAMP},
  418. </if>
  419. <if test="samplePlaceName != null">
  420. #{samplePlaceName,jdbcType=VARCHAR},
  421. </if>
  422. <if test="insertTime != null">
  423. #{insertTime,jdbcType=TIMESTAMP},
  424. </if>
  425. <if test="insertRemark != null">
  426. #{insertRemark,jdbcType=VARCHAR},
  427. </if>
  428. <if test="inputDate != null">
  429. #{inputDate,jdbcType=VARCHAR},
  430. </if>
  431. <if test="netWeight != null">
  432. #{netWeight,jdbcType=VARCHAR},
  433. </if>
  434. <if test="isquality != null">
  435. #{isquality,jdbcType=VARCHAR},
  436. </if>
  437. <if test="unloadId != null">
  438. #{unloadId,jdbcType=DECIMAL},
  439. </if>
  440. <if test="deductNumber != null">
  441. #{deductNumber,jdbcType=DECIMAL},
  442. </if>
  443. <if test="elementValue != null">
  444. #{elementValue,jdbcType=VARCHAR},
  445. </if>
  446. </trim>
  447. </insert>
  448. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainQualityResult">
  449. update TMSTRAIN_QUALITY_RESULT
  450. set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
  451. WZ_INPUT_ID = #{wzInputId,jdbcType=VARCHAR},
  452. WZ_ID = #{wzId,jdbcType=VARCHAR},
  453. "MINE_ID " = #{mineId,jdbcType=VARCHAR},
  454. CONTRANCT_NO = #{contranctNo,jdbcType=VARCHAR},
  455. SUPLIER_ID = #{suplierId,jdbcType=VARCHAR},
  456. MINE_NAME = #{mineName,jdbcType=VARCHAR},
  457. IS_IMPORT = #{isImport,jdbcType=VARCHAR},
  458. POUND_NO = #{poundNo,jdbcType=VARCHAR},
  459. CARGO_NO = #{cargoNo,jdbcType=VARCHAR},
  460. SATION_NAME = #{sationName,jdbcType=VARCHAR},
  461. PURCHASE_UNIT_NAME = #{purchaseUnitName,jdbcType=VARCHAR},
  462. SHIP_NAME = #{shipName,jdbcType=VARCHAR},
  463. SAMPLE_DATE = #{sampleDate,jdbcType=TIMESTAMP},
  464. SAMPLE_PLACE_NAME = #{samplePlaceName,jdbcType=VARCHAR},
  465. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  466. INSERT_REMARK = #{insertRemark,jdbcType=VARCHAR},
  467. INPUT_DATE = #{inputDate,jdbcType=VARCHAR},
  468. NET_WEIGHT = #{netWeight,jdbcType=VARCHAR},
  469. ISQUALITY = #{isquality,jdbcType=VARCHAR},
  470. UNLOAD_ID = #{unloadId,jdbcType=DECIMAL},
  471. DEDUCT_NUMBER = #{deductNumber,jdbcType=DECIMAL},
  472. ELEMENT_VALUE = #{elementValue,jdbcType=VARCHAR}
  473. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  474. </update>
  475. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainQualityResult">
  476. update TMSTRAIN_QUALITY_RESULT
  477. <set>
  478. <if test="resultTotalId != null">
  479. RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
  480. </if>
  481. <if test="wzInputId != null">
  482. WZ_INPUT_ID = #{wzInputId,jdbcType=VARCHAR},
  483. </if>
  484. <if test="wzId != null">
  485. WZ_ID = #{wzId,jdbcType=VARCHAR},
  486. </if>
  487. <if test="mineId != null">
  488. "MINE_ID " = #{mineId,jdbcType=VARCHAR},
  489. </if>
  490. <if test="contranctNo != null">
  491. CONTRANCT_NO = #{contranctNo,jdbcType=VARCHAR},
  492. </if>
  493. <if test="suplierId != null">
  494. SUPLIER_ID = #{suplierId,jdbcType=VARCHAR},
  495. </if>
  496. <if test="mineName != null">
  497. MINE_NAME = #{mineName,jdbcType=VARCHAR},
  498. </if>
  499. <if test="isImport != null">
  500. IS_IMPORT = #{isImport,jdbcType=VARCHAR},
  501. </if>
  502. <if test="poundNo != null">
  503. POUND_NO = #{poundNo,jdbcType=VARCHAR},
  504. </if>
  505. <if test="cargoNo != null">
  506. CARGO_NO = #{cargoNo,jdbcType=VARCHAR},
  507. </if>
  508. <if test="sationName != null">
  509. SATION_NAME = #{sationName,jdbcType=VARCHAR},
  510. </if>
  511. <if test="purchaseUnitName != null">
  512. PURCHASE_UNIT_NAME = #{purchaseUnitName,jdbcType=VARCHAR},
  513. </if>
  514. <if test="shipName != null">
  515. SHIP_NAME = #{shipName,jdbcType=VARCHAR},
  516. </if>
  517. <if test="sampleDate != null">
  518. SAMPLE_DATE = #{sampleDate,jdbcType=TIMESTAMP},
  519. </if>
  520. <if test="samplePlaceName != null">
  521. SAMPLE_PLACE_NAME = #{samplePlaceName,jdbcType=VARCHAR},
  522. </if>
  523. <if test="insertTime != null">
  524. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  525. </if>
  526. <if test="insertRemark != null">
  527. INSERT_REMARK = #{insertRemark,jdbcType=VARCHAR},
  528. </if>
  529. <if test="inputDate != null">
  530. INPUT_DATE = #{inputDate,jdbcType=VARCHAR},
  531. </if>
  532. <if test="netWeight != null">
  533. NET_WEIGHT = #{netWeight,jdbcType=VARCHAR},
  534. </if>
  535. <if test="isquality != null">
  536. ISQUALITY = #{isquality,jdbcType=VARCHAR},
  537. </if>
  538. <if test="unloadId != null">
  539. UNLOAD_ID = #{unloadId,jdbcType=DECIMAL},
  540. </if>
  541. <if test="deductNumber != null">
  542. DEDUCT_NUMBER = #{deductNumber,jdbcType=DECIMAL},
  543. </if>
  544. <if test="elementValue != null">
  545. ELEMENT_VALUE = #{elementValue,jdbcType=VARCHAR},
  546. </if>
  547. </set>
  548. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  549. </update>
  550. <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
  551. <include refid="select" />
  552. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  553. </select>
  554. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  555. <include refid="select" />
  556. <include refid="where" />
  557. </select>
  558. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  559. <include refid="select" />
  560. <include refid="whereLike" />
  561. </select>
  562. <insert id="batchInsert" parameterType="java.util.List">
  563. insert into TMSTRAIN_QUALITY_RESULT
  564. (RESULT_ID,
  565. RESULT_TOTAL_ID, WZ_INPUT_ID, WZ_ID,
  566. "MINE_ID ", CONTRANCT_NO, SUPLIER_ID,
  567. MINE_NAME, IS_IMPORT, POUND_NO,
  568. CARGO_NO, SATION_NAME, PURCHASE_UNIT_NAME,
  569. SHIP_NAME, SAMPLE_DATE, SAMPLE_PLACE_NAME,
  570. INSERT_TIME, INSERT_REMARK, INPUT_DATE,
  571. NET_WEIGHT, ISQUALITY, UNLOAD_ID,
  572. DEDUCT_NUMBER, ELEMENT_VALUE)
  573. ( <foreach collection="list" item="item" separator="union all">
  574. select
  575. #{item.resultId,jdbcType=DECIMAL},
  576. #{item.resultTotalId,jdbcType=DECIMAL}, #{item.wzInputId,jdbcType=VARCHAR}, #{item.wzId,jdbcType=VARCHAR},
  577. #{item.mineId,jdbcType=VARCHAR}, #{item.contranctNo,jdbcType=VARCHAR}, #{item.suplierId,jdbcType=VARCHAR},
  578. #{item.mineName,jdbcType=VARCHAR}, #{item.isImport,jdbcType=VARCHAR}, #{item.poundNo,jdbcType=VARCHAR},
  579. #{item.cargoNo,jdbcType=VARCHAR}, #{item.sationName,jdbcType=VARCHAR}, #{item.purchaseUnitName,jdbcType=VARCHAR},
  580. #{item.shipName,jdbcType=VARCHAR}, #{item.sampleDate,jdbcType=TIMESTAMP}, #{item.samplePlaceName,jdbcType=VARCHAR},
  581. #{item.insertTime,jdbcType=TIMESTAMP}, #{item.insertRemark,jdbcType=VARCHAR}, #{item.inputDate,jdbcType=VARCHAR},
  582. #{item.netWeight,jdbcType=VARCHAR}, #{item.isquality,jdbcType=VARCHAR}, #{item.unloadId,jdbcType=DECIMAL},
  583. #{item.deductNumber,jdbcType=DECIMAL}, #{item.elementValue,jdbcType=VARCHAR} from dual
  584. </foreach> )
  585. </insert>
  586. <update id="batchUpdate" parameterType="java.util.List">
  587. update TMSTRAIN_QUALITY_RESULT
  588. set
  589. RESULT_ID=
  590. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  591. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
  592. </foreach>
  593. ,RESULT_TOTAL_ID=
  594. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  595. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
  596. </foreach>
  597. ,WZ_INPUT_ID=
  598. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  599. when #{item.resultId,jdbcType=DECIMAL} then #{item.wzInputId,jdbcType=VARCHAR}
  600. </foreach>
  601. ,WZ_ID=
  602. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  603. when #{item.resultId,jdbcType=DECIMAL} then #{item.wzId,jdbcType=VARCHAR}
  604. </foreach>
  605. ,"MINE_ID "=
  606. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  607. when #{item.resultId,jdbcType=DECIMAL} then #{item.mineId,jdbcType=VARCHAR}
  608. </foreach>
  609. ,CONTRANCT_NO=
  610. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  611. when #{item.resultId,jdbcType=DECIMAL} then #{item.contranctNo,jdbcType=VARCHAR}
  612. </foreach>
  613. ,SUPLIER_ID=
  614. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  615. when #{item.resultId,jdbcType=DECIMAL} then #{item.suplierId,jdbcType=VARCHAR}
  616. </foreach>
  617. ,MINE_NAME=
  618. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  619. when #{item.resultId,jdbcType=DECIMAL} then #{item.mineName,jdbcType=VARCHAR}
  620. </foreach>
  621. ,IS_IMPORT=
  622. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  623. when #{item.resultId,jdbcType=DECIMAL} then #{item.isImport,jdbcType=VARCHAR}
  624. </foreach>
  625. ,POUND_NO=
  626. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  627. when #{item.resultId,jdbcType=DECIMAL} then #{item.poundNo,jdbcType=VARCHAR}
  628. </foreach>
  629. ,CARGO_NO=
  630. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  631. when #{item.resultId,jdbcType=DECIMAL} then #{item.cargoNo,jdbcType=VARCHAR}
  632. </foreach>
  633. ,SATION_NAME=
  634. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  635. when #{item.resultId,jdbcType=DECIMAL} then #{item.sationName,jdbcType=VARCHAR}
  636. </foreach>
  637. ,PURCHASE_UNIT_NAME=
  638. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  639. when #{item.resultId,jdbcType=DECIMAL} then #{item.purchaseUnitName,jdbcType=VARCHAR}
  640. </foreach>
  641. ,SHIP_NAME=
  642. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  643. when #{item.resultId,jdbcType=DECIMAL} then #{item.shipName,jdbcType=VARCHAR}
  644. </foreach>
  645. ,SAMPLE_DATE=
  646. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  647. when #{item.resultId,jdbcType=DECIMAL} then #{item.sampleDate,jdbcType=TIMESTAMP}
  648. </foreach>
  649. ,SAMPLE_PLACE_NAME=
  650. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  651. when #{item.resultId,jdbcType=DECIMAL} then #{item.samplePlaceName,jdbcType=VARCHAR}
  652. </foreach>
  653. ,INSERT_TIME=
  654. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  655. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  656. </foreach>
  657. ,INSERT_REMARK=
  658. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  659. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertRemark,jdbcType=VARCHAR}
  660. </foreach>
  661. ,INPUT_DATE=
  662. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  663. when #{item.resultId,jdbcType=DECIMAL} then #{item.inputDate,jdbcType=VARCHAR}
  664. </foreach>
  665. ,NET_WEIGHT=
  666. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  667. when #{item.resultId,jdbcType=DECIMAL} then #{item.netWeight,jdbcType=VARCHAR}
  668. </foreach>
  669. ,ISQUALITY=
  670. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  671. when #{item.resultId,jdbcType=DECIMAL} then #{item.isquality,jdbcType=VARCHAR}
  672. </foreach>
  673. ,UNLOAD_ID=
  674. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  675. when #{item.resultId,jdbcType=DECIMAL} then #{item.unloadId,jdbcType=DECIMAL}
  676. </foreach>
  677. ,DEDUCT_NUMBER=
  678. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  679. when #{item.resultId,jdbcType=DECIMAL} then #{item.deductNumber,jdbcType=DECIMAL}
  680. </foreach>
  681. ,ELEMENT_VALUE=
  682. <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
  683. when #{item.resultId,jdbcType=DECIMAL} then #{item.elementValue,jdbcType=VARCHAR}
  684. </foreach>
  685. where RESULT_ID in
  686. <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
  687. #{item.resultId,jdbcType=DECIMAL}
  688. </foreach>
  689. </update>
  690. <delete id="batchDelete" parameterType="java.util.List">
  691. delete from TMSTRAIN_QUALITY_RESULT
  692. where RESULT_ID in
  693. <foreach close=")" collection="list" item="id" open="(" separator=",">
  694. #{id}
  695. </foreach>
  696. </delete>
  697. <!-- 友情提示!!!-->
  698. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  699. <!--查询计量过后未质检的数据-->
  700. <select id="selectWzInputId" resultType="java.util.Map">
  701. select TTR.TOTAL_RESULT_ID "resultTotalId",
  702. TLR.RESULT_WAGON_NO "cargonNo",
  703. to_char(TWR.RESULT_GROSS_WEIGHT_TIME,'YYYYMMDDHH24MISS') "grossWeightTime"
  704. from TMSTRAIN_LOADING_RESULT TLR
  705. LEFT JOIN TMSTRAIN_TOTAL_RESULT TTR
  706. ON TTR.LOADING_ID = TLR.RESULT_ID
  707. left join TMSTRAIN_WEIGHT_RESULT TWR
  708. ON TWR.RESULT_TOTAL_ID = TTR.TOTAL_RESULT_ID
  709. left join TMSTRAIN_QUALITY_RESULT TQR
  710. ON TQR.RESULT_TOTAL_ID = TTR.TOTAL_RESULT_ID
  711. WHERE TQR.ISQUALITY IS NULL AND TWR.RESULT_GROSS_WEIGHT_TIME IS NOT NULL
  712. </select>
  713. </mapper>