edit
此提交包含在:
+4
-3
@@ -56,7 +56,7 @@ public partial class autocopy : System.Web.UI.Page
|
|||||||
string newctid = tArr[1].ToString();
|
string newctid = tArr[1].ToString();
|
||||||
|
|
||||||
StringBuilder sql = new StringBuilder();
|
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];
|
DataTable dt = CeErpTradeCell.ExecuteDataset(sql.ToString()).Tables[0];
|
||||||
if (dt == null || dt.Rows.Count < 1)
|
if (dt == null || dt.Rows.Count < 1)
|
||||||
{
|
{
|
||||||
@@ -64,7 +64,7 @@ public partial class autocopy : System.Web.UI.Page
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
StringBuilder sqlnew = new StringBuilder();
|
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];
|
DataTable dtnew = CeErpTradeCell.ExecuteDataset(sqlnew.ToString()).Tables[0];
|
||||||
if (dtnew == null || dtnew.Rows.Count < 1)
|
if (dtnew == null || dtnew.Rows.Count < 1)
|
||||||
{
|
{
|
||||||
@@ -204,7 +204,8 @@ public partial class autocopy : System.Web.UI.Page
|
|||||||
//CeErpTradeLog.ExecuteNonQuery(sqlpng);
|
//CeErpTradeLog.ExecuteNonQuery(sqlpng);
|
||||||
}
|
}
|
||||||
CeErpTradeLog.AddLog(newctid, 5, userId, "自动上传老客户文件-" + newPathFileName);
|
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("文件已上传到共享目录");
|
conSuc("文件已上传到共享目录");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+42
-11
@@ -1,4 +1,5 @@
|
|||||||
using BizCom;
|
using BizCom;
|
||||||
|
using CorelDRAW;
|
||||||
using ICSharpCode.SharpZipLib.Zip;
|
using ICSharpCode.SharpZipLib.Zip;
|
||||||
using SQLData;
|
using SQLData;
|
||||||
using System;
|
using System;
|
||||||
@@ -6,6 +7,7 @@ using System.Collections.Generic;
|
|||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
@@ -28,6 +30,36 @@ public partial class copydownload : System.Web.UI.Page
|
|||||||
//Response.End();
|
//Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string dealMemoName(string name)
|
||||||
|
{
|
||||||
|
string[] al = name.Split('-');
|
||||||
|
List<string> list = new List<string>();
|
||||||
|
string pa = string.Empty;
|
||||||
|
for (int i = 0; i < al.Length; i++)
|
||||||
|
{
|
||||||
|
if (i == 1)
|
||||||
|
{
|
||||||
|
if (al[i].Contains("(") || al[i].Contains("("))
|
||||||
|
{
|
||||||
|
string tname = al[i].Replace(")", "").Replace(")", "").Replace("(", "").Replace("(", "");
|
||||||
|
if (!string.IsNullOrEmpty(tname))
|
||||||
|
{
|
||||||
|
pa = al[i];
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
list.Add(al[i]);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(pa))
|
||||||
|
{
|
||||||
|
list.Insert(3, pa);
|
||||||
|
}
|
||||||
|
name = string.Join("-", list);
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (Request["hexdata"] != null)
|
if (Request["hexdata"] != null)
|
||||||
@@ -54,7 +86,7 @@ public partial class copydownload : System.Web.UI.Page
|
|||||||
}
|
}
|
||||||
tids = string.Join(",", tLst.ToArray());
|
tids = string.Join(",", tLst.ToArray());
|
||||||
StringBuilder sql = new StringBuilder();
|
StringBuilder sql = new StringBuilder();
|
||||||
sql.AppendFormat("select ctid,seller_memo,FinishDesignTime,OrderState,SupplierName,OrderSn,tid from view_erptradecell where orderstate=5 and ctid in ({0})", tids);
|
sql.AppendFormat("select ctid,seller_memo,FinishDesignTime,OrderState,SupplierName,OrderSn,tid,SupplierId from view_erptradecell where orderstate=5 and ctid in ({0})", tids);
|
||||||
DataTable dt = CeErpTradeCell.ExecuteDataset(sql.ToString()).Tables[0];
|
DataTable dt = CeErpTradeCell.ExecuteDataset(sql.ToString()).Tables[0];
|
||||||
if (dt == null || dt.Rows.Count < 1)
|
if (dt == null || dt.Rows.Count < 1)
|
||||||
{
|
{
|
||||||
@@ -91,13 +123,12 @@ public partial class copydownload : System.Web.UI.Page
|
|||||||
df_name = upPath + "\\" + dTime + "\\" + formatMemo(dr["seller_memo"]);
|
df_name = upPath + "\\" + dTime + "\\" + formatMemo(dr["seller_memo"]);
|
||||||
foreach (string ext in extArr)
|
foreach (string ext in extArr)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(tid) && !string.IsNullOrEmpty(orderSn))
|
|
||||||
{
|
|
||||||
rname = formatMemo(dr["seller_memo"]).Replace(orderSn, tid);
|
|
||||||
rname = rname + "《" + orderSn + "》";
|
|
||||||
}
|
|
||||||
fname = df_name + ext;
|
fname = df_name + ext;
|
||||||
rname = rname + ext;
|
rname = formatMemo(dr["seller_memo"]) + ext;
|
||||||
|
if ("14".Equals(dr["SupplierId"].ToString()))
|
||||||
|
{
|
||||||
|
rname = dealMemoName(rname);
|
||||||
|
}
|
||||||
if (!hasFile)
|
if (!hasFile)
|
||||||
{
|
{
|
||||||
if (File.Exists(fname))
|
if (File.Exists(fname))
|
||||||
@@ -288,13 +319,13 @@ public partial class copydownload : System.Web.UI.Page
|
|||||||
string fname = Path.GetFileName(file);
|
string fname = Path.GetFileName(file);
|
||||||
foreach (var rule in replaceRules)
|
foreach (var rule in replaceRules)
|
||||||
{
|
{
|
||||||
fname = fname.Replace(rule.Key, rule.Value);
|
rname = rname.Replace(rule.Key, rule.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
File.Copy(file, path + "\\" + fname, true);
|
File.Copy(file, path + "\\" + rname, true);
|
||||||
if (!File.Exists(path + "\\" + fname))
|
if (!File.Exists(path + "\\" + rname))
|
||||||
{
|
{
|
||||||
File.Copy(file, path + "\\" + fname, true);
|
File.Copy(file, path + "\\" + rname, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+47
-5
@@ -67,6 +67,7 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
Response.Buffer = true;
|
Response.Buffer = true;
|
||||||
|
|
||||||
downloadMore();
|
downloadMore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -115,8 +116,9 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
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,SupplierId 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> supplierIds = new List<string>();
|
||||||
List<string> tids = new List<string>();
|
List<string> tids = new List<string>();
|
||||||
int upStatus = 3;
|
int upStatus = 3;
|
||||||
string url = "";
|
string url = "";
|
||||||
@@ -133,6 +135,7 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|||||||
//不存在则打包失败
|
//不存在则打包失败
|
||||||
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);
|
||||||
files = new List<string>();
|
files = new List<string>();
|
||||||
|
supplierIds = new List<string>();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
string fname = df_name + ext;
|
string fname = df_name + ext;
|
||||||
@@ -172,6 +175,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);
|
||||||
|
supplierIds.Add(row["SupplierId"].ToString());
|
||||||
tids.Add("'" + ctid + "'");
|
tids.Add("'" + ctid + "'");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -179,6 +183,7 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|||||||
writeLog("打包复制文件出错!" + ex.Message);
|
writeLog("打包复制文件出错!" + ex.Message);
|
||||||
updateSql += string.Format("update CE_ErpPackDataItem set message = '复制文件出错!{2}' where packId= {0} and ctid='{1}' ;", packId, ctid, ex.Message);
|
updateSql += string.Format("update CE_ErpPackDataItem set message = '复制文件出错!{2}' where packId= {0} and ctid='{1}' ;", packId, ctid, ex.Message);
|
||||||
files = new List<string>();//清空数据
|
files = new List<string>();//清空数据
|
||||||
|
supplierIds = new List<string>();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -204,7 +209,13 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
file.Add(files[i]);
|
string fname = Path.GetFileName(files[i]);
|
||||||
|
if ("14".Equals(supplierIds[i]))
|
||||||
|
{
|
||||||
|
fname = dealMemoName(fname);
|
||||||
|
}
|
||||||
|
|
||||||
|
file.Add(files[i], fname);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -238,9 +249,9 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|||||||
writeLog("打包文件出错!" + ex.Message);
|
writeLog("打包文件出错!" + ex.Message);
|
||||||
updateSql += string.Format("update CE_ErpPackData set upStatus = 3 where ID= {0} ;", packId);
|
updateSql += string.Format("update CE_ErpPackData set upStatus = 3 where ID= {0} ;", packId);
|
||||||
}
|
}
|
||||||
|
CeErpTradeLog.ExecuteNonQuery(updateSql);
|
||||||
|
updateSql = "";
|
||||||
}
|
}
|
||||||
CeErpTradeLog.ExecuteNonQuery(updateSql);
|
|
||||||
}
|
}
|
||||||
running = false;
|
running = false;
|
||||||
}
|
}
|
||||||
@@ -250,7 +261,35 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|||||||
//FileOssUp();
|
//FileOssUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string dealMemoName(string name)
|
||||||
|
{
|
||||||
|
string[] al = name.Split('-');
|
||||||
|
List<string> list = new List<string>();
|
||||||
|
string pa = string.Empty;
|
||||||
|
for (int i = 0; i < al.Length; i++)
|
||||||
|
{
|
||||||
|
if (i == 1)
|
||||||
|
{
|
||||||
|
if (al[i].Contains("(") || al[i].Contains("("))
|
||||||
|
{
|
||||||
|
string tname = al[i].Replace(")", "").Replace(")", "").Replace("(", "").Replace("(", "");
|
||||||
|
if (!string.IsNullOrEmpty(tname))
|
||||||
|
{
|
||||||
|
pa = al[i];
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
list.Add(al[i]);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(pa))
|
||||||
|
{
|
||||||
|
list.Insert(3, pa);
|
||||||
|
}
|
||||||
|
name = string.Join("-", list);
|
||||||
|
return name;
|
||||||
|
}
|
||||||
private string formatMemo(object memo)
|
private string formatMemo(object memo)
|
||||||
{
|
{
|
||||||
string m = memo.ToString();
|
string m = memo.ToString();
|
||||||
@@ -292,8 +331,11 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|||||||
var accessKeySecret = "NnutvWhKl4HbQFSad3HosYbCkEkbjN";
|
var accessKeySecret = "NnutvWhKl4HbQFSad3HosYbCkEkbjN";
|
||||||
// 填写Bucket名称,例如examplebucket。
|
// 填写Bucket名称,例如examplebucket。
|
||||||
var bucketName = "dfdiyfile";
|
var bucketName = "dfdiyfile";
|
||||||
|
int year = DateTime.Now.Year;
|
||||||
|
int month = DateTime.Now.Month;
|
||||||
|
int day = DateTime.Now.Day;
|
||||||
// 填写Object完整路径,完整路径中不能包含Bucket名称,例如exampledir/exampleobject.txt。
|
// 填写Object完整路径,完整路径中不能包含Bucket名称,例如exampledir/exampleobject.txt。
|
||||||
var objectName = "supplierFile/" + fileName;
|
var objectName = "supplierFile/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||||
|
|
||||||
// 填写Bucket所在地域对应的Region。以华东1(杭州)为例,Region填写为cn-hangzhou。
|
// 填写Bucket所在地域对应的Region。以华东1(杭州)为例,Region填写为cn-hangzhou。
|
||||||
string region = "cn-fuzhou";
|
string region = "cn-fuzhou";
|
||||||
|
|||||||
+35
-9
@@ -149,7 +149,7 @@ public partial class supplierDownload : System.Web.UI.Page
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
StringBuilder sql = new StringBuilder();
|
StringBuilder sql = new StringBuilder();
|
||||||
sql.AppendFormat("select ctid,seller_memo,FinishDesignTime,OrderState,SupplierName,FileMd5,OrderSn,tid from view_erptradecell where FinishDesignTime is not null and ctid in ({0}) {1}", ("'" + tids.Replace(",", "','") + "'"), ((onlyDownFile == 1 || isFromClient == 1) ? "" : " and OrderState=5 "));
|
sql.AppendFormat("select ctid,seller_memo,FinishDesignTime,OrderState,SupplierName,FileMd5,OrderSn,tid,SupplierId from view_erptradecell where FinishDesignTime is not null and ctid in ({0}) {1}", ("'" + tids.Replace(",", "','") + "'"), ((onlyDownFile == 1 || isFromClient == 1) ? "" : " and OrderState=5 "));
|
||||||
DataTable dt = CeErpTradeCell.ExecuteDataset(sql.ToString()).Tables[0];
|
DataTable dt = CeErpTradeCell.ExecuteDataset(sql.ToString()).Tables[0];
|
||||||
if (dt == null || dt.Rows.Count < 1)
|
if (dt == null || dt.Rows.Count < 1)
|
||||||
{
|
{
|
||||||
@@ -170,12 +170,10 @@ public partial class supplierDownload : System.Web.UI.Page
|
|||||||
string fname = df_name + ext;
|
string fname = df_name + ext;
|
||||||
string tid = dr["tid"].ToString();
|
string tid = dr["tid"].ToString();
|
||||||
string orderSn = dr["OrderSn"].ToString();
|
string orderSn = dr["OrderSn"].ToString();
|
||||||
string rname = "";
|
string rname = formatMemo(dr["seller_memo"]) + ext;
|
||||||
if (!string.IsNullOrEmpty(tid) && !string.IsNullOrEmpty(orderSn))
|
if ("14".Equals(dr["SupplierId"].ToString()))
|
||||||
{
|
{
|
||||||
rname = formatMemo(dr["seller_memo"]).Replace(orderSn, tid);
|
rname = dealMemoName(rname);
|
||||||
rname = rname + "《" + orderSn + "》";
|
|
||||||
rname = rname + ext;
|
|
||||||
}
|
}
|
||||||
int IsFileEncrypt = IsFileEncrypted(fname);
|
int IsFileEncrypt = IsFileEncrypted(fname);
|
||||||
if (IsFileEncrypt == 1 && File.Exists(fname))
|
if (IsFileEncrypt == 1 && File.Exists(fname))
|
||||||
@@ -284,7 +282,35 @@ public partial class supplierDownload : System.Web.UI.Page
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private string dealMemoName(string name)
|
||||||
|
{
|
||||||
|
string[] al = name.Split('-');
|
||||||
|
List<string> list = new List<string>();
|
||||||
|
string pa = string.Empty;
|
||||||
|
for (int i = 0; i < al.Length; i++)
|
||||||
|
{
|
||||||
|
if (i == 1)
|
||||||
|
{
|
||||||
|
if (al[i].Contains("(") || al[i].Contains("("))
|
||||||
|
{
|
||||||
|
string tname = al[i].Replace(")", "").Replace(")", "").Replace("(", "").Replace("(", "");
|
||||||
|
if (!string.IsNullOrEmpty(tname))
|
||||||
|
{
|
||||||
|
pa = al[i];
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
list.Add(al[i]);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(pa))
|
||||||
|
{
|
||||||
|
list.Insert(3, pa);
|
||||||
|
}
|
||||||
|
name = string.Join("-", list);
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
private string formatMemo(object memo)
|
private string formatMemo(object memo)
|
||||||
{
|
{
|
||||||
@@ -361,13 +387,13 @@ public partial class supplierDownload : System.Web.UI.Page
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
file.Add(files[i]);
|
file.Add(files[i], rnameList[i]);
|
||||||
addFiles.Add(files[i]);
|
addFiles.Add(files[i]);
|
||||||
addCtid.Add(ctidLst[i]);
|
addCtid.Add(ctidLst[i]);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
XLog.SaveLog(0, "supplierdownload_ZipFileDownload:" + ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -420,7 +446,7 @@ public partial class supplierDownload : System.Web.UI.Page
|
|||||||
//通知浏览器下载文件而不是打开\\fileDownload=true; path=/
|
//通知浏览器下载文件而不是打开\\fileDownload=true; path=/
|
||||||
Response.AddHeader("Set-Cookie", "fileDownload=true; path=/;");
|
Response.AddHeader("Set-Cookie", "fileDownload=true; path=/;");
|
||||||
//Response.AddHeader("Cache-Control", "no-cache, no-store, must-revalidate");
|
//Response.AddHeader("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||||
Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(dfile, System.Text.Encoding.UTF8));
|
Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(fname, System.Text.Encoding.UTF8));
|
||||||
Response.AddHeader("Content-Length", bytes.Length.ToString());
|
Response.AddHeader("Content-Length", bytes.Length.ToString());
|
||||||
Response.AddHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
Response.AddHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||||
Response.BinaryWrite(bytes);
|
Response.BinaryWrite(bytes);
|
||||||
|
|||||||
新增問題並參考
封鎖使用者