|
|
@@ -273,6 +273,14 @@ namespace UAS_MES.Make
|
|
|
//提示正确返回时传递的信息
|
|
|
if (ErrorMessage.Contains("AFTERSUCCESS"))
|
|
|
OperateResult.AppendText(">>" + ErrorMessage + "\n");
|
|
|
+ string si_id = dh.getFieldDataByCondition("sninfo", "max(si_id) si_id", " si_sn='"+ sn_code + "' or si_sn in(select sn from makesnrelation where sn='"+ sn_code + "')").ToString();
|
|
|
+ if (si_id != "")
|
|
|
+ {
|
|
|
+ dh.BatchInsert("update sninfo set si_mac = :mac,si_bt =:bt where si_id = :osiId", new String[] { "mac", "bt", "osiId" }, new string[] { sncode.Text }, new string[] { ms_bt }, new string[] { si_id });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ dh.BatchInsert("insert into sninfo (si_id,si_sn,si_mac,si_bt,si_indate) values (SnInfo_seq.nextval,:si_sn,:si_mac,:si_bt,sysdate)", new String[] { "si_sn", "si_mac", "si_bt" }, new string[] { sn_code }, new string[] { sncode.Text }, new string[] { ms_bt });
|
|
|
+ }
|
|
|
dh.BatchInsert("update makeserial set ms_mac = :mac,ms_bt =:bt where ms_id = :oMsId", new String[] { "mac", "bt", "oMsId" }, new string[] { sncode.Text }, new string[] { ms_bt }, new string[] { oMsID.ToString() });
|
|
|
OperateResult.AppendText(">>BT/MAC采集完成,执行更新\n", Color.Green);
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "BT/MAC采集", "采集成功", sn_code, "");
|