From 1c7d84d153f22148c7c8dbf80aa646edb0c53648 Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期四, 18 十二月 2025 09:24:57 +0800
Subject: [PATCH] 同步
---
项目代码/WMS/WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs"
index 15a0dbd..9cc2883 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs"
@@ -31,10 +31,6 @@
WebResponseContent content = new WebResponseContent();
try
{
- //string palletCode = saveModel.MainData["palletCode"].ToString();
- //string station = saveModel.MainData["station"].ToString();
-
- // 璋冪敤BaseDal.QueryFirstAsync鏂规硶锛屾煡璇换鍔�
var task = await BaseDal.QueryFirstAsync(x => x.PalletCode == input.PalletCode);
if (task != null)
{
@@ -46,14 +42,20 @@
{
throw new Exception($"绔欏彴{input.Position}涓嶅瓨鍦�");
}
-
+
+ var carBody = _carBodyRepository.QueryFirst(x => x.PalletCode == input.PalletCode);
+
+ BDCManager bDCManager = new BDCManager(_bdcConfigurationService, _locationRepository, _roadWayInfoRepository);
+
+ await bDCManager.AddToBDC(carBody);
+
// 鑾峰彇搴撲綅
var location = RequestLocation(stationInfo.Roadway);
if (location == null)
{
return content.Error("鏃犳硶鑾峰彇璐т綅淇℃伅鎴栧簱浣嶅凡婊�");
}
-
+
var newtask = new Dt_Task
{
CurrentAddress = input.Position,
@@ -61,7 +63,6 @@
Roadway = stationInfo.Roadway,
TargetAddress = location.LocationCode,
Dispatchertime = DateTime.Now,
-
NextAddress = stationInfo.Roadway,
OrderNo = null,
PalletCode = input.PalletCode,
@@ -70,10 +71,9 @@
TaskType = (int)TaskInboundTypeEnum.Inbound,
TaskNum = await BaseDal.GetTaskNo(),
Creater = "Systeam",
-
};
-
+
_unitOfWorkManage.BeginTran();
BaseDal.AddData(newtask);
@@ -81,7 +81,7 @@
_locationRepository.UpdateData(location);
_unitOfWorkManage.CommitTran();
- content.OK("鐢宠鍏ュ簱鎴愬姛",data: newtask);
+ content.OK("鐢宠鍏ュ簱鎴愬姛", data: newtask);
}
catch (Exception er)
{
@@ -121,7 +121,7 @@
return location;
}
catch (Exception err)
- {
+ {
Console.WriteLine(err.Message.ToString());
return null;
}
@@ -132,10 +132,10 @@
private DtLocationInfo GetEmptyLocation(List<DtLocationInfo> dtLocationInfos)
{
var locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderBy(x => x.Column).ThenBy(x => x.Row).ThenBy(x => x.Layer).FirstOrDefault(); //.ThenByDescending(x => x.Depth)
-
return locationinfo;
}
+
#endregion 鑾峰彇璐т綅
#endregion 搴撲綅鍒嗛厤
--
Gitblit v1.9.3