|
|
@@ -331,8 +331,10 @@ namespace UAS_LabelMachine
|
|
|
//}
|
|
|
break;
|
|
|
case "PLC2":
|
|
|
+ ScanGroup = BaseUtil.filterDataTable(ScanGroup, "sg_autolabel<>0");
|
|
|
break;
|
|
|
case "FrontendCheck":
|
|
|
+ ScanGroup = BaseUtil.filterDataTable(ScanGroup, "sg_autolabel<>0");
|
|
|
//比对当前箱数量和容量
|
|
|
FrontCollect.Text = msg;
|
|
|
if (!FrontCheckFunction(msg, out ErrorMsg))
|
|
|
@@ -377,6 +379,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
break;
|
|
|
case "BackendCheck":
|
|
|
+ ScanGroup = BaseUtil.filterDataTable(ScanGroup, "sg_autolabel<>0");
|
|
|
BackCheck.Text = msg;
|
|
|
if (BackendCheckFunction(msg, "Auto", out ErrorMsg))
|
|
|
{
|
|
|
@@ -570,11 +573,7 @@ namespace UAS_LabelMachine
|
|
|
ErrorMsg = "订单号不匹配";
|
|
|
}
|
|
|
//如果匹配到的行的品牌和当前正则的品牌不相等结束本次循环
|
|
|
- if (LabelInf.Rows[CurrentRowIndex].Cells["pib_brand"].Value.ToString() != sg_brand)
|
|
|
- {
|
|
|
- continue;
|
|
|
- }
|
|
|
- else
|
|
|
+ if (LabelInf.Rows[CurrentRowIndex].Cells["pib_brand"].Value.ToString() == sg_brand)
|
|
|
{
|
|
|
break;
|
|
|
}
|
|
|
@@ -1376,7 +1375,7 @@ namespace UAS_LabelMachine
|
|
|
for (int j = 0; j < MidDoc.Variables.FormVariables.Count; j++)
|
|
|
{
|
|
|
DataRow[] dr1 = MidLabelParam.Select("lp_name='" + MidDoc.Variables.FormVariables.Item(j + 1).Name + "'");
|
|
|
- if (dr1.Length > 0 && dr1[0]["lp_valuetype"].ToString() == "字符串")
|
|
|
+ if (dr1.Length > 0 && dr1[0]["lp_valuetype"].ToString() == "字符串" && dr1[0]["lp_sql"].ToString() != "")
|
|
|
{
|
|
|
sql.Append(dr1[0]["lp_sql"].ToString() + ",");
|
|
|
}
|
|
|
@@ -1462,7 +1461,7 @@ namespace UAS_LabelMachine
|
|
|
for (int j = 0; j < OutBoxDoc.Variables.FormVariables.Count; j++)
|
|
|
{
|
|
|
DataRow[] dr1 = OutLabelParam.Select("lp_name='" + OutBoxDoc.Variables.FormVariables.Item(j + 1).Name + "'");
|
|
|
- if (dr1.Length > 0 && dr1[0]["lp_valuetype"].ToString() == "字符串")
|
|
|
+ if (dr1.Length > 0 && dr1[0]["lp_valuetype"].ToString() == "字符串" && dr1[0]["lp_sql"].ToString() != "")
|
|
|
{
|
|
|
sql.Append(dr1[0]["lp_sql"].ToString() + ",");
|
|
|
}
|
|
|
@@ -1604,11 +1603,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
//嵌套查询重置RowNum
|
|
|
sql.Clear();
|
|
|
- sql.Append("select t.*,rownum from (select pd_pdno,pib_autoset,pd_ordercode,pib_year,pi_remark,pi_remark2,pib_month,pib_day,pr_barcode,pr_detail,pib_custoutboxcode,pib_custmidboxcode,pr_orispeccode,pd_id,pd_custprodcode,pib_indate,pi_date,pib_inoutno,pd_custprodspec,");
|
|
|
- sql.Append("nvl(pib_ifrecheck,0)pib_ifrecheck,nvl(pib_ifupload,0)pib_ifupload,nvl(pib_ifmodify,0)pib_ifmodify,pd_pocode,pib_madein,pib_custbarcode,pib_id,pib_pdid,pib_piid,");
|
|
|
- sql.Append("pib_pdno,pib_prodcode,nvl(nvl(pd_brand,pib_brand),pr_brand)pib_brand,(select pr_brand from saledetail left join product on pr_code=sd_prodcode where sd_code=pd_ordercode and sd_detno=pd_orderdetno ) sd_brand, pr_vendprodcode,pib_lotno,pib_datecode,pib_qty,pr_spec,pi_title,pr_zxbzs,pr_unit,pib_barcode,pib_outboxcode1,");
|
|
|
- sql.Append("pib_outboxcode2,nvl(pib_ifpick,0)pib_ifpick,nvl(pib_ifprint,0)pib_ifprint from prodiobarcode left join prodinout on pib_piid=pi_id left join prodiodetail on pib_piid=pd_piid and ");
|
|
|
- sql.Append("pd_pdno=pib_pdno and pd_prodcode=pib_prodcode left join product on pr_code=pib_prodcode where pib_piid='" + PI_ID + "' order by to_number(pib_id))t");
|
|
|
+ sql.Append("select t.*,rownum from prodiobarcode_view t where pib_inoutno='" + pi_inoutno.Text + "'");
|
|
|
LabelInfDataTable = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
|
|
|
//检验查询的字段和本地数据库字段是否匹配
|
|
|
adh.AddColumFromDataTable(LabelInfDataTable, "prodiobarcode");
|
|
|
@@ -2553,10 +2548,9 @@ namespace UAS_LabelMachine
|
|
|
for (int j = 0; j < SingleDoc.Variables.FormVariables.Count; j++)
|
|
|
{
|
|
|
DataRow[] dr1 = SingleLabelParam.Select("lp_name='" + SingleDoc.Variables.FormVariables.Item(j + 1).Name + "'");
|
|
|
- if (dr1.Length > 0)
|
|
|
+ if (dr1.Length > 0 && dr1[0]["lp_valuetype"].ToString() == "字符串" && dr1[0]["lp_sql"].ToString() != "")
|
|
|
{
|
|
|
- if (dr1[0]["lp_valuetype"].ToString() == "字符串")
|
|
|
- sql.Append(dr1[0]["lp_sql"].ToString() + ",");
|
|
|
+ sql.Append(dr1[0]["lp_sql"].ToString() + ",");
|
|
|
}
|
|
|
}
|
|
|
sql.Append("1,");
|