Преглед на файлове

出库bom为空时跳过

24282 преди 1 година
родител
ревизия
9dc4e831a5
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      sd-business/src/main/java/com/sd/business/service/inventory/impl/InventoryServiceImpl.java

+ 4 - 0
sd-business/src/main/java/com/sd/business/service/inventory/impl/InventoryServiceImpl.java

@@ -89,6 +89,10 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
 
     @Override
     public void in(Long departmentId, Long warehouseId, List<? extends InOutFun> list) {
+        if (list.isEmpty()) {
+            return;
+        }
+
         List<Long> bomSpecIdList = list.stream().map(InOutFun::getBomSpecId).collect(Collectors.toList());
 
         synchronized (this) {