初步校准测试

This commit is contained in:
2024-08-26 15:45:15 +08:00
parent f15dfac750
commit 4f76fa0c65
27 changed files with 247 additions and 70 deletions
@@ -134,7 +134,22 @@ void sqlManager::initialization(appConfig* _appConfig,std::string dataBasePath,
std::vector<std::string> input=getTableList();
mutex.unlock();
}
bool sqlManager::updateData(std::string SN,sqlRowDatas data)
{
mutex.lock();
sqlTableDatas selectResult;
dbPtr->Select(getCurrentDate(), {}, selectResult, "SN", SN);
if (selectResult.rowDatas.size() == 0)//无指定数据 查找前一天
{
dbPtr->Update(getPreviousDate(), data, "SN", SN);
}
else
{
dbPtr->Update(getCurrentDate(), data, "SN", SN);
}
mutex.unlock();
}
//将数据存入数据库
bool sqlManager::addData(std::string SN,std::vector<sqlData> data)
{