Browse Source

自定义标签打印调整

callm 1 year ago
parent
commit
07b79603cd

+ 2 - 2
UAS_MES_LGDZ/FunctionCode/Make/Make_CustomLabelPrint.cs

@@ -103,10 +103,10 @@ namespace UAS_MES_NEW.Make
                 }
                 string la_id = listA.Rows[0]["la_id"].ToString();
                 string la_code = listA.Rows[0]["la_code"].ToString();
-                if (listA.Rows[0]["la_isdefault"].ToString() != "-1")
+                Console.WriteLine(listA.Rows[0]["la_isdefault"].ToString());
                 {
                     //说明没有默认的模板,那就取pl_id最大的
-                    listA = (DataTable)dh.ExecuteSql("select fp_name la_url,'" + la_id + "' la_id,'"+ la_code + "'la_code from FILEPATH where fp_id in (select *  from table(select parsestring(LA_SOFTTYPE,';') from label where la_id='" + la_id + "' ) where COLUMN_VALUE is not null)", "select");
+                    listA = (DataTable)dh.ExecuteSql("select fp_name la_url,'" + la_id + "' la_id,'" + la_code + "'la_code from FILEPATH where fp_id in (select *  from table(select parsestring(LA_SOFTTYPE,';') from label where la_id='" + la_id + "' ) where COLUMN_VALUE is not null)", "select");
                     //listA = (DataTable)dh.ExecuteSql("select la_code,la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='自定义' and la_statuscode='AUDITED' order by la_isdefault", "select");
                 }
                 //标签显示

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrintGetIMEI.cs

@@ -122,7 +122,7 @@ namespace UAS_MES_NEW.Make
                     string oStatus = "";
                     //调用公共方法CheckStepSNAndMacode判断工序是否正确
                     string status = "";
-                    dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei1='" + sncode.Text + "' order by ms_id desc", "select");
+                    dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_code='"+sncode.Text+"' or ms_imei1='" + sncode.Text + "' order by ms_id desc", "select");
                     if (dt.Rows.Count > 0)
                     {
                         sncode.Text = dt.Rows[0]["ms_sncode"].ToString();