|
@@ -213,7 +213,7 @@ INT CDataImpl::InsertSN(std::string strOrder, std::string strLine, std::string s
|
|
|
return -1;
|
|
|
|
|
|
char szValue[16] = {0};
|
|
|
- std::string strInsert = "INSERT INTO DebugSN(OrderID, Line, SN, TestTime, ElapsedTime, TestResult, DEAvgValue, Outcome) VALUES ('";
|
|
|
+ std::string strInsert = "INSERT INTO DebugSN(OrderID, Line, SN, TestTime, ElapsedTime, TestResult, DEAvgValue, DEValue, Outcome) VALUES ('";
|
|
|
strInsert.append(strOrder);
|
|
|
strInsert.append("','");
|
|
|
strInsert.append(strLine);
|
|
@@ -234,6 +234,10 @@ INT CDataImpl::InsertSN(std::string strOrder, std::string strLine, std::string s
|
|
|
strInsert.append("','");
|
|
|
strInsert.append(szValue);
|
|
|
|
|
|
+ _gcvt_s(szValue, dDeltaEValue, 3);
|
|
|
+ strInsert.append("','");
|
|
|
+ strInsert.append(szValue);
|
|
|
+
|
|
|
strInsert.append("','");
|
|
|
strInsert.append(strDetails);
|
|
|
strInsert.append("');");
|
|
@@ -382,7 +386,9 @@ INT CDataImpl::QuerySNData(std::string strSN, TB_SN &sn_data)
|
|
|
sn_data.nTestResult = atoi(pazResult[nCol+5]);
|
|
|
sn_data.strDeltaAVGEValue = pazResult[nCol+6];
|
|
|
sn_data.dDeltaAVGEValue = atof(pazResult[nCol+6]);
|
|
|
- sn_data.strDetails = pazResult[nCol+7];
|
|
|
+ sn_data.strDeltaEValue = pazResult[nCol+7];
|
|
|
+ sn_data.dDeltaEValue = atof(pazResult[nCol+7]);
|
|
|
+ sn_data.strDetails = pazResult[nCol+8];
|
|
|
#else
|
|
|
// 由Native for SQLite3插入的数据,都是utf8格式;
|
|
|
sn_data.strOrder = CharEncoding::UTF82ASCII(pazResult[nCol+0]);
|
|
@@ -395,7 +401,9 @@ INT CDataImpl::QuerySNData(std::string strSN, TB_SN &sn_data)
|
|
|
sn_data.nTestResult = atoi(pazResult[nCol+5]);
|
|
|
sn_data.strDeltaAVGEValue = CharEncoding::UTF82ASCII(pazResult[nCol+6]);
|
|
|
sn_data.dDeltaAVGEValue = atof(pazResult[nCol+6]);
|
|
|
- sn_data.strDetails = CharEncoding::UTF82ASCII(pazResult[nCol+7]);
|
|
|
+ sn_data.strDeltaEValue = CharEncoding::UTF82ASCII(pazResult[nCol+7]);
|
|
|
+ sn_data.dDeltaEValue = atof(pazResult[nCol+7]);
|
|
|
+ sn_data.strDetails = CharEncoding::UTF82ASCII(pazResult[nCol+8]);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -431,30 +439,34 @@ INT CDataImpl::QuerySNData(std::string strOrder, std::vector<TB_SN> &vtSNdata)
|
|
|
for(int i = 1; i <= nRow; i++, it++)
|
|
|
{
|
|
|
#ifndef USE_UTF8
|
|
|
- it->strOrder = pazResult[nCol+0];
|
|
|
- it->strSN = pazResult[nCol+1];
|
|
|
- it->strLine = pazResult[nCol+2];
|
|
|
- it->strTestTime = pazResult[nCol+3];
|
|
|
- it->strElapsed = pazResult[nCol+4];
|
|
|
+ it->strOrder = pazResult[i*nCol+0];
|
|
|
+ it->strSN = pazResult[i*nCol+1];
|
|
|
+ it->strLine = pazResult[i*nCol+2];
|
|
|
+ it->strTestTime = pazResult[i*nCol+3];
|
|
|
+ it->strElapsed = pazResult[i*nCol+4];
|
|
|
it->nElapsed = atoi(it->strElapsed.c_str());
|
|
|
- it->strTestResult = pazResult[nCol+5];
|
|
|
- it->nTestResult = atoi(pazResult[nCol+5]);
|
|
|
- it->strDeltaAVGEValue = pazResult[nCol+6];
|
|
|
- it->dDeltaAVGEValue = atof(pazResult[nCol+6]);
|
|
|
- it->strDetails = pazResult[nCol+7];
|
|
|
+ it->strTestResult = pazResult[i*nCol+5];
|
|
|
+ it->nTestResult = atoi(pazResult[i*nCol+5]);
|
|
|
+ it->strDeltaAVGEValue = pazResult[i*nCol+6];
|
|
|
+ it->dDeltaAVGEValue = atof(pazResult[i*nCol+6]);
|
|
|
+ it->strDeltaEValue = pazResult[i*nCol+7];
|
|
|
+ it->dDeltaEValue = atof(pazResult[i*nCol+7]);
|
|
|
+ it->strDetails = pazResult[i*nCol+8];
|
|
|
#else
|
|
|
// 由Native for SQLite3插入的数据,都是utf8格式;
|
|
|
- it->strOrder = CharEncoding::UTF82ASCII(pazResult[nCol+0]);
|
|
|
- it->strSN = CharEncoding::UTF82ASCII(pazResult[nCol+1]);
|
|
|
- it->strLine = CharEncoding::UTF82ASCII(pazResult[nCol+2]);
|
|
|
- it->strTestTime = CharEncoding::UTF82ASCII(pazResult[nCol+3]);
|
|
|
- it->strElapsed = CharEncoding::UTF82ASCII(pazResult[nCol+4]);
|
|
|
- it->nElapsed = atoi(pazResult[nCol+4]);
|
|
|
- it->strTestResult = CharEncoding::UTF82ASCII(pazResult[nCol+5]);
|
|
|
- it->nTestResult = atoi(pazResult[nCol+5]);
|
|
|
- it->strDeltaAVGEValue = CharEncoding::UTF82ASCII(pazResult[nCol+6]);
|
|
|
- it->dDeltaAVGEValue = atof(pazResult[nCol+6]);
|
|
|
- it->strDetails = CharEncoding::UTF82ASCII(pazResult[nCol+7]);
|
|
|
+ it->strOrder = CharEncoding::UTF82ASCII(pazResult[i*nCol+0]);
|
|
|
+ it->strSN = CharEncoding::UTF82ASCII(pazResult[i*nCol+1]);
|
|
|
+ it->strLine = CharEncoding::UTF82ASCII(pazResult[i*nCol+2]);
|
|
|
+ it->strTestTime = CharEncoding::UTF82ASCII(pazResult[i*nCol+3]);
|
|
|
+ it->strElapsed = CharEncoding::UTF82ASCII(pazResult[i*nCol+4]);
|
|
|
+ it->nElapsed = atoi(pazResult[i*nCol+4]);
|
|
|
+ it->strTestResult = CharEncoding::UTF82ASCII(pazResult[i*nCol+5]);
|
|
|
+ it->nTestResult = atoi(pazResult[i*nCol+5]);
|
|
|
+ it->strDeltaAVGEValue = CharEncoding::UTF82ASCII(pazResult[i*nCol+6]);
|
|
|
+ it->dDeltaAVGEValue = atof(pazResult[i*nCol+6]);
|
|
|
+ it->strDeltaEValue = CharEncoding::UTF82ASCII(pazResult[i*nCol+7]);
|
|
|
+ it->dDeltaEValue = atof(pazResult[i*nCol+7]);
|
|
|
+ it->strDetails = CharEncoding::UTF82ASCII(pazResult[i*nCol+8]);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -492,30 +504,34 @@ INT CDataImpl::QuerySNData(std::vector<TB_SN> &vtSNData, std::string strBeginTim
|
|
|
for(int i = 1; i <= nRow; i++, it++)
|
|
|
{
|
|
|
#ifndef USE_UTF8
|
|
|
- it->strOrder = pazResult[nCol+0];
|
|
|
- it->strSN = pazResult[nCol+1];
|
|
|
- it->strLine = pazResult[nCol+2];
|
|
|
- it->strTestTime = pazResult[nCol+3];
|
|
|
- it->strElapsed = pazResult[nCol+4];
|
|
|
+ it->strOrder = pazResult[i*nCol+0];
|
|
|
+ it->strSN = pazResult[i*nCol+1];
|
|
|
+ it->strLine = pazResult[i*nCol+2];
|
|
|
+ it->strTestTime = pazResult[i*nCol+3];
|
|
|
+ it->strElapsed = pazResult[i*nCol+4];
|
|
|
it->nElapsed = atoi(it->strElapsed.c_str());
|
|
|
- it->strTestResult = pazResult[nCol+5];
|
|
|
- it->nTestResult = atoi(pazResult[nCol+5]);
|
|
|
- it->strDeltaAVGEValue = pazResult[nCol+6];
|
|
|
- it->dDeltaAVGEValue = atof(pazResult[nCol+6]);
|
|
|
- it->strDetails = pazResult[nCol+7];
|
|
|
+ it->strTestResult = pazResult[i*nCol+5];
|
|
|
+ it->nTestResult = atoi(pazResult[i*nCol+5]);
|
|
|
+ it->strDeltaAVGEValue = pazResult[i*nCol+6];
|
|
|
+ it->dDeltaAVGEValue = atof(pazResult[i*nCol+6]);
|
|
|
+ it->strDeltaEValue = pazResult[i*nCol+7];
|
|
|
+ it->dDeltaEValue = atof(pazResult[i*nCol+7]);
|
|
|
+ it->strDetails = pazResult[i*nCol+8];
|
|
|
#else
|
|
|
// 由Native for SQLite3插入的数据,都是utf8格式;
|
|
|
- it->strOrder = CharEncoding::UTF82ASCII(pazResult[nCol+0]);
|
|
|
- it->strSN = CharEncoding::UTF82ASCII(pazResult[nCol+1]);
|
|
|
- it->strLine = CharEncoding::UTF82ASCII(pazResult[nCol+2]);
|
|
|
- it->strTestTime = CharEncoding::UTF82ASCII(pazResult[nCol+3]);
|
|
|
- it->strElapsed = CharEncoding::UTF82ASCII(pazResult[nCol+4]);
|
|
|
- it->nElapsed = atoi(pazResult[nCol+4]);
|
|
|
- it->strTestResult = CharEncoding::UTF82ASCII(pazResult[nCol+5]);
|
|
|
- it->nTestResult = atoi(pazResult[nCol+5]);
|
|
|
- it->strDeltaAVGEValue = CharEncoding::UTF82ASCII(pazResult[nCol+6]);
|
|
|
- it->dDeltaAVGEValue = atof(pazResult[nCol+6]);
|
|
|
- it->strDetails = CharEncoding::UTF82ASCII(pazResult[nCol+7]);
|
|
|
+ it->strOrder = CharEncoding::UTF82ASCII(pazResult[i*nCol+0]);
|
|
|
+ it->strSN = CharEncoding::UTF82ASCII(pazResult[i*nCol+1]);
|
|
|
+ it->strLine = CharEncoding::UTF82ASCII(pazResult[i*nCol+2]);
|
|
|
+ it->strTestTime = CharEncoding::UTF82ASCII(pazResult[i*nCol+3]);
|
|
|
+ it->strElapsed = CharEncoding::UTF82ASCII(pazResult[i*nCol+4]);
|
|
|
+ it->nElapsed = atoi(pazResult[i*nCol+4]);
|
|
|
+ it->strTestResult = CharEncoding::UTF82ASCII(pazResult[i*nCol+5]);
|
|
|
+ it->nTestResult = atoi(pazResult[i*nCol+5]);
|
|
|
+ it->strDeltaAVGEValue = CharEncoding::UTF82ASCII(pazResult[i*nCol+6]);
|
|
|
+ it->dDeltaAVGEValue = atof(pazResult[i*nCol+6]);
|
|
|
+ it->strDeltaEValue = CharEncoding::UTF82ASCII(pazResult[i*nCol+7]);
|
|
|
+ it->dDeltaEValue = atof(pazResult[i*nCol+7]);
|
|
|
+ it->strDetails = CharEncoding::UTF82ASCII(pazResult[i*nCol+8]);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -554,30 +570,34 @@ INT CDataImpl::QuerySNData(std::vector<TB_SN> &vtSNData, std::string strWhere)
|
|
|
for(int i = 1; i <= nRow; i++, it++)
|
|
|
{
|
|
|
#ifndef USE_UTF8
|
|
|
- it->strOrder = pazResult[nCol+0];
|
|
|
- it->strSN = pazResult[nCol+1];
|
|
|
- it->strLine = pazResult[nCol+2];
|
|
|
- it->strTestTime = pazResult[nCol+3];
|
|
|
- it->strElapsed = pazResult[nCol+4];
|
|
|
+ it->strOrder = pazResult[i*nCol+0];
|
|
|
+ it->strSN = pazResult[i*nCol+1];
|
|
|
+ it->strLine = pazResult[i*nCol+2];
|
|
|
+ it->strTestTime = pazResult[i*nCol+3];
|
|
|
+ it->strElapsed = pazResult[i*nCol+4];
|
|
|
it->nElapsed = atoi(it->strElapsed.c_str());
|
|
|
- it->strTestResult = pazResult[nCol+5];
|
|
|
- it->nTestResult = atoi(pazResult[nCol+5]);
|
|
|
- it->strDeltaAVGEValue = pazResult[nCol+6];
|
|
|
- it->dDeltaAVGEValue = atof(pazResult[nCol+6]);
|
|
|
- it->strDetails = pazResult[nCol+7];
|
|
|
+ it->strTestResult = pazResult[i*nCol+5];
|
|
|
+ it->nTestResult = atoi(pazResult[i*nCol+5]);
|
|
|
+ it->strDeltaAVGEValue = pazResult[i*nCol+6];
|
|
|
+ it->dDeltaAVGEValue = atof(pazResult[i*nCol+6]);
|
|
|
+ it->strDeltaEValue = pazResult[i*nCol+7];
|
|
|
+ it->dDeltaEValue = atof(pazResult[i*nCol+7]);
|
|
|
+ it->strDetails = pazResult[i*nCol+8];
|
|
|
#else
|
|
|
// 由Native for SQLite3插入的数据,都是utf8格式;
|
|
|
- it->strOrder = CharEncoding::UTF82ASCII(pazResult[nCol+0]);
|
|
|
- it->strSN = CharEncoding::UTF82ASCII(pazResult[nCol+1]);
|
|
|
- it->strLine = CharEncoding::UTF82ASCII(pazResult[nCol+2]);
|
|
|
- it->strTestTime = CharEncoding::UTF82ASCII(pazResult[nCol+3]);
|
|
|
- it->strElapsed = CharEncoding::UTF82ASCII(pazResult[nCol+4]);
|
|
|
- it->nElapsed = atoi(pazResult[nCol+4]);
|
|
|
- it->strTestResult = CharEncoding::UTF82ASCII(pazResult[nCol+5]);
|
|
|
- it->nTestResult = atoi(pazResult[nCol+5]);
|
|
|
- it->strDeltaAVGEValue = CharEncoding::UTF82ASCII(pazResult[nCol+6]);
|
|
|
- it->dDeltaAVGEValue = atof(pazResult[nCol+6]);
|
|
|
- it->strDetails = CharEncoding::UTF82ASCII(pazResult[nCol+7]);
|
|
|
+ it->strOrder = CharEncoding::UTF82ASCII(pazResult[i*nCol+0]);
|
|
|
+ it->strSN = CharEncoding::UTF82ASCII(pazResult[i*nCol+1]);
|
|
|
+ it->strLine = CharEncoding::UTF82ASCII(pazResult[i*nCol+2]);
|
|
|
+ it->strTestTime = CharEncoding::UTF82ASCII(pazResult[i*nCol+3]);
|
|
|
+ it->strElapsed = CharEncoding::UTF82ASCII(pazResult[i*nCol+4]);
|
|
|
+ it->nElapsed = atoi(pazResult[i*nCol+4]);
|
|
|
+ it->strTestResult = CharEncoding::UTF82ASCII(pazResult[i*nCol+5]);
|
|
|
+ it->nTestResult = atoi(pazResult[i*nCol+5]);
|
|
|
+ it->strDeltaAVGEValue = CharEncoding::UTF82ASCII(pazResult[i*nCol+6]);
|
|
|
+ it->dDeltaAVGEValue = atof(pazResult[i*nCol+6]);
|
|
|
+ it->strDeltaEValue = CharEncoding::UTF82ASCII(pazResult[i*nCol+7]);
|
|
|
+ it->dDeltaEValue = atof(pazResult[i*nCol+7]);
|
|
|
+ it->strDetails = CharEncoding::UTF82ASCII(pazResult[i*nCol+8]);
|
|
|
#endif
|
|
|
}
|
|
|
|