|
@@ -204,25 +204,23 @@ INT CDataImpl::InsertOrder(std::string strOrder, std::string strDeltaEType, std:
|
|
|
|
|
|
INT CDataImpl::InsertSN(const TB_SN &sn_data)
|
|
|
{
|
|
|
- return InsertSN(sn_data.strOrder, sn_data.strLine, sn_data.strSN, sn_data.strStartTime, sn_data.strFinishedTime, sn_data.nElapsed, sn_data.nTestResult, sn_data.dDeltaAVGEValue, sn_data.dDeltaEValue, sn_data.strDetails);
|
|
|
+ return InsertSN(sn_data.strOrder, sn_data.strLine, sn_data.strSN, sn_data.strTestTime, sn_data.nElapsed, sn_data.nTestResult, sn_data.dDeltaAVGEValue, sn_data.dDeltaEValue, sn_data.strDetails);
|
|
|
}
|
|
|
|
|
|
-INT CDataImpl::InsertSN(std::string strOrder, std::string strLine, std::string strSN, std::string strStartTime, std::string strFinishTime, int nElapsed, int nTestResult, DOUBLE dDeltaAVGEValue, DOUBLE dDeltaEValue, std::string strDetails )
|
|
|
+INT CDataImpl::InsertSN(std::string strOrder, std::string strLine, std::string strSN, std::string strTestTime, int nElapsed, int nTestResult, DOUBLE dDeltaAVGEValue, DOUBLE dDeltaEValue, std::string strDetails )
|
|
|
{
|
|
|
if(m_psqlite3 == NULL)
|
|
|
return -1;
|
|
|
|
|
|
char szValue[16] = {0};
|
|
|
- std::string strInsert = "INSERT INTO DebugSN(OrderID, Line, SN, StartTime, FinishTime, ElapsedTime, TestResult, DEAvgValue, Outcome) VALUES ('";
|
|
|
+ std::string strInsert = "INSERT INTO DebugSN(OrderID, Line, SN, TestTime, ElapsedTime, TestResult, DEAvgValue, Outcome) VALUES ('";
|
|
|
strInsert.append(strOrder);
|
|
|
strInsert.append("','");
|
|
|
strInsert.append(strLine);
|
|
|
strInsert.append("','");
|
|
|
strInsert.append(strSN);
|
|
|
strInsert.append("','");
|
|
|
- strInsert.append(strStartTime);
|
|
|
- strInsert.append("','");
|
|
|
- strInsert.append(strFinishTime);
|
|
|
+ strInsert.append(strTestTime);
|
|
|
|
|
|
_itoa_s(nElapsed, szValue, 10);
|
|
|
strInsert.append("','");
|
|
@@ -373,23 +371,21 @@ INT CDataImpl::QuerySNData(std::string strSN, TB_SN &sn_data)
|
|
|
sn_data.strOrder = pazResult[nCol+0];
|
|
|
sn_data.strSN = pazResult[nCol+1];
|
|
|
sn_data.strLine = pazResult[nCol+2];
|
|
|
- sn_data.strStartTime = pazResult[nCol+3];
|
|
|
- sn_data.strFinishedTime = pazResult[nCol+4];
|
|
|
- sn_data.nElapsed = atoi(pazResult[nCol+5]);
|
|
|
- sn_data.nTestResult = atoi(pazResult[nCol+6]);
|
|
|
- sn_data.dDeltaAVGEValue = atof(pazResult[nCol+7]);
|
|
|
- sn_data.strDetails = pazResult[nCol+8];
|
|
|
+ sn_data.strTestTime = pazResult[nCol+3];
|
|
|
+ sn_data.nElapsed = atoi(pazResult[nCol+4]);
|
|
|
+ sn_data.nTestResult = atoi(pazResult[nCol+5]);
|
|
|
+ sn_data.dDeltaAVGEValue = atof(pazResult[nCol+6]);
|
|
|
+ sn_data.strDetails = pazResult[nCol+7];
|
|
|
#else
|
|
|
// 由Native for SQLite3插入的数据,都是utf8格式;
|
|
|
sn_data.strOrder = CharEncoding::UTF82ASCII(pazResult[nCol+0]);
|
|
|
sn_data.strSN = CharEncoding::UTF82ASCII(pazResult[nCol+1]);
|
|
|
sn_data.strLine = CharEncoding::UTF82ASCII(pazResult[nCol+2]);
|
|
|
- sn_data.strStartTime = CharEncoding::UTF82ASCII(pazResult[nCol+3]);
|
|
|
- sn_data.strFinishedTime = CharEncoding::UTF82ASCII(pazResult[nCol+4]);
|
|
|
- sn_data.nElapsed = atoi(pazResult[nCol+5]);
|
|
|
- sn_data.nTestResult = atoi(pazResult[nCol+6]);
|
|
|
- sn_data.dDeltaAVGEValue = atof(pazResult[nCol+7]);
|
|
|
- sn_data.strDetails = CharEncoding::UTF82ASCII(pazResult[nCol+8]);
|
|
|
+ sn_data.strTestTime = CharEncoding::UTF82ASCII(pazResult[nCol+3]);
|
|
|
+ sn_data.nElapsed = atoi(pazResult[nCol+4]);
|
|
|
+ sn_data.nTestResult = atoi(pazResult[nCol+5]);
|
|
|
+ sn_data.dDeltaAVGEValue = atof(pazResult[nCol+6]);
|
|
|
+ sn_data.strDetails = CharEncoding::UTF82ASCII(pazResult[nCol+7]);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -428,23 +424,21 @@ INT CDataImpl::QuerySNData(std::string strOrder, std::vector<TB_SN> &vtSNdata)
|
|
|
it->strOrder = pazResult[nCol*i+0];
|
|
|
it->strSN = pazResult[nCol*i+1];
|
|
|
it->strLine = pazResult[nCol*i+2];
|
|
|
- it->strStartTime = pazResult[nCol*i+3];
|
|
|
- it->strFinishedTime = pazResult[nCol*i+4];
|
|
|
- it->nElapsed = atoi(pazResult[nCol*i+5]);
|
|
|
- it->nTestResult = atoi(pazResult[nCol*i+6]);
|
|
|
- it->dDeltaAVGEValue = atof(pazResult[nCol*i+7]);
|
|
|
- it->strDetails = pazResult[nCol*i+8];
|
|
|
+ it->strTestTime = pazResult[nCol*i+3];
|
|
|
+ it->nElapsed = atoi(pazResult[nCol*i+4]);
|
|
|
+ it->nTestResult = atoi(pazResult[nCol*i+5]);
|
|
|
+ it->dDeltaAVGEValue = atof(pazResult[nCol*i+6]);
|
|
|
+ it->strDetails = pazResult[nCol*i+7];
|
|
|
#else
|
|
|
// 由Native for SQLite3插入的数据,都是utf8格式;
|
|
|
it->strOrder = CharEncoding::UTF82ASCII(pazResult[nCol*i+0]);
|
|
|
it->strSN = CharEncoding::UTF82ASCII(pazResult[nCol*i+1]);
|
|
|
it->strLine = CharEncoding::UTF82ASCII(pazResult[nCol*i+2]);
|
|
|
- it->strStartTime = CharEncoding::UTF82ASCII(pazResult[nCol*i+3]);
|
|
|
- it->strFinishedTime = CharEncoding::UTF82ASCII(pazResult[nCol*i+4]);
|
|
|
- it->nElapsed = atoi(pazResult[nCol*i+5]);
|
|
|
- it->nTestResult = atoi(pazResult[nCol*i+6]);
|
|
|
- it->dDeltaAVGEValue = atof(pazResult[nCol*i+7]);
|
|
|
- it->strDetails = CharEncoding::UTF82ASCII(pazResult[nCol*i+8]);
|
|
|
+ it->strTestTime = CharEncoding::UTF82ASCII(pazResult[nCol*i+3]);
|
|
|
+ it->nElapsed = atoi(pazResult[nCol*i+4]);
|
|
|
+ it->nTestResult = atoi(pazResult[nCol*i+5]);
|
|
|
+ it->dDeltaAVGEValue = atof(pazResult[nCol*i+6]);
|
|
|
+ it->strDetails = CharEncoding::UTF82ASCII(pazResult[nCol*i+7]);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -485,23 +479,21 @@ INT CDataImpl::QuerySNData(std::vector<TB_SN> &vtSNData, std::string strBeginTim
|
|
|
it->strOrder = pazResult[nCol*i+0];
|
|
|
it->strSN = pazResult[nCol*i+1];
|
|
|
it->strLine = pazResult[nCol*i+2];
|
|
|
- it->strStartTime = pazResult[nCol*i+3];
|
|
|
- it->strFinishedTime = pazResult[nCol*i+4];
|
|
|
- it->nElapsed = atoi(pazResult[nCol*i+5]);
|
|
|
- it->nTestResult = atoi(pazResult[nCol*i+6]);
|
|
|
- it->dDeltaAVGEValue = atof(pazResult[nCol*i+7]);
|
|
|
- it->strDetails = pazResult[nCol*i+8];
|
|
|
+ it->strTestTime = pazResult[nCol*i+3];
|
|
|
+ it->nElapsed = atoi(pazResult[nCol*i+4]);
|
|
|
+ it->nTestResult = atoi(pazResult[nCol*i+5]);
|
|
|
+ it->dDeltaAVGEValue = atof(pazResult[nCol*i+6]);
|
|
|
+ it->strDetails = pazResult[nCol*i+7];
|
|
|
#else
|
|
|
// 由Native for SQLite3插入的数据,都是utf8格式;
|
|
|
it->strOrder = CharEncoding::UTF82ASCII(pazResult[nCol*i+0]);
|
|
|
it->strSN = CharEncoding::UTF82ASCII(pazResult[nCol*i+1]);
|
|
|
it->strLine = CharEncoding::UTF82ASCII(pazResult[nCol*i+2]);
|
|
|
- it->strStartTime = CharEncoding::UTF82ASCII(pazResult[nCol*i+3]);
|
|
|
- it->strFinishedTime = CharEncoding::UTF82ASCII(pazResult[nCol*i+4]);
|
|
|
- it->nElapsed = atoi(pazResult[nCol*i+5]);
|
|
|
- it->nTestResult = atoi(pazResult[nCol*i+6]);
|
|
|
- it->dDeltaAVGEValue = atof(pazResult[nCol*i+7]);
|
|
|
- it->strDetails = CharEncoding::UTF82ASCII(pazResult[nCol*i+8]);
|
|
|
+ it->strTestTime = CharEncoding::UTF82ASCII(pazResult[nCol*i+3]);
|
|
|
+ it->nElapsed = atoi(pazResult[nCol*i+4]);
|
|
|
+ it->nTestResult = atoi(pazResult[nCol*i+5]);
|
|
|
+ it->dDeltaAVGEValue = atof(pazResult[nCol*i+6]);
|
|
|
+ it->strDetails = CharEncoding::UTF82ASCII(pazResult[nCol*i+7]);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -547,10 +539,10 @@ BOOL CDataImpl::UpdateOrder(std::string strOrder, std::string strDeltaEType, std
|
|
|
|
|
|
BOOL CDataImpl::UpdateSNData(TB_SN &sn_data)
|
|
|
{
|
|
|
- return UpdateSNData(sn_data.strOrder, sn_data.strSN, sn_data.strLine, sn_data.strStartTime, sn_data.strFinishedTime, sn_data.nElapsed, sn_data.nTestResult, sn_data.dDeltaAVGEValue, sn_data.dDeltaEValue, sn_data.strDetails);
|
|
|
+ return UpdateSNData(sn_data.strOrder, sn_data.strSN, sn_data.strLine, sn_data.strTestTime, sn_data.nElapsed, sn_data.nTestResult, sn_data.dDeltaAVGEValue, sn_data.dDeltaEValue, sn_data.strDetails);
|
|
|
}
|
|
|
|
|
|
-BOOL CDataImpl::UpdateSNData(std::string strOrder,std::string strSN, std::string strLine, std::string strTestTime, std::string strFinishedTime, int nElapsed, int nTestResult, double dAVGDeltaEVlaue, DOUBLE dDeltaEValue, std::string strDetails)
|
|
|
+BOOL CDataImpl::UpdateSNData(std::string strOrder,std::string strSN, std::string strLine, std::string strTestTime, int nElapsed, int nTestResult, double dAVGDeltaEVlaue, DOUBLE dDeltaEValue, std::string strDetails)
|
|
|
{
|
|
|
if(m_psqlite3 == NULL)
|
|
|
return FALSE;
|
|
@@ -560,10 +552,8 @@ BOOL CDataImpl::UpdateSNData(std::string strOrder,std::string strSN, std::string
|
|
|
strInsert.append(strOrder);
|
|
|
strInsert.append("', Line='");
|
|
|
strInsert.append(strLine);
|
|
|
- strInsert.append("', StartTime='");
|
|
|
+ strInsert.append("', TestTime='");
|
|
|
strInsert.append(strTestTime);
|
|
|
- strInsert.append("', FinishTime='");
|
|
|
- strInsert.append(strFinishedTime);
|
|
|
_itoa_s(nElapsed, szValue, 10);
|
|
|
strInsert.append("', ElapsedTime='");
|
|
|
strInsert.append(szValue);
|