Browse Source

添加并发控制的平库申请货位方法

在 `FjController.cs` 文件中,添加了一个名为 `lockFindAvailableFlatStorageSlot` 的静态对象锁。
在 `FjController.cs` 文件中,添加了一个新的方法 `FindAvailableFlatStorageSlot`,用于平库申请货位。该方法使用 `lockFindAvailableFlatStorageSlot` 进行并发控制。
在 `IFJService.cs` 文件中,添加了 `FindAvailableFlatStorageSlot` 方法的声明。
在 `FJService.cs` 文件中,删除了一行多余的字符 `d`。
林豪 左 1 year ago
parent
commit
0547e343b8

+ 11 - 0
wms.api/Controllers/FjController.cs

@@ -60,6 +60,7 @@ namespace wms.api.Controllers
         private static object lockerlockerStockChange = new object();
         private static object lockerWetFormulaInfo = new object();
         private static object lockerManualBuildEmptyStock = new object();
+        private static object lockFindAvailableFlatStorageSlot=new object();
 
         /// <summary>
         ///  人工组盘传输接口
@@ -831,6 +832,16 @@ namespace wms.api.Controllers
             return ConcurrencyReqControl<FJApplyStockInLocRequest, SRes<FJApplyStockInLocResponse>>(lockApplyStockInLoc, "ApplyStockInLoc" + reqDto.PickUpEquipmentNo, reqDto.PickUpEquipmentNo, reqDto, _fjService.ApplyStockInLoc);
         }
 
+        /// <summary>
+        ///  平库申请货位
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        public SRes<FJApplyStockInLocResponse> FindAvailableFlatStorageSlot(FJApplyStockInLocRequest reqDto)
+        {
+            return ConcurrencyReqControl<FJApplyStockInLocRequest, SRes<FJApplyStockInLocResponse>>(lockFindAvailableFlatStorageSlot, "FindAvailableFlatStorageSlot" + reqDto.PickUpEquipmentNo, reqDto.PickUpEquipmentNo, reqDto, _fjService.FindAvailableFlatStorageSlot);
+        }
+
         /// <summary>
         ///   空托出库任务
         /// </summary>

+ 7 - 0
wms.service/IService/IFJService.cs

@@ -198,6 +198,13 @@ namespace wms.service.IService
         /// <returns></returns>
         public SRes<FJApplyStockInLocResponse> ApplyStockInLoc(FJApplyStockInLocRequest reqDto);
 
+        /// <summary>
+        ///  平库申请货位
+        /// </summary>
+        /// <param name="reqEntity"></param>
+        /// <returns></returns>
+        public SRes<FJApplyStockInLocResponse> FindAvailableFlatStorageSlot(FJApplyStockInLocRequest reqEntity);
+
         /// <summary>
         ///  手动出库
         /// </summary>

+ 1 - 1
wms.service/Service/FJService.cs

@@ -66,7 +66,7 @@ namespace wms.service.Service
         ///  容器表
         /// </summary>
         private Repository<BaseContinfo> _baseContinfo => new Repository<BaseContinfo>();
-        d
+        
         /// <summary>
         ///  环形库码垛缓存信息
         /// </summary>