WmspOutboundScanResultMapper.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  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.WmspOutboundScanResultMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.WmspOutboundScanResult">
  5. <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
  6. <result column="OUTBOUND_RESULT_ID" jdbcType="DECIMAL" property="outboundResultId" />
  7. <result column="LOAD_ID" jdbcType="DECIMAL" property="loadId" />
  8. <result column="RESULT_MATERIAL" jdbcType="VARCHAR" property="resultMaterial" />
  9. <result column="RESULT_LOAD_TIME" jdbcType="TIMESTAMP" property="resultLoadTime" />
  10. <result column="OUTBOUND_MATERIAL_NUMBER" jdbcType="DECIMAL" property="outboundMaterialNumber" />
  11. <result column="RESULT_CHECK" jdbcType="DECIMAL" property="resultCheck" />
  12. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
  13. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
  14. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
  15. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  16. <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
  17. <result column="INBOUND_RESULT_ID" jdbcType="DECIMAL" property="inboundResultId" />
  18. </resultMap>
  19. <sql id="columns">
  20. RESULT_ID, OUTBOUND_RESULT_ID, LOAD_ID, RESULT_MATERIAL, RESULT_LOAD_TIME, OUTBOUND_MATERIAL_NUMBER,
  21. RESULT_CHECK, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,INBOUND_RESULT_ID
  22. </sql>
  23. <sql id="columns_alias">
  24. t.RESULT_ID, t.OUTBOUND_RESULT_ID, t.LOAD_ID, t.RESULT_MATERIAL, t.RESULT_LOAD_TIME,
  25. t.OUTBOUND_MATERIAL_NUMBER, t.RESULT_CHECK, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
  26. t.UPDATE_TIME, t.INSERT_UPDATE_REMARK ,t.INBOUND_RESULT_ID
  27. </sql>
  28. <sql id="select">
  29. SELECT <include refid="columns"/> FROM WMSP_OUTBOUND_SCAN_RESULT
  30. </sql>
  31. <sql id="select_alias">
  32. SELECT <include refid="columns_alias"/> FROM WMSP_OUTBOUND_SCAN_RESULT t
  33. </sql>
  34. <sql id="where">
  35. <where>
  36. <if test="resultId != null">
  37. and RESULT_ID = #{resultId}
  38. </if>
  39. <if test="outboundResultId != null">
  40. and OUTBOUND_RESULT_ID = #{outboundResultId}
  41. </if>
  42. <if test="loadId != null">
  43. and LOAD_ID = #{loadId}
  44. </if>
  45. <if test="resultMaterial != null and resultMaterial != ''">
  46. and RESULT_MATERIAL = #{resultMaterial}
  47. </if>
  48. <if test="resultLoadTime != null">
  49. and TO_CHAR(RESULT_LOAD_TIME,'yyyy-MM-dd') = #{resultLoadTime}
  50. </if>
  51. <if test="outboundMaterialNumber != null">
  52. and OUTBOUND_MATERIAL_NUMBER = #{outboundMaterialNumber}
  53. </if>
  54. <if test="resultCheck != null">
  55. and RESULT_CHECK = #{resultCheck}
  56. </if>
  57. <if test="insertUsername != null and insertUsername != ''">
  58. and INSERT_USERNAME = #{insertUsername}
  59. </if>
  60. <if test="insertTime != null">
  61. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  62. </if>
  63. <if test="updateUsername != null and updateUsername != ''">
  64. and UPDATE_USERNAME = #{updateUsername}
  65. </if>
  66. <if test="updateTime != null">
  67. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  68. </if>
  69. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  70. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  71. </if>
  72. <if test="inboundResultId != null">
  73. and INBOUND_RESULT_ID = #{inboundResultId}
  74. </if>
  75. </where>
  76. </sql>
  77. <sql id="whereLike">
  78. <where>
  79. <if test="resultId != null">
  80. and RESULT_ID = #{resultId}
  81. </if>
  82. <if test="outboundResultId != null">
  83. and OUTBOUND_RESULT_ID = #{outboundResultId}
  84. </if>
  85. <if test="loadId != null">
  86. and LOAD_ID = #{loadId}
  87. </if>
  88. <if test="resultMaterial != null and resultMaterial != ''">
  89. and RESULT_MATERIAL LIKE '%${resultMaterial}%'
  90. </if>
  91. <if test="resultLoadTime != null">
  92. and TO_CHAR(RESULT_LOAD_TIME,'yyyy-MM-dd') = #{resultLoadTime}
  93. </if>
  94. <if test="outboundMaterialNumber != null">
  95. and OUTBOUND_MATERIAL_NUMBER = #{outboundMaterialNumber}
  96. </if>
  97. <if test="resultCheck != null">
  98. and RESULT_CHECK = #{resultCheck}
  99. </if>
  100. <if test="insertUsername != null and insertUsername != ''">
  101. and INSERT_USERNAME LIKE '%${insertUsername}%'
  102. </if>
  103. <if test="insertTime != null">
  104. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  105. </if>
  106. <if test="updateUsername != null and updateUsername != ''">
  107. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  108. </if>
  109. <if test="updateTime != null">
  110. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  111. </if>
  112. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  113. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  114. </if>
  115. <if test="inboundResultId != null and inboundResultId != ''">
  116. and INBOUND_RESULT_ID LIKE '%${inboundResultId}%'
  117. </if>
  118. </where>
  119. </sql>
  120. <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
  121. delete from WMSP_OUTBOUND_SCAN_RESULT
  122. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  123. </delete>
  124. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  125. delete from WMSP_OUTBOUND_SCAN_RESULT
  126. where 1!=1
  127. <if test="outboundResultId != null">
  128. or OUTBOUND_RESULT_ID = #{outboundResultId}
  129. </if>
  130. <if test="loadId != null">
  131. or LOAD_ID = #{loadId}
  132. </if>
  133. <if test="resultMaterial != null and resultMaterial != ''">
  134. or RESULT_MATERIAL = #{resultMaterial}
  135. </if>
  136. <if test="resultLoadTime != null">
  137. or TO_CHAR(RESULT_LOAD_TIME,'yyyy-MM-dd') = '#{resultLoadTime}'
  138. </if>
  139. <if test="outboundMaterialNumber != null">
  140. or OUTBOUND_MATERIAL_NUMBER = #{outboundMaterialNumber}
  141. </if>
  142. <if test="resultCheck != null">
  143. or RESULT_CHECK = #{resultCheck}
  144. </if>
  145. <if test="insertUsername != null and insertUsername != ''">
  146. or INSERT_USERNAME = #{insertUsername}
  147. </if>
  148. <if test="insertTime != null">
  149. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  150. </if>
  151. <if test="updateUsername != null and updateUsername != ''">
  152. or UPDATE_USERNAME = #{updateUsername}
  153. </if>
  154. <if test="updateTime != null">
  155. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  156. </if>
  157. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  158. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  159. </if>
  160. <if test="inboundResultId != null and inboundResultId != ''">
  161. or INBOUND_RESULT_ID = #{inboundResultId}
  162. </if>
  163. </delete>
  164. <insert id="insert" parameterType="com.steerinfo.dil.model.WmspOutboundScanResult">
  165. insert into WMSP_OUTBOUND_SCAN_RESULT (RESULT_ID, OUTBOUND_RESULT_ID, LOAD_ID,
  166. RESULT_MATERIAL, RESULT_LOAD_TIME, OUTBOUND_MATERIAL_NUMBER,
  167. RESULT_CHECK, INSERT_USERNAME, INSERT_TIME,
  168. UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,INBOUND_RESULT_ID
  169. )
  170. values (#{resultId,jdbcType=DECIMAL}, #{outboundResultId,jdbcType=DECIMAL}, #{loadId,jdbcType=DECIMAL},
  171. #{resultMaterial,jdbcType=VARCHAR}, #{resultLoadTime,jdbcType=TIMESTAMP}, #{outboundMaterialNumber,jdbcType=DECIMAL},
  172. #{resultCheck,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
  173. #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},#{inboundResultId,jdbcType=DECIMAL}
  174. )
  175. </insert>
  176. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.WmspOutboundScanResult">
  177. insert into WMSP_OUTBOUND_SCAN_RESULT
  178. <trim prefix="(" suffix=")" suffixOverrides=",">
  179. <if test="resultId != null">
  180. RESULT_ID,
  181. </if>
  182. <if test="outboundResultId != null">
  183. OUTBOUND_RESULT_ID,
  184. </if>
  185. <if test="loadId != null">
  186. LOAD_ID,
  187. </if>
  188. <if test="resultMaterial != null">
  189. RESULT_MATERIAL,
  190. </if>
  191. <if test="resultLoadTime != null">
  192. RESULT_LOAD_TIME,
  193. </if>
  194. <if test="outboundMaterialNumber != null">
  195. OUTBOUND_MATERIAL_NUMBER,
  196. </if>
  197. <if test="resultCheck != null">
  198. RESULT_CHECK,
  199. </if>
  200. <if test="insertUsername != null">
  201. INSERT_USERNAME,
  202. </if>
  203. <if test="insertTime != null">
  204. INSERT_TIME,
  205. </if>
  206. <if test="updateUsername != null">
  207. UPDATE_USERNAME,
  208. </if>
  209. <if test="updateTime != null">
  210. UPDATE_TIME,
  211. </if>
  212. <if test="insertUpdateRemark != null">
  213. INSERT_UPDATE_REMARK,
  214. </if>
  215. <if test="inboundResultId != null">
  216. INBOUND_RESULT_ID,
  217. </if>
  218. </trim>
  219. <trim prefix="values (" suffix=")" suffixOverrides=",">
  220. <if test="resultId != null">
  221. #{resultId,jdbcType=DECIMAL},
  222. </if>
  223. <if test="outboundResultId != null">
  224. #{outboundResultId,jdbcType=DECIMAL},
  225. </if>
  226. <if test="loadId != null">
  227. #{loadId,jdbcType=DECIMAL},
  228. </if>
  229. <if test="resultMaterial != null">
  230. #{resultMaterial,jdbcType=VARCHAR},
  231. </if>
  232. <if test="resultLoadTime != null">
  233. #{resultLoadTime,jdbcType=TIMESTAMP},
  234. </if>
  235. <if test="outboundMaterialNumber != null">
  236. #{outboundMaterialNumber,jdbcType=DECIMAL},
  237. </if>
  238. <if test="resultCheck != null">
  239. #{resultCheck,jdbcType=DECIMAL},
  240. </if>
  241. <if test="insertUsername != null">
  242. #{insertUsername,jdbcType=VARCHAR},
  243. </if>
  244. <if test="insertTime != null">
  245. #{insertTime,jdbcType=TIMESTAMP},
  246. </if>
  247. <if test="updateUsername != null">
  248. #{updateUsername,jdbcType=VARCHAR},
  249. </if>
  250. <if test="updateTime != null">
  251. #{updateTime,jdbcType=TIMESTAMP},
  252. </if>
  253. <if test="insertUpdateRemark != null">
  254. #{insertUpdateRemark,jdbcType=VARCHAR},
  255. </if>
  256. <if test="inboundResultId != null">
  257. #{inboundResultId,jdbcType=DECIMAL},
  258. </if>
  259. </trim>
  260. </insert>
  261. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.WmspOutboundScanResult">
  262. update WMSP_OUTBOUND_SCAN_RESULT
  263. set OUTBOUND_RESULT_ID = #{outboundResultId,jdbcType=DECIMAL},
  264. LOAD_ID = #{loadId,jdbcType=DECIMAL},
  265. RESULT_MATERIAL = #{resultMaterial,jdbcType=VARCHAR},
  266. RESULT_LOAD_TIME = #{resultLoadTime,jdbcType=TIMESTAMP},
  267. OUTBOUND_MATERIAL_NUMBER = #{outboundMaterialNumber,jdbcType=DECIMAL},
  268. RESULT_CHECK = #{resultCheck,jdbcType=DECIMAL},
  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. INBOUND_RESULT_ID = #{inboundResultId,jdbcType=DECIMAL},
  275. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  276. </update>
  277. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.WmspOutboundScanResult">
  278. update WMSP_OUTBOUND_SCAN_RESULT
  279. <set>
  280. <if test="outboundResultId != null">
  281. OUTBOUND_RESULT_ID = #{outboundResultId,jdbcType=DECIMAL},
  282. </if>
  283. <if test="loadId != null">
  284. LOAD_ID = #{loadId,jdbcType=DECIMAL},
  285. </if>
  286. <if test="resultMaterial != null">
  287. RESULT_MATERIAL = #{resultMaterial,jdbcType=VARCHAR},
  288. </if>
  289. <if test="resultLoadTime != null">
  290. RESULT_LOAD_TIME = #{resultLoadTime,jdbcType=TIMESTAMP},
  291. </if>
  292. <if test="outboundMaterialNumber != null">
  293. OUTBOUND_MATERIAL_NUMBER = #{outboundMaterialNumber,jdbcType=DECIMAL},
  294. </if>
  295. <if test="resultCheck != null">
  296. RESULT_CHECK = #{resultCheck,jdbcType=DECIMAL},
  297. </if>
  298. <if test="insertUsername != null">
  299. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  300. </if>
  301. <if test="insertTime != null">
  302. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  303. </if>
  304. <if test="updateUsername != null">
  305. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  306. </if>
  307. <if test="updateTime != null">
  308. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  309. </if>
  310. <if test="insertUpdateRemark != null">
  311. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  312. </if>
  313. <if test="inboundResultId != null">
  314. INBOUND_RESULT_ID = #{inboundResultId,jdbcType=DECIMAL},
  315. </if>
  316. </set>
  317. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  318. </update>
  319. <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
  320. <include refid="select"/>
  321. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  322. </select>
  323. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  324. <include refid="select"/>
  325. <include refid="where"/>
  326. </select>
  327. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  328. <include refid="select"/>
  329. <include refid="whereLike"/>
  330. </select>
  331. <insert id="batchInsert" parameterType="java.util.List">
  332. insert into WMSP_OUTBOUND_SCAN_RESULT
  333. (RESULT_ID,
  334. OUTBOUND_RESULT_ID, LOAD_ID, RESULT_MATERIAL,
  335. RESULT_LOAD_TIME, OUTBOUND_MATERIAL_NUMBER,
  336. RESULT_CHECK, INSERT_USERNAME,
  337. INSERT_TIME, UPDATE_USERNAME,
  338. UPDATE_TIME, INSERT_UPDATE_REMARK,INBOUND_RESULT_ID
  339. )
  340. ( <foreach collection="list" item="item" separator="union all">
  341. select
  342. #{item.resultId,jdbcType=DECIMAL},
  343. #{item.outboundResultId,jdbcType=DECIMAL}, #{item.loadId,jdbcType=DECIMAL}, #{item.resultMaterial,jdbcType=VARCHAR},
  344. #{item.resultLoadTime,jdbcType=TIMESTAMP}, #{item.outboundMaterialNumber,jdbcType=DECIMAL},
  345. #{item.resultCheck,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
  346. #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
  347. #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.inboundResultId,jdbcType=DECIMAL}
  348. from dual
  349. </foreach> )
  350. </insert>
  351. <update id="batchUpdate" parameterType="java.util.List">
  352. update WMSP_OUTBOUND_SCAN_RESULT
  353. set
  354. RESULT_ID=
  355. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  356. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
  357. </foreach>
  358. ,OUTBOUND_RESULT_ID=
  359. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  360. when #{item.resultId,jdbcType=DECIMAL} then #{item.outboundResultId,jdbcType=DECIMAL}
  361. </foreach>
  362. ,LOAD_ID=
  363. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  364. when #{item.resultId,jdbcType=DECIMAL} then #{item.loadId,jdbcType=DECIMAL}
  365. </foreach>
  366. ,RESULT_MATERIAL=
  367. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  368. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterial,jdbcType=VARCHAR}
  369. </foreach>
  370. ,RESULT_LOAD_TIME=
  371. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  372. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadTime,jdbcType=TIMESTAMP}
  373. </foreach>
  374. ,OUTBOUND_MATERIAL_NUMBER=
  375. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  376. when #{item.resultId,jdbcType=DECIMAL} then #{item.outboundMaterialNumber,jdbcType=DECIMAL}
  377. </foreach>
  378. ,RESULT_CHECK=
  379. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  380. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultCheck,jdbcType=DECIMAL}
  381. </foreach>
  382. ,INSERT_USERNAME=
  383. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  384. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  385. </foreach>
  386. ,INSERT_TIME=
  387. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  388. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  389. </foreach>
  390. ,UPDATE_USERNAME=
  391. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  392. when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  393. </foreach>
  394. ,UPDATE_TIME=
  395. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  396. when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  397. </foreach>
  398. ,INSERT_UPDATE_REMARK=
  399. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  400. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  401. </foreach>
  402. ,INBOUND_RESULT_ID=
  403. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  404. when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundResultId,jdbcType=DECIMAL}
  405. </foreach>
  406. where RESULT_ID in
  407. <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
  408. #{item.resultId,jdbcType=DECIMAL}
  409. </foreach>
  410. </update>
  411. <delete id="batchDelete" parameterType="java.util.List">
  412. delete from WMSP_OUTBOUND_SCAN_RESULT
  413. where RESULT_ID in
  414. <foreach collection="list" item="id" open="(" close=")" separator=",">
  415. #{id}
  416. </foreach>
  417. </delete>
  418. <!-- 友情提示!!!-->
  419. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  420. <!-- 通过出库单id找出稽核结果成功的扫描结果-->
  421. <select id="getResultMaterial" parameterType="Integer" resultType="java.util.LinkedHashMap">
  422. SELECT smsj.RESULT_MATERIAL
  423. FROM WMSP_OUTBOUND_SCAN_RESULT smsj
  424. WHERE smsj.OUTBOUND_RESULT_ID = #{resultId}
  425. </select>
  426. <!-- 通过物资唯一编码找寻物资名称和规格型号-->
  427. <select id="getRmsMaterial" parameterType="String" resultType="java.util.LinkedHashMap">
  428. SELECT
  429. wz.MATERIAL_NAME "materialName",
  430. wz.MATERIAL_SPECIFICATION || '(' || wz.MATERIAL_MODEL || ')' "specification",
  431. gcwz.MATERIAL_ONLY_CODE "materialOnlyCode",
  432. CASE
  433. WHEN gcwz.MATERIAL_QUALIFIED = 0 THEN
  434. '不合格且判废'
  435. WHEN gcwz.MATERIAL_QUALIFIED = 1 THEN
  436. '不合格且降级'
  437. WHEN gcwz.MATERIAL_QUALIFIED = 2 THEN
  438. '不合格且卖本地经销商'
  439. WHEN gcwz.MATERIAL_QUALIFIED = 3 THEN
  440. '合格'
  441. END materialQualified,
  442. gcwz.MATERIAL_PRODUCTION_DATE "materialProductionDa"
  443. FROM RMS_MATERIAL_STEEL gcwz
  444. LEFT JOIN RMS_MATERIAL wz
  445. ON gcwz.MATERIAL_ID = wz.MATERIAL_ID
  446. WHERE gcwz.MATERIAL_ONLY_CODE = #{materialOnlyCode}
  447. </select>
  448. <select id="getOutBoundMaterialDetailedInfos" resultType="com.steerinfo.dil.vo.OutBoundMaterialDetailedInfo">
  449. select
  450. rms.MATERIAL_STEEL_ID "materialSteelId",
  451. rms.MATERIAL_ONLY_CODE "onlyCode",
  452. RM.material_Id "materialId",
  453. RM.MATERIAL_CODE "materialCode",
  454. RM.MATERIAL_NAME "materialName",
  455. RM.MATERIAL_SPECIFICATION "materialSpecification",
  456. RM.MATERIAL_MODEL "materialModel"
  457. from RMS_MATERIAL_STEEL rms
  458. left join RMS_MATERIAL RM on rms.material_id = RM.MATERIAL_ID
  459. LEFT JOIN WMSP_GRID_MATERIAL wgm
  460. ON rms.MATERIAL_STEEL_ID = wgm.MATERIAL_ID
  461. where
  462. MATERIAL_ONLY_CODE in
  463. <foreach collection="onlyCodes" item="item" open="(" close=")" separator=",">
  464. #{item}
  465. </foreach>
  466. <if test="isDelete!=null">
  467. and wgm.DELETED='0'
  468. </if>
  469. </select>
  470. <select id="getResultStrs" resultType="java.lang.String">
  471. select RESULT_MATERIAL "resultMaterial" from WMSP_OUTBOUND_SCAN_RESULT where OUTBOUND_RESULT_ID=#{resultId}
  472. </select>
  473. <select id="getMaterialSteelId" resultType="java.util.Map" parameterType="String">
  474. SELECT
  475. wgm.MATERIAL_ID "materialId",
  476. wgm.UPDATE_TIME "updateTime"
  477. FROM RMS_MATERIAL_STEEL gcwz
  478. LEFT JOIN WMSP_GRID_MATERIAL wgm
  479. ON gcwz.MATERIAL_STEEL_ID = wgm.MATERIAL_ID
  480. WHERE gcwz.MATERIAL_ONLY_CODE = #{materialOnlyCode}
  481. </select>
  482. </mapper>