Эх сурвалжийг харах

万利达修改代码提交

Hcsy 6 жил өмнө
parent
commit
8d815d237d

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_RePrintLabel.cs

@@ -406,7 +406,7 @@ namespace UAS_MES.Make
                             if (infoc.Rows[0]["pa_downstatus"].ToString() != "0")
                             if (infoc.Rows[0]["pa_downstatus"].ToString() != "0")
                             {
                             {
                                 //判断下地原因是否是补打标签,是才能取消下地
                                 //判断下地原因是否是补打标签,是才能取消下地
-                                if (dh.CheckExist("makedown", "Md_OUTBOXCODE='" + TSN + "' AND Md_PRODCODE='" + infoc.Rows[0]["pa_prodcode"].ToString() + "' AND Md_STATUS=-1  AND MD_DOWNREASON='补打标签'"))
+                                if (dh.CheckExist("makedown", "Md_OUTBOXCODE='" + TSN + "' AND nvl(Md_PRODCODE,' ')='" + (infoc.Rows[0]["pa_prodcode"].ToString()==""?" ":infoc.Rows[0]["pa_prodcode"].ToString()) + "' AND Md_STATUS=-1  AND MD_DOWNREASON='补打标签'"))
                                 {
                                 {
                                     sql.Clear();
                                     sql.Clear();
                                     sql.Append("update makedown set md_status=0,Md_UPREASON='标签补打核对',Md_UPMAN='" + User.UserCode + "',Md_UPDATE=SYSDATE WHERE Md_OUTBOXCODE='" + TSN + "' AND Md_PRODCODE='" + infoc.Rows[0]["pa_prodcode"].ToString() + "' AND Md_STATUS=-1  AND MD_DOWNREASON='补打标签'");
                                     sql.Append("update makedown set md_status=0,Md_UPREASON='标签补打核对',Md_UPMAN='" + User.UserCode + "',Md_UPDATE=SYSDATE WHERE Md_OUTBOXCODE='" + TSN + "' AND Md_PRODCODE='" + infoc.Rows[0]["pa_prodcode"].ToString() + "' AND Md_STATUS=-1  AND MD_DOWNREASON='补打标签'");

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

@@ -782,11 +782,11 @@ namespace UAS_MES.Make
 
 
         private void SaveBadLocation_Click(object sender, EventArgs e)
         private void SaveBadLocation_Click(object sender, EventArgs e)
         {
         {
-            if (mbl_loc.Text.Length > 6)
-            {
-                OperatResult.AppendText(">>不良位置长度不能大于6\n", Color.Red);
-                return;
-            }
+            //if (mbl_loc.Text.Length > 6)
+            //{
+            //    OperatResult.AppendText(">>不良位置长度不能大于6\n", Color.Red);
+            //    return;
+            //}
             DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode from makeserial where ms_id='" + msid + "' and ms_sncode='" + GetSNCode.Text + "' and ms_status=3", "select");
             DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode from makeserial where ms_id='" + msid + "' and ms_sncode='" + GetSNCode.Text + "' and ms_status=3", "select");
             if (dt.Rows.Count > 0)
             if (dt.Rows.Count > 0)
             {
             {

+ 7 - 1
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -496,9 +496,15 @@ namespace UAS_MES.Make
                     }
                     }
                 }
                 }
                 //如果之前是良品的
                 //如果之前是良品的
-                dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_status", "ms_checkno" }, "ms_id='" + oMSID + "' and ms_stepcode='" + User.CurrentStepCode + "'");
+                dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_status", "ms_checkno","ms_outboxcode" }, "ms_id='" + oMSID + "' and ms_stepcode='" + User.CurrentStepCode + "'");
                 if (dt.Rows.Count > 0)
                 if (dt.Rows.Count > 0)
                 {
                 {
+                    string ms_outboxcode = dt.Rows[0]["ms_outboxcode"].ToString();
+                    if (ms_outboxcode != "")
+                    {
+                        OperateResult.AppendText(">>SN已装箱"+ms_outboxcode+",采集不良请先解除装箱\n",Color.Red);
+                        return;
+                    }
                     string status = dt.Rows[0]["ms_status"].ToString();
                     string status = dt.Rows[0]["ms_status"].ToString();
                     if (status == "1" || status == "2")
                     if (status == "1" || status == "2")
                     {
                     {