Explorar el Código

添加判定是否自动分配的SN

章政 hace 7 años
padre
commit
8e82840927
Se han modificado 2 ficheros con 5 adiciones y 5 borrados
  1. 2 2
      UAS_AutoPass/AutoAnalysisXml.cs
  2. 3 3
      UAS_AutoPass/ToolClass/LogicHandler.cs

+ 2 - 2
UAS_AutoPass/AutoAnalysisXml.cs

@@ -264,7 +264,7 @@ namespace UAS_AutoPass
                 if (LogicHandler.CheckStepSNAndMacode(ma_code.Text == "" ? makecode : ma_code.Text, isource, sncode, iusercode, out makecode, out oMSID, out oErrMessage))
                 {
                     //插入日志
-                    LogicHandler.AutoPassLog(sncode, isource, makecode, test_date, istepcode, ilinecode, e.Name, test_result == "NG" ? "-1" : "0");
+                    LogicHandler.AutoPassLog(sncode, isource, makecode, test_date, istepcode, ilinecode, e.Name, test_result == "NG" ? "-1" : "0","-1");
                     //如果是不良品记录日志,用于测试采集判负
                     if (test_result == "NG")
                     {
@@ -325,7 +325,7 @@ namespace UAS_AutoPass
                             default:
                                 break;
                         }
-                        LogicHandler.AutoPassLog(sncode, isource, makecode, test_date, istepcode, ilinecode, e.Name, test_result == "NG" ? "1" : "0");
+                        LogicHandler.AutoPassLog(sncode, isource, makecode, test_date, istepcode, ilinecode, e.Name, test_result == "NG" ? "1" : "0","0");
                     }
                 }
                 else

+ 3 - 3
UAS_AutoPass/ToolClass/LogicHandler.cs

@@ -30,13 +30,13 @@ namespace UAS_AutoPass.ToolClass
                 return false;
         }
 
-        public static void AutoPassLog(string iSN, string iSource, string iMakeCode, string iDate, string iStepCode, string iLineCode, string iFileName, string iIFNG)
+        public static void AutoPassLog(string iSN, string iSource, string iMakeCode, string iDate, string iStepCode, string iLineCode, string iFileName, string iIFNG,string iIFAutoSN)
         {
             sql.Clear();
             sql.Append("insert into AUTOSCANLOG(as_id,as_indate,as_testdate,as_sourcecode,as_stepcode,");
-            sql.Append("as_linecode,as_makecode,as_sncode,as_filename,as_ifng)values(AUTOSCANLOG_seq.nextval,");
+            sql.Append("as_linecode,as_makecode,as_sncode,as_filename,as_ifng,as_autosn)values(AUTOSCANLOG_seq.nextval,");
             sql.Append("sysdate,to_date('" + iDate + "','yyyy-mm-dd,hh24:mi:ss'),'" + iSource + "','" + iStepCode + "','" + iLineCode + "','" + iMakeCode + "',");
-            sql.Append("'" + iSN + "','" + iFileName + "','" + iIFNG + "')");
+            sql.Append("'" + iSN + "','" + iFileName + "','" + iIFNG + "','"+iIFAutoSN+"')");
             dh.ExecuteSql(sql.ToString(), "select");
         }