Ver código fonte

SPI XRAY采集调整

caosy 6 anos atrás
pai
commit
d7abd1ab4c

+ 6 - 5
UAS-MES/FunctionCode/Make/Make_SpiTestCollection.cs

@@ -265,11 +265,7 @@ namespace UAS_MES.Make
                         string ifrepair = dt.Rows[0]["st_ifrepair"].ToString();
                         string sncode = dt.Rows[0]["ms_sncode"].ToString();
                         int ms_spi = int.Parse(dt.Rows[0]["ms_spi"].ToString());
-                        if (ms_spi != 0)
-                        {
-                            OperateResult.AppendText(">>" + ms_sncode.Text + "已采集过XRAY良品,无法重复采集\n", Color.Red, ms_sncode);
-                            return;
-                        }
+                      
                         if (sncode != ms_sncode.Text)
                         {
                             OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过转号,不允许使用TSN采集\n", Color.Red, ms_sncode);
@@ -278,6 +274,11 @@ namespace UAS_MES.Make
                         ifrework = dt.Rows[0]["ms_ifrework"].ToString();
                         if (GoodProduct.Checked)
                         {
+                            if (ms_spi != 0)
+                            {
+                                OperateResult.AppendText(">>" + ms_sncode.Text + "已采集过XRAY良品,无法重复采集\n", Color.Red, ms_sncode);
+                                return;
+                            }
                             if (ifrework != "0")
                             {
                                 if (stepcode == User.CurrentStepCode && (reworkstatus == "1" || reworkstatus == "2") && ifrepair == "0")

+ 5 - 5
UAS-MES/FunctionCode/Make/Make_XrayTestCollection.cs

@@ -265,11 +265,6 @@ namespace UAS_MES.Make
                         string ifrepair = dt.Rows[0]["st_ifrepair"].ToString();
                         string sncode = dt.Rows[0]["ms_sncode"].ToString();
                         int ms_xray = int.Parse(dt.Rows[0]["ms_xray"].ToString());
-                        if (ms_xray != 0)
-                        {
-                            OperateResult.AppendText(">>" + ms_sncode.Text + "已采集过XRAY良品,无法重复采集\n", Color.Red, ms_sncode);
-                            return;
-                        }
                         if (sncode != ms_sncode.Text)
                         {
                             OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过转号,不允许使用TSN采集\n", Color.Red, ms_sncode);
@@ -278,6 +273,11 @@ namespace UAS_MES.Make
                         ifrework = dt.Rows[0]["ms_ifrework"].ToString();
                         if (GoodProduct.Checked)
                         {
+                            if (ms_xray != 0)
+                            {
+                                OperateResult.AppendText(">>" + ms_sncode.Text + "已采集过XRAY良品,无法重复采集\n", Color.Red, ms_sncode);
+                                return;
+                            }
                             if (ifrework != "0")
                             {
                                 if (stepcode == User.CurrentStepCode && (reworkstatus == "1" || reworkstatus == "2") && ifrepair == "0")