|
|
@@ -927,9 +927,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (j != SingleDoc.Variables.FreeVariables.Count - 1)
|
|
|
sql.Append(dr1[0]["lp_sql"].ToString() + ",");
|
|
|
+ else
|
|
|
+ sql.Append(dr1[0]["lp_sql"].ToString());
|
|
|
}
|
|
|
}
|
|
|
- DataTable dt = (DataTable)adh.ExecuteSql("select " + sql.ToString().Substring(0, sql.Length - 1) + " from prodiobarcode where pib_id=" + pib_id, "select");
|
|
|
+ DataTable dt = (DataTable)adh.ExecuteSql("select " + sql.ToString() + " from prodiobarcode where pib_id=" + pib_id, "select");
|
|
|
for (int j = 0; j < SingleDoc.Variables.FreeVariables.Count; j++)
|
|
|
{
|
|
|
DataRow[] dr1 = SingleLabelParam.Select("lp_name='" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
@@ -1207,9 +1209,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (j != MidDoc.Variables.FreeVariables.Count - 1)
|
|
|
sql.Append(dr1[0]["lp_sql"].ToString() + ",");
|
|
|
+ else
|
|
|
+ sql.Append(dr1[0]["lp_sql"].ToString());
|
|
|
}
|
|
|
}
|
|
|
- DataTable dt = (DataTable)adh.ExecuteSql("select " + sql.ToString().Substring(0, sql.Length - 1) + " from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1='" + pib_outboxcode1 + "'", "select");
|
|
|
+ DataTable dt = (DataTable)adh.ExecuteSql("select " + sql.ToString() + " from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1='" + pib_outboxcode1 + "'", "select");
|
|
|
for (int j = 0; j < MidDoc.Variables.FreeVariables.Count; j++)
|
|
|
{
|
|
|
DataRow[] dr1 = MidLabelParam.Select("lp_name='" + MidDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
@@ -1243,9 +1247,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (j != OutBoxDoc.Variables.FreeVariables.Count - 1)
|
|
|
sql.Append(dr1[0]["lp_sql"].ToString() + ",");
|
|
|
+ else
|
|
|
+ sql.Append(dr1[0]["lp_sql"].ToString());
|
|
|
}
|
|
|
}
|
|
|
- DataTable dt = (DataTable)adh.ExecuteSql("select " + sql.ToString().Substring(0, sql.Length - 1) + " from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode2='" + pib_outboxcode2 + "'", "select");
|
|
|
+ DataTable dt = (DataTable)adh.ExecuteSql("select " + sql.ToString() + " from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode2='" + pib_outboxcode2 + "'", "select");
|
|
|
for (int j = 0; j < OutBoxDoc.Variables.FreeVariables.Count; j++)
|
|
|
{
|
|
|
DataRow[] dr1 = OutLabelParam.Select("lp_name='" + OutBoxDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
|
|
|
@@ -1335,10 +1341,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
//嵌套查询重置RowNum
|
|
|
sql.Clear();
|
|
|
- sql.Append("select t.*,rownum from (select pib_custoutboxcode,pib_custmidboxcode,pr_orispeccode,pd_id,pd_custprodcode,pib_indate,pi_date,pib_inoutno,pd_custprodspec,nvl(pib_ifrecheck,0)pib_ifrecheck,nvl(pib_ifupload,0)pib_ifupload,nvl(pib_ifmodify,0)pib_ifmodify,pd_pocode,pib_madein,pib_custbarcode,");
|
|
|
- sql.Append("pib_id,pib_pdid,pib_piid,pib_pdno,pib_prodcode,nvl(nvl(pd_brand,pib_brand),pr_brand)pib_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 pd_pdno=pib_pdno and ");
|
|
|
- sql.Append("pd_prodcode=pib_prodcode left join product on pr_code=pib_prodcode left join sale on sa_code=pib_ordercode where pib_piid='" + PI_ID + "' order by to_number(pib_id))t");
|
|
|
+ sql.Append("select t.*,rownum from (select 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,pib_custprodspec,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, 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 left join sale on sa_code=pib_ordercode where pib_piid='" + PI_ID + "' order by to_number(pib_id))t");
|
|
|
LabelInfDataTable = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
|
|
|
//检验查询的字段和本地数据库字段是否匹配
|
|
|
adh.AddColumFromDataTable(LabelInfDataTable, "prodiobarcode");
|