Browse Source

库位逻辑推荐

ChenYang 1 year ago
parent
commit
2cf1e59bfd

+ 2 - 2
warewms-ams/src/main/java/com/ruoyi/ams/xuankuang/service/AgvCallProxyService.java

@@ -240,8 +240,8 @@ public class AgvCallProxyService {
         //1.生成一个wcs任务
         String locationInfoId = String.valueOf(baseLocationInfo.getId());
         addWcsOutTask(taskNo, locationInfoId, bucketCacheLocationId, orderNo, 10L, "桶装料出库任务", Constant.TaskType.RGV.getDesc());
-        //修改出库出库存的traceId
-        invLotLocIdService.operateTraceIdByLocationId(bucketCacheLocationId, taskNo);
+        //修改出库出库存的traceId TODO
+        invLotLocIdService.operateTraceIdByLocationId(locationInfoId, taskNo);
         //4.组装wcs任务请求参数并同步当前的wcs任务
         OutTaskForm outTaskForm = assemblyOutTaskForm(taskNo, orderNo, baseSku.getSkuType(), materialType, quantity, baseLocationInfo);
         return wmsToWcsApiService.wmsOutTask(outTaskForm);

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/xuankuang/service/WmsDocOrderSubService.java

@@ -377,7 +377,7 @@ public class WmsDocOrderSubService {
         List<Long> invIdList = currentRowInvList.stream().map(item -> Long.parseLong(item.getLocationId())).collect(Collectors.toList());
 
         return CompareUtil.compare(currentRowInvCount, quantity) < 0
-                || (CompareUtil.compare(currentRowInvCount, quantity) > 0 && CompareUtil.compare(exceptCurrentLnvCount, quantity) < 0)
+                || (CompareUtil.compare(currentRowInvCount, quantity) >= 0 && CompareUtil.compare(exceptCurrentLnvCount, quantity) < 0)
                 ? subList.stream().filter(item -> CollectionUtil.contains(invIdList, item)).collect(Collectors.toList())
                 : Lists.newArrayList();
     }