|
@@ -268,7 +268,7 @@ namespace UAS_MES.Make
|
|
|
string sp_fsoncode = dtbar.Rows[0]["sp_fsoncode"].ToString();
|
|
string sp_fsoncode = dtbar.Rows[0]["sp_fsoncode"].ToString();
|
|
|
string length = dtbar.Rows[0]["sp_length"].ToString();
|
|
string length = dtbar.Rows[0]["sp_length"].ToString();
|
|
|
string sp_barcoderule = dtbar.Rows[0]["sp_barcoderule"].ToString();
|
|
string sp_barcoderule = dtbar.Rows[0]["sp_barcoderule"].ToString();
|
|
|
- if (sp_tracekind != "2")
|
|
|
|
|
|
|
+ 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, out ErrorMessage))
|
|
@@ -279,7 +279,7 @@ namespace UAS_MES.Make
|
|
|
}
|
|
}
|
|
|
dh.UpdateByCondition("makeserial", "ms_nextmacode='" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() + "'", "ms_id=(select max(ms_id) from makeserial where ms_sncode='" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "')");
|
|
dh.UpdateByCondition("makeserial", "ms_nextmacode='" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() + "'", "ms_id=(select max(ms_id) from makeserial where ms_sncode='" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "')");
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
|
|
+ else if(sp_tracekind == "2")
|
|
|
{
|
|
{
|
|
|
if (!dh.CheckExist("makesourcestock", " (MSS_FPRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "' or MSS_PRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "') and mss_barcode = '" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "'"))
|
|
if (!dh.CheckExist("makesourcestock", " (MSS_FPRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "' or MSS_PRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "') and mss_barcode = '" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "'"))
|
|
|
{
|
|
{
|