Parcourir la source

-- 根据托盘号获取托盘信息

star il y a 1 an
Parent
commit
456da54adc

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

@@ -1,5 +1,6 @@
 package com.ruoyi.web.controller.warewms.pda;
 
+import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.ruoyi.ams.asn.domain.WmsDocAsnDetails;
@@ -805,6 +806,19 @@ public class PdaController {
         }
     }
 
+    /**
+     * 根据库位获取托盘信息
+     */
+    @PostMapping("/boxInfo/queryBoxInfo")
+    public AjaxResult queryBoxInfo(@RequestBody WmsBoxInfo wmsBoxInfo) {
+        wmsBoxInfo.setLocationId(Constant.LOC_SORTATION_CACHE);
+        WmsBoxInfo boxInfo = wmsBoxInfoService.selectWmsBoxInfoByModel(wmsBoxInfo);
+        if (ObjectUtil.isNull(boxInfo) || StringUtils.isBlank(boxInfo.getBoxNo())) {
+            return AjaxResult.error(wmsBoxInfo.getLocationId()+"库位不存在存在该托盘");
+        }
+        return AjaxResult.success(wmsBoxInfo.getLocationId()+"库位存在存在该托盘");
+    }
+
     /**
      * 按照托盘进行库存调整
      */

+ 10 - 0
warewms-ams/src/main/java/com/ruoyi/ams/order/service/impl/WmsDocOrderHeaderServiceImpl.java

@@ -1314,6 +1314,16 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
 
     @Override
     public AjaxResult groupDiskBHCheck(GroupDiskFrom groupDiskFrom) {
+
+        //根据托盘号和库位查询托盘信息
+        WmsBoxInfo queryBoxInfo = new WmsBoxInfo();
+        queryBoxInfo.setBoxNo(groupDiskFrom.getPalletNoTo());
+        queryBoxInfo.setLocationId(Constant.LOC_SORTATION_CACHE);
+        WmsBoxInfo boxInfo = wmsBoxInfoService.selectWmsBoxInfoByModel(queryBoxInfo);
+        if (ObjectUtil.isNull(boxInfo) || StringUtils.isBlank(boxInfo.getBoxNo())) {
+            return AjaxResult.error(queryBoxInfo.getLocationId()+"库位不存在存在该托盘");
+        }
+
         //通过ERP单号获取WMS的出库单号
         String orderNo = wmsDocOrderHeaderService.changeErpNoToOrderNo(groupDiskFrom.getOrderNo());
         if (StringUtils.isBlank(orderNo)) return AjaxResult.error("出库单号不存在!");