12345678910111213141516171819202122232425262728293031323334353637 |
- #pragma once
- #include <afxwin.h>
- #include "../sqlite/CppSQLite3.h"
- #include <string>
- #include <vector>
- #include "../SmartEvaluationLogic/ScanDll.h"
- using namespace std;
- class CDataBaseService
- {
- public:
- CDataBaseService(void);
- ~CDataBaseService(void);
- bool InsertPapers(const wstring& db_path, vector<string>& list_papers);
- bool UpdateIndexPicWrong(int total_cnt, int id);
- bool InsertIndex(int total_cnt, int& last_id);
- bool InsertIndex(const wstring& strBatchDBPath, const wstring& strWorkPath, const wstring& strZipfileName, int total_cnt, int& last_id);
- vector<batch_info> GetFailedBatch();
- void GetBatchInfo(batch_info& info);
- vector<wstring> GetCashBatch();
- void GetBatchPapers(const wstring& db_path, vector<paper_info>& vctPapers);
- void GetPaperByID(const wstring& db_path, int id, paper_info& info);
- bool DeletePaper(const wstring& db_path, int paper_id);
- bool DeletePaperAll(const wstring& db_path, int state);
- bool DeleteIndex(int id);
- bool UpdatePapersPath(const wstring& db_path, paper_info& info);
- private:
- bool OpenSQLiteDB(CppSQLite3DB& db, const wstring& strdbpath);
-
- wstring m_strModuleDir;
- wstring m_strIndexDbPath;
- };
|