k 2 роки тому
батько
коміт
8004f1484d

+ 14 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/pda/PdaController.java

@@ -38,6 +38,7 @@ import com.ruoyi.ams.order.service.IActAllocationDetailsService;
 import com.ruoyi.ams.order.service.IWmsDocOrderHeaderService;
 import com.ruoyi.ams.order.vo.CheckOutVO;
 import com.ruoyi.ams.order.vo.PickingListVO;
+import com.ruoyi.base.constant.Constant;
 import com.ruoyi.base.domain.vo.CodeSkuRelationshipVO;
 import com.ruoyi.base.form.SnCheckForm;
 import com.ruoyi.base.service.ICodeSkuRelationshipService;
@@ -225,7 +226,7 @@ public class PdaController {
     }
 
     /**
-     * 解绑物料
+     * 入库解绑物料
      * PDA先执行-查询备货绑定
      * @param unlockForm
      * @return
@@ -379,6 +380,18 @@ public class PdaController {
         return AjaxResult.success(pickingListVOS);
     }
 
+    /**
+     * 出库货位解绑
+     * 出库完成后,人工拉走出库位货物,扫描库位码,清除库存解绑托盘
+     *
+     * @param locationId
+     * @return
+     */
+    @PostMapping("/docOrder/locationUntie")
+    public AjaxResult locationUntie(String locationId) {
+        return invLotLocIdService.clear(locationId, Constant.WAREHOUSE_ID, "PDA");
+    }
+
     /*************************************************出库-END****************************************************/
 
     /**

+ 8 - 0
warewms-ams/src/main/java/com/ruoyi/ams/box/mapper/WmsBoxInfoMapper.java

@@ -44,6 +44,14 @@ public interface WmsBoxInfoMapper
      */
      int updateWmsBoxInfo(WmsBoxInfo wmsBoxInfo);
 
+    /**
+     * 修改容器管理绑定库位为空
+     *
+     * @param wmsBoxInfo
+     * @return
+     */
+     int updateWmsBoxInfoIsNull(WmsBoxInfo wmsBoxInfo);
+
     /**
      * 删除容器管理
      *

+ 8 - 0
warewms-ams/src/main/java/com/ruoyi/ams/box/service/IWmsBoxInfoService.java

@@ -61,6 +61,14 @@ public interface IWmsBoxInfoService {
      */
     int updateWmsBoxInfo(WmsBoxInfo wmsBoxInfo);
 
+    /**
+     * 修改容器管理绑定库位为空
+     *
+     * @param wmsBoxInfo
+     * @return
+     */
+    int updateWmsBoxInfoIsNull(WmsBoxInfo wmsBoxInfo);
+
     /**
      * 批量删除容器管理
      *

+ 12 - 0
warewms-ams/src/main/java/com/ruoyi/ams/box/service/impl/WmsBoxInfoServiceImpl.java

@@ -102,6 +102,18 @@ public class WmsBoxInfoServiceImpl implements IWmsBoxInfoService {
         return wmsBoxInfoMapper.updateWmsBoxInfo(wmsBoxInfo);
     }
 
+    /**
+     * 修改容器管理绑定库位为空
+     *
+     * @param wmsBoxInfo 容器管理
+     * @return 结果
+     */
+    @Override
+    public int updateWmsBoxInfoIsNull(WmsBoxInfo wmsBoxInfo) {
+        wmsBoxInfo.setUpdateTime(DateUtils.getNowDate());
+        return wmsBoxInfoMapper.updateWmsBoxInfoIsNull(wmsBoxInfo);
+    }
+
     /**
      * 批量删除容器管理
      *

+ 1 - 3
warewms-ams/src/main/java/com/ruoyi/ams/inv/service/impl/InvLotLocIdServiceImpl.java

@@ -345,12 +345,10 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
         baseLocationInfoService.updateLocationIdleAndEmpty(id, warehouseId, updateBy);
         //修改托盘绑定
         WmsBoxInfo wmsBoxInfo = iWmsBoxInfoService.selectByLocationId(locationId);
-        wmsBoxInfo.setLocationId(null);
         wmsBoxInfo.setIsFull("N");
         wmsBoxInfo.setIsEmpty("Y");
         wmsBoxInfo.setUpdateBy(updateBy);
-        wmsBoxInfo.setUpdateTime(new Date());
-        iWmsBoxInfoService.updateWmsBoxInfo(wmsBoxInfo);
+        iWmsBoxInfoService.updateWmsBoxInfoIsNull(wmsBoxInfo);
         return AjaxResult.success("操作成功!");
     }
 

+ 19 - 0
warewms-ams/src/main/resources/mapper/box/WmsBoxInfoMapper.xml

@@ -91,6 +91,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </trim>
         where id = #{id}
     </update>
+    <update id="updateWmsBoxInfoIsNull" parameterType="WmsBoxInfo">
+        update wms_box_info
+        <trim prefix="SET" suffixOverrides=",">
+            location_id = null,
+            <if test="boxNo != null">box_no = #{boxNo},</if>
+            <if test="boxType != null">box_type = #{boxType},</if>
+            <if test="boxRemark != null">box_remark = #{boxRemark},</if>
+            <if test="boxState != null">box_state = #{boxState},</if>
+            <if test="isEmpty != null">is_empty = #{isEmpty},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="userdefine1 != null">userdefine1 = #{userdefine1},</if>
+            <if test="userdefine2 != null">userdefine2 = #{userdefine2},</if>
+            <if test="isFull != null">is_full = #{isFull},</if>
+        </trim>
+        where id = #{id}
+    </update>
 
     <delete id="deleteWmsBoxInfoById" parameterType="Long">
         delete from wms_box_info where id = #{id}