|
|
@@ -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和参数名称
|