diff --git a/Sln.Wcs.HoistDispatcher/HoistDispatchHub.cs b/Sln.Wcs.HoistDispatcher/HoistDispatchHub.cs
index dcc5637..f9796ab 100644
--- a/Sln.Wcs.HoistDispatcher/HoistDispatchHub.cs
+++ b/Sln.Wcs.HoistDispatcher/HoistDispatchHub.cs
@@ -184,26 +184,21 @@ public class HoistDispatchHub
}
///
- /// 解析起始点内容
- /// 14#_L2_02 => 14栋、2层、02货位
+ /// 解析接驳位编码
+ /// 13#_L1_HOIST => 13栋、1层、提升机接驳位
+ /// 14#_L2_03 => 14栋、2层、03货位
///
- ///
- ///
- ///
- ///
- ///
- private bool TryParsePointCode(string taskCode, out string building, out string floor, out string location)
+ private static bool TryParsePointCode(string pointCode, out string building, out string floor, out string location)
{
building = null;
floor = null;
location = null;
- if (string.IsNullOrWhiteSpace(taskCode))
+ if (string.IsNullOrWhiteSpace(pointCode))
return false;
- // 使用正则表达式匹配格式:数字+#+_+L+数字+_+数字(至少一位)
- // 示例:14#_L2_03
- var match = System.Text.RegularExpressions.Regex.Match(taskCode, @"^(\d+)#_L(\d+)_(\d+)$");
+ // 格式: {楼栋}#_L{楼层}_{位置},位置可为数字或字母(如 HOIST)
+ var match = System.Text.RegularExpressions.Regex.Match(pointCode, @"^(\d+)#_L(\d+)_(.+)$");
if (!match.Success)
return false;
diff --git a/Sln.Wcs/Program.cs b/Sln.Wcs/Program.cs
index 61f5289..5bc6333 100644
--- a/Sln.Wcs/Program.cs
+++ b/Sln.Wcs/Program.cs
@@ -62,6 +62,15 @@ namespace Sln.Wcs
handler.ServerCertificateCustomValidationCallback = (_, _, _, _) => true;
});
+ var service = serviceProvider.GetService();
+ service.TaskDispatch(new BaseDeviceInfo()
+ {
+ deviceSerialNo = 1
+ }, new LiveTaskDetail()
+ {
+ startPoint = "13#_L1_HOIST",
+ endPoint = "13#_L4_HOIST",
+ });
// var service = serviceProvider.GetService();
// var res = service.GbTaskSubmit(new GbTaskSubmitDto()
// {