|
|
@@ -253,7 +253,7 @@ namespace UAS_MES.Make
|
|
|
|
|
|
dtbar = new DataTable();
|
|
|
sql.Clear();
|
|
|
- sql.Append("select sp_id,sp_tracekind,sp_barcoderule,sp_prefix,sp_ifuseregex,sp_ifforsn,sp_length,sp_description,sp_soncode,pr_detail,pr_spec,");
|
|
|
+ sql.Append("select sp_id,sp_tracekind,sp_barcoderule,nvl(sp_ifrepeat,0)sp_ifrepeat,sp_prefix,sp_ifuseregex,sp_ifforsn,sp_length,sp_description,sp_soncode,pr_detail,pr_spec,");
|
|
|
sql.Append("sp_repcode,sp_fsoncode,pr_id,sp_type,sp_prefix,");
|
|
|
sql.Append("sp_length,sp_regex,sp_ifforsn from stepproduct left join product on pr_code=sp_soncode where sp_bomversion='" + ma_bomversion + "' and ");
|
|
|
sql.Append("sp_craftcode='" + LabelDataGridView.Rows[i].Cells["cm_craftcode"].Value + "'and sp_mothercode ='" + LabelDataGridView.Rows[i].Cells["cm_maprodcode"].Value + "' and sp_soncode = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "' ");
|
|
|
@@ -267,11 +267,12 @@ namespace UAS_MES.Make
|
|
|
string sp_prefix = dtbar.Rows[0]["sp_prefix"].ToString();
|
|
|
string sp_fsoncode = dtbar.Rows[0]["sp_fsoncode"].ToString();
|
|
|
string length = dtbar.Rows[0]["sp_length"].ToString();
|
|
|
+ string sp_ifrepeat = dtbar.Rows[0]["sp_ifrepeat"].ToString();
|
|
|
string sp_barcoderule = dtbar.Rows[0]["sp_barcoderule"].ToString();
|
|
|
if (sp_tracekind == "1")
|
|
|
{
|
|
|
//上料校验规则判断
|
|
|
- if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString(), LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, out ErrorMessage))
|
|
|
+ if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString(), LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, out ErrorMessage))
|
|
|
{
|
|
|
OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
|
|
|
LoadData(sncode_1, sender, new KeyEventArgs(Keys.Enter));
|