Browse Source

抽样数据采集添加不良验证

章政 8 years ago
parent
commit
87d36ba006

+ 1 - 1
UAS-MES/FunctionCode/OQC/OQC_BatchResultJudge.cs

@@ -37,7 +37,7 @@ namespace UAS_MES.OQC
         {
             if (CheckStep())
             {
-                DataTable temp = dh.getFieldsDataByCondition("makeserial", new string[] { "nvl(ms_ifrework,0)ms_ifrework", "ms_reworkcheckno" }, "ms_sncode='" + ms_sncode.Text + "'");
+                DataTable temp = dh.getFieldsDataByCondition("makeserial", new string[] { "nvl(ms_ifrework,0)ms_ifrework", "ms_reworkcheckno" }, "upper(ms_sncode)='" + ms_sncode.Text.ToUpper() + "'");
                 if (temp.Rows.Count > 0)
                 {
                     if (temp.Rows[0]["ms_ifrework"].ToString() != "0")

+ 1 - 1
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.cs

@@ -56,7 +56,7 @@ namespace UAS_MES.OQC
         {
             if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
             {
-                DataTable temp = dh.getFieldsDataByCondition("makeserial", new string[] { "nvl(ms_ifrework,0)ms_ifrework", "ms_reworkcheckno" }, "ms_sncode='" + ms_sncode.Text + "'");
+                DataTable temp = dh.getFieldsDataByCondition("makeserial", new string[] { "nvl(ms_ifrework,0)ms_ifrework", "ms_reworkcheckno" }, "upper(ms_sncode)='" + ms_sncode.Text.ToUpper() + "'");
                 if (temp.Rows.Count > 0)
                 {
                     if (temp.Rows[0]["ms_ifrework"].ToString() != "0")

+ 6 - 1
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -47,9 +47,14 @@ namespace UAS_MES.OQC
         {
             if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
             {
-                DataTable temp = dh.getFieldsDataByCondition("makeserial", new string[] { "nvl(ms_ifrework,0)ms_ifrework", "ms_reworkcheckno" }, "ms_sncode='" + sncode.Text + "'");
+                DataTable temp = dh.getFieldsDataByCondition("makeserial", new string[] { "nvl(ms_ifrework,0)ms_ifrework", "ms_reworkcheckno", "ms_reworkstatus" }, "upper(ms_sncode)='" + sncode.Text.ToUpper() + "'");
                 if (temp.Rows.Count > 0)
                 {
+                    if (temp.Rows[0]["ms_reworkstatus"].ToString() == "3")
+                    {
+                        OperateResult.AppendText(">>返修的不良序列号必须先进行维修\n", Color.Red);
+                        return;
+                    }
                     if (temp.Rows[0]["ms_ifrework"].ToString() != "0")
                     {
                         ob_checkno.Text = temp.Rows[0]["ms_reworkcheckno"].ToString();