This commit is contained in:
2025-05-19 12:05:22 +08:00
parent 97acaf9195
commit e96db91864
+7 -1
View File
@@ -1,5 +1,6 @@
using Aliyun.OSS; using Aliyun.OSS;
using Aliyun.OSS.Common; using Aliyun.OSS.Common;
using Aspose.Imaging.FileFormats.Tiff.FileManagement;
using BizCom; using BizCom;
using ICSharpCode.SharpZipLib.Zip; using ICSharpCode.SharpZipLib.Zip;
using MSharp.Framework; 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)); 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]; 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<string> files = new List<string>(); List<string> files = new List<string>();
List<string> tids = new List<string>();
int upStatus = 3; int upStatus = 3;
string url = ""; string url = "";
if (itemData != null && itemData.Rows.Count > 0) if (itemData != null && itemData.Rows.Count > 0)
@@ -128,8 +130,10 @@ public partial class supplierBuildFile : System.Web.UI.Page
string ext = getCanDownFile(df_name); string ext = getCanDownFile(df_name);
if (string.IsNullOrEmpty(ext)) if (string.IsNullOrEmpty(ext))
{ {
//不存在则打包失败
updateSql += string.Format("update CE_ErpPackDataItem set message = '文件不存在!' where packId= {0} and ctid='{1}' ;", packId, ctid); updateSql += string.Format("update CE_ErpPackDataItem set message = '文件不存在!' where packId= {0} and ctid='{1}' ;", packId, ctid);
continue; files = new List<string>();
break;
} }
string fname = df_name + ext; string fname = df_name + ext;
if (Convert.ToInt16(row["OrderState"]) != 6) 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); copyFile(getDesignDate(row["FinishDesignTime"]), row["SupplierName"].ToString(), fname);
files.Add(fname); files.Add(fname);
tids.Add("'" + ctid + "'");
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -220,6 +225,7 @@ public partial class supplierBuildFile : System.Web.UI.Page
if (url != null) if (url != null)
{ {
upStatus = 2; 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, "下载设计文件");
} }
} }