|
|
|
@ -5660,12 +5660,40 @@ namespace BP.WF.HttpHandler
|
|
|
|
|
// return AttachmentUpload_Down(true);
|
|
|
|
|
return AttachmentUpload_Down();
|
|
|
|
|
}
|
|
|
|
|
#region 获取ip(包括获取本机ip)
|
|
|
|
|
public static string GetIP4Address()
|
|
|
|
|
{
|
|
|
|
|
string IP4Address = String.Empty;
|
|
|
|
|
foreach (IPAddress IPA in Dns.GetHostAddresses(HttpContext.Current.Request.UserHostAddress))
|
|
|
|
|
{
|
|
|
|
|
if (IPA.AddressFamily.ToString() == "InterNetwork")
|
|
|
|
|
{
|
|
|
|
|
IP4Address = IPA.ToString();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (IP4Address != String.Empty)
|
|
|
|
|
{
|
|
|
|
|
return IP4Address;
|
|
|
|
|
}
|
|
|
|
|
foreach (IPAddress IPA in Dns.GetHostAddresses(Dns.GetHostName()))
|
|
|
|
|
{
|
|
|
|
|
if (IPA.AddressFamily.ToString() == "InterNetwork")
|
|
|
|
|
{
|
|
|
|
|
IP4Address = IPA.ToString();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return IP4Address;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 下载
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public string AttachmentUpload_Down()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//获取文件是否加密
|
|
|
|
|
bool fileEncrypt = BP.Difference.SystemConfig.isEnableAthEncrypt;
|
|
|
|
|
FrmAttachmentDB downDB = new FrmAttachmentDB();
|
|
|
|
@ -5690,7 +5718,7 @@ namespace BP.WF.HttpHandler
|
|
|
|
|
gwf.Update();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string ip = GetIP4Address();
|
|
|
|
|
bool isEncrypt = downDB.GetParaBoolen("IsEncrypt");
|
|
|
|
|
string filepath = "";
|
|
|
|
|
|
|
|
|
@ -5742,8 +5770,6 @@ namespace BP.WF.HttpHandler
|
|
|
|
|
//string clientIP = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
|
|
|
|
|
string strHostName = System.Net.Dns.GetHostName();
|
|
|
|
|
//string clientIPAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(1).ToString();
|
|
|
|
|
string clientIPAddress = this.Address;
|
|
|
|
|
string ip = HttpContext.Current.Request.Headers["X-Forwarded-For"];
|
|
|
|
|
string url = "http://172.15.89.222:8080/Personnel/Personnelapi/LogRecording";
|
|
|
|
|
string questbody = "";
|
|
|
|
|
string result = "";
|
|
|
|
@ -5752,7 +5778,7 @@ namespace BP.WF.HttpHandler
|
|
|
|
|
questbody += "\",\r \"Operate\": \"";
|
|
|
|
|
questbody += "下载了" + downDB.FileName + "文件";
|
|
|
|
|
questbody += "\",\r \"OperateIp\": \"";
|
|
|
|
|
questbody += clientIPAddress;
|
|
|
|
|
questbody += ip;
|
|
|
|
|
questbody += "\",\r \"Flag\": \"";
|
|
|
|
|
questbody += "1";
|
|
|
|
|
questbody += "\",\r}";
|
|
|
|
@ -6097,10 +6123,8 @@ namespace BP.WF.HttpHandler
|
|
|
|
|
//新文件目录
|
|
|
|
|
copyToPath = copyToPath + "//" + db.FileName;
|
|
|
|
|
#region 触发接口 BKGY
|
|
|
|
|
//string clientIP = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
|
|
|
|
|
string ip = GetIP4Address();//获取ip地址
|
|
|
|
|
string strHostName = System.Net.Dns.GetHostName();
|
|
|
|
|
//string clientIPAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(1).ToString();
|
|
|
|
|
string clientIPAddress = this.Address;
|
|
|
|
|
string urll = "http://172.15.89.222:8080/Personnel/Personnelapi/LogRecording";
|
|
|
|
|
string questbody = "";
|
|
|
|
|
string result = "";
|
|
|
|
@ -6109,7 +6133,7 @@ namespace BP.WF.HttpHandler
|
|
|
|
|
questbody += "\",\r \"Operate\": \"";
|
|
|
|
|
questbody += "下载了" + db.FileName + "文件";
|
|
|
|
|
questbody += "\",\r \"OperateIp\": \"";
|
|
|
|
|
questbody += clientIPAddress;
|
|
|
|
|
questbody += ip;
|
|
|
|
|
questbody += "\",\r \"Flag\": \"";
|
|
|
|
|
questbody += "1";
|
|
|
|
|
questbody += "\",\r}";
|
|
|
|
|