20220915 焊接增加焊工功效分析界面
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using RestSharp;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -91,10 +92,37 @@ namespace BLL
|
||||
};
|
||||
|
||||
}
|
||||
public static void UploadFileToOa()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="file">文件地址</param>
|
||||
/// <param name="subject">主项</param>
|
||||
/// <param name="fileType">1模型2图纸</param>
|
||||
public static bool UploadFileToOa(string file, string unitworkid, string fileType)
|
||||
{
|
||||
bool result = true;
|
||||
try
|
||||
{
|
||||
var client = new RestClient("http://sgglnet.sedin.com.cn:6060/file/uploadSingle");
|
||||
client.Timeout = -1;
|
||||
var request = new RestRequest(Method.POST);
|
||||
// client.UserAgent = "apifox/1.0.0 (https://www.apifox.cn)";
|
||||
//request.AddFile("file", @"E:\微信\WeChat\WeChat Files\wxid_9140361403112\FileStorage\File\2022-08\焊接管理尾项20220809.docx");
|
||||
request.AddFile("file", file);
|
||||
string unitworkname = BLL.UnitWorkService.GetNameById(unitworkid);
|
||||
request.AddParameter("subject", unitworkname);
|
||||
request.AddParameter("fileType", fileType);
|
||||
IRestResponse response = client.Execute(request);
|
||||
var contentPost = response.Content;
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
|
||||
result =false;
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取当前文件新的版本号
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user