|
@@ -621,6 +621,14 @@ namespace UAS_LabelMachine
|
|
|
SumQty = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
|
|
|
}
|
|
|
//采集后重新计数,自动跳到下一行
|
|
|
+
|
|
|
+ if (SumQty == null)
|
|
|
+ {
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("select pib_pdno,pib_prodcode,sum(pib_qty) pib_qty from prodiodetail left join prodiobarcode on pd_id=pib_pdid and pd_pdno=pib_pdno ");
|
|
|
+ sql.Append("where pib_inoutno='" + pi_inoutno.Text + "' group by pib_prodcode,pib_pdno order by pib_pdno ");
|
|
|
+ SumQty = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
|
|
|
+ }
|
|
|
collectqty = (SumQty.Compute("sum(pib_qty)", "pib_prodcode='" + CurrentPrCode + "' and pib_pdno='" + CurrentPDNO + "'").ToString());
|
|
|
CollectQty = (collectqty == "" ? 0 : double.Parse(collectqty));
|
|
|
|
|
@@ -1713,6 +1721,13 @@ namespace UAS_LabelMachine
|
|
|
string CurrentPrCode = GridPrcode.Rows[i].Cells["pd_prodcode"].Value.ToString();
|
|
|
string CurrentPDNO = GridPrcode.Rows[i].Cells["pd_pdno"].Value.ToString();
|
|
|
string CurrentOutQTY = GridPrcode.Rows[i].Cells["pd_outqty"].Value.ToString();
|
|
|
+ if (SumQty == null)
|
|
|
+ {
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("select pib_pdno,pib_prodcode,sum(pib_qty) pib_qty from prodiodetail left join prodiobarcode on pd_id=pib_pdid and pd_pdno=pib_pdno ");
|
|
|
+ sql.Append("where pib_inoutno='" + pi_inoutno.Text + "' group by pib_prodcode,pib_pdno order by pib_pdno ");
|
|
|
+ SumQty = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
|
|
|
+ }
|
|
|
string collectqty = (SumQty.Compute("sum(pib_qty)", "pib_prodcode='" + CurrentPrCode + "' and pib_pdno='" + CurrentPDNO + "'").ToString());
|
|
|
CollectNum += double.Parse(collectqty == "" ? "0" : collectqty);
|
|
|
OutNum += double.Parse(CurrentOutQTY);
|
|
@@ -1763,6 +1778,13 @@ namespace UAS_LabelMachine
|
|
|
string CurrentPrCode = GridPrcode.Rows[i].Cells["pd_prodcode"].Value.ToString();
|
|
|
string CurrentPDNO = GridPrcode.Rows[i].Cells["pd_pdno"].Value.ToString();
|
|
|
string CurrentOutQTY = GridPrcode.Rows[i].Cells["pd_outqty"].Value.ToString();
|
|
|
+ if (SumQty == null)
|
|
|
+ {
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("select pib_pdno,pib_prodcode,sum(pib_qty) pib_qty from prodiodetail left join prodiobarcode on pd_id=pib_pdid and pd_pdno=pib_pdno ");
|
|
|
+ sql.Append("where pib_inoutno='" + pi_inoutno.Text + "' group by pib_prodcode,pib_pdno order by pib_pdno ");
|
|
|
+ SumQty = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
|
|
|
+ }
|
|
|
string collectqty = (SumQty.Compute("sum(pib_qty)", "pib_prodcode='" + CurrentPrCode + "' and pib_pdno='" + CurrentPDNO + "'").ToString());
|
|
|
CollectNum += double.Parse(collectqty == "" ? "0" : collectqty);
|
|
|
OutNum += double.Parse(CurrentOutQTY);
|