AmsNotUploadedEasMapper.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  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.AmsNotUploadedEasMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmsNotUploadedEas">
  5. <id column="ORDER_ID" jdbcType="VARCHAR" property="orderId" />
  6. <result column="NO" jdbcType="VARCHAR" property="no" />
  7. <result column="RESULT_POUND_NO" jdbcType="VARCHAR" property="resultPoundNo" />
  8. <result column="CAPACITY_NUMBER" jdbcType="VARCHAR" property="capacityNumber" />
  9. <result column="RESULT_CROSS_CALCULATE_NUMBER" jdbcType="VARCHAR" property="resultCrossCalculateNumber" />
  10. <result column="RESULT_TARE_CALCULATE_NUMBER" jdbcType="VARCHAR" property="resultTareCalculateNumber" />
  11. <result column="RESULT_CROSS_WEIGHT" jdbcType="VARCHAR" property="resultCrossWeight" />
  12. <result column="RESULT_TARE_WEIGHT" jdbcType="VARCHAR" property="resultTareWeight" />
  13. <result column="RESULT_NET_WEIGHT" jdbcType="VARCHAR" property="resultNetWeight" />
  14. <result column="RESULT_CROSS_WEIGHT_TIME" jdbcType="VARCHAR" property="resultCrossWeightTime" />
  15. <result column="RESULT_TARE_WEIGHT_TIME" jdbcType="VARCHAR" property="resultTareWeightTime" />
  16. <result column="EAS_ENTRY_ID" jdbcType="VARCHAR" property="easEntryId" />
  17. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
  18. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
  19. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
  20. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  21. <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
  22. </resultMap>
  23. <sql id="columns">
  24. ORDER_ID, NO, RESULT_POUND_NO, CAPACITY_NUMBER, RESULT_CROSS_CALCULATE_NUMBER, RESULT_TARE_CALCULATE_NUMBER,
  25. RESULT_CROSS_WEIGHT, RESULT_TARE_WEIGHT, RESULT_NET_WEIGHT, RESULT_CROSS_WEIGHT_TIME,
  26. RESULT_TARE_WEIGHT_TIME, EAS_ENTRY_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
  27. UPDATE_TIME, INSERT_UPDATE_REMARK
  28. </sql>
  29. <sql id="columns_alias">
  30. t.ORDER_ID, t.NO, t.RESULT_POUND_NO, t.CAPACITY_NUMBER, t.RESULT_CROSS_CALCULATE_NUMBER,
  31. t.RESULT_TARE_CALCULATE_NUMBER, t.RESULT_CROSS_WEIGHT, t.RESULT_TARE_WEIGHT, t.RESULT_NET_WEIGHT,
  32. t.RESULT_CROSS_WEIGHT_TIME, t.RESULT_TARE_WEIGHT_TIME, t.EAS_ENTRY_ID, t.INSERT_USERNAME,
  33. t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK
  34. </sql>
  35. <sql id="select">
  36. SELECT <include refid="columns" /> FROM AMS_NOT_UPLOADED_EAS
  37. </sql>
  38. <sql id="select_alias">
  39. SELECT <include refid="columns_alias" /> FROM AMS_NOT_UPLOADED_EAS t
  40. </sql>
  41. <sql id="where">
  42. <where>
  43. <if test="orderId != null and orderId != ''">
  44. and ORDER_ID = #{orderId}
  45. </if>
  46. <if test="no != null and no != ''">
  47. and NO = #{no}
  48. </if>
  49. <if test="resultPoundNo != null and resultPoundNo != ''">
  50. and RESULT_POUND_NO = #{resultPoundNo}
  51. </if>
  52. <if test="capacityNumber != null and capacityNumber != ''">
  53. and CAPACITY_NUMBER = #{capacityNumber}
  54. </if>
  55. <if test="resultCrossCalculateNumber != null and resultCrossCalculateNumber != ''">
  56. and RESULT_CROSS_CALCULATE_NUMBER = #{resultCrossCalculateNumber}
  57. </if>
  58. <if test="resultTareCalculateNumber != null and resultTareCalculateNumber != ''">
  59. and RESULT_TARE_CALCULATE_NUMBER = #{resultTareCalculateNumber}
  60. </if>
  61. <if test="resultCrossWeight != null and resultCrossWeight != ''">
  62. and RESULT_CROSS_WEIGHT = #{resultCrossWeight}
  63. </if>
  64. <if test="resultTareWeight != null and resultTareWeight != ''">
  65. and RESULT_TARE_WEIGHT = #{resultTareWeight}
  66. </if>
  67. <if test="resultNetWeight != null and resultNetWeight != ''">
  68. and RESULT_NET_WEIGHT = #{resultNetWeight}
  69. </if>
  70. <if test="resultCrossWeightTime != null and resultCrossWeightTime != ''">
  71. and RESULT_CROSS_WEIGHT_TIME = #{resultCrossWeightTime}
  72. </if>
  73. <if test="resultTareWeightTime != null and resultTareWeightTime != ''">
  74. and RESULT_TARE_WEIGHT_TIME = #{resultTareWeightTime}
  75. </if>
  76. <if test="easEntryId != null and easEntryId != ''">
  77. and EAS_ENTRY_ID = #{easEntryId}
  78. </if>
  79. <if test="insertUsername != null and insertUsername != ''">
  80. and INSERT_USERNAME = #{insertUsername}
  81. </if>
  82. <if test="insertTime != null">
  83. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  84. </if>
  85. <if test="updateUsername != null and updateUsername != ''">
  86. and UPDATE_USERNAME = #{updateUsername}
  87. </if>
  88. <if test="updateTime != null">
  89. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  90. </if>
  91. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  92. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  93. </if>
  94. </where>
  95. </sql>
  96. <sql id="whereLike">
  97. <where>
  98. <if test="orderId != null and orderId != ''">
  99. and ORDER_ID LIKE '%${orderId}%'
  100. </if>
  101. <if test="no != null and no != ''">
  102. and NO LIKE '%${no}%'
  103. </if>
  104. <if test="resultPoundNo != null and resultPoundNo != ''">
  105. and RESULT_POUND_NO LIKE '%${resultPoundNo}%'
  106. </if>
  107. <if test="capacityNumber != null and capacityNumber != ''">
  108. and CAPACITY_NUMBER LIKE '%${capacityNumber}%'
  109. </if>
  110. <if test="resultCrossCalculateNumber != null and resultCrossCalculateNumber != ''">
  111. and RESULT_CROSS_CALCULATE_NUMBER LIKE '%${resultCrossCalculateNumber}%'
  112. </if>
  113. <if test="resultTareCalculateNumber != null and resultTareCalculateNumber != ''">
  114. and RESULT_TARE_CALCULATE_NUMBER LIKE '%${resultTareCalculateNumber}%'
  115. </if>
  116. <if test="resultCrossWeight != null and resultCrossWeight != ''">
  117. and RESULT_CROSS_WEIGHT LIKE '%${resultCrossWeight}%'
  118. </if>
  119. <if test="resultTareWeight != null and resultTareWeight != ''">
  120. and RESULT_TARE_WEIGHT LIKE '%${resultTareWeight}%'
  121. </if>
  122. <if test="resultNetWeight != null and resultNetWeight != ''">
  123. and RESULT_NET_WEIGHT LIKE '%${resultNetWeight}%'
  124. </if>
  125. <if test="resultCrossWeightTime != null and resultCrossWeightTime != ''">
  126. and RESULT_CROSS_WEIGHT_TIME LIKE '%${resultCrossWeightTime}%'
  127. </if>
  128. <if test="resultTareWeightTime != null and resultTareWeightTime != ''">
  129. and RESULT_TARE_WEIGHT_TIME LIKE '%${resultTareWeightTime}%'
  130. </if>
  131. <if test="easEntryId != null and easEntryId != ''">
  132. and EAS_ENTRY_ID LIKE '%${easEntryId}%'
  133. </if>
  134. <if test="insertUsername != null and insertUsername != ''">
  135. and INSERT_USERNAME LIKE '%${insertUsername}%'
  136. </if>
  137. <if test="insertTime != null">
  138. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  139. </if>
  140. <if test="updateUsername != null and updateUsername != ''">
  141. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  142. </if>
  143. <if test="updateTime != null">
  144. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  145. </if>
  146. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  147. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  148. </if>
  149. </where>
  150. </sql>
  151. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  152. delete from AMS_NOT_UPLOADED_EAS
  153. where ORDER_ID = #{orderId,jdbcType=VARCHAR}
  154. </delete>
  155. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  156. delete from AMS_NOT_UPLOADED_EAS
  157. where 1!=1
  158. <if test="no != null and no != ''">
  159. or NO = #{no}
  160. </if>
  161. <if test="resultPoundNo != null and resultPoundNo != ''">
  162. or RESULT_POUND_NO = #{resultPoundNo}
  163. </if>
  164. <if test="capacityNumber != null and capacityNumber != ''">
  165. or CAPACITY_NUMBER = #{capacityNumber}
  166. </if>
  167. <if test="resultCrossCalculateNumber != null and resultCrossCalculateNumber != ''">
  168. or RESULT_CROSS_CALCULATE_NUMBER = #{resultCrossCalculateNumber}
  169. </if>
  170. <if test="resultTareCalculateNumber != null and resultTareCalculateNumber != ''">
  171. or RESULT_TARE_CALCULATE_NUMBER = #{resultTareCalculateNumber}
  172. </if>
  173. <if test="resultCrossWeight != null and resultCrossWeight != ''">
  174. or RESULT_CROSS_WEIGHT = #{resultCrossWeight}
  175. </if>
  176. <if test="resultTareWeight != null and resultTareWeight != ''">
  177. or RESULT_TARE_WEIGHT = #{resultTareWeight}
  178. </if>
  179. <if test="resultNetWeight != null and resultNetWeight != ''">
  180. or RESULT_NET_WEIGHT = #{resultNetWeight}
  181. </if>
  182. <if test="resultCrossWeightTime != null and resultCrossWeightTime != ''">
  183. or RESULT_CROSS_WEIGHT_TIME = #{resultCrossWeightTime}
  184. </if>
  185. <if test="resultTareWeightTime != null and resultTareWeightTime != ''">
  186. or RESULT_TARE_WEIGHT_TIME = #{resultTareWeightTime}
  187. </if>
  188. <if test="easEntryId != null and easEntryId != ''">
  189. or EAS_ENTRY_ID = #{easEntryId}
  190. </if>
  191. <if test="insertUsername != null and insertUsername != ''">
  192. or INSERT_USERNAME = #{insertUsername}
  193. </if>
  194. <if test="insertTime != null">
  195. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  196. </if>
  197. <if test="updateUsername != null and updateUsername != ''">
  198. or UPDATE_USERNAME = #{updateUsername}
  199. </if>
  200. <if test="updateTime != null">
  201. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  202. </if>
  203. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  204. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  205. </if>
  206. </delete>
  207. <insert id="insert" parameterType="com.steerinfo.dil.model.AmsNotUploadedEas">
  208. insert into AMS_NOT_UPLOADED_EAS (ORDER_ID, NO, RESULT_POUND_NO,
  209. CAPACITY_NUMBER, RESULT_CROSS_CALCULATE_NUMBER,
  210. RESULT_TARE_CALCULATE_NUMBER, RESULT_CROSS_WEIGHT,
  211. RESULT_TARE_WEIGHT, RESULT_NET_WEIGHT, RESULT_CROSS_WEIGHT_TIME,
  212. RESULT_TARE_WEIGHT_TIME, EAS_ENTRY_ID, INSERT_USERNAME,
  213. INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
  214. INSERT_UPDATE_REMARK)
  215. values (#{orderId,jdbcType=VARCHAR}, #{no,jdbcType=VARCHAR}, #{resultPoundNo,jdbcType=VARCHAR},
  216. #{capacityNumber,jdbcType=VARCHAR}, #{resultCrossCalculateNumber,jdbcType=VARCHAR},
  217. #{resultTareCalculateNumber,jdbcType=VARCHAR}, #{resultCrossWeight,jdbcType=VARCHAR},
  218. #{resultTareWeight,jdbcType=VARCHAR}, #{resultNetWeight,jdbcType=VARCHAR}, #{resultCrossWeightTime,jdbcType=VARCHAR},
  219. #{resultTareWeightTime,jdbcType=VARCHAR}, #{easEntryId,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
  220. #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
  221. #{insertUpdateRemark,jdbcType=VARCHAR})
  222. </insert>
  223. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsNotUploadedEas">
  224. insert into AMS_NOT_UPLOADED_EAS
  225. <trim prefix="(" suffix=")" suffixOverrides=",">
  226. <if test="orderId != null">
  227. ORDER_ID,
  228. </if>
  229. <if test="no != null">
  230. NO,
  231. </if>
  232. <if test="resultPoundNo != null">
  233. RESULT_POUND_NO,
  234. </if>
  235. <if test="capacityNumber != null">
  236. CAPACITY_NUMBER,
  237. </if>
  238. <if test="resultCrossCalculateNumber != null">
  239. RESULT_CROSS_CALCULATE_NUMBER,
  240. </if>
  241. <if test="resultTareCalculateNumber != null">
  242. RESULT_TARE_CALCULATE_NUMBER,
  243. </if>
  244. <if test="resultCrossWeight != null">
  245. RESULT_CROSS_WEIGHT,
  246. </if>
  247. <if test="resultTareWeight != null">
  248. RESULT_TARE_WEIGHT,
  249. </if>
  250. <if test="resultNetWeight != null">
  251. RESULT_NET_WEIGHT,
  252. </if>
  253. <if test="resultCrossWeightTime != null">
  254. RESULT_CROSS_WEIGHT_TIME,
  255. </if>
  256. <if test="resultTareWeightTime != null">
  257. RESULT_TARE_WEIGHT_TIME,
  258. </if>
  259. <if test="easEntryId != null">
  260. EAS_ENTRY_ID,
  261. </if>
  262. <if test="insertUsername != null">
  263. INSERT_USERNAME,
  264. </if>
  265. <if test="insertTime != null">
  266. INSERT_TIME,
  267. </if>
  268. <if test="updateUsername != null">
  269. UPDATE_USERNAME,
  270. </if>
  271. <if test="updateTime != null">
  272. UPDATE_TIME,
  273. </if>
  274. <if test="insertUpdateRemark != null">
  275. INSERT_UPDATE_REMARK,
  276. </if>
  277. </trim>
  278. <trim prefix="values (" suffix=")" suffixOverrides=",">
  279. <if test="orderId != null">
  280. #{orderId,jdbcType=VARCHAR},
  281. </if>
  282. <if test="no != null">
  283. #{no,jdbcType=VARCHAR},
  284. </if>
  285. <if test="resultPoundNo != null">
  286. #{resultPoundNo,jdbcType=VARCHAR},
  287. </if>
  288. <if test="capacityNumber != null">
  289. #{capacityNumber,jdbcType=VARCHAR},
  290. </if>
  291. <if test="resultCrossCalculateNumber != null">
  292. #{resultCrossCalculateNumber,jdbcType=VARCHAR},
  293. </if>
  294. <if test="resultTareCalculateNumber != null">
  295. #{resultTareCalculateNumber,jdbcType=VARCHAR},
  296. </if>
  297. <if test="resultCrossWeight != null">
  298. #{resultCrossWeight,jdbcType=VARCHAR},
  299. </if>
  300. <if test="resultTareWeight != null">
  301. #{resultTareWeight,jdbcType=VARCHAR},
  302. </if>
  303. <if test="resultNetWeight != null">
  304. #{resultNetWeight,jdbcType=VARCHAR},
  305. </if>
  306. <if test="resultCrossWeightTime != null">
  307. #{resultCrossWeightTime,jdbcType=VARCHAR},
  308. </if>
  309. <if test="resultTareWeightTime != null">
  310. #{resultTareWeightTime,jdbcType=VARCHAR},
  311. </if>
  312. <if test="easEntryId != null">
  313. #{easEntryId,jdbcType=VARCHAR},
  314. </if>
  315. <if test="insertUsername != null">
  316. #{insertUsername,jdbcType=VARCHAR},
  317. </if>
  318. <if test="insertTime != null">
  319. #{insertTime,jdbcType=TIMESTAMP},
  320. </if>
  321. <if test="updateUsername != null">
  322. #{updateUsername,jdbcType=VARCHAR},
  323. </if>
  324. <if test="updateTime != null">
  325. #{updateTime,jdbcType=TIMESTAMP},
  326. </if>
  327. <if test="insertUpdateRemark != null">
  328. #{insertUpdateRemark,jdbcType=VARCHAR},
  329. </if>
  330. </trim>
  331. </insert>
  332. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsNotUploadedEas">
  333. update AMS_NOT_UPLOADED_EAS
  334. set NO = #{no,jdbcType=VARCHAR},
  335. RESULT_POUND_NO = #{resultPoundNo,jdbcType=VARCHAR},
  336. CAPACITY_NUMBER = #{capacityNumber,jdbcType=VARCHAR},
  337. RESULT_CROSS_CALCULATE_NUMBER = #{resultCrossCalculateNumber,jdbcType=VARCHAR},
  338. RESULT_TARE_CALCULATE_NUMBER = #{resultTareCalculateNumber,jdbcType=VARCHAR},
  339. RESULT_CROSS_WEIGHT = #{resultCrossWeight,jdbcType=VARCHAR},
  340. RESULT_TARE_WEIGHT = #{resultTareWeight,jdbcType=VARCHAR},
  341. RESULT_NET_WEIGHT = #{resultNetWeight,jdbcType=VARCHAR},
  342. RESULT_CROSS_WEIGHT_TIME = #{resultCrossWeightTime,jdbcType=VARCHAR},
  343. RESULT_TARE_WEIGHT_TIME = #{resultTareWeightTime,jdbcType=VARCHAR},
  344. EAS_ENTRY_ID = #{easEntryId,jdbcType=VARCHAR},
  345. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  346. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  347. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  348. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  349. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR}
  350. where ORDER_ID = #{orderId,jdbcType=VARCHAR}
  351. </update>
  352. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsNotUploadedEas">
  353. update AMS_NOT_UPLOADED_EAS
  354. <set>
  355. <if test="no != null">
  356. NO = #{no,jdbcType=VARCHAR},
  357. </if>
  358. <if test="resultPoundNo != null">
  359. RESULT_POUND_NO = #{resultPoundNo,jdbcType=VARCHAR},
  360. </if>
  361. <if test="capacityNumber != null">
  362. CAPACITY_NUMBER = #{capacityNumber,jdbcType=VARCHAR},
  363. </if>
  364. <if test="resultCrossCalculateNumber != null">
  365. RESULT_CROSS_CALCULATE_NUMBER = #{resultCrossCalculateNumber,jdbcType=VARCHAR},
  366. </if>
  367. <if test="resultTareCalculateNumber != null">
  368. RESULT_TARE_CALCULATE_NUMBER = #{resultTareCalculateNumber,jdbcType=VARCHAR},
  369. </if>
  370. <if test="resultCrossWeight != null">
  371. RESULT_CROSS_WEIGHT = #{resultCrossWeight,jdbcType=VARCHAR},
  372. </if>
  373. <if test="resultTareWeight != null">
  374. RESULT_TARE_WEIGHT = #{resultTareWeight,jdbcType=VARCHAR},
  375. </if>
  376. <if test="resultNetWeight != null">
  377. RESULT_NET_WEIGHT = #{resultNetWeight,jdbcType=VARCHAR},
  378. </if>
  379. <if test="resultCrossWeightTime != null">
  380. RESULT_CROSS_WEIGHT_TIME = #{resultCrossWeightTime,jdbcType=VARCHAR},
  381. </if>
  382. <if test="resultTareWeightTime != null">
  383. RESULT_TARE_WEIGHT_TIME = #{resultTareWeightTime,jdbcType=VARCHAR},
  384. </if>
  385. <if test="easEntryId != null">
  386. EAS_ENTRY_ID = #{easEntryId,jdbcType=VARCHAR},
  387. </if>
  388. <if test="insertUsername != null">
  389. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  390. </if>
  391. <if test="insertTime != null">
  392. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  393. </if>
  394. <if test="updateUsername != null">
  395. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  396. </if>
  397. <if test="updateTime != null">
  398. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  399. </if>
  400. <if test="insertUpdateRemark != null">
  401. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  402. </if>
  403. </set>
  404. where ORDER_ID = #{orderId,jdbcType=VARCHAR}
  405. </update>
  406. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  407. <include refid="select" />
  408. where ORDER_ID = #{orderId,jdbcType=VARCHAR}
  409. </select>
  410. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  411. <include refid="select" />
  412. <include refid="where" />
  413. </select>
  414. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  415. <include refid="select" />
  416. <include refid="whereLike" />
  417. </select>
  418. <insert id="batchInsert" parameterType="java.util.List">
  419. insert into AMS_NOT_UPLOADED_EAS
  420. (ORDER_ID,
  421. NO, RESULT_POUND_NO, CAPACITY_NUMBER,
  422. RESULT_CROSS_CALCULATE_NUMBER, RESULT_TARE_CALCULATE_NUMBER,
  423. RESULT_CROSS_WEIGHT, RESULT_TARE_WEIGHT,
  424. RESULT_NET_WEIGHT, RESULT_CROSS_WEIGHT_TIME,
  425. RESULT_TARE_WEIGHT_TIME, EAS_ENTRY_ID,
  426. INSERT_USERNAME, INSERT_TIME,
  427. UPDATE_USERNAME, UPDATE_TIME,
  428. INSERT_UPDATE_REMARK)
  429. ( <foreach collection="list" item="item" separator="union all">
  430. select
  431. #{item.orderId,jdbcType=VARCHAR},
  432. #{item.no,jdbcType=VARCHAR}, #{item.resultPoundNo,jdbcType=VARCHAR}, #{item.capacityNumber,jdbcType=VARCHAR},
  433. #{item.resultCrossCalculateNumber,jdbcType=VARCHAR}, #{item.resultTareCalculateNumber,jdbcType=VARCHAR},
  434. #{item.resultCrossWeight,jdbcType=VARCHAR}, #{item.resultTareWeight,jdbcType=VARCHAR},
  435. #{item.resultNetWeight,jdbcType=VARCHAR}, #{item.resultCrossWeightTime,jdbcType=VARCHAR},
  436. #{item.resultTareWeightTime,jdbcType=VARCHAR}, #{item.easEntryId,jdbcType=VARCHAR},
  437. #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
  438. #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
  439. #{item.insertUpdateRemark,jdbcType=VARCHAR} from dual
  440. </foreach> )
  441. </insert>
  442. <update id="batchUpdate" parameterType="java.util.List">
  443. update AMS_NOT_UPLOADED_EAS
  444. set
  445. ORDER_ID=
  446. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  447. when #{item.orderId,jdbcType=VARCHAR} then #{item.orderId,jdbcType=VARCHAR}
  448. </foreach>
  449. ,NO=
  450. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  451. when #{item.orderId,jdbcType=VARCHAR} then #{item.no,jdbcType=VARCHAR}
  452. </foreach>
  453. ,RESULT_POUND_NO=
  454. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  455. when #{item.orderId,jdbcType=VARCHAR} then #{item.resultPoundNo,jdbcType=VARCHAR}
  456. </foreach>
  457. ,CAPACITY_NUMBER=
  458. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  459. when #{item.orderId,jdbcType=VARCHAR} then #{item.capacityNumber,jdbcType=VARCHAR}
  460. </foreach>
  461. ,RESULT_CROSS_CALCULATE_NUMBER=
  462. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  463. when #{item.orderId,jdbcType=VARCHAR} then #{item.resultCrossCalculateNumber,jdbcType=VARCHAR}
  464. </foreach>
  465. ,RESULT_TARE_CALCULATE_NUMBER=
  466. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  467. when #{item.orderId,jdbcType=VARCHAR} then #{item.resultTareCalculateNumber,jdbcType=VARCHAR}
  468. </foreach>
  469. ,RESULT_CROSS_WEIGHT=
  470. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  471. when #{item.orderId,jdbcType=VARCHAR} then #{item.resultCrossWeight,jdbcType=VARCHAR}
  472. </foreach>
  473. ,RESULT_TARE_WEIGHT=
  474. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  475. when #{item.orderId,jdbcType=VARCHAR} then #{item.resultTareWeight,jdbcType=VARCHAR}
  476. </foreach>
  477. ,RESULT_NET_WEIGHT=
  478. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  479. when #{item.orderId,jdbcType=VARCHAR} then #{item.resultNetWeight,jdbcType=VARCHAR}
  480. </foreach>
  481. ,RESULT_CROSS_WEIGHT_TIME=
  482. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  483. when #{item.orderId,jdbcType=VARCHAR} then #{item.resultCrossWeightTime,jdbcType=VARCHAR}
  484. </foreach>
  485. ,RESULT_TARE_WEIGHT_TIME=
  486. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  487. when #{item.orderId,jdbcType=VARCHAR} then #{item.resultTareWeightTime,jdbcType=VARCHAR}
  488. </foreach>
  489. ,EAS_ENTRY_ID=
  490. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  491. when #{item.orderId,jdbcType=VARCHAR} then #{item.easEntryId,jdbcType=VARCHAR}
  492. </foreach>
  493. ,INSERT_USERNAME=
  494. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  495. when #{item.orderId,jdbcType=VARCHAR} then #{item.insertUsername,jdbcType=VARCHAR}
  496. </foreach>
  497. ,INSERT_TIME=
  498. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  499. when #{item.orderId,jdbcType=VARCHAR} then #{item.insertTime,jdbcType=TIMESTAMP}
  500. </foreach>
  501. ,UPDATE_USERNAME=
  502. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  503. when #{item.orderId,jdbcType=VARCHAR} then #{item.updateUsername,jdbcType=VARCHAR}
  504. </foreach>
  505. ,UPDATE_TIME=
  506. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  507. when #{item.orderId,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
  508. </foreach>
  509. ,INSERT_UPDATE_REMARK=
  510. <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
  511. when #{item.orderId,jdbcType=VARCHAR} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  512. </foreach>
  513. where ORDER_ID in
  514. <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
  515. #{item.orderId,jdbcType=VARCHAR}
  516. </foreach>
  517. </update>
  518. <delete id="batchDelete" parameterType="java.util.List">
  519. delete from AMS_NOT_UPLOADED_EAS
  520. where ORDER_ID in
  521. <foreach close=")" collection="list" item="id" open="(" separator=",">
  522. #{id}
  523. </foreach>
  524. </delete>
  525. <!-- 友情提示!!!-->
  526. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  527. <!-- -->
  528. <select id="getAllNotUploadedEasMes" resultType="java.util.Map">
  529. select
  530. t.ORDER_ID "orderId",
  531. t.NO "no",
  532. t.RESULT_POUND_NO "resultPoundNo",
  533. t.CAPACITY_NUMBER "capacityNumber",
  534. t.RESULT_CROSS_CALCULATE_NUMBER "resultCrossCalculateNumber",
  535. t.RESULT_TARE_CALCULATE_NUMBER "resultTareCalculateNumber",
  536. t.RESULT_CROSS_WEIGHT "resultCrossWeight",
  537. t.RESULT_TARE_WEIGHT "resultTareWeight",
  538. t.RESULT_NET_WEIGHT "resultNetWeight",
  539. t.RESULT_CROSS_WEIGHT_TIME "resultCrossWeightTime",
  540. t.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
  541. t.EAS_ENTRY_ID "easEntryId"
  542. from AMS_NOT_UPLOADED_EAS t
  543. </select>
  544. <select id="getIsExistsOrderId" parameterType="string" resultType="string">
  545. select a.ORDER_ID from AMS_NOT_UPLOADED_EAS a where a.ORDER_ID = #{orderId}
  546. </select>
  547. </mapper>