|
|
@@ -529,6 +529,9 @@ namespace UAS_LabelMachine
|
|
|
private bool FrontCheckFunction(string msg, out string ErrorMsg)
|
|
|
{
|
|
|
ErrorMsg = "";
|
|
|
+ string year = "0";
|
|
|
+ string month = "0";
|
|
|
+ string day = "0";
|
|
|
//调用正则验证
|
|
|
RegexMatch("FrontCheck", msg, out ErrorMsg);
|
|
|
if (ErrorMsg != "")
|
|
|
@@ -539,6 +542,18 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
//获取当前最大的箱号
|
|
|
LabelInf.Rows[CurrentRowIndex].Cells["pib_datecode"].Value = DateCode;
|
|
|
+ //解析DateCode,将值设置到年月日
|
|
|
+ try
|
|
|
+ {
|
|
|
+ LogicHandler.GetTimeFromDatecode(DateCode, "", out year, out month, out day);
|
|
|
+ LabelInf.Rows[CurrentRowIndex].Cells["pib_year"].Value = year;
|
|
|
+ LabelInf.Rows[CurrentRowIndex].Cells["pib_month"].Value = month;
|
|
|
+ LabelInf.Rows[CurrentRowIndex].Cells["pib_day"].Value = day;
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
LabelInf.Rows[CurrentRowIndex].Cells["pib_lotno"].Value = LotNo;
|
|
|
LabelInf.Rows[CurrentRowIndex].Cells["pib_ifmodify"].Value = true;
|
|
|
string boxcode = front_adh.getFieldDataByCondition("prodiobarcode", "max(pib_outboxcode1)", "pib_inoutno='" + pi_inoutno.Text + "'").ToString();
|
|
|
@@ -699,7 +714,7 @@ namespace UAS_LabelMachine
|
|
|
LabelInf.Rows[CurrentRowIndex].Cells["pib_outboxcode1"].Value = outboxcode1;
|
|
|
LabelInf.Rows[CurrentRowIndex].Cells["pib_outboxcode2"].Value = outboxcode2;
|
|
|
string pib_id = LabelInf.Rows[CurrentRowIndex].Cells["pib_id1"].Value.ToString();
|
|
|
- front_adh.ExecuteSql("update prodiobarcode set pib_outboxcode2=" + outboxcode2 + ",pib_outboxcode1=" + outboxcode1 + ",pib_custoutboxcode='" + OutBoxBarCode + "',pib_custmidboxcode='" + MidBoxBarCode + "',pib_lotno='" + LotNo + "',pib_datecode='" + DateCode + "',pib_ifpick=-1,pib_ifmodify=-1 where pib_id=" + pib_id, "update");
|
|
|
+ front_adh.ExecuteSql("update prodiobarcode set pib_year=" + year + ",pib_month=" + month + ",pib_day=" + day + ",pib_outboxcode2=" + outboxcode2 + ",pib_outboxcode1=" + outboxcode1 + ",pib_custoutboxcode='" + OutBoxBarCode + "',pib_custmidboxcode='" + MidBoxBarCode + "',pib_lotno='" + LotNo + "',pib_datecode='" + DateCode + "',pib_ifpick=-1,pib_ifmodify=-1 where pib_id=" + pib_id, "update");
|
|
|
LabelInf.Invalidate();
|
|
|
return true;
|
|
|
}
|
|
|
@@ -779,19 +794,33 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (CheckItem.Count == 0 || (ManualCheckCount.Count == 1 && CheckItem.Count == 1))
|
|
|
{
|
|
|
+ string year = "0";
|
|
|
+ string month = "0";
|
|
|
+ string day = "0";
|
|
|
DataRow[] dr = LabelInfDataTable.Select("pib_id=" + pibid1 + " and pr_orispeccode='" + PN + "'");
|
|
|
if (dr.Length > 0)
|
|
|
{
|
|
|
dr[0]["pib_ifrecheck"] = -1;
|
|
|
dr[0]["pib_lotno"] = LotNo;
|
|
|
dr[0]["pib_datecode"] = DateCode;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ LogicHandler.GetTimeFromDatecode(DateCode, "", out year, out month, out day);
|
|
|
+ dr[0]["pib_year"] = year;
|
|
|
+ dr[0]["pib_month"] = month;
|
|
|
+ dr[0]["pib_day"] = day;
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
ErrorMsg = "未匹配到合适的原厂型号";
|
|
|
return false;
|
|
|
}
|
|
|
- back_adh.ExecuteSql("update prodiobarcode set pib_ifrecheck=-1,pib_datecode='" + DateCode + "',pib_lotno='" + LotNo + "' where pib_id=" + pibid1 + " and pr_orispeccode='" + PN + "'", "update");
|
|
|
+ back_adh.ExecuteSql("update prodiobarcode set pib_year=" + year + ",pib_month=" + month + ",pib_day=" + day + ",pib_ifrecheck=-1,pib_datecode='" + DateCode + "',pib_lotno='" + LotNo + "' where pib_id=" + pibid1 + " and pr_orispeccode='" + PN + "'", "update");
|
|
|
}
|
|
|
}
|
|
|
else
|