|
|
@@ -209,10 +209,7 @@ namespace UAS_MES.Make
|
|
|
string sp_barcoderule = ListA.Rows[RemainIndex]["sp_barcoderule"].ToString();
|
|
|
if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, out ErrorMessage))
|
|
|
{
|
|
|
- if (sp_barcoderule == "TSN")
|
|
|
- {
|
|
|
- TSN.Add(code.Text);
|
|
|
- }
|
|
|
+ TSN.Add(code.Text);
|
|
|
if (sp_barcoderule == "BARCODE")
|
|
|
{
|
|
|
sp_soncode = ErrorMessage;
|
|
|
@@ -247,7 +244,7 @@ namespace UAS_MES.Make
|
|
|
sql.Append("where ma_code='" + ma_code.Text + "'and sp_id=:sp_id1 and mcd_stepcode = '" + User.CurrentStepCode + "' and ms_sncode='" + ms_sncode.Text + "'");
|
|
|
dh.BatchInsert(sql.GetString(), new string[] { "soncode", "barcode", "sp_id", "sp_id1" }, CollectDataSonCode.ToArray(), CollectData.ToArray(), SPID.ToArray(), SPID.ToArray());
|
|
|
//更新半成品SN已被工单使用
|
|
|
- dh.BatchInsert("update makeserial set ms_nextmacode='" + ma_code.Text + "' where ms_id=(select max(ms_id) from makeserial where ms_sncode=:sncode and ms_makecode<>'" + ma_code.Text + "')", new string[] { "sncode" }, TSN.ToArray());
|
|
|
+ dh.BatchInsert("update makeserial set ms_nextmacode='" + ma_code.Text + "' where ms_id=(select max(ms_id) from makeserial where ms_sncode=:sncode and ms_nextmacode is null and ms_makecode<>'" + ma_code.Text + "')", new string[] { "sncode" }, TSN.ToArray());
|
|
|
OperateResult.AppendText(">>序列号" + ms_sncode.Text + "对应的物料已经采集完成\n", Color.Green);
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "上料采集", "上料成功", ms_sncode.Text, "");
|
|
|
doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
|