From 23a7f18c6246405bd40f8d85e0e112f7dffab708 Mon Sep 17 00:00:00 2001 From: "yidi.wu" Date: Fri, 26 Jan 2024 19:43:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=AF=BC=E5=87=BA=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E9=9B=B6=E4=BB=B6=E5=90=8D=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 北京北汽/SCP/Properties/AssemblyInfo.cs | 4 ++-- .../Views/PlanData/SCP_ARRIVE_DETAIL.aspx.cs | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/北京北汽/SCP/Properties/AssemblyInfo.cs b/北京北汽/SCP/Properties/AssemblyInfo.cs index 352f68d..d8d051a 100644 --- a/北京北汽/SCP/Properties/AssemblyInfo.cs +++ b/北京北汽/SCP/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // 可以指定所有值,也可以使用“修订号”和“内部版本号”的默认值, // 方法是按如下所示使用 "*": -[assembly: AssemblyVersion("1.24.0126.1")] -[assembly: AssemblyFileVersion("1.24.0126.1")] +[assembly: AssemblyVersion("1.24.0126.2")] +[assembly: AssemblyFileVersion("1.24.0126.2")] diff --git a/北京北汽/SCP/Views/PlanData/SCP_ARRIVE_DETAIL.aspx.cs b/北京北汽/SCP/Views/PlanData/SCP_ARRIVE_DETAIL.aspx.cs index b8a8afc..0f7e1b0 100644 --- a/北京北汽/SCP/Views/PlanData/SCP_ARRIVE_DETAIL.aspx.cs +++ b/北京北汽/SCP/Views/PlanData/SCP_ARRIVE_DETAIL.aspx.cs @@ -67,7 +67,6 @@ namespace SCP.Views.PlanData { Grid_V_TB_ARRIVE_DETAIL.RecordCount = ret.Result.Count(); var _ls = SortAndPage(ret.Result, Grid_V_TB_ARRIVE_DETAIL); - var lst = _ls.ToList(); using (ScpEntities db = EntitiesFactory.CreateScpInstance()) { @@ -99,6 +98,22 @@ namespace SCP.Views.PlanData { if (ret.State == ReturnStatus.Succeed) { + var lst = ret.Result.ToList(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var lt in lst) + { + if (string.IsNullOrEmpty(lt.PartDesc1)) + { + var partModel = db.TA_PART.FirstOrDefault(p => p.PartCode == lt.PartCode && p.Site == lt.Site); + if (partModel != null) + { + lt.PartDesc1 = partModel.PartDesc1; + lt.Unit = partModel.Unit; + } + } + } + } Dictionary cellheader = new Dictionary { { "ArrvBillNum", "单据号" }, @@ -113,7 +128,7 @@ namespace SCP.Views.PlanData { "ShipTime", "时间" }, { "Remark", "备注" }, }; - string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "审核明细"); + string url = EntityListToExcel2003(cellheader, lst, "审核明细"); } }); }