From 347cfe16a23410819d453ebc8a006e8309cc094a Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Mon, 21 Oct 2024 15:29:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9HLC=20BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TaskBCHLCParserService.cs | 38 +++++++++++++++++-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/DAJYunPlat/DAJYun.Application/TaskManagePlatDomain/TaskBCHLCParserService.cs b/DAJYunPlat/DAJYun.Application/TaskManagePlatDomain/TaskBCHLCParserService.cs index 4d26e92..8480cb6 100644 --- a/DAJYunPlat/DAJYun.Application/TaskManagePlatDomain/TaskBCHLCParserService.cs +++ b/DAJYunPlat/DAJYun.Application/TaskManagePlatDomain/TaskBCHLCParserService.cs @@ -627,9 +627,18 @@ namespace DAJYun.Application.TaskManagePlatDomain { model.PlaceDelivery = readSchDict[endSideList[endSideList.Count - 2] + 1][1].Item2; } - - string etd1 = $"{readSchDict[1][3].Item2} {readSchDict[2][3].Item2}"; + + string etd1 = string.Empty; + + if (endFlag) + { + etd1 = $"{readSchDict[1][3].Item2} {readSchDict[2][3].Item2}"; + } + else + { + etd1 = $"{readSchDict[1][3].Item2} {readSchDict[2][2].Item2}"; + } DateTime dataEtd = DateTime.MinValue; @@ -710,8 +719,13 @@ namespace DAJYun.Application.TaskManagePlatDomain } else { - string etd2 = $"{readSchDict[endSideList.LastOrDefault() - 1][3].Item2} {readSchDict[endSideList.LastOrDefault()][3].Item2}"; + string etd2 = $"{readSchDict[endSideList.LastOrDefault() - 1][3].Item2}"; + if (readSchDict[endSideList.LastOrDefault()].Count == 4) + { + etd2 += $" {readSchDict[endSideList.LastOrDefault()][2].Item2}"; + } + DateTime dataEtd2 = DateTime.MinValue; if (DateTime.TryParse(etd2, out dataEtd2)) @@ -719,7 +733,23 @@ namespace DAJYun.Application.TaskManagePlatDomain model.SecondETD = dataEtd2; } - string eta2 = $"{readSchDict[endSideList.LastOrDefault() - 1][4].Item2} {readSchDict[endSideList.LastOrDefault()][3].Item2}"; + string eta2 = $"{readSchDict[endSideList.LastOrDefault() - 1][4].Item2}"; + + if (readSchDict[endSideList.LastOrDefault()].Count == 5) + { + eta2 += $" {readSchDict[endSideList.LastOrDefault()][4].Item2}"; + } + else + { + if (readSchDict[endSideList.LastOrDefault()].Count == 4) + { + etd2 += $" {readSchDict[endSideList.LastOrDefault()][3].Item2}"; + } + else if (readSchDict[endSideList.LastOrDefault()].Count == 3) + { + eta2 += $" {readSchDict[endSideList.LastOrDefault()][2].Item2}"; + } + } DateTime dataEta2 = DateTime.MinValue;