|
@@ -965,7 +965,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
CurrentPage = 1;
|
|
|
sql.Clear();
|
|
|
- sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date from prodinout where pi_inoutno='" + pi_inoutno.Text + "' and pi_pdastatus='已捡料'");
|
|
|
+ sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date from prodinout where pi_inoutno='" + pi_inoutno.Text + "' and pi_pdastatus in('已捡料','已复核')");
|
|
|
dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
@@ -2297,12 +2297,10 @@ namespace UAS_LabelMachine
|
|
|
if (datecode != "")
|
|
|
{
|
|
|
sql += " and (pib_datecode='' or pib_datecode is null) ";
|
|
|
- PrintSQL += " and (pib_datecode='' or pib_datecode is null) ";
|
|
|
}
|
|
|
if (lotno != "")
|
|
|
{
|
|
|
sql += " and (pib_lotno='' or pib_lotno is null) ";
|
|
|
- PrintSQL += " and (pib_lotno='' or pib_lotno is null) ";
|
|
|
}
|
|
|
if (nums == "")
|
|
|
{
|
|
@@ -2369,10 +2367,10 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
|
|
|
}
|
|
|
- else if (CurrentRowNum - 1 > 0)
|
|
|
+ else if (CurrentRowNum - 1 >= 0)
|
|
|
{
|
|
|
|
|
|
- DataTable LastRowData = (DataTable)adh.ExecuteSql("select pib_lotno,pib_custmidboxcode,pib_custoutboxcode,pd_pocode,pd_custprodcode,pd_custprodspec,pib_datecode from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and rownum=" + (CurrentRowNum - 1), "select");
|
|
|
+ DataTable LastRowData = (DataTable)adh.ExecuteSql("select pib_lotno,pib_custmidboxcode,pib_custoutboxcode,pd_pocode,pd_custprodcode,pd_custprodspec,pib_datecode from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and rownum=" + (CurrentRowNum == 1 ? 1 : CurrentRowNum - 1), "select");
|
|
|
|
|
|
|
|
|
|
|
@@ -2453,10 +2451,10 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
|
|
|
}
|
|
|
- else if (CurrentRowNum - 1 > 0)
|
|
|
+ else if (CurrentRowNum - 1 >= 0)
|
|
|
{
|
|
|
|
|
|
- DataTable LastRowData = (DataTable)adh.ExecuteSql("select pib_lotno,pib_custmidboxcode,pib_custoutboxcode,pd_pocode,pd_custprodcode,pd_custprodspec,pib_datecode from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and rownum=" + (CurrentRowNum - 1), "select");
|
|
|
+ DataTable LastRowData = (DataTable)adh.ExecuteSql("select pib_lotno,pib_custmidboxcode,pib_custoutboxcode,pd_pocode,pd_custprodcode,pd_custprodspec,pib_datecode from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and rownum=" + (CurrentRowNum == 1 ? 1 : CurrentRowNum - 1), "select");
|
|
|
|
|
|
|
|
|
|