|
|
@@ -1675,12 +1675,12 @@ namespace UAS_LabelMachine
|
|
|
List<string> MidBoxCode = new List<string>();
|
|
|
List<string> PIBID = new List<string>();
|
|
|
List<string> PIBOUTBOXCODE1 = new List<string>();
|
|
|
- DataTable dt1 = (DataTable)dh.ExecuteSql("select pib_id,pib_prodcode from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode2='" + dt.Rows[i]["pib_outboxcode2"].ToString() + "' and pib_outboxcode1 is null order by to_number(pib_id)", "select");
|
|
|
+ DataTable dt1 = (DataTable)dh.ExecuteSql("select pib_id,pib_prodcode,pd_custprodcode from prodiobarcode left join prodiodetail on pib_pdid=pd_id where pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode2='" + dt.Rows[i]["pib_outboxcode2"].ToString() + "' and pib_outboxcode1 is null order by to_number(pib_id)", "select");
|
|
|
//如果不是10的整数倍则为尾盒
|
|
|
int tencount = 0;
|
|
|
for (int j = 0; j < dt1.Rows.Count; j++)
|
|
|
{
|
|
|
- if (tencount % MidboxCapacity.Value == 0 || (dt1.Rows[j]["pib_prodcode"].ToString() != dt1.Rows[j - 1]["pib_prodcode"].ToString()))
|
|
|
+ if (tencount % MidboxCapacity.Value == 0 || (dt1.Rows[j]["pib_prodcode"].ToString() != dt1.Rows[j - 1]["pib_prodcode"].ToString())|| (dt1.Rows[j]["pd_custprodcode"].ToString() != dt1.Rows[j - 1]["pd_custprodcode"].ToString()))
|
|
|
{
|
|
|
pib_outboxcode1 = pib_outboxcode1 + 1;
|
|
|
MaxNum = MaxNum + 1;
|