TmstrainWeightResultMapper.xml 30 KB

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