Explorar o código

打印方法修改

Hcsy %!s(int64=8) %!d(string=hai) anos
pai
achega
2d481d23c3
Modificáronse 1 ficheiros con 15 adicións e 12 borrados
  1. 15 12
      UAS-MES/PublicMethod/Print.cs

+ 15 - 12
UAS-MES/PublicMethod/Print.cs

@@ -25,19 +25,22 @@ namespace UAS_MES.PublicMethod
         {
             ErrorMessage = "";
             DataTable dt = new DataTable();
-            if (LabelType == "卡通箱标" || LabelType == "大箱标" || LabelType == "栈板标")
+            if (IfRePrint != "-1")
             {
-                dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
-            }
-            else
-            {
-                dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_makecode='" + MakeCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
-            }
-            //如果已经打印过了,则不允许再打印
-            if (dt.Rows.Count > 0)
-            {
-                ErrorMessage = SnCode + LabelType + "已打印";
-                return false;
+                if (LabelType == "卡通箱标" || LabelType == "大箱标" || LabelType == "栈板标")
+                {
+                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
+                }
+                else
+                {
+                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_makecode='" + MakeCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
+                }
+                //如果已经打印过了,则不允许再打印
+                if (dt.Rows.Count > 0)
+                {
+                    ErrorMessage = SnCode + LabelType + "已打印";
+                    return false;
+                }
             }
             //打开模板路径
             //查询模板对应的取值SQL和参数名称