Browse Source

大屏库位信息加判空8.7

李卫 1 year ago
parent
commit
25a7ae7580

+ 8 - 2
warewms-ams/src/main/java/com/ruoyi/ams/inv/service/impl/InvLotLocIdServiceImpl.java

@@ -1,5 +1,7 @@
 package com.ruoyi.ams.inv.service.impl;
 
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.ruoyi.ams.box.domain.WmsBoxInfo;
 import com.ruoyi.ams.box.service.IWmsBoxInfoService;
@@ -129,9 +131,13 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
     @Override
     public List<InvLotLocIdLotattLargeScreenVO> selectInvLocIdLotattLargeScreenList(InvLocIdSearchFrom invLocIdSearchFrom) {
 
-        List<InvLotLocIdLotattLargeScreenVO> invLotLocIdLotattLargeScreenVOS = invLotLocIdMapper.selectInvLocIdLotattList(invLocIdSearchFrom)
+        List<InvLotLocIdLotattVO> invLotLocIdLotattVOS = invLotLocIdMapper.selectInvLocIdLotattList(invLocIdSearchFrom);
+        if(CollectionUtil.isNotEmpty(invLotLocIdLotattVOS)){
+            return new ArrayList<>();
+        }
+        List<InvLotLocIdLotattLargeScreenVO> invLotLocIdLotattLargeScreenVOS = invLotLocIdLotattVOS
                 .stream()
-                .filter(item -> StringUtils.isNotBlank(item.getZoneName()))
+                .filter(item -> StringUtils.isNotBlank(item.getZoneName()) && ObjectUtil.isNotNull(item.getQty()))
                 .collect(Collectors.groupingBy(InvLotLocIdLotattVO::getZoneName))
                 .entrySet()
                 .stream()