Browse Source

调试完成思泰克spi

yhluo 5 months ago
parent
commit
a56df1e605
1 changed files with 7 additions and 3 deletions
  1. 7 3
      UAS_MES_BG/FunctionCode/Make/Make_ParseLog.cs

+ 7 - 3
UAS_MES_BG/FunctionCode/Make/Make_ParseLog.cs

@@ -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;
                 }
             }