This commit is contained in:
2025-10-31 11:26:55 +08:00
parent 50cd510351
commit 670118a6d5
4 changed files with 128 additions and 28 deletions
+4 -3
View File
@@ -56,7 +56,7 @@ public partial class autocopy : System.Web.UI.Page
string newctid = tArr[1].ToString();
StringBuilder sql = new StringBuilder();
sql.AppendFormat("select ctid,seller_memo,FinishDesignTime,OrderState,SupplierId,SupplierName from view_erptradecell where ctid='{0}'", oldctid);
sql.AppendFormat("select ctid,tid,seller_memo,FinishDesignTime,OrderState,SupplierId,SupplierName from view_erptradecell where ctid='{0}'", oldctid);
DataTable dt = CeErpTradeCell.ExecuteDataset(sql.ToString()).Tables[0];
if (dt == null || dt.Rows.Count < 1)
{
@@ -64,7 +64,7 @@ public partial class autocopy : System.Web.UI.Page
return;
}
StringBuilder sqlnew = new StringBuilder();
sqlnew.AppendFormat("select ctid,seller_memo,FinishDesignTime,OrderState,SupplierId,SupplierName,orderSn from view_erptradecell where (orderstate=3 or orderstate=4) and ctid='{0}'", newctid);
sqlnew.AppendFormat("select ctid,tid,seller_memo,FinishDesignTime,OrderState,SupplierId,SupplierName,orderSn from view_erptradecell where (orderstate=3 or orderstate=4) and ctid='{0}'", newctid);
DataTable dtnew = CeErpTradeCell.ExecuteDataset(sqlnew.ToString()).Tables[0];
if (dtnew == null || dtnew.Rows.Count < 1)
{
@@ -204,7 +204,8 @@ public partial class autocopy : System.Web.UI.Page
//CeErpTradeLog.ExecuteNonQuery(sqlpng);
}
CeErpTradeLog.AddLog(newctid, 5, userId, "自动上传老客户文件-" + newPathFileName);
string fileSql = string.Format("INSERT INTO [dbo].[CE_ErpTradeCellFile]([tid], [ctid], [isDel], [url], [createtime], [type]) SELECT '{0}', '{1}', isDel ,url,getdate(),type FROM [dbo].[CE_ErpTradeCellFile] WHERE tid='{2}' and ctid='{3}' and isDel = 0 and type = 'AUTH_FILE'", dtnew.Rows[0]["tid"], dtnew.Rows[0]["ctid"], dt.Rows[0]["tid"], dt.Rows[0]["ctid"]);
CeErpTradeCell.ExecuteNonQuery(fileSql);
conSuc("文件已上传到共享目录");
return;
}