From b9234fd82525c3421eabb2f992d7b000389e287f Mon Sep 17 00:00:00 2001 From: "yidi.wu" Date: Fri, 26 Jan 2024 21:05:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=8A=A0=E9=9B=B6=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 北京北汽/Controller/SCP_EXCEL_CONTROLLER.cs | 11 +++++++---- 北京北汽/SCP/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/北京北汽/Controller/SCP_EXCEL_CONTROLLER.cs b/北京北汽/Controller/SCP_EXCEL_CONTROLLER.cs index cb5e9cd..694d8bb 100644 --- a/北京北汽/Controller/SCP_EXCEL_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_EXCEL_CONTROLLER.cs @@ -424,6 +424,7 @@ namespace CK.SCP.Controller DataSet _ds = new DataSet(); using (ScpEntities db = EntitiesFactory.CreateScpInstance()) { + db.Database.CommandTimeout = 300; List _ls = new List(); if (!string.IsNullOrEmpty(p_vendid)) { @@ -446,7 +447,6 @@ namespace CK.SCP.Controller { _ls = db.V_TB_ARRIVE.Where(p => p_lst.Contains(p.ArrvBillNum)).ToList(); } - } var str = JsonHelper.GetJson(_ls); @@ -497,7 +497,6 @@ namespace CK.SCP.Controller } - _detailList.ForEach(itm => { var _entity = new SCP_ARRIVE_DETAIL_EXPORT(); _entity.单据号 = itm.ArrvBillNum; @@ -505,8 +504,12 @@ namespace CK.SCP.Controller _entity.订单号 = itm.PoBillNum; _entity.订单行 = itm.PoLine.ToString(); _entity.零件号 = itm.PartCode; - _entity.零件名称 = itm.PartDesc1; - _entity.单位 = itm.Unit; + var partModel = db.TA_PART.FirstOrDefault(p => p.PartCode == itm.PartCode && p.Site == itm.Site); + if (partModel != null) + { + _entity.零件名称 = partModel.PartDesc1; + _entity.单位 = partModel.Unit; + } _entity.数量 = itm.Qty.ToString(); _entity.时间 = itm.ShipTime == null ? string.Empty : itm.ShipTime.Value.ToString("yyyyMMdd"); _entity.备注 = itm.Remark; diff --git a/北京北汽/SCP/Properties/AssemblyInfo.cs b/北京北汽/SCP/Properties/AssemblyInfo.cs index d8d051a..8e6b1db 100644 --- a/北京北汽/SCP/Properties/AssemblyInfo.cs +++ b/北京北汽/SCP/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // 可以指定所有值,也可以使用“修订号”和“内部版本号”的默认值, // 方法是按如下所示使用 "*": -[assembly: AssemblyVersion("1.24.0126.2")] -[assembly: AssemblyFileVersion("1.24.0126.2")] +[assembly: AssemblyVersion("1.24.0126.3")] +[assembly: AssemblyFileVersion("1.24.0126.3")]