From e96db918649db4cbac389cabd85792999ae4fbd4 Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Mon, 19 May 2025 12:05:22 +0800 Subject: [PATCH] edit --- supplierBuildFile.aspx.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/supplierBuildFile.aspx.cs b/supplierBuildFile.aspx.cs index 040b0fe..c52a0ac 100644 --- a/supplierBuildFile.aspx.cs +++ b/supplierBuildFile.aspx.cs @@ -1,5 +1,6 @@ using Aliyun.OSS; using Aliyun.OSS.Common; +using Aspose.Imaging.FileFormats.Tiff.FileManagement; using BizCom; using ICSharpCode.SharpZipLib.Zip; using MSharp.Framework; @@ -116,6 +117,7 @@ public partial class supplierBuildFile : System.Web.UI.Page CeErpTradeLog.ExecuteNonQuery(string.Format("update CE_ErpPackData set upStatus = 1 where ID= {0} ;", packId)); DataTable itemData = CeErpTradeCell.ExecuteDataset(string.Format("select ctid,seller_memo,FinishDesignTime,OrderState,SupplierName,OrderSn,tid from view_erptradecell where FinishDesignTime is not null and ctid in (SELECT ctid FROM CE_ErpPackDataItem WHERE packId = {0})", packId)).Tables[0]; List files = new List(); + List tids = new List(); int upStatus = 3; string url = ""; if (itemData != null && itemData.Rows.Count > 0) @@ -128,8 +130,10 @@ public partial class supplierBuildFile : System.Web.UI.Page string ext = getCanDownFile(df_name); if (string.IsNullOrEmpty(ext)) { + //不存在则打包失败 updateSql += string.Format("update CE_ErpPackDataItem set message = '文件不存在!' where packId= {0} and ctid='{1}' ;", packId, ctid); - continue; + files = new List(); + break; } string fname = df_name + ext; if (Convert.ToInt16(row["OrderState"]) != 6) @@ -168,6 +172,7 @@ public partial class supplierBuildFile : System.Web.UI.Page { copyFile(getDesignDate(row["FinishDesignTime"]), row["SupplierName"].ToString(), fname); files.Add(fname); + tids.Add("'" + ctid + "'"); } catch (Exception ex) { @@ -220,6 +225,7 @@ public partial class supplierBuildFile : System.Web.UI.Page if (url != null) { upStatus = 2; + updateSql += string.Format("insert into CE_ErpTradeLog(tid,orderstate,userid,operatetime,con) select ctid,{1},{2},getdate(),'{3}' from ce_erptradecell where ctid in ({0}) ;", string.Join(",", tids), (int)OrderState.下单完成, 0, "下载设计文件"); } }