From 0bc021a1c7515af5a0f102776488f0457d418d27 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 30 十二月 2024 11:46:05 +0800
Subject: [PATCH] 获取最新代码
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index f1a3944..a872ab6 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -34,7 +34,7 @@
return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡鐢熸垚浠诲姟");
}
- if (Repository.QueryFirst(x => x.SourceAddress == stationCode && x.TaskStatus == TaskInStatusEnum.InNew.ObjToInt()) != null)
+ if (Repository.QueryFirst(x => x.SourceAddress == stationCode && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null)
{
return WebResponseContent.Instance.Error($"璇ョ珯鐐瑰凡鏈夋湭鎵ц鐨勪换鍔�");
}
@@ -52,6 +52,10 @@
{
return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡缁戝畾璐т綅");
}
+ if(warehouseId != stockInfo.WarehouseId)
+ {
+ return WebResponseContent.Instance.Error($"浠撳簱涓嶆纭�");
+ }
Dt_Task newTask = new Dt_Task()
{
@@ -62,8 +66,10 @@
Roadway = "",
SourceAddress = stationCode,
TargetAddress = "",
- TaskType = TaskInboundTypeEnum.Inbound.ObjToInt(),
- TaskStatus = TaskInStatusEnum.InNew.ObjToInt(),
+ TaskType = TaskTypeEnum.Inbound.ObjToInt(),
+ TaskStatus = TaskStatusEnum.New.ObjToInt(),
+ WarehouseId = stockInfo.WarehouseId,
+ PalletType = stockInfo.PalletType
};
stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
@@ -73,7 +79,7 @@
newTask.TaskId = taskId;
_stockRepository.StockInfoRepository.UpdateData(stockInfo);
_unitOfWorkManage.CommitTran();
-
+ PushTasksToWCS(new List<Dt_Task> { newTask });
return WebResponseContent.Instance.OK(data: newTask);
}
catch (Exception ex)
@@ -99,6 +105,11 @@
return WebResponseContent.Instance.Error($"鏈壘鍒拌鍏ュ簱浠诲姟");
}
+ if(_basicRepository.LocationInfoRepository.QueryFirst(x=>x.LocationCode == task.TargetAddress) != null)
+ {
+ return WebResponseContent.Instance.OK(data: task.TargetAddress);
+ }
+
Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(roadwayNo, (PalletTypeEnum)task.PalletType, task.WarehouseId);
if (locationInfo == null)
{
@@ -107,7 +118,7 @@
task.Roadway = roadwayNo;
task.TargetAddress = locationInfo.LocationCode;
- task.TaskStatus = TaskInStatusEnum.SC_InExecute.ObjToInt();
+ task.TaskStatus = TaskStatusEnum.SC_Execute.ObjToInt();
LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus;
--
Gitblit v1.9.3