|
|
@@ -434,10 +434,12 @@ namespace UAS_MES_NEW.Make
|
|
|
LogMessage($"文件: {file},开始上传");
|
|
|
if (UploadFileToFtp(file))
|
|
|
{
|
|
|
+ /*dh.ExecuteSql($@"insert into STEPTESTDETAIL (std_id,std_sn,std_makecode,std_indate,std_class,std_testresult)
|
|
|
+ select STEPTESTDETAIL_seq.nextval,'{SN}','{ma_code.Text}',sysdate,'思泰克SPI',
|
|
|
+ 'http://112.48.67.154:8088/ftp/mes/TestData/{DateTime.Now.ToString("yyyyMMdd")}/{Path.GetFileName(file)}.xml' from dual", "insert");*/
|
|
|
dh.ExecuteSql($@"insert into STEPTESTDETAIL (std_id,std_sn,std_makecode,std_indate,std_class,std_testresult)
|
|
|
select STEPTESTDETAIL_seq.nextval,'{SN}','{ma_code.Text}',sysdate,'思泰克SPI',
|
|
|
- 'http://112.48.67.154:8088/ftp/mes/TestData/{DateTime.Now.ToString("yyyyMMdd")}/{Path.GetFileName(file)}.xml' from dual", "insert");
|
|
|
-
|
|
|
+ 'http://192.168.1.92:8088/ftp/mes/TestData/{DateTime.Now.ToString("yyyyMMdd")}/{Path.GetFileName(file)}.xml' from dual", "insert");
|
|
|
string xmlContent = File.ReadAllText(file);
|
|
|
if (ConsoleLog(xmlContent, file))
|
|
|
{
|
|
|
@@ -733,7 +735,8 @@ namespace UAS_MES_NEW.Make
|
|
|
|
|
|
public bool UploadFileToFtp(string localFilePath)
|
|
|
{
|
|
|
- string ftpServer = "ftp://10.8.0.208:21/mes/TestData/";
|
|
|
+ /*string ftpServer = "ftp://10.8.0.208:21/mes/TestData/";*/
|
|
|
+ string ftpServer = "ftp://192.168.1.92:21/mes/TestData/";
|
|
|
string username = "vsftpd";
|
|
|
string password = "vsftpd3cd79018fl";
|
|
|
|
|
|
@@ -808,6 +811,7 @@ namespace UAS_MES_NEW.Make
|
|
|
|
|
|
using (FtpWebResponse response = (FtpWebResponse)request.GetResponse())
|
|
|
{
|
|
|
+ response.Close();
|
|
|
return "OK,目录创建成功: " + response.StatusDescription;
|
|
|
}
|
|
|
}
|