|
|
|
|
@ -184,26 +184,21 @@ public class HoistDispatchHub
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 解析起始点内容
|
|
|
|
|
/// 14#_L2_02 => 14栋、2层、02货位
|
|
|
|
|
/// 解析接驳位编码
|
|
|
|
|
/// 13#_L1_HOIST => 13栋、1层、提升机接驳位
|
|
|
|
|
/// 14#_L2_03 => 14栋、2层、03货位
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="taskCode"></param>
|
|
|
|
|
/// <param name="building"></param>
|
|
|
|
|
/// <param name="floor"></param>
|
|
|
|
|
/// <param name="location"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
|