|
@@ -1772,7 +1772,10 @@ namespace MOKA_Factory_Tools
|
|
|
|
|
|
SetsuccessStatus(m_readPSN);
|
|
|
SetsuccessStatus(ResultStatus);
|
|
|
- goto stop;
|
|
|
+ // 设置成功;
|
|
|
+ TestResult = 1;
|
|
|
+ // 抄写完PSN后,需要切PID,不能直接goto stop;
|
|
|
+ // goto stop;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -4756,37 +4759,41 @@ namespace MOKA_Factory_Tools
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (SN.Trim().Length > 0)
|
|
|
+ // 烧录PSN的不用上传;
|
|
|
+ if (!WritePSN.Checked)
|
|
|
{
|
|
|
- keycontent += "nodid=true&";
|
|
|
- string postjson = V2Method.GetReportJson(orderNow, SN, isNodid: true, midListNow.clienttype, midListNow.version, ProjectIDText.Text, ref keyInfo, FunctionSettingNow.MITVEnable, ref _MiKey);
|
|
|
- if (V2Method.ReportOnlineData(midListNow.host, orderNow, postjson, errorDBNow, false, "", FunctionSettingNow.ReportTimeOut))
|
|
|
- {
|
|
|
- TestResult = 1;
|
|
|
- }
|
|
|
- else
|
|
|
+ if (SN.Trim().Length > 0)
|
|
|
{
|
|
|
- TestResult = 0;
|
|
|
- UploadCopyCount();
|
|
|
- ErrMsg = "上报结果到MID系统失败";
|
|
|
- Log.WriteErrorLog(ErrMsg);
|
|
|
- UpdateKeys(midListNow.keytype, false);
|
|
|
- goto end;
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- LocalTxtRecord.LocalRecord(midListNow.host + "/v1/report.do?\r\n" + keycontent + "sversionid=" + midListNow.version + "&clienttype=" + midListNow.clienttype + "&ordernum=" + orderNow + "\r\n\r\n", orderNow);
|
|
|
- if (FunctionSettingNow.AllowNoScanning)
|
|
|
- {
|
|
|
- TestResult = 1;
|
|
|
+ keycontent += "nodid=true&";
|
|
|
+ string postjson = V2Method.GetReportJson(orderNow, SN, isNodid: true, midListNow.clienttype, midListNow.version, ProjectIDText.Text, ref keyInfo, FunctionSettingNow.MITVEnable, ref _MiKey);
|
|
|
+ if (V2Method.ReportOnlineData(midListNow.host, orderNow, postjson, errorDBNow, false, "", FunctionSettingNow.ReportTimeOut))
|
|
|
+ {
|
|
|
+ TestResult = 1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ TestResult = 0;
|
|
|
+ UploadCopyCount();
|
|
|
+ ErrMsg = "上报结果到MID系统失败";
|
|
|
+ Log.WriteErrorLog(ErrMsg);
|
|
|
+ UpdateKeys(midListNow.keytype, false);
|
|
|
+ goto end;
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- ErrMsg = "未扫码启动数据抄写";
|
|
|
- Log.WriteErrorLog(ErrMsg);
|
|
|
- MessageBox.Show("You must scan to start the burning!");
|
|
|
- TestResult = 0;
|
|
|
+ LocalTxtRecord.LocalRecord(midListNow.host + "/v1/report.do?\r\n" + keycontent + "sversionid=" + midListNow.version + "&clienttype=" + midListNow.clienttype + "&ordernum=" + orderNow + "\r\n\r\n", orderNow);
|
|
|
+ if (FunctionSettingNow.AllowNoScanning)
|
|
|
+ {
|
|
|
+ TestResult = 1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ErrMsg = "未扫码启动数据抄写";
|
|
|
+ Log.WriteErrorLog(ErrMsg);
|
|
|
+ MessageBox.Show("You must scan to start the burning!");
|
|
|
+ TestResult = 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|