WmspInboundDistributeMapper.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  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.WmspInboundDistributeMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.WmspInboundDistribute">
  5. <id column="DISTRIBUTE_ID" jdbcType="DECIMAL" property="distributeId" />
  6. <result column="INBOUND_GROUP_ID" jdbcType="DECIMAL" property="inboundGroupId" />
  7. <result column="PERSONNEL_WORKSHOPID" jdbcType="DECIMAL" property="personnelWorkshopid" />
  8. <result column="RESULT_STATUS" jdbcType="DECIMAL" property="resultStatus" />
  9. <result column="BATCH" jdbcType="DECIMAL" property="batch" />
  10. <result column="DRIVING_ID" jdbcType="DECIMAL" property="drivingId" />
  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. </resultMap>
  17. <sql id="columns">
  18. DISTRIBUTE_ID, INBOUND_GROUP_ID,PERSONNEL_WORKSHOPID, RESULT_STATUS, BATCH, DRIVING_ID, INSERT_USERNAME,
  19. INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
  20. </sql>
  21. <sql id="columns_alias">
  22. t.DISTRIBUTE_ID, t.INBOUND_GROUP_ID,PERSONNEL_WORKSHOPID, t.RESULT_STATUS, t.BATCH, t.DRIVING_ID, t.INSERT_USERNAME,
  23. t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK
  24. </sql>
  25. <sql id="select">
  26. SELECT <include refid="columns"/> FROM WMSP_INBOUND_DISTRIBUTE
  27. </sql>
  28. <sql id="select_alias">
  29. SELECT <include refid="columns_alias"/> FROM WMSP_INBOUND_DISTRIBUTE t
  30. </sql>
  31. <sql id="where">
  32. <where>
  33. <if test="distributeId != null">
  34. and DISTRIBUTE_ID = #{distributeId}
  35. </if>
  36. <if test="inboundGroupId != null">
  37. and INBOUND_GROUP_ID = #{inboundGroupId}
  38. </if>
  39. <if test="personnelWorkshopid != null">
  40. and PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
  41. </if>
  42. <if test="resultStatus != null">
  43. and RESULT_STATUS = #{resultStatus}
  44. </if>
  45. <if test="batch != null">
  46. and BATCH = #{batch}
  47. </if>
  48. <if test="drivingId != null">
  49. and DRIVING_ID = #{drivingId}
  50. </if>
  51. <if test="insertUsername != null and insertUsername != ''">
  52. and INSERT_USERNAME = #{insertUsername}
  53. </if>
  54. <if test="insertTime != null">
  55. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  56. </if>
  57. <if test="updateUsername != null and updateUsername != ''">
  58. and UPDATE_USERNAME = #{updateUsername}
  59. </if>
  60. <if test="updateTime != null">
  61. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  62. </if>
  63. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  64. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  65. </if>
  66. </where>
  67. </sql>
  68. <sql id="whereLike">
  69. <where>
  70. <if test="distributeId != null">
  71. and DISTRIBUTE_ID = #{distributeId}
  72. </if>
  73. <if test="inboundGroupId != null">
  74. and INBOUND_GROUP_ID = #{inboundGroupId}
  75. </if>
  76. <if test="personnelWorkshopid != null">
  77. and PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
  78. </if>
  79. <if test="resultStatus != null">
  80. and RESULT_STATUS = #{resultStatus}
  81. </if>
  82. <if test="batch != null">
  83. and BATCH = #{batch}
  84. </if>
  85. <if test="drivingId != null">
  86. and DRIVING_ID = #{drivingId}
  87. </if>
  88. <if test="insertUsername != null and insertUsername != ''">
  89. and INSERT_USERNAME LIKE '%${insertUsername}%'
  90. </if>
  91. <if test="insertTime != null">
  92. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  93. </if>
  94. <if test="updateUsername != null and updateUsername != ''">
  95. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  96. </if>
  97. <if test="updateTime != null">
  98. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  99. </if>
  100. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  101. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  102. </if>
  103. </where>
  104. </sql>
  105. <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
  106. delete from WMSP_INBOUND_DISTRIBUTE
  107. where DISTRIBUTE_ID = #{distributeId,jdbcType=DECIMAL}
  108. </delete>
  109. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  110. delete from WMSP_INBOUND_DISTRIBUTE
  111. where 1!=1
  112. <if test="inboundGroupId != null">
  113. or INBOUND_GROUP_ID = #{inboundGroupId}
  114. </if>
  115. <if test="personnelWorkshopid != null">
  116. or PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
  117. </if>
  118. <if test="resultStatus != null">
  119. or RESULT_STATUS = #{resultStatus}
  120. </if>
  121. <if test="batch != null">
  122. or BATCH = #{batch}
  123. </if>
  124. <if test="drivingId != null">
  125. or DRIVING_ID = #{drivingId}
  126. </if>
  127. <if test="insertUsername != null and insertUsername != ''">
  128. or INSERT_USERNAME = #{insertUsername}
  129. </if>
  130. <if test="insertTime != null">
  131. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  132. </if>
  133. <if test="updateUsername != null and updateUsername != ''">
  134. or UPDATE_USERNAME = #{updateUsername}
  135. </if>
  136. <if test="updateTime != null">
  137. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  138. </if>
  139. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  140. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  141. </if>
  142. </delete>
  143. <insert id="insert" parameterType="com.steerinfo.dil.model.WmspInboundDistribute">
  144. insert into WMSP_INBOUND_DISTRIBUTE (DISTRIBUTE_ID, INBOUND_GROUP_ID,PERSONNEL_WORKSHOPID, RESULT_STATUS,
  145. BATCH, DRIVING_ID, INSERT_USERNAME,
  146. INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
  147. INSERT_UPDATE_REMARK)
  148. values (#{distributeId,jdbcType=DECIMAL}, #{inboundGroupId,jdbcType=DECIMAL}, #{personnelWorkshopid,jdbcType=DECIMAL}, #{resultStatus,jdbcType=DECIMAL},
  149. #{batch,jdbcType=DECIMAL}, #{drivingId,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR},
  150. #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
  151. #{insertUpdateRemark,jdbcType=VARCHAR})
  152. </insert>
  153. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.WmspInboundDistribute">
  154. insert into WMSP_INBOUND_DISTRIBUTE
  155. <trim prefix="(" suffix=")" suffixOverrides=",">
  156. <if test="distributeId != null">
  157. DISTRIBUTE_ID,
  158. </if>
  159. <if test="inboundGroupId != null">
  160. INBOUND_GROUP_ID,
  161. </if>
  162. <if test="personnelWorkshopid != null">
  163. PERSONNEL_WORKSHOPID,
  164. </if>
  165. <if test="resultStatus != null">
  166. RESULT_STATUS,
  167. </if>
  168. <if test="batch != null">
  169. BATCH,
  170. </if>
  171. <if test="drivingId != null">
  172. DRIVING_ID,
  173. </if>
  174. <if test="insertUsername != null">
  175. INSERT_USERNAME,
  176. </if>
  177. <if test="insertTime != null">
  178. INSERT_TIME,
  179. </if>
  180. <if test="updateUsername != null">
  181. UPDATE_USERNAME,
  182. </if>
  183. <if test="updateTime != null">
  184. UPDATE_TIME,
  185. </if>
  186. <if test="insertUpdateRemark != null">
  187. INSERT_UPDATE_REMARK,
  188. </if>
  189. </trim>
  190. <trim prefix="values (" suffix=")" suffixOverrides=",">
  191. <if test="distributeId != null">
  192. #{distributeId,jdbcType=DECIMAL},
  193. </if>
  194. <if test="inboundGroupId != null">
  195. #{inboundGroupId,jdbcType=DECIMAL},
  196. </if>
  197. <if test="personnelWorkshopid != null">
  198. #{personnelWorkshopid,jdbcType=DECIMAL},
  199. </if>
  200. <if test="resultStatus != null">
  201. #{resultStatus,jdbcType=DECIMAL},
  202. </if>
  203. <if test="batch != null">
  204. #{batch,jdbcType=DECIMAL},
  205. </if>
  206. <if test="drivingId != null">
  207. #{drivingId,jdbcType=DECIMAL},
  208. </if>
  209. <if test="insertUsername != null">
  210. #{insertUsername,jdbcType=VARCHAR},
  211. </if>
  212. <if test="insertTime != null">
  213. #{insertTime,jdbcType=TIMESTAMP},
  214. </if>
  215. <if test="updateUsername != null">
  216. #{updateUsername,jdbcType=VARCHAR},
  217. </if>
  218. <if test="updateTime != null">
  219. #{updateTime,jdbcType=TIMESTAMP},
  220. </if>
  221. <if test="insertUpdateRemark != null">
  222. #{insertUpdateRemark,jdbcType=VARCHAR},
  223. </if>
  224. </trim>
  225. </insert>
  226. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.WmspInboundDistribute">
  227. update WMSP_INBOUND_DISTRIBUTE
  228. set INBOUND_GROUP_ID = #{inboundGroupId,jdbcType=DECIMAL},
  229. PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=DECIMAL},
  230. RESULT_STATUS = #{resultStatus,jdbcType=DECIMAL},
  231. BATCH = #{batch,jdbcType=DECIMAL},
  232. DRIVING_ID = #{drivingId,jdbcType=DECIMAL},
  233. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  234. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  235. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  236. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  237. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR}
  238. where DISTRIBUTE_ID = #{distributeId,jdbcType=DECIMAL}
  239. </update>
  240. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.WmspInboundDistribute">
  241. update WMSP_INBOUND_DISTRIBUTE
  242. <set>
  243. <if test="inboundGroupId != null">
  244. INBOUND_GROUP_ID = #{inboundGroupId,jdbcType=DECIMAL},
  245. </if>
  246. <if test="personnelWorkshopid != null">
  247. PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=DECIMAL},
  248. </if>
  249. <if test="resultStatus != null">
  250. RESULT_STATUS = #{resultStatus,jdbcType=DECIMAL},
  251. </if>
  252. <if test="batch != null">
  253. BATCH = #{batch,jdbcType=DECIMAL},
  254. </if>
  255. <if test="drivingId != null">
  256. DRIVING_ID = #{drivingId,jdbcType=DECIMAL},
  257. </if>
  258. <if test="insertUsername != null">
  259. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  260. </if>
  261. <if test="insertTime != null">
  262. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  263. </if>
  264. <if test="updateUsername != null">
  265. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  266. </if>
  267. <if test="updateTime != null">
  268. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  269. </if>
  270. <if test="insertUpdateRemark != null">
  271. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  272. </if>
  273. </set>
  274. where DISTRIBUTE_ID = #{distributeId,jdbcType=DECIMAL}
  275. </update>
  276. <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
  277. <include refid="select"/>
  278. where DISTRIBUTE_ID = #{distributeId,jdbcType=DECIMAL}
  279. </select>
  280. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  281. <include refid="select"/>
  282. <include refid="where"/>
  283. </select>
  284. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  285. <include refid="select"/>
  286. <include refid="whereLike"/>
  287. </select>
  288. <insert id="batchInsert" parameterType="java.util.List">
  289. insert into
  290. (DISTRIBUTE_ID,
  291. INBOUND_GROUP_ID,PERSONNEL_WORKSHOPID,WMSP_INBOUND_DISTRIBUTE, RESULT_STATUS,
  292. BATCH, DRIVING_ID, INSERT_USERNAME,
  293. INSERT_TIME, UPDATE_USERNAME,
  294. UPDATE_TIME, INSERT_UPDATE_REMARK
  295. )
  296. ( <foreach collection="list" item="item" separator="union all">
  297. select
  298. #{item.distributeId,jdbcType=DECIMAL},
  299. #{item.inboundGroupId,jdbcType=DECIMAL},#{item.personnelWorkshopid,jdbcType=DECIMAL}, #{item.resultStatus,jdbcType=DECIMAL},
  300. #{item.batch,jdbcType=DECIMAL}, #{item.drivingId,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
  301. #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
  302. #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}
  303. from dual
  304. </foreach> )
  305. </insert>
  306. <update id="batchUpdate" parameterType="java.util.List">
  307. update WMSP_INBOUND_DISTRIBUTE
  308. set
  309. DISTRIBUTE_ID=
  310. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  311. when #{item.distributeId,jdbcType=DECIMAL} then #{item.distributeId,jdbcType=DECIMAL}
  312. </foreach>
  313. ,WMSP_INBOUND_DISTRIBUTE=
  314. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  315. when #{item.distributeId,jdbcType=DECIMAL} then #{item.inboundGroupId,jdbcType=DECIMAL}
  316. </foreach>
  317. ,INBOUND_GROUP_ID=
  318. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  319. when #{item.distributeId,jdbcType=DECIMAL} then #{item.inboundGroupId,jdbcType=DECIMAL}
  320. </foreach>
  321. ,PERSONNEL_WORKSHOPID=
  322. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  323. when #{item.distributeId,jdbcType=DECIMAL} then #{item.personnelWorkshopid,jdbcType=DECIMAL}
  324. </foreach>
  325. ,WMSP_INBOUND_DISTRIBUTE=
  326. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  327. when #{item.distributeId,jdbcType=DECIMAL} then #{item.inboundGroupId,jdbcType=DECIMAL}
  328. </foreach>
  329. ,RESULT_STATUS=
  330. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  331. when #{item.distributeId,jdbcType=DECIMAL} then #{item.resultStatus,jdbcType=DECIMAL}
  332. </foreach>
  333. ,BATCH=
  334. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  335. when #{item.distributeId,jdbcType=DECIMAL} then #{item.batch,jdbcType=DECIMAL}
  336. </foreach>
  337. ,DRIVING_ID=
  338. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  339. when #{item.distributeId,jdbcType=DECIMAL} then #{item.drivingId,jdbcType=DECIMAL}
  340. </foreach>
  341. ,INSERT_USERNAME=
  342. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  343. when #{item.distributeId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  344. </foreach>
  345. ,INSERT_TIME=
  346. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  347. when #{item.distributeId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  348. </foreach>
  349. ,UPDATE_USERNAME=
  350. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  351. when #{item.distributeId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  352. </foreach>
  353. ,UPDATE_TIME=
  354. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  355. when #{item.distributeId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  356. </foreach>
  357. ,INSERT_UPDATE_REMARK=
  358. <foreach collection="list" item="item" index="index" separator=" " open="case DISTRIBUTE_ID" close="end">
  359. when #{item.distributeId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  360. </foreach>
  361. where DISTRIBUTE_ID in
  362. <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
  363. #{item.distributeId,jdbcType=DECIMAL}
  364. </foreach>
  365. </update>
  366. <delete id="batchDelete" parameterType="java.util.List">
  367. delete from WMSP_INBOUND_DISTRIBUTE
  368. where DISTRIBUTE_ID in
  369. <foreach collection="list" item="id" open="(" close=")" separator=",">
  370. #{id}
  371. </foreach>
  372. </delete>
  373. <!-- 友情提示!!!-->
  374. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  375. <select id="getNewDistribute" resultType="java.util.Map">
  376. select distinct
  377. -- 批次ID
  378. wir.inbound_distribute_id "distributeId",
  379. -- 扫码数
  380. wir.result_number "resultNumber",
  381. -- 仓库名称
  382. rw.WAREHOUSE_NAME "warehouseName",
  383. -- 仓库主键
  384. rw.WAREHOUSE_ID "warehouseId",
  385. -- 月台ID
  386. rpg.PLATFORM_ID "platformId",
  387. -- 垛位ID
  388. rpg.STACKING_ID "stackingId",
  389. -- 垛位位置
  390. rs.STACKING_ARRIVAL "stackingArrival",
  391. -- 垛位编号
  392. rs.STACKING_NO "stackingNo",
  393. -- 层次号
  394. rpg.GRID_GRADATION_NUMBER "gridGradationNumber",
  395. -- 层序号
  396. rpg.GRID_SEQUENCE_NUMBER "gridSequenceNumber",
  397. -- 物资类型ID
  398. rm.MATERIAL_TYPE_ID "materialTypeId",
  399. -- 计量单位ID
  400. rm.UNIT_OF_MEASURE_ID "unitOfMeasureId",
  401. -- 物资编码
  402. rm.MATERIAL_CODE "materialCode",
  403. -- 物资名称
  404. rm.MATERIAL_NAME "materialName",
  405. -- 规格
  406. rm.MATERIAL_SPECIFICATION "materialSpecification",
  407. -- 型号
  408. rm.MATERIAL_MODEL "materialMode",
  409. -- 长度
  410. rm.MATERIAL_LENGTH "materialLength"
  411. -- 入库作业实绩表
  412. from WMSP_INBOUND_RESULT wir
  413. -- 仓储网格表
  414. left join RMS_PWAREHOUSE_GRID rpg
  415. on rpg.GRID_ID=wir.GRID_ID
  416. -- 仓库表
  417. left join RMS_WAREHOUSE rw
  418. on rpg.WAREHOUSE_ID=rw.WAREHOUSE_ID
  419. -- 垛位表
  420. left join RMS_STACKING rs
  421. on rs.STACKING_ID=rpg.STACKING_ID
  422. -- 物资钢材表
  423. left join rms_material_steel rms
  424. on rms.MATERIAL_STEEL_ID=wir.material_Id
  425. -- 物资表
  426. left join rms_material rm
  427. on rm.material_Id=rms.material_Id
  428. where wir.INBOUND_DISTRIBUTE_ID
  429. in(
  430. select * from(
  431. select DISTRIBUTE_ID
  432. from WMSP_INBOUND_DISTRIBUTE
  433. -- 入库状态为2
  434. where RESULT_STATUS=2 and PERSONNEL_WORKSHOPID=#{personnelWorkshopid} order by insert_time asc
  435. ) where rownum=1)
  436. </select>
  437. <select id="getDistributeStatus" resultType="java.lang.Integer">
  438. select RESULT_STATUS from WMSP_INBOUND_DISTRIBUTE where DISTRIBUTE_ID=#{distributeId}
  439. </select>
  440. <update id="grabDistribute">
  441. update WMSP_INBOUND_DISTRIBUTE set DRIVING_ID=#{drivingId} , RESULT_STATUS='3' where DISTRIBUTE_ID=#{distributeId}
  442. </update>
  443. <update id="updateDistributeStatus">
  444. update WMSP_INBOUND_DISTRIBUTE
  445. set RESULT_STATUS=2 where DISTRIBUTE_ID=#{distributeId}
  446. </update>
  447. </mapper>