From b73c0cdef5acd4d64f113811541e2e123af30705 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 3 Feb 2023 17:57:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E4=BB=BB=E5=8A=A1-LRAR?= =?UTF-8?q?=E7=BA=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TaskManagePlat/TaskManageService.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs index fb7a1852..42ea06a7 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs @@ -1661,6 +1661,11 @@ namespace Myshipping.Application }; }).OrderByDescending(t => t.tsk.CreatedTime).ToList(); + var bookingNoList = list2.Select(t => !string.IsNullOrWhiteSpace(t.tsk.BOOK_ORDER_NO) ?long.Parse(t.tsk.BOOK_ORDER_NO):0) + .Where(t=>t > 0).Distinct().ToList(); + + var orderList = _bookingOrderRepository.AsQueryable().Where(t => bookingNoList.Contains(t.Id)).ToList(); + list2.ForEach(t => { LaraPaperRegistDetailDto laraInfo = new LaraPaperRegistDetailDto(); @@ -1669,16 +1674,19 @@ namespace Myshipping.Application laraInfo.TaskId = t.tsk.PK_ID; laraInfo.MBLNo = t.tsk.MBL_NO; - var files = calcList.FirstOrDefault(a => a.tsk.PK_ID.Equals(t.tsk.PK_ID)); + var files = calcList.FirstOrDefault(a => a.tsk.PK_ID.Equals(t.tsk2.PK_ID)); if (files != null) { laraInfo.DraftNum = files.clist.Select(t => t.FILE_NAME.GetPageNum()).Sum(); } - laraInfo.OriginalDownTime = originalDownloadHisInfo.END_DATE; - laraInfo.IssueType = t.tsk.ISSUE_TYPE; - laraInfo.IssueTypeName = t.tsk2.ISSUE_TYPE_NAME; + laraInfo.OriginalDownTime = originalDownloadHisInfo?.END_DATE; + + var orderInfo = orderList.FirstOrDefault(a => a.Id == long.Parse(t.tsk.BOOK_ORDER_NO)); + + laraInfo.IssueType = orderInfo?.ISSUETYPE; + //laraInfo.IssueTypeName = t.tsk2.issu; list.Add(laraInfo); });