|
@@ -36,6 +36,7 @@ namespace MOKA_Factory_Tools
|
|
|
SerialPort TVPort = new SerialPort();
|
|
|
SQLiteConnection localDBNow;
|
|
|
SQLiteConnection errorDBNow;
|
|
|
+ SQLiteConnection reportDBNow;
|
|
|
KeyInfo keyInfo = new KeyInfo();
|
|
|
FireTVKey fireTVKey = new FireTVKey();
|
|
|
NTFBLL ntfBLL = null;
|
|
@@ -137,6 +138,11 @@ namespace MOKA_Factory_Tools
|
|
|
preloadNow = preload;
|
|
|
midListNow = midList1;
|
|
|
orderNow = order;
|
|
|
+ if (reportDBNow == null)
|
|
|
+ {
|
|
|
+ reportDBNow = new SQLiteConnection("data source=" + AppDomain.CurrentDomain.BaseDirectory + "DB\\ReportData.db");
|
|
|
+ reportDBNow.Open();
|
|
|
+ }
|
|
|
InitPanel();
|
|
|
mainform = form1;
|
|
|
this.mainform.MoveEvent += new MoveHandler(SetFormLocation);
|
|
@@ -4997,8 +5003,8 @@ namespace MOKA_Factory_Tools
|
|
|
#endregion
|
|
|
#endregion
|
|
|
#endif
|
|
|
- //数据上传
|
|
|
- if (midListNow.host == "LocalPC" && !preloadNow)
|
|
|
+ //数据上传
|
|
|
+ if (midListNow.host == "LocalPC" && !preloadNow)
|
|
|
{// 离线抄写
|
|
|
if (GetLocalKeyCount.DeleteLocalKeys(keypath, keyStream, keyReader))
|
|
|
{
|
|
@@ -5043,7 +5049,7 @@ namespace MOKA_Factory_Tools
|
|
|
if (WriteDID.Checked)
|
|
|
{
|
|
|
string postjson = V2Method.GetReportJson(orderNow, SN, isNodid: false, midListNow.clienttype, midListNow.version, ProjectIDText.Text, ref keyInfo, FunctionSettingNow.MITVEnable || FunctionSettingNow.IndiaMITVEnable, ref _MiKey);
|
|
|
- if (V2Method.ReportOnlineData(midListNow.host, orderNow, postjson, errorDBNow, false, "", FunctionSettingNow.ReportTimeOut))
|
|
|
+ if (V2Method.ReportOnlineData(midListNow.host, orderNow, postjson, FunctionSettingNow.BackgroudReportData ? reportDBNow : errorDBNow, false, "", FunctionSettingNow.ReportTimeOut, FunctionSettingNow.BackgroudReportData))
|
|
|
{
|
|
|
TestResult = 1;
|
|
|
}
|
|
@@ -5066,7 +5072,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
keycontent += "nodid=true&";
|
|
|
string postjson = V2Method.GetReportJson(orderNow, SN, isNodid: true, midListNow.clienttype, midListNow.version, ProjectIDText.Text, ref keyInfo, FunctionSettingNow.MITVEnable || FunctionSettingNow.IndiaMITVEnable, ref _MiKey);
|
|
|
- if (V2Method.ReportOnlineData(midListNow.host, orderNow, postjson, errorDBNow, false, "", FunctionSettingNow.ReportTimeOut))
|
|
|
+ if (V2Method.ReportOnlineData(midListNow.host, orderNow, postjson, FunctionSettingNow.BackgroudReportData ? reportDBNow : errorDBNow, false, "", FunctionSettingNow.ReportTimeOut, FunctionSettingNow.BackgroudReportData))
|
|
|
{
|
|
|
TestResult = 1;
|
|
|
}
|