From 29cd467ba62b2bdf49c6546e78ae3ec809c4a723 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 19 六月 2025 17:50:28 +0800
Subject: [PATCH] 1
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs | 33 ++++++++++++++++++++++++---------
1 files changed, 24 insertions(+), 9 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs"
index dfb74fb..36c9f5a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs"
@@ -17,7 +17,14 @@
{
public partial class TaskService
{
+ /// <summary>
+ /// WCS IP鍦板潃
+ /// </summary>
public string url = AppSettings.Configuration["WCS"];
+ /// <summary>
+ /// AGV IP鍦板潃
+ /// </summary>
+ public string AGVurl = AppSettings.Configuration["AGV"];
/// <summary>
/// PDA鐢宠鍏ュ簱--鍫嗗灈鏈虹珛搴撳叆搴�
/// </summary>
@@ -105,7 +112,7 @@
try
{
_unitOfWorkManage.BeginTran();
- Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(stationCode, taskType);
+ Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(ref stationCode, taskType);
if (locationInfo != null)
{
List<Dt_Task> tasks = new List<Dt_Task>();
@@ -120,7 +127,7 @@
TargetAddress = locationInfo.LocationCode,
TaskStatus = InTaskStatusEnum.InNew.ObjToInt(),
TaskType = taskType,
- Depth= locationInfo.Depth,
+ Depth = locationInfo.Depth,
};
BaseDal.AddData(task);
int beforeStatus = locationInfo.LocationStatus;
@@ -138,11 +145,16 @@
orderNo = stockInfo.Details.FirstOrDefault()?.OrderNo ?? "";
stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
+ stockInfo.Details.ForEach(x =>
+ {
+ x.Status = StockStatusEmun.鍏ュ簱纭.ObjToInt();
+ });
_stockService.StockInfoService.Repository.UpdateData(stockInfo);
+ _stockService.StockInfoDetailService.Repository.UpdateData(stockInfo.Details);
}
else
{
- return content = WebResponseContent.Instance.Error("鏈壘鍒板簱瀛樹俊鎭�");
+ return content.Error("鏈壘鍒板簱瀛樹俊鎭�");
}
}
else
@@ -155,7 +167,7 @@
task.Grade = 1;
}
_basicService.LocationInfoService.Repository.UpdateData(locationInfo);
-
+
tasks.Add(task);
_recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum);
@@ -163,17 +175,17 @@
if (!response.Status)
{
_unitOfWorkManage.RollbackTran();
- return content = WebResponseContent.Instance.Error($"{response.Message}");
+ return content.Error($"{response.Message}");
}
_unitOfWorkManage.CommitTran();
- return content = WebResponseContent.Instance.OK();
+ return content.OK();
}
- return content = WebResponseContent.Instance.Error("鏈壘鍒板彲鍒嗛厤璐т綅");
+ return content.Error("鏈壘鍒板彲鍒嗛厤璐т綅");
}
catch (Exception ex)
{
_unitOfWorkManage.RollbackTran();
- content = WebResponseContent.Instance.Error(ex.Message);
+ content.Error(ex.Message);
}
return content;
}
@@ -192,7 +204,10 @@
{
return (false, "璇ユ墭鐩樺彿宸叉湁浠诲姟!");
}
- if (BaseDal.QueryFirst(x => (x.SourceAddress == stationCode || x.CurrentAddress == stationCode) && x.TaskStatus == InTaskStatusEnum.InNew.ObjToInt()) != null)
+
+ Dt_RoadwayInfo roadwayInfo = _basicService.RoadwayInfoService.Repository.QueryFirst(x => x.InStationCode == stationCode) ?? throw new Exception("鏈壘鍒拌绔欏彴瀵瑰簲鐨勫贩閬擄紝璇锋鏌ュ熀纭�閰嶇疆淇℃伅!");
+
+ if (BaseDal.QueryFirst(x => (x.SourceAddress == roadwayInfo.InSCStationCode || x.CurrentAddress == roadwayInfo.InSCStationCode) && x.TaskStatus == InTaskStatusEnum.InNew.ObjToInt()) != null)
{
return (false, "褰撳墠鍏ュ簱绔欏彴宸叉湁涓�鏉℃柊寤轰换鍔�!");
}
--
Gitblit v1.9.3