Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 8 years ago
parent
commit
1469407f2c
1 changed files with 6 additions and 0 deletions
  1. 6 0
      UAS-MES/PublicMethod/LogicHandler.cs

+ 6 - 0
UAS-MES/PublicMethod/LogicHandler.cs

@@ -1188,6 +1188,12 @@ namespace UAS_MES.PublicMethod
                     else ErrMessage = "条码" + iSN + "不存在";
                     break;
                 case "RULE":
+                    dt = (DataTable)dh.ExecuteSql("select cm_barcode from craftmaterial where cm_barcode='" + iSN + "'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        ErrMessage = "条码" + iSN + "已经上料";
+                        return false;
+                    }
                     int sp_length = int.Parse(iLength != "" ? iLength : "0");
                     //若有多个,以|分割
                     string[] pres = iPrefix.Split('|');