diff --git a/src/main/java/com/huaheng/pc/config/location/controller/LocationController.java b/src/main/java/com/huaheng/pc/config/location/controller/LocationController.java
index 44e7db7..e304a59 100644
--- a/src/main/java/com/huaheng/pc/config/location/controller/LocationController.java
+++ b/src/main/java/com/huaheng/pc/config/location/controller/LocationController.java
@@ -38,6 +38,7 @@ import javax.annotation.Resource;
 import javax.sql.DataSource;
 import java.math.BigDecimal;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -86,6 +87,10 @@ public class LocationController extends BaseController {
     PageDomain pageDomain = TableSupport.buildPageRequest();
     Integer pageNum = pageDomain.getPageNum();
     Integer pageSize = pageDomain.getPageSize();
+    String zone=location.getZoneCode();
+    if(StringUtils.isEmpty(zone)&&ShiroUtils.getUser()!=null&& Arrays.asList(QuantityConstant.USERID_AGV).contains(ShiroUtils.getUserId().toString())) {
+      zone="B";
+    }
     lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), Location::getCreated, createdBegin)
             .lt(StringUtils.isNotEmpty(createdEnd), Location::getCreated, createdEnd)
             .eq(Location::getWarehouseCode, ShiroUtils.getWarehouseCode())
@@ -93,7 +98,7 @@ public class LocationController extends BaseController {
             .eq(StringUtils.isNotEmpty(location.getName()), Location::getName, location.getName())
             .eq(StringUtils.isNotEmpty(location.getContainerCode()), Location::getContainerCode, location.getContainerCode())
             .eq(StringUtils.isNotNull(location.getSystemCreated()), Location::getStatus, location.getStatus())
-            .eq(StringUtils.isNotEmpty(location.getZoneCode()), Location::getZoneCode, location.getZoneCode())
+            .eq(StringUtils.isNotEmpty(zone), Location::getZoneCode, zone)
             .eq(StringUtils.isNotNull(location.getIRow()), Location::getIRow, location.getIRow())
             .eq(StringUtils.isNotNull(location.getIColumn()), Location::getIColumn, location.getIColumn())
             .eq(StringUtils.isNotNull(location.getIGrid()), Location::getIGrid, location.getIGrid())
diff --git a/src/main/java/com/huaheng/pc/config/zone/controller/ZoneController.java b/src/main/java/com/huaheng/pc/config/zone/controller/ZoneController.java
index 77bf79a..62970eb 100644
--- a/src/main/java/com/huaheng/pc/config/zone/controller/ZoneController.java
+++ b/src/main/java/com/huaheng/pc/config/zone/controller/ZoneController.java
@@ -29,10 +29,7 @@ import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
diff --git a/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/controller/InventoryMaterialSummaryController.java b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/controller/InventoryMaterialSummaryController.java
index 032cea8..a73c107 100644
--- a/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/controller/InventoryMaterialSummaryController.java
+++ b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/controller/InventoryMaterialSummaryController.java
@@ -2,6 +2,7 @@ package com.huaheng.pc.inventory.InventoryMaterialSummary.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.huaheng.common.constant.QuantityConstant;
 import com.huaheng.common.utils.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.huaheng.common.utils.StringUtils;
@@ -25,6 +26,7 @@ import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
@@ -69,7 +71,10 @@ public class InventoryMaterialSummaryController extends BaseController {
     public List<InventoryMaterialSummary> list(InventoryMaterialSummary inventoryMaterialSummary, String createdBegin, String createdEnd) {
 
         LambdaQueryWrapper<InventoryMaterialSummary> lambdaQueryWrapper = Wrappers.lambdaQuery();
-
+        String zone=inventoryMaterialSummary.getZoneCode();
+        if(StringUtils.isEmpty(zone)&&ShiroUtils.getUser()!=null&& Arrays.asList(QuantityConstant.USERID_AGV).contains(ShiroUtils.getUserId().toString())) {
+            zone="B";
+        }
         lambdaQueryWrapper.ge(
                 StringUtils.isNotEmpty(createdBegin), InventoryMaterialSummary::getCreated, createdBegin)
                 .le(StringUtils.isNotEmpty(createdEnd), InventoryMaterialSummary::getCreated, createdEnd)//创建时间范围
@@ -79,7 +84,7 @@ public class InventoryMaterialSummaryController extends BaseController {
                 .eq(StringUtils.isNotEmpty(inventoryMaterialSummary.getMaterialCode()), InventoryMaterialSummary::getMaterialCode, inventoryMaterialSummary.getMaterialCode())
                 //物料名称
                 .eq(StringUtils.isNotEmpty(inventoryMaterialSummary.getMaterialName()), InventoryMaterialSummary::getMaterialName, inventoryMaterialSummary.getMaterialName())
-                .eq(StringUtils.isNotEmpty(inventoryMaterialSummary.getZoneCode()), InventoryMaterialSummary::getZoneCode, inventoryMaterialSummary.getZoneCode())
+                .eq(StringUtils.isNotEmpty(zone), InventoryMaterialSummary::getZoneCode, zone)
                 //货主
                 .in(StringUtils.isEmpty(inventoryMaterialSummary.getCompanyCode()),InventoryMaterialSummary::getCompanyCode, ShiroUtils.getCompanyCodeList())
                 .eq(!StringUtils.isEmpty(inventoryMaterialSummary.getCompanyCode()),InventoryMaterialSummary::getCompanyCode,inventoryMaterialSummary.getCompanyCode());
diff --git a/src/main/java/com/huaheng/pc/inventory/inventoryHeader/controller/InventoryHeaderController.java b/src/main/java/com/huaheng/pc/inventory/inventoryHeader/controller/InventoryHeaderController.java
index 51d7e76..35abb1c 100644
--- a/src/main/java/com/huaheng/pc/inventory/inventoryHeader/controller/InventoryHeaderController.java
+++ b/src/main/java/com/huaheng/pc/inventory/inventoryHeader/controller/InventoryHeaderController.java
@@ -3,6 +3,7 @@ package com.huaheng.pc.inventory.inventoryHeader.controller;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.huaheng.common.constant.QuantityConstant;
 import com.huaheng.common.exception.service.ServiceException;
 import com.huaheng.common.support.Convert;
 import com.huaheng.common.utils.StringUtils;
@@ -73,10 +74,14 @@ public class InventoryHeaderController extends BaseController
         Integer pageNum = pageDomain.getPageNum();
         Integer pageSize = pageDomain.getPageSize();
 
+        String zone=inventoryHeader.getZoneCode();
+        if(StringUtils.isEmpty(zone)&&ShiroUtils.getUser()!=null&& Arrays.asList(QuantityConstant.USERID_AGV).contains(ShiroUtils.getUserId().toString())) {
+            zone="B";
+        }
         lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),InventoryHeader::getCreated, createdBegin)
                 .le(StringUtils.isNotEmpty(createdEnd), InventoryHeader::getCreated, createdEnd)//创建时间范围
                 //.eq(InventoryHeader::getWarehouseCode,ShiroUtils.getWarehouseCode())//仓库
-                .eq(StringUtils.isNotEmpty(inventoryHeader.getZoneCode()), InventoryHeader::getZoneCode, inventoryHeader.getZoneCode()) //库位
+                .eq(StringUtils.isNotEmpty(zone), InventoryHeader::getZoneCode, zone) //库区
                 .likeRight(StringUtils.isNotEmpty(inventoryHeader.getLocationCode()),InventoryHeader::getLocationCode,inventoryHeader.getLocationCode()) //库位
                 .eq(StringUtils.isNotEmpty(inventoryHeader.getContainerCode()),InventoryHeader::getContainerCode,inventoryHeader.getContainerCode())//容器
                 .eq(StringUtils.isNotEmpty(inventoryHeader.getCreatedBy()),InventoryHeader::getCreatedBy,inventoryHeader.getCreatedBy())//创建用户
diff --git a/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java b/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
index 5ae1806..059a9cd 100644
--- a/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
+++ b/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
@@ -35,6 +35,8 @@ import com.huaheng.pc.config.receiptPreference.domain.ReceiptPreference;
 import com.huaheng.pc.config.receiptPreference.mapper.ReceiptPreferenceMapper;
 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail;
 import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService;
+import com.huaheng.pc.inventory.inventoryHeader.domain.InventoryHeader;
+import com.huaheng.pc.inventory.inventoryHeader.service.InventoryHeaderService;
 import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail;
 import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService;
 import com.huaheng.pc.receipt.receiptContainerHeader.domain.BatteryBean;
@@ -95,6 +97,9 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai
     @Resource
     private WarecellAllocationService warecellAllocationService;
 
+    @Resource
+    private InventoryHeaderService inventoryHeaderService;
+
     /**
      * 保存入库组盘
      * @param receiptCode 入库单编码
@@ -214,12 +219,20 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai
         }
         //3楼agv限制补充入库
         //生成AGV任务
-        if(ShiroUtils.getUser()!=null&&
-                Arrays.asList(QuantityConstant.USERID_AGV).contains(ShiroUtils.getUserId().toString())) {
+        if(ShiroUtils.getUser()!=null&& Arrays.asList(QuantityConstant.USERID_AGV).contains(ShiroUtils.getUserId().toString())) {
             boolean tag=inventoryDetailService.checkInventoryByContainerCode(containerCode);
             if(tag){
 //                throw new ServiceException("该托盘已经有库存,限制补充入库");
             }
+        }else {
+            //判断是否已经在三楼了,避免补充入库
+            List<InventoryHeader> list = inventoryHeaderService.list(new LambdaQueryWrapper<InventoryHeader>().eq(InventoryHeader::getContainerCode, containerCode));
+            if (!list.isEmpty()) {
+                InventoryHeader inventoryHeader = list.get(0);
+                if (inventoryHeader.getLocationCode().startsWith("B")) {
+                    throw new ServiceException("这个托盘已经在三楼使用了!");
+                }
+            }
         }
         /* 新建保存组盘头表记录*/
         //根据容器编码查询组盘表头记录
diff --git a/src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java b/src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java
index a41c9e0..0324cc3 100644
--- a/src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java
+++ b/src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java
@@ -128,16 +128,19 @@ public class TaskHeaderController extends BaseController {
     @PostMapping("/list")
     @ResponseBody
     public TableDataInfo list(TaskHeader taskHeader, @ApiParam(name = "InternalTaskType", value = "类型") Integer InternalTaskType,
-                              @ApiParam(name = "createdBegin", value = "类型") String createdBegin, @ApiParam(name = "createdEnd", value = "类型") String createdEnd
-    ,Integer taskHeaderStatus) {
+                              @ApiParam(name = "createdBegin", value = "类型") String createdBegin, @ApiParam(name = "createdEnd", value = "类型") String createdEnd,Integer taskHeaderStatus) {
         LambdaQueryWrapper<TaskHeader> lambdaQueryWrapper = Wrappers.lambdaQuery();
-        lambdaQueryWrapper.eq(TaskHeader::getWarehouseCode, ShiroUtils.getWarehouseCode())
+        String zone=taskHeader.getZoneCode();
+        if(StringUtils.isEmpty(zone)&&ShiroUtils.getUser()!=null&& Arrays.asList(QuantityConstant.USERID_AGV).contains(ShiroUtils.getUserId().toString())) {
+            zone="B";
+        }
+            lambdaQueryWrapper.eq(TaskHeader::getWarehouseCode, ShiroUtils.getWarehouseCode())
                 .eq(StringUtils.isNotNull(InternalTaskType), TaskHeader::getInternalTaskType, InternalTaskType)
                 .eq(StringUtils.isNotNull(taskHeader.getId()), TaskHeader::getId, taskHeader.getId())
                 .eq(StringUtils.isNotEmpty(taskHeader.getContainerCode()), TaskHeader::getContainerCode, taskHeader.getContainerCode())
                 .eq(StringUtils.isNotEmpty(taskHeader.getToLocation()), TaskHeader::getToLocation, taskHeader.getToLocation())
                 .eq(StringUtils.isNotEmpty(taskHeader.getFromLocation()), TaskHeader::getFromLocation, taskHeader.getFromLocation())
-                .eq(StringUtils.isNotEmpty(taskHeader.getZoneCode()), TaskHeader::getZoneCode, taskHeader.getZoneCode())
+                .eq(StringUtils.isNotEmpty(zone), TaskHeader::getZoneCode,zone)
                 .eq(StringUtils.isNotNull(taskHeader.getPriority()), TaskHeader::getPriority, taskHeader.getPriority())
                 .eq(StringUtils.isNotNull(taskHeader.getPush()), TaskHeader::getPush, taskHeader.getPush())
                 .eq(StringUtils.isNotNull(taskHeader.getStatus()), TaskHeader::getStatus, taskHeader.getStatus())