From d44b4cfa1bf7858236f928488f3777617b6c7449 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期三, 12 十一月 2025 12:15:34 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs | 4 +
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs | 4
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 4
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 58 +++++++++++++++---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/ESSApiService.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs | 61 ++++++++++++++++----
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 5 +
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 3
10 files changed, 110 insertions(+), 35 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_BasicService/ESSApiService.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_BasicService/ESSApiService.cs"
index b11bdac..56cecfd 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_BasicService/ESSApiService.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_BasicService/ESSApiService.cs"
@@ -71,7 +71,7 @@
return false;
}
}
-
+
private async Task<TResponse> PostAsync<TRequest, TResponse>(string url, TRequest request)
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_BasicService/LocationInfoService.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_BasicService/LocationInfoService.cs"
index 33789ce..82bbeeb 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_BasicService/LocationInfoService.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_BasicService/LocationInfoService.cs"
@@ -35,7 +35,7 @@
{
private readonly IUnitOfWorkManage _unitOfWorkManage;
private readonly IRepository<Dt_StockInfo> _stockInfoRepository;
- public IRepository<Dt_LocationInfo> Repository => BaseDal;
+ public IRepository<Dt_LocationInfo> Repository => BaseDal;
public readonly IRepository<Dt_LocationType> _locationTypeRepository;
public LocationInfoService(IRepository<Dt_LocationInfo> BaseDal, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_LocationType> locationTypeRepository) : base(BaseDal)
@@ -122,6 +122,42 @@
/// </summary>
/// <param name="roadwayNo"></param>
/// <returns></returns>
+ public Dt_LocationInfo? AssignLocation(int locationType)
+ {
+ if (locationType <= 0)
+ {
+ throw new ArgumentOutOfRangeException("浠撳簱鍖哄煙閿欒锛�");
+ }
+ lock (_locker)
+ {
+
+ List<LocationCache> removeItems = locationCaches.Where(x => (DateTime.Now - x.DateTime).TotalMinutes > locationCacheTime).ToList();
+ int count = removeItems.Count;
+ for (int i = 0; i < count; i++)
+ {
+ locationCaches.Remove(removeItems[i]);
+ }
+
+ List<string> lockLocationCodes = locationCaches.Select(x => x.LocationCode).ToList();
+
+ Dictionary<string, OrderByType> orderBy = new Dictionary<string, OrderByType>()
+ {
+ { nameof(Dt_LocationInfo.RoadwayNo),OrderByType.Asc },
+ { nameof(Dt_LocationInfo.Layer),OrderByType.Asc },
+ { nameof(Dt_LocationInfo.Column),OrderByType.Asc },
+ { nameof(Dt_LocationInfo.Depth),OrderByType.Desc },
+ { nameof(Dt_LocationInfo.Row),OrderByType.Asc }
+ };
+
+ var first = BaseDal.QueryFirst(x => x.LocationType == locationType && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.Disable.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode), orderBy);//鏌ヨ绌鸿揣浣嶄俊鎭苟鎺掗櫎5鍒嗛挓鍐呭垎閰嶇殑璐т綅,鏍规嵁灞傘�佸垪銆佹繁搴︺�佽鎺掑簭
+ if (first != null)
+ {
+ locationCaches.Add(new LocationCache { LocationCode = first?.LocationCode, DateTime = DateTime.Now });
+ }
+
+ return first;
+ }
+ }
public Dt_LocationInfo? AssignLocation()
{
lock (_locker)
@@ -145,14 +181,13 @@
{ nameof(Dt_LocationInfo.Row),OrderByType.Asc }
};
- var first= BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.Disable.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode), orderBy);//鏌ヨ绌鸿揣浣嶄俊鎭苟鎺掗櫎5鍒嗛挓鍐呭垎閰嶇殑璐т綅,鏍规嵁灞傘�佸垪銆佹繁搴︺�佽鎺掑簭
+ var first = BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.Disable.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode), orderBy);//鏌ヨ绌鸿揣浣嶄俊鎭苟鎺掗櫎5鍒嗛挓鍐呭垎閰嶇殑璐т綅,鏍规嵁灞傘�佸垪銆佹繁搴︺�佽鎺掑簭
locationCaches.Add(new LocationCache { LocationCode = first.LocationCode, DateTime = DateTime.Now });
return first;
}
}
-
/// <summary>
/// 鑾峰彇鍙嚭搴撹揣浣嶇紪鍙�
/// </summary>
@@ -160,7 +195,7 @@
/// <returns></returns>
public List<string> GetCanOutLocationCodes()
{
- return Repository.QueryData(x => x.LocationCode, x => x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())).Distinct().ToList();
+ return Repository.QueryData(x => x.LocationCode, x => x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())).Distinct().ToList();
}
/// <summary>
@@ -175,8 +210,8 @@
public List<LocationTypeDto> GetLocationTypes()
{
- return _locationTypeRepository.Db.Queryable<Dt_LocationType>().Select(x=>
- new LocationTypeDto { LocationType=x.LocationType,LocationTypeDesc=x.LocationTypeDesc}).ToList();
+ return _locationTypeRepository.Db.Queryable<Dt_LocationType>().Select(x =>
+ new LocationTypeDto { LocationType = x.LocationType, LocationTypeDesc = x.LocationTypeDesc }).ToList();
}
/// <summary>
@@ -215,7 +250,7 @@
LocationCode = $"HAI-{row.ToString().PadLeft(3, '0')}-{col.ToString().PadLeft(3, '0')}-{layer.ToString().PadLeft(2, '0')} ",
LocationName = $"{row.ToString()}琛寋col.ToString()}鍒梴layer.ToString()}灞� ",
-
+
RoadwayNo = roadwayNo,
Row = row,
Column = col,
@@ -242,7 +277,7 @@
LocationCode = $"HAI-{r1.ToString().PadLeft(3, '0')}-{col.ToString().PadLeft(3, '0')}-{layer.ToString().PadLeft(2, '0')} ",
LocationName = $"{r1.ToString()}琛寋col.ToString()}鍒梴layer.ToString()}灞� ",
-
+
RoadwayNo = roadwayNo,
Row = r1,
Column = col,
@@ -261,7 +296,7 @@
LocationName = $"{r2.ToString()}琛寋col.ToString()}鍒梴layer.ToString()}灞� ",
-
+
RoadwayNo = roadwayNo,
Row = r2,
Column = col,
@@ -322,9 +357,9 @@
Row = i + 1,
Depth = depth,
};
-
- locationInfo.LocationCode = $"HAI-{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(2, '0')}";
- locationInfo.LocationName = $"HAI{locationInfo.RoadwayNo}宸烽亾{locationInfo.Row.ToString().PadLeft(3, '0')}琛寋locationInfo.Column.ToString().PadLeft(3, '0')}鍒梴locationInfo.Layer.ToString().PadLeft(3, '0')}灞�";
+
+ locationInfo.LocationCode = $"HAI-{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(2, '0')}";
+ locationInfo.LocationName = $"HAI{locationInfo.RoadwayNo}宸烽亾{locationInfo.Row.ToString().PadLeft(3, '0')}琛寋locationInfo.Column.ToString().PadLeft(3, '0')}鍒梴locationInfo.Layer.ToString().PadLeft(3, '0')}灞�";
//locationInfo.LocationCode = $"{locationInfo.RoadwayNo}-{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}-{locationInfo.Depth.ToString().PadLeft(2, '0')}";
@@ -334,7 +369,7 @@
}
}
}
- // BaseDal.AddData(locationInfos);
+ // BaseDal.AddData(locationInfos);
return WebResponseContent.Instance.OK();
}
catch (Exception ex)
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_IBasicService/ILocationInfoService.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_IBasicService/ILocationInfoService.cs"
index f92fab0..167a158 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_IBasicService/ILocationInfoService.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_IBasicService/ILocationInfoService.cs"
@@ -53,12 +53,14 @@
/// <returns></returns>
WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO);
- Dt_LocationInfo? AssignLocation();
+ Dt_LocationInfo? AssignLocation(int locationType);
List<string> GetCanOutLocationCodes();
List<Dt_LocationInfo> GetLocationInfos(List<string> locationCodes);
+ Dt_LocationInfo? AssignLocation();
+
List<LocationTypeDto> GetLocationTypes();
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_ITaskInfoService/ITaskService.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_ITaskInfoService/ITaskService.cs"
index 34b8861..2b3c1dc 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_ITaskInfoService/ITaskService.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_ITaskInfoService/ITaskService.cs"
@@ -44,7 +44,6 @@
Task<WebResponseContent> TaskCompleted(string taskNum);
-
- WebResponseContent GenerateOutboundTasks(int[] keys);
+ Task<WebResponseContent> GenerateOutboundTasksAsync(int[] keys);
}
}
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_InboundService/InboundOrderService.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_InboundService/InboundOrderService.cs"
index 8a288c1..dbbd0f3 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_InboundService/InboundOrderService.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_InboundService/InboundOrderService.cs"
@@ -340,11 +340,11 @@
if (stockInfo == null)
{
- stockInfo = new Dt_StockInfo() { PalletType = (int)PalletTypeEnum.None };
+ stockInfo = new Dt_StockInfo() { PalletType = (int)PalletTypeEnum.None,LocationType=materielGroupDTO.locationType.ObjToInt() };
stockInfo.Details = new List<Dt_StockInfoDetail>();
}
var warehouseareas = _warehouseAreaRepository.Db.Queryable<Dt_WarehouseArea>().ToList();
- var warehousearea = warehouseareas.First(x => x.Name == materielGroupDTO.locationTypeDesc.Trim() && x.FactoryArea == inboundOrder.FactoryArea);
+ var warehousearea = warehouseareas.FirstOrDefault(x => x.Name == materielGroupDTO.locationTypeDesc && x.FactoryArea == inboundOrder.FactoryArea);
foreach (var item in dbinboundOrderDetails)
{
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_Model/Models/Stock/Dt_StockInfo.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_Model/Models/Stock/Dt_StockInfo.cs"
index 85fea92..034ac40 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_Model/Models/Stock/Dt_StockInfo.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_Model/Models/Stock/Dt_StockInfo.cs"
@@ -44,6 +44,8 @@
[SugarColumn(IsNullable = false, ColumnDescription = "浠撳簱涓婚敭")]
public int WarehouseId { get; set; }
+ [SugarColumn(IsNullable = false, ColumnDescription = "浠撳簱鍖哄煙")]
+ public int LocationType { get; set; }
/// <summary>
/// 搴撳瓨鐘舵��
/// </summary>
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 63eb2f1..e918645 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"
@@ -50,7 +50,7 @@
return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡缁戝畾璐т綅");
}
- Dt_LocationInfo? locationInfo = _locationInfoService.AssignLocation();
+ Dt_LocationInfo? locationInfo = _locationInfoService.AssignLocation(stockInfo.LocationType);
if (locationInfo == null)
{
return WebResponseContent.Instance.Error($"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅");
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 85be5fd..fcedffb 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"
@@ -31,14 +31,14 @@
{
try
{
- Dt_StockInfo stockInfo ;
+ Dt_StockInfo stockInfo;
if (string.IsNullOrEmpty(palletCode))
{
stockInfo = _stockRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletType == PalletTypeEnum.Empty.ObjToInt() && !string.IsNullOrWhiteSpace(x.LocationCode)).First();
}
else
{
- stockInfo = _stockRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode) .First();
+ stockInfo = _stockRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).First();
}
if (stockInfo == null)
@@ -103,7 +103,7 @@
}
}
}
- };
+ };
var result = await _eSSApiService.CreateTaskAsync(esstask);
_logger.LogInformation("鍒涘缓浠诲姟PalletOutboundTask 杩斿洖: " + result);
@@ -208,7 +208,7 @@
/// <param name="outStockLockInfos"></param>
/// <param name="locationInfos"></param>
/// <returns></returns>
- public WebResponseContent GenerateOutboundTaskDataUpdate(List<Dt_Task> tasks, List<Dt_StockInfo>? stockInfos = null, List<Dt_OutboundOrderDetail>? outboundOrderDetails = null, List<Dt_OutStockLockInfo>? outStockLockInfos = null, List<Dt_LocationInfo>? locationInfos = null)
+ public async Task<WebResponseContent> GenerateOutboundTaskDataUpdateAsync(List<Dt_Task> tasks, List<Dt_StockInfo>? stockInfos = null, List<Dt_OutboundOrderDetail>? outboundOrderDetails = null, List<Dt_OutStockLockInfo>? outStockLockInfos = null, List<Dt_LocationInfo>? locationInfos = null)
{
try
{
@@ -252,15 +252,51 @@
_outboundOrderDetailService.Repository.UpdateData(outboundOrderDetails);
}
_unitOfWorkManage.CommitTran();
- //
- return WebResponseContent.Instance.OK();
+ TaskModel esstask = new TaskModel()
+ {
+ taskType = "carry",
+ taskGroupCode = "",
+ groupPriority = 0,
+ tasks = new List<TasksType>()
+ };
+
+ foreach (var task in tasks)
+ {
+ esstask.
+ tasks.Add(new TasksType
+ {
+ taskCode = task.TaskNum.ToString(),
+ taskPriority = 0,
+ taskDescribe = new TaskDescribeType
+ {
+ containerCode = task.PalletCode,
+ containerType = "CT_KUBOT_STANDARD",
+ fromLocationCode = task.SourceAddress ?? "",
+ toStationCode = "",
+ toLocationCode = task.TargetAddress,
+ deadline = 0,
+ storageTag = ""
+ }
+ }
+ );
+ }
+ var result = await _eSSApiService.CreateTaskAsync(esstask);
+
+ _logger.LogInformation("鍒涘缓浠诲姟PalletOutboundTask 杩斿洖: " + result);
+ if (result)
+ {
+ return WebResponseContent.Instance.OK();
+ }
+ else
+ {
+ return WebResponseContent.Instance.Error("涓嬪彂鏈哄櫒浜轰换鍔″け璐ワ紒");
+ }
}
catch (Exception ex)
{
_unitOfWorkManage.RollbackTran();
return WebResponseContent.Instance.Error(ex.Message);
}
-
}
/// <summary>
@@ -292,7 +328,7 @@
TargetAddress = "",
TaskStatus = TaskStatusEnum.New.ObjToInt(),
TaskType = taskType.ObjToInt(),
- // TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
+ // TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
PalletType = stockInfo.PalletType,
WarehouseId = stockInfo.WarehouseId,
@@ -303,7 +339,7 @@
// task.Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
// task.BatchNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
//}
-
+
tasks.Add(task);
}
}
@@ -317,7 +353,7 @@
/// </summary>
/// <param name="keys">鍑哄簱鍗曟槑缁嗕富閿�</param>
/// <returns></returns>
- public WebResponseContent GenerateOutboundTasks(int[] keys)
+ public async Task<WebResponseContent> GenerateOutboundTasksAsync(int[] keys)
{
try
{
@@ -350,7 +386,7 @@
tasks.AddRange(result.Item1);
}
- WebResponseContent content = GenerateOutboundTaskDataUpdate(tasks, stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos);
+ WebResponseContent content = await GenerateOutboundTaskDataUpdateAsync(tasks, stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos);
return content;
}
catch (Exception ex)
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_WMSServer/Controllers/Basic/LocationInfoController.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_WMSServer/Controllers/Basic/LocationInfoController.cs"
index a39ae97..1b3e918 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_WMSServer/Controllers/Basic/LocationInfoController.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_WMSServer/Controllers/Basic/LocationInfoController.cs"
@@ -42,12 +42,12 @@
}
[HttpPost, Route("TTTTTAssignLocation"), AllowAnonymous, MethodParamsValidate]
- public WebResponseContent TTTTTAssignLocation()
+ public WebResponseContent TTTTTAssignLocation(int locationType)
{
- var sddd = Service.AssignLocation();
+ var sddd = Service.AssignLocation(locationType);
return WebResponseContent.Instance.OK("resdasd", sddd);
}
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_WMSServer/Controllers/TaskInfo/TaskController.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_WMSServer/Controllers/TaskInfo/TaskController.cs"
index 4d0c35f..8b54df6 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_WMSServer/Controllers/TaskInfo/TaskController.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_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -1,6 +1,7 @@
锘縰sing Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
using WIDESEA_Common.CommonEnum;
using WIDESEA_Core;
using WIDESEA_Core.Attributes;
@@ -40,9 +41,9 @@
/// <param name="keys"></param>
/// <returns></returns>
[HttpPost, HttpGet, Route("GenerateOutboundTasks"), AllowAnonymous]
- public WebResponseContent GenerateOutboundTasks([FromBody] int[] keys)
+ public async Task<WebResponseContent> GenerateOutboundTasks([FromBody] int[] keys)
{
- return Service.GenerateOutboundTasks(keys);
+ return await Service.GenerateOutboundTasksAsync(keys);
}
}
--
Gitblit v1.9.3