From 3460ffdc967b65ea67c959212c2505a19008401e Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期四, 16 四月 2026 13:39:56 +0800
Subject: [PATCH] 盘点优化,智仓调智仓防呆
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 58 ++++++++++++----------------------------------------------
1 files changed, 12 insertions(+), 46 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_Inbound.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_Inbound.cs"
index d521c7f..c025179 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_Inbound.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_Inbound.cs"
@@ -54,7 +54,7 @@
return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�");
}
- if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎷i�夊畬鎴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�.ObjToInt())
+ if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎷i�夊畬鎴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.閫佹搴撳瓨瀹屾垚.ObjToInt())
{
return WebResponseContent.Instance.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘,涓嶅彲鐢宠鍏ュ簱");
}
@@ -85,7 +85,7 @@
OrderNo= stockInfo.Details.FirstOrDefault()?.OrderNo,
};
//绌虹
- if (stockInfo.PalletType == PalletTypeEnum.Empty.ObjToInt()|| stockInfo.StockStatus == StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�.ObjToInt())
+ if (stockInfo.PalletType == PalletTypeEnum.Empty.ObjToInt()|| stockInfo.StockStatus == StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�.ObjToInt() || stockInfo.StockStatus == StockStatusEmun.閫佹搴撳瓨瀹屾垚.ObjToInt())
{
_unitOfWorkManage.BeginTran();
newTask.TaskType = TaskTypeEnum.InEmpty.ObjToInt();
@@ -93,6 +93,10 @@
if (stockInfo.StockStatus == StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�.ObjToInt())
{
newTask.TaskType = TaskTypeEnum.AllocateInWarehouse.ObjToInt();
+ }
+ if (stockInfo.StockStatus == StockStatusEmun.閫佹搴撳瓨瀹屾垚.ObjToInt())
+ {
+ newTask.TaskType = TaskTypeEnum.InQuality.ObjToInt();
}
int taskId = BaseDal.AddData(newTask);
newTask.TaskId = taskId;
@@ -129,52 +133,14 @@
_stockRepository.UpdateData(stockInfo);
_unitOfWorkManage.CommitTran();
}
- //TaskModel esstask = new TaskModel()
- //{
- // taskType = "putaway",
- // taskGroupCode = "",
- // groupPriority = 0,
- // tasks = new List<TasksType>
- // {
- // new()
- // {
- // taskCode=newTask.TaskNum.ToString(),
- // taskPriority=0,
- // taskDescribe=new TaskDescribeType{
- // containerCode=palletCode,
- // containerType= "CT_KUBOT_STANDARD",
- // fromLocationCode=stations.GetValueOrDefault(stationCode)??"",
- // toStationCode="",
- // toLocationCode=locationInfo.LocationCode,
- // deadline=0,storageTag=""
- // }
- // }
- // }
- //};
-
- //var result = await _eSSApiService.CreateTaskAsync(esstask);
-
- //_logger.LogInformation("鍒涘缓浠诲姟杩斿洖: " + result);
- //if (result)
+ await _eSSApiService.MoveContainerAsync(new WIDESEA_DTO.Basic.MoveContainerRequest
{
- try
- {
- await _eSSApiService.MoveContainerAsync(new WIDESEA_DTO.Basic.MoveContainerRequest
- {
- slotCode = stationCode,
- containerCode = palletCode
- });
- }
- catch (Exception ex) {
-
+ slotCode = stationCode,
+ containerCode = palletCode
+ });
- }
- return WebResponseContent.Instance.OK();
- }
- //else
- //{
- // return WebResponseContent.Instance.Error("涓嬪彂鏈哄櫒浜轰换鍔″け璐ワ紒");
- //}
+ return WebResponseContent.Instance.OK();
+
}
catch (Exception ex)
{
--
Gitblit v1.9.3