TmstruckEnfactoryResultMapper.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  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.TmstruckEnfactoryResultMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckEnfactoryResult">
  5. <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
  6. <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
  7. <result column="GATEPOST_ID" jdbcType="DECIMAL" property="gatepostId" />
  8. <result column="RESULT_ENTRY_MODE" jdbcType="VARCHAR" property="resultEntryMode" />
  9. <result column="RESULT_ENTRY_GATE_TIME" jdbcType="TIMESTAMP" property="resultEntryGateTime" />
  10. <result column="RESULT_MEMO" jdbcType="VARCHAR" property="resultMemo" />
  11. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
  12. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
  13. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
  14. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  15. <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
  16. <result column="DELETE_USERNAME" jdbcType="VARCHAR" property="deleteUsername" />
  17. <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
  18. </resultMap>
  19. <sql id="columns">
  20. RESULT_ID, RESULT_TOTAL_ID, GATEPOST_ID, RESULT_ENTRY_MODE, RESULT_ENTRY_GATE_TIME,
  21. RESULT_MEMO, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
  22. DELETE_USERNAME, DELETE_TIME
  23. </sql>
  24. <sql id="columns_alias">
  25. t.RESULT_ID, t.RESULT_TOTAL_ID, t.GATEPOST_ID, t.RESULT_ENTRY_MODE, t.RESULT_ENTRY_GATE_TIME,
  26. t.RESULT_MEMO, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
  27. t.INSERT_UPDATE_REMARK, t.DELETE_USERNAME, t.DELETE_TIME
  28. </sql>
  29. <sql id="select">
  30. SELECT <include refid="columns"/> FROM TMSTRUCK_ENFACTORY_RESULT
  31. </sql>
  32. <sql id="select_alias">
  33. SELECT <include refid="columns_alias"/> FROM TMSTRUCK_ENFACTORY_RESULT t
  34. </sql>
  35. <sql id="where">
  36. <where>
  37. <if test="resultId != null">
  38. and RESULT_ID = #{resultId}
  39. </if>
  40. <if test="resultTotalId != null">
  41. and RESULT_TOTAL_ID = #{resultTotalId}
  42. </if>
  43. <if test="gatepostId != null">
  44. and GATEPOST_ID = #{gatepostId}
  45. </if>
  46. <if test="resultEntryMode != null and resultEntryMode != ''">
  47. and RESULT_ENTRY_MODE = #{resultEntryMode}
  48. </if>
  49. <if test="resultEntryGateTime != null">
  50. and TO_CHAR(RESULT_ENTRY_GATE_TIME,'yyyy-MM-dd') = #{resultEntryGateTime}
  51. </if>
  52. <if test="resultMemo != null and resultMemo != ''">
  53. and RESULT_MEMO = #{resultMemo}
  54. </if>
  55. <if test="insertUsername != null and insertUsername != ''">
  56. and INSERT_USERNAME = #{insertUsername}
  57. </if>
  58. <if test="insertTime != null">
  59. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  60. </if>
  61. <if test="updateUsername != null and updateUsername != ''">
  62. and UPDATE_USERNAME = #{updateUsername}
  63. </if>
  64. <if test="updateTime != null">
  65. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  66. </if>
  67. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  68. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  69. </if>
  70. <if test="deleteUsername != null and deleteUsername != ''">
  71. and DELETE_USERNAME = #{deleteUsername}
  72. </if>
  73. <if test="deleteTime != null">
  74. and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
  75. </if>
  76. </where>
  77. </sql>
  78. <sql id="whereLike">
  79. <where>
  80. <if test="resultId != null">
  81. and RESULT_ID = #{resultId}
  82. </if>
  83. <if test="resultTotalId != null">
  84. and RESULT_TOTAL_ID = #{resultTotalId}
  85. </if>
  86. <if test="gatepostId != null">
  87. and GATEPOST_ID = #{gatepostId}
  88. </if>
  89. <if test="resultEntryMode != null and resultEntryMode != ''">
  90. and RESULT_ENTRY_MODE LIKE '%${resultEntryMode}%'
  91. </if>
  92. <if test="resultEntryGateTime != null">
  93. and TO_CHAR(RESULT_ENTRY_GATE_TIME,'yyyy-MM-dd') = #{resultEntryGateTime}
  94. </if>
  95. <if test="resultMemo != null and resultMemo != ''">
  96. and RESULT_MEMO LIKE '%${resultMemo}%'
  97. </if>
  98. <if test="insertUsername != null and insertUsername != ''">
  99. and INSERT_USERNAME LIKE '%${insertUsername}%'
  100. </if>
  101. <if test="insertTime != null">
  102. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  103. </if>
  104. <if test="updateUsername != null and updateUsername != ''">
  105. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  106. </if>
  107. <if test="updateTime != null">
  108. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  109. </if>
  110. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  111. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  112. </if>
  113. <if test="deleteUsername != null and deleteUsername != ''">
  114. and DELETE_USERNAME LIKE '%${deleteUsername}%'
  115. </if>
  116. <if test="deleteTime != null">
  117. and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
  118. </if>
  119. </where>
  120. </sql>
  121. <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
  122. delete from TMSTRUCK_ENFACTORY_RESULT
  123. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  124. </delete>
  125. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  126. delete from TMSTRUCK_ENFACTORY_RESULT
  127. where 1!=1
  128. <if test="resultTotalId != null">
  129. or RESULT_TOTAL_ID = #{resultTotalId}
  130. </if>
  131. <if test="gatepostId != null">
  132. or GATEPOST_ID = #{gatepostId}
  133. </if>
  134. <if test="resultEntryMode != null and resultEntryMode != ''">
  135. or RESULT_ENTRY_MODE = #{resultEntryMode}
  136. </if>
  137. <if test="resultEntryGateTime != null">
  138. or TO_CHAR(RESULT_ENTRY_GATE_TIME,'yyyy-MM-dd') = '#{resultEntryGateTime}'
  139. </if>
  140. <if test="resultMemo != null and resultMemo != ''">
  141. or RESULT_MEMO = #{resultMemo}
  142. </if>
  143. <if test="insertUsername != null and insertUsername != ''">
  144. or INSERT_USERNAME = #{insertUsername}
  145. </if>
  146. <if test="insertTime != null">
  147. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  148. </if>
  149. <if test="updateUsername != null and updateUsername != ''">
  150. or UPDATE_USERNAME = #{updateUsername}
  151. </if>
  152. <if test="updateTime != null">
  153. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  154. </if>
  155. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  156. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  157. </if>
  158. <if test="deleteUsername != null and deleteUsername != ''">
  159. or DELETE_USERNAME = #{deleteUsername}
  160. </if>
  161. <if test="deleteTime != null">
  162. or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
  163. </if>
  164. </delete>
  165. <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckEnfactoryResult">
  166. insert into TMSTRUCK_ENFACTORY_RESULT (RESULT_ID, RESULT_TOTAL_ID, GATEPOST_ID,
  167. RESULT_ENTRY_MODE, RESULT_ENTRY_GATE_TIME,
  168. RESULT_MEMO, INSERT_USERNAME, INSERT_TIME,
  169. UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
  170. DELETE_USERNAME, DELETE_TIME)
  171. values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{gatepostId,jdbcType=DECIMAL},
  172. #{resultEntryMode,jdbcType=VARCHAR}, #{resultEntryGateTime,jdbcType=TIMESTAMP},
  173. #{resultMemo,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
  174. #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
  175. #{deleteUsername,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP})
  176. </insert>
  177. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckEnfactoryResult">
  178. insert into TMSTRUCK_ENFACTORY_RESULT
  179. <trim prefix="(" suffix=")" suffixOverrides=",">
  180. <if test="resultId != null">
  181. RESULT_ID,
  182. </if>
  183. <if test="resultTotalId != null">
  184. RESULT_TOTAL_ID,
  185. </if>
  186. <if test="gatepostId != null">
  187. GATEPOST_ID,
  188. </if>
  189. <if test="resultEntryMode != null">
  190. RESULT_ENTRY_MODE,
  191. </if>
  192. <if test="resultEntryGateTime != null">
  193. RESULT_ENTRY_GATE_TIME,
  194. </if>
  195. <if test="resultMemo != null">
  196. RESULT_MEMO,
  197. </if>
  198. <if test="insertUsername != null">
  199. INSERT_USERNAME,
  200. </if>
  201. <if test="insertTime != null">
  202. INSERT_TIME,
  203. </if>
  204. <if test="updateUsername != null">
  205. UPDATE_USERNAME,
  206. </if>
  207. <if test="updateTime != null">
  208. UPDATE_TIME,
  209. </if>
  210. <if test="insertUpdateRemark != null">
  211. INSERT_UPDATE_REMARK,
  212. </if>
  213. <if test="deleteUsername != null">
  214. DELETE_USERNAME,
  215. </if>
  216. <if test="deleteTime != null">
  217. DELETE_TIME,
  218. </if>
  219. </trim>
  220. <trim prefix="values (" suffix=")" suffixOverrides=",">
  221. <if test="resultId != null">
  222. #{resultId,jdbcType=DECIMAL},
  223. </if>
  224. <if test="resultTotalId != null">
  225. #{resultTotalId,jdbcType=DECIMAL},
  226. </if>
  227. <if test="gatepostId != null">
  228. #{gatepostId,jdbcType=DECIMAL},
  229. </if>
  230. <if test="resultEntryMode != null">
  231. #{resultEntryMode,jdbcType=VARCHAR},
  232. </if>
  233. <if test="resultEntryGateTime != null">
  234. #{resultEntryGateTime,jdbcType=TIMESTAMP},
  235. </if>
  236. <if test="resultMemo != null">
  237. #{resultMemo,jdbcType=VARCHAR},
  238. </if>
  239. <if test="insertUsername != null">
  240. #{insertUsername,jdbcType=VARCHAR},
  241. </if>
  242. <if test="insertTime != null">
  243. #{insertTime,jdbcType=TIMESTAMP},
  244. </if>
  245. <if test="updateUsername != null">
  246. #{updateUsername,jdbcType=VARCHAR},
  247. </if>
  248. <if test="updateTime != null">
  249. #{updateTime,jdbcType=TIMESTAMP},
  250. </if>
  251. <if test="insertUpdateRemark != null">
  252. #{insertUpdateRemark,jdbcType=VARCHAR},
  253. </if>
  254. <if test="deleteUsername != null">
  255. #{deleteUsername,jdbcType=VARCHAR},
  256. </if>
  257. <if test="deleteTime != null">
  258. #{deleteTime,jdbcType=TIMESTAMP},
  259. </if>
  260. </trim>
  261. </insert>
  262. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckEnfactoryResult">
  263. update TMSTRUCK_ENFACTORY_RESULT
  264. set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
  265. GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL},
  266. RESULT_ENTRY_MODE = #{resultEntryMode,jdbcType=VARCHAR},
  267. RESULT_ENTRY_GATE_TIME = #{resultEntryGateTime,jdbcType=TIMESTAMP},
  268. RESULT_MEMO = #{resultMemo,jdbcType=VARCHAR},
  269. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  270. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  271. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  272. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  273. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  274. DELETE_USERNAME = #{deleteUsername,jdbcType=VARCHAR},
  275. DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP}
  276. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  277. </update>
  278. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckEnfactoryResult">
  279. update TMSTRUCK_ENFACTORY_RESULT
  280. <set>
  281. <if test="resultTotalId != null">
  282. RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
  283. </if>
  284. <if test="gatepostId != null">
  285. GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL},
  286. </if>
  287. <if test="resultEntryMode != null">
  288. RESULT_ENTRY_MODE = #{resultEntryMode,jdbcType=VARCHAR},
  289. </if>
  290. <if test="resultEntryGateTime != null">
  291. RESULT_ENTRY_GATE_TIME = #{resultEntryGateTime,jdbcType=TIMESTAMP},
  292. </if>
  293. <if test="resultMemo != null">
  294. RESULT_MEMO = #{resultMemo,jdbcType=VARCHAR},
  295. </if>
  296. <if test="insertUsername != null">
  297. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  298. </if>
  299. <if test="insertTime != null">
  300. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  301. </if>
  302. <if test="updateUsername != null">
  303. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  304. </if>
  305. <if test="updateTime != null">
  306. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  307. </if>
  308. <if test="insertUpdateRemark != null">
  309. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  310. </if>
  311. <if test="deleteUsername != null">
  312. DELETE_USERNAME = #{deleteUsername,jdbcType=VARCHAR},
  313. </if>
  314. <if test="deleteTime != null">
  315. DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
  316. </if>
  317. </set>
  318. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  319. </update>
  320. <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
  321. <include refid="select"/>
  322. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  323. </select>
  324. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  325. <include refid="select"/>
  326. <include refid="where"/>
  327. </select>
  328. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  329. <include refid="select"/>
  330. <include refid="whereLike"/>
  331. </select>
  332. <insert id="batchInsert" parameterType="java.util.List">
  333. insert into TMSTRUCK_ENFACTORY_RESULT
  334. (RESULT_ID,
  335. RESULT_TOTAL_ID, GATEPOST_ID, RESULT_ENTRY_MODE,
  336. RESULT_ENTRY_GATE_TIME, RESULT_MEMO,
  337. INSERT_USERNAME, INSERT_TIME,
  338. UPDATE_USERNAME, UPDATE_TIME,
  339. INSERT_UPDATE_REMARK, DELETE_USERNAME,
  340. DELETE_TIME)
  341. ( <foreach collection="list" item="item" separator="union all">
  342. select
  343. #{item.resultId,jdbcType=DECIMAL},
  344. #{item.resultTotalId,jdbcType=DECIMAL}, #{item.gatepostId,jdbcType=DECIMAL}, #{item.resultEntryMode,jdbcType=VARCHAR},
  345. #{item.resultEntryGateTime,jdbcType=TIMESTAMP}, #{item.resultMemo,jdbcType=VARCHAR},
  346. #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
  347. #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
  348. #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleteUsername,jdbcType=VARCHAR},
  349. #{item.deleteTime,jdbcType=TIMESTAMP} from dual
  350. </foreach> )
  351. </insert>
  352. <update id="batchUpdate" parameterType="java.util.List">
  353. update TMSTRUCK_ENFACTORY_RESULT
  354. set
  355. RESULT_ID=
  356. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  357. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
  358. </foreach>
  359. ,RESULT_TOTAL_ID=
  360. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  361. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
  362. </foreach>
  363. ,GATEPOST_ID=
  364. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  365. when #{item.resultId,jdbcType=DECIMAL} then #{item.gatepostId,jdbcType=DECIMAL}
  366. </foreach>
  367. ,RESULT_ENTRY_MODE=
  368. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  369. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEntryMode,jdbcType=VARCHAR}
  370. </foreach>
  371. ,RESULT_ENTRY_GATE_TIME=
  372. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  373. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEntryGateTime,jdbcType=TIMESTAMP}
  374. </foreach>
  375. ,RESULT_MEMO=
  376. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  377. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMemo,jdbcType=VARCHAR}
  378. </foreach>
  379. ,INSERT_USERNAME=
  380. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  381. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  382. </foreach>
  383. ,INSERT_TIME=
  384. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  385. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  386. </foreach>
  387. ,UPDATE_USERNAME=
  388. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  389. when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  390. </foreach>
  391. ,UPDATE_TIME=
  392. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  393. when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  394. </foreach>
  395. ,INSERT_UPDATE_REMARK=
  396. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  397. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  398. </foreach>
  399. ,DELETE_USERNAME=
  400. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  401. when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteUsername,jdbcType=VARCHAR}
  402. </foreach>
  403. ,DELETE_TIME=
  404. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  405. when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
  406. </foreach>
  407. where RESULT_ID in
  408. <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
  409. #{item.resultId,jdbcType=DECIMAL}
  410. </foreach>
  411. </update>
  412. <delete id="batchDelete" parameterType="java.util.List">
  413. delete from TMSTRUCK_ENFACTORY_RESULT
  414. where RESULT_ID in
  415. <foreach collection="list" item="id" open="(" close=")" separator=",">
  416. #{id}
  417. </foreach>
  418. </delete>
  419. <!-- 友情提示!!!-->
  420. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  421. <update id="updateEnFactory" parameterType="java.util.Map">
  422. update (select *
  423. from TMSTRUCK_ENFACTORY_RESULT TER
  424. LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
  425. ON TTR.RESULT_TOTAL_ID = TER.RESULT_TOTAL_ID
  426. LEFT JOIN OMSTRUCK_ORDER OO
  427. ON Ttr.Order_Id = oo.order_id
  428. where oo.order_number = #{orderNumber}) tt
  429. set tt.gatepost_id = (select rg.gatepost_id from rms_gatepost rg
  430. where rg.gatepost_name = #{gatepostName}),
  431. tt.result_entry_mode=#{resultEntryMode},
  432. tt.result_entry_gate_time=TO_DATE(#{resultTime}, 'yyyy-mm-dd hh24:mi:ss' )
  433. </update>
  434. </mapper>