From 95c92db3c831c73b05068b09221c13ad4a250322 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期一, 02 二月 2026 20:07:00 +0800
Subject: [PATCH] 条码扫描成功音频播放功能,代码优化
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 41 +++++++++++------------------------------
1 files changed, 11 insertions(+), 30 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index 87f4d36..79d9d7f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -88,33 +88,6 @@
_unitOfWorkManage.CommitTran();
- //TaskModel esstask = new TaskModel()
- //{
- // taskType = "carry",
- // taskGroupCode = "",
- // groupPriority = 0,
- // tasks = new List<TasksType>
- // {
- // new()
- // {
- // taskCode=task.TaskNum.ToString(),
- // taskPriority=0,
- // taskDescribe=new TaskDescribeType
- // {
- // containerCode=stockInfo.PalletCode,
- // containerType= "CT_KUBOT_STANDARD",
- // fromLocationCode=stockInfo.LocationCode??"",
- // toStationCode="",
- // toLocationCode="1-2",
- // deadline=0,
- // storageTag=""
- // }
- // }
- // }
- //};
- //var result = await _eSSApiService.CreateTaskAsync(esstask);
-
- //_logger.LogInformation("鍒涘缓浠诲姟PalletOutboundTask 杩斿洖: " + result);
}
return content.OK("绌烘墭鍑哄簱鎴愬姛!");
}
@@ -830,7 +803,7 @@
}
-
+
#region 鍒嗘壒鍒嗛厤搴撳瓨
#region 鍐呭瓨閿佺鐞嗗櫒
private static readonly ConcurrentDictionary<string, SemaphoreSlim> _materialLocks =
@@ -1117,6 +1090,14 @@
WebResponseContent content = new WebResponseContent();
try
{
+ var allFactoryAreas = stockViews.SelectMany(sv => sv.Details)
+ .Select(x => x.FactoryArea)
+ .GroupBy(x => x)
+ .ToList();
+ if (allFactoryAreas.Count >= 2)
+ {
+ return content.Error($"璇烽�夋嫨鍚屼竴鍘傚尯鍖哄煙鐨勫簱瀛樿繘琛岀洏鐐癸紝褰撳墠娑夊強{allFactoryAreas.Count}涓笉鍚岀殑鍘傚尯");
+ }
List<int> ids = stockViews.Select(x => x.StockId).ToList();
//鑾峰彇搴撳瓨
List<Dt_StockInfo> stockInfos = _stockRepository.Db.Queryable<Dt_StockInfo>().Where(x => ids.Contains(x.Id)).Includes(x => x.Details).ToList();
@@ -1149,9 +1130,9 @@
return content.Error($"鏈壘鍒皗item.PalletCode}搴撳瓨鏄庣粏鏁版嵁");
}
Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.LocationCode == item.LocationCode);
- if (locationInfo == null && (locationInfo.EnableStatus == EnableStatusEnum.Disable.ObjToInt() || locationInfo.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) && locationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && item.StockStatus != StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt())
+ if (locationInfo == null || (locationInfo.EnableStatus == EnableStatusEnum.Disable.ObjToInt() || locationInfo.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) || locationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt() || item.StockStatus != StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt())
{
- content.Error($"{item.PalletCode}璐т綅鎴栧簱瀛樼姸鎬佷笉婊¤冻鍑哄簱鏉′欢");
+ return content.Error($"{item.PalletCode}璐т綅鎴栧簱瀛樼姸鎬佷笉婊¤冻鍑哄簱鏉′欢");
}
}
List<Dt_Task> tasks = GetTasks(stockInfos, TaskTypeEnum.OutInventory,outStation);
--
Gitblit v1.9.3