123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- #include "stdafx.h"
- #include "Bantch.h"
- #include "SmartEvaluationService.h"
- #include "BatchService.h"
- extern int g_my_scan_type;
- CBatch::CBatch(bool bOnlineCard, int nSubjectID, int nOnlineScanType) :service(new CBatchService(bOnlineCard, nSubjectID, nOnlineScanType))
- {
- }
- CBatch::~CBatch()
- {
- LOGI("~CBatch()");
- }
- void CBatch::leaveCurrentBatch()
- {
- if (service)
- service->leaveCurrentBatch();
- }
- string CBatch::GetBatchCode()
- {
- return service->GetBatchCode();
- }
- int CBatch::LoadSchema(long long examId, std::string examName, long examCourseId, std::string courseName, const std::string schemaPath, std::string rule/* = ""*/)
- {
- return service->LoadSchema(examId, examName, examCourseId, courseName, schemaPath,rule);
- }
- int CBatch::ReadyScanEX(FEEDER_TYPE feederType, const ScanParam & param)
- {
- return service->ReadyScan(feederType, param);
- }
- int CBatch::SetFolderScanDir(const std::string img_dir)
- {
- if (1 == g_my_scan_type)
- {
- service->loadDuXueFirstMode();
- }
- return service->SetFolderScanDir(img_dir);
- }
- int CBatch::GetServiceSate()
- {
- return service->GetServiceSate();
- }
- int CBatch::Start()
- {
- return service->Start();
- }
- int CBatch::Pause()
- {
- return service->Pause();
- }
- int CBatch::Resume()
- {
- return service->Resume();
- }
- int CBatch::Stop()
- {
- return service->Stop();
- }
- int CBatch::GiveUpCurrentBatch()
- {
- return service->GiveUpCurrentBatch();
- }
- int CBatch::StartUploadPaper(HWND hWnd)
- {
- return service->StartUploadPaper(hWnd);
- }
- int CBatch::ReIdentify(const int paper_id, const std::string& stu_code, const std::vector<img_param>& params)
- {
- return service->ReIdentify(paper_id, stu_code, params);
- }
- int CBatch::QueryMubanImgPath(int page_index, std::string& imgPath)
- {
- return service->QueryMubanImgPath(page_index, imgPath);
- }
- int CBatch::QueryMubanImgCount(int& page_count)
- {
- return service->QueryMubanImgCount(page_count);
- }
- int CBatch::QueryExptionPaperCount(int & exc_count, int & total_count)
- {
- return service->QueryExptionPaperCount(exc_count ,total_count);
- }
- int CBatch::QueryExptionTypeInfo(vector<EXCEPTION_TYPE_INFO> & infos)
- {
- return service->QueryExptionTypeInfo(infos);
- }
- int CBatch::QueryExceptionPaper(const long exception_type, vector<STUDENT_INFO> &studengList)
- {
- return service->QueryExceptionPaper(exception_type, studengList);
- }
- int CBatch::QueryNormalPaper(vector<STUDENT_INFO> &studengList)
- {
- return service->QueryNormalPaper(studengList);
- }
- int CBatch::QueryPaperDetail(const int paper_id, PAPER_DETAIL &paper_detail, vector<PAGE_DETAIL> &pageList, vector<GROUP_QUESTION> &questionList)
- {
- return service->QueryPaperDetail(paper_id, paper_detail, pageList, questionList);
- }
- int CBatch::UpdatePaperStudent(const int paper_id, const std::string examinee_id, const std::string student_code, const std::string studentName, const long schoolId, const std::string stuCode, const std::string stuSchoolCode, const std::string className, const std::string gradeName, bool bReIdentify /*= false*/)
- {
- return service->UpdatePaperStudent(paper_id, examinee_id, student_code, studentName, schoolId, stuCode, stuSchoolCode, className, gradeName,bReIdentify);
- }
- int CBatch::IgnorePaper(const int paper_id)
- {
- return service->IgnorePaper(paper_id);
- }
- int CBatch::IgnoreException(const long exceptions)
- {
- return service->IgnoreException(exceptions);
- }
- int CBatch::ReplacePaper(const int paper_id, int &paper_id_ret)
- {
- return service->ReplacePaper(paper_id, paper_id_ret);
- }
- int CBatch::ClearDbTemp()
- {
- return service->ClearDbTemp();
- }
- int CBatch::ReplaceAllKaoHaoChongTu(vector<int> &paper_id_List)
- {
- return service->ReplaceAllKaoHaoChongTu(paper_id_List);
- }
- int CBatch::OnBnClickedButtonStartScan()
- {
- return service->Start();
- }
- int CBatch::SetHandlerWnd(HWND hwnd)
- {
- return service->SetHandlerWnd(hwnd);
- }
- void CBatch::SetDataBaseManager(RTL_CRITICAL_SECTION* database_db_lock, CppSQLite3DB* database_db, int database_id)
- {
- service->SetDataBaseManager(database_db_lock, database_db, database_id);
- }
- void CBatch::getCurScanExam(std::string exam_code, std::vector<std::vector<coverStu>> &stuInfo)
- {
- service->getCurScanExam(exam_code, stuInfo);
- }
- void CBatch::getCoverStuInfoByExamCode(std::string examCode, std::vector<coverStu> &stuInfo)
- {
- service->getCoverStuInfoByExamCode(examCode, stuInfo);
- }
- void CBatch::RestoreErrorHandleSite(const std::string& task_id, const std::string&type, const std::string& strPath)
- {
- service->RestoreErrorHandleSite(task_id,type, strPath);
- }
- int CBatch::PreErrorHandleRestoreSite(bool bcontinue, int scan_type, FEEDER_TYPE feederType, const ScanParam & param)
- {
- return service->PreErrorHandleRestoreSite(bcontinue,scan_type, feederType, param);
- }
- void CBatch::SetErrorHandle(bool bErrorHandle)
- {
- return service->SetErrorHandle(bErrorHandle);
- }
- void CBatch::InitUploadManager(bool bEanble, bool bCountiue, bool bErrorHanle, bool bOnlineCard, IUploudNotify*pNotify)
- {
- service->InitUploadManager(bEanble, bCountiue,bErrorHanle,bOnlineCard, pNotify);
- }
- void CBatch::OnScanListFilter(bool bsuccess, int nUploadState)
- {
- service->OnScanListFilter(bsuccess,nUploadState);
- }
- int CBatch::UploadOnScanCmd(int nCmd, const char*param, void*ret)
- {
- return service->UploadOnScanCmd(nCmd, param, ret);
- }
- int CBatch::BatchServiceCmd(int cmd, void*param, void*ret)
- {
- int nRet = -1;
- if (service){
- nRet = service->BatchServiceCmd(cmd, param,ret);
- }
- return nRet;
- }
- void CBatch::QuickHandle(bool bGetPath, char*path_nor, int nor_len, char*path_exc, int exc_len)
- {
- service->QuickHandle(bGetPath, path_nor, nor_len, path_exc, exc_len);
- }
- vector<int> CBatch::GetAllConfictPaper(int student_paper_id, string student_id)//»ñÈ¡³åÍ»ÊÔ¾í
- {
- return service->GetAllConfictPaper(student_paper_id, student_id);
- }
- int CBatch::ExamineThisScan(PAPER_DETAIL& paper_detail)
- {
- return service->ExamineThisScan(paper_detail);
- }
- int CBatch::SetAbsentExam(PAPER_DETAIL& paper_detail, int absent)
- {
- return service->SetAbsentExam(paper_detail, absent);
- }
- int CBatch::QueryKeGuanTiYiChang(const int paper_id, std::vector<KEGUANTI_DETAIL>& keguantiList)
- {
- return service->QueryKeGuanTiYiChang(paper_id, keguantiList);
- }
- int CBatch::UpdateKeGuanTiYiChang(const int paper_id, std::vector<KEGUANTI_DETAIL>& keguantiList)
- {
- return service->UpdateKeGuanTiYiChang(paper_id, keguantiList);
- }
|