From bc8d5d9f033b638e97007c8a9cec8a703879fcbe Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 27 二月 2026 18:15:33 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/RuiShengZhiNeng/GaoPuLiTiKu
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs | 46 ++++++++++++++++++++++++++++++++++++----------
1 files changed, 36 insertions(+), 10 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
index a9ff92c..b799926 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
@@ -15,8 +15,9 @@
{
public partial class TaskService
{
+ #region 鍑箰澹换鍔″垱寤�
/// <summary>
- /// 鍒涘缓鍏ュ簱浠诲姟
+ /// 鍒涘缓鍑箰澹獳GV鍏ュ簱浠诲姟
/// </summary>
/// <param name="taskDTO"></param>
/// <returns></returns>
@@ -26,20 +27,22 @@
{
int containerType = taskDTO.containerCode.Contains("LLM") ? LocationTypeEnum.LargePallet.ObjToInt() : LocationTypeEnum.SmallPallet.ObjToInt();
//鑾峰彇璐т綅淇℃伅
- Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.WarehouseId.ToString() == taskDTO.toAreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == containerType);
- if (kLSLocationInfo == null) throw new Exception($"鏈壘鍒扮粓鐐瑰簱鍖恒�恵taskDTO.toAreaCode}銆戝彲鐢ㄧ┖璐т綅锛�");
- Dt_Task dt_Task = new Dt_Task()
+ Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.GetFreeLocationInfo(taskDTO.toAreaCode, containerType) ?? throw new Exception($"鏈壘鍒扮粓鐐瑰簱鍖恒�恵taskDTO.toAreaCode}銆戝彲鐢ㄧ┖璐т綅锛�");
+ Dt_Task dt_Task = new()
{
TaskNum = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
WMSTaskNum = taskDTO.taskCode,
+ //WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
Grade = taskDTO.taskPriority,
PalletCode = taskDTO.containerCode,
+ Roadway = kLSLocationInfo.RoadwayNo,
TaskState = TaskStatusEnum.New.ObjToInt(),
TaskType = taskType,
SourceAddress = taskDTO.fromLocationCode,
CurrentAddress = taskDTO.fromLocationCode,
NextAddress = kLSLocationInfo.LocationCode,
TargetAddress = kLSLocationInfo.LocationCode,
+ Creater = "WMS",
};
kLSLocationInfo.LocationStatus = LocationStatusEnum.InLock.ObjToInt();
Db.Ado.BeginTran();
@@ -51,29 +54,36 @@
catch (Exception ex)
{
Db.Ado.RollbackTran();
- return WebResponseContent.Instance.Error(ex.Message);
+ throw new Exception(ex.Message);
}
}
-
+ /// <summary>
+ /// 鍒涘缓鍑箰澹獳GV鍑哄簱浠诲姟
+ /// </summary>
+ /// <param name="taskDTO"></param>
+ /// <param name="taskType"></param>
+ /// <returns></returns>
public WebResponseContent CreateKLSNewOutTask(TaskDTO taskDTO, int taskType)
{
try
{
- Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.LocationCode == taskDTO.fromLocationCode);
- if (kLSLocationInfo == null) throw new Exception($"鏈壘鍒拌捣鐐瑰簱浣嶃�恵taskDTO.fromLocationCode}銆戯紒");
+ Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.LocationCode == taskDTO.fromLocationCode) ?? throw new Exception($"鏈壘鍒拌捣鐐瑰簱浣嶃�恵taskDTO.fromLocationCode}銆戯紒");
if (kLSLocationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt()) throw new Exception($"璧风偣搴撲綅銆恵taskDTO.fromLocationCode}銆戝綋鍓嶅簱浣嶇姸鎬佷笉鍙嚭搴擄紒");
- Dt_Task dt_Task = new Dt_Task()
+ Dt_Task dt_Task = new()
{
TaskNum = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
WMSTaskNum = taskDTO.taskCode,
+ //WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
Grade = taskDTO.taskPriority,
PalletCode = taskDTO.containerCode,
+ Roadway = kLSLocationInfo.RoadwayNo,
TaskState = TaskStatusEnum.New.ObjToInt(),
TaskType = taskType,
SourceAddress = taskDTO.fromLocationCode,
CurrentAddress = taskDTO.fromLocationCode,
NextAddress = taskDTO.toLocationCode,
TargetAddress = taskDTO.toLocationCode,
+ Creater = "WMS",
};
kLSLocationInfo.LocationStatus = LocationStatusEnum.OutLock.ObjToInt();
Db.Ado.BeginTran();
@@ -85,8 +95,24 @@
catch (Exception ex)
{
Db.Ado.RollbackTran();
- return WebResponseContent.Instance.Error(ex.Message);
+ throw new Exception(ex.Message);
}
}
+ #endregion
+
+ #region 5 璺ㄦゼ灞傝繍杈撲换鍔″垱寤�
+ public WebResponseContent CarryTask(TaskDTO taskDTO, int taskType)
+ {
+ return WebResponseContent.Instance.OK();
+ }
+ #endregion
+
+
+ #region 6 瑁佸壀閫佽揣
+ public WebResponseContent CJCarryTaske(TaskDTO taskDTO, int taskType)
+ {
+ return WebResponseContent.Instance.OK();
+ }
+ #endregion
}
}
--
Gitblit v1.9.3