TmstruckLoadResultMapper.xml 31 KB

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