|
|
@@ -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
|
|
|
//LabelInf.Rows[CurrentRowIndex].Cells["pib_custmidboxcode"].Value = MidBoxBarCode;
|
|
|
//LogicHandler.SendDataToPLC(PLC1, PLCInstruct.MaterialTray, adh);
|
|
|
}
|
|
|
- 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");
|
|
|
//string custmidboxcode = LastRowData.Rows[0]["pib_custmidboxcode"].ToString();
|
|
|
//if (custmidboxcode == "")
|
|
|
//{
|
|
|
@@ -2453,10 +2451,10 @@ namespace UAS_LabelMachine
|
|
|
//LogicHandler.GetBarCode(PI_ID, pd_id, 1, out OutBoxBarCode);
|
|
|
//LabelInf.Rows[CurrentRowIndex].Cells["pib_custoutboxcode"].Value = OutBoxBarCode;
|
|
|
}
|
|
|
- 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");
|
|
|
//string custoutboxcode = LastRowData.Rows[0]["pib_custoutboxcode"].ToString();
|
|
|
//if (custoutboxcode == "")
|
|
|
//{
|