123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- #include "stdafx.h"
- #include "OnlineCardStudentMatcher.h"
- #include "basic_struct.h"
- #include "ServerConfig.h"
- #include "rapidjson/document.h"
- #include "../EvaluationUtil/HttpClient.h"
- #include "UploadManager.h"
- int g_flagid; //判断是否使用id(0:不使用id,1:使用id)
- int g_schoolCardStatus; //
- extern UploadManager* g_upload_manager;
- std::string ascii2utf8(const string & ascii);
- std::string utf82ascii(const string & utf8);
- COnlineCardStudentMatcher::COnlineCardStudentMatcher()
- {
- url_strcode.Format(_T("%s/coachio/iointerface_v2/getPaperStudentInfo"), CServerConfig::server_url);
- }
- COnlineCardStudentMatcher::~COnlineCardStudentMatcher()
- {
- }
- ServiceState COnlineCardStudentMatcher::OnStarting(void)
- {
- return __super::OnStarting();
- }
- void COnlineCardStudentMatcher::updatefile(CppSQLite3DB* bantch_db, long student_paper_id, const std::string & norimg_dir, const std::string & excimg_dir){
- char sql5[512];
- sprintf_s(sql5, "select * from student_paper sp where sp.student_paper_id =%d", student_paper_id);
- CppSQLite3Query query_s = bantch_db->execQuery(sql5);
- if (!query_s.eof()){
- long paper_state = query_s.getInt64Field("paper_state");
- const char * student_code = query_s.getStringField("student_code");
- sprintf_s(sql5, "select * from page p where p.student_paper_id =%d", student_paper_id);
- CppSQLite3Query query_p = bantch_db->execQuery(sql5);
- CppSQLite3Statement stmt = bantch_db->compileStatement("update page set img_path =:img_path where page_id =:page_id");
- while (!query_p.eof()){
- std::string img_path = query_p.getStringField("img_path");
- int page_id = query_p.getIntField("page_id");
- int phy_number = atoi(query_p.getStringField("phy_number"));
- int page_index = query_p.getIntField("page_index");
- int index_dirspeator = img_path.find_last_of('\\');
- int index_dot = img_path.find_last_of('.');
- std::string dir = img_path.substr(0, index_dirspeator);
- std::string filename = img_path.substr(index_dirspeator, img_path.length() - index_dirspeator);
- std::string extname = index_dot > index_dirspeator ? img_path.substr(index_dot, img_path.length() - index_dot) : ".jpg";
- std::string dir_new = (paper_state&(MEX_YICHANG)) ? excimg_dir : norimg_dir;
- char filename_new[512];
- if (paper_state&(MEX_YICHANG)){
- sprintf_s(filename_new, "%06d%s", phy_number, extname.c_str());
- }
- else{
- sprintf_s(filename_new, "%s_%01d_%06d%s", student_code, page_index, phy_number, extname.c_str());
- }
- std::string img_path_new = dir_new + "\\" + filename_new;
- if (dir != dir_new){
- CopyFile(CString(img_path.c_str()), CString(img_path_new.c_str()),FALSE);
- stmt.bind(":img_path", img_path_new.c_str());
- stmt.bind(":page_id", page_id);
- stmt.execDML();
- }
- else if (filename != filename_new){
- rename(img_path.c_str(), img_path_new.c_str());
- stmt.bind(":img_path", img_path_new.c_str());
- stmt.bind(":page_id", page_id);
- stmt.execDML();
- }
- query_p.nextRow();
- }
- }
- }
- ServiceState COnlineCardStudentMatcher::OnRunning(void)
- {
- ServiceState nextState = IService::OnRunning();
- if (nextState == pausing) return nextState;
- char sql5[512];
- sprintf_s(sql5, "SELECT sp.student_paper_id, sp.student_id, sp.student_code, sp.paper_code FROM student_paper sp WHERE (sp.paper_state & %d) = %d", EX_KAOHAODAIPIPEI, EX_KAOHAODAIPIPEI);
- CppSQLite3Query query = bantch_db->execQuery(sql5);
- if (!query.eof()){
- if (g_flagid != 0)
- {
- // 使用id流程
- std::string response;
- CString postData;
- std::string strStuCode = query.getStringField("student_code");
- CString strPaperId; readPaperId(strPaperId);
- int studentCount = 0;
- std::map<std::string, vector<int>> code_id_map;
- Json::Value json;
- Json::Value json_array(Json::arrayValue);
- while (!query.eof()){
- Json::Value item;
- auto student_id = query.getStringField("student_id");
- auto student_paper_id = query.getIntField("student_paper_id");
- code_id_map[student_id].push_back(student_paper_id);
- //code_id_map["26541648372577028"].push_back(student_paper_id);
- item["studentCode"] = student_id;
- //item["studentCode"] = "26541648372577028";
- item["paperCode"] = query.getStringField("paper_code");
- //item["paperCode"] = "704606657776021504";
- json_array.append(item);
- query.nextRow();
- studentCount++;
- }
- postData = _T("json_str=");
- json["studentandpaper"] = json_array;
- if (m_nOnlineScanType == 0)
- {
- json["is_magic_word_card"] = 1;
- }
- Json::FastWriter writer;
- std::string json_str = writer.write(json);
- postData += CString(json_str.c_str());
- CHttpClient httpClient;
- httpClient.SetSendHeader(MarkHttpHeaderData());
- httpClient.HttpPost(url_strcode, postData, response);
- rapidjson::Document root;
- root.Parse(response.c_str());
- EnterCriticalSection(db_lock);
- bantch_db->execDML("begin transaction");
- if (root.IsObject() && root.HasMember("success") &&
- root["success"].IsInt() && root["success"].GetInt()){
- rapidjson::Value& rows = root["object"];
- std::map<std::string, rapidjson::Value> code_obj_map;
- if (rows.IsArray()){
- for (int i = 0; i < rows.Size(); i++)
- {
- if (rows[i].HasMember("studentCode") &&
- rows[i]["studentCode"].IsString())
- code_obj_map[utf82ascii(rows[i]["studentCode"].GetString())] = rows[i];
- }
- }
- std::map<string, vector<int>>::iterator it;
- char * sql = "INSERT INTO student ( student_id, student_code, class_name, school_id, grade_name, student_name, class_id, score_total ,studentCard,schoolStudentCard ) SELECT t.student_id, t.student_code, t.class_name, t.school_id, t.grade_name, t.student_name, t.class_id, t.score_total,t.studentCard ,t.schoolStudentCard FROM ( SELECT :student_id student_id, :student_code student_code, :class_name class_name, :school_id school_id, :grade_name grade_name, :student_name student_name, :class_id class_id, :score_total score_total, :studentCard studentCard , :schoolStudentCard schoolStudentCard ) t LEFT JOIN student s ON s.student_id = t.student_id WHERE s.student_id IS NULL";
- CppSQLite3Statement statement = bantch_db->compileStatement(sql);
- for (it = code_id_map.begin(); it != code_id_map.end(); ++it)
- {
- std::map<std::string, rapidjson::Value>::iterator it2 = code_obj_map.find(it->first);
- bool bUpload = true;
- for (int m = 0; m<it->second.size(); m++)
- {
- if (it2 == code_obj_map.end()){
- // 考号不存在
- sprintf_s(sql5, "update student_paper set paper_state =paper_state -%d +%d where student_paper_id =%d", EX_KAOHAODAIPIPEI, EX_KAOHAOBUCUNZAI, it->second[m]);
- bantch_db->execDML(sql5);
- bUpload = false;
- }
- else{
- //检查是否有考号冲突的试卷
- sprintf_s(sql5, "select sp.student_paper_id,sp.paper_state,sp.student_id from student_paper sp where sp.student_id = '%s' and sp.student_paper_id!=%d and (sp.paper_state & %d) != %d ",
- utf82ascii(it2->second["studentCode"].GetString()).c_str(), it->second[m], EX_KAOHAODAIPIPEI, EX_KAOHAODAIPIPEI);
- CppSQLite3Query q2 = bantch_db->execQuery(sql5);
- vector<int> all_conflict_ids;
- vector<int> conflict_ids;
- while (!q2.eof()){
- long paper_state_t = q2.getInt64Field("paper_state");
- all_conflict_ids.push_back(q2.getIntField("student_paper_id"));
- if (!(paper_state_t&EX_KAOHAOCHONGTU))
- conflict_ids.push_back(q2.getIntField("student_paper_id"));
- q2.nextRow();
- }
- bUpload = all_conflict_ids.empty();
- if (!all_conflict_ids.empty()){
- CppSQLite3Statement stmt3 = bantch_db->compileStatement("insert into exception (exception_type ,exception_name,page_id,student_paper_id) values(:exception_type ,:exception_name,:page_id,:student_paper_id)");
- for (int m = 0; m < conflict_ids.size(); m++){//将与之冲突的试卷标记为考号冲突
- sprintf_s(sql5, "update student_paper set paper_state =paper_state|%d ,Is_Covered=0 where student_paper_id=%d", EX_KAOHAOCHONGTU, conflict_ids[m]);
- bantch_db->execDML(sql5);
- stmt3.bind(":student_paper_id", conflict_ids[m]);
- stmt3.bind(":exception_type", SHIFT_KAOHAOCHONGTU);
- stmt3.bind(":exception_name", "考号冲突");
- stmt3.execDML();
- CppSQLite3Statement stmt4 = bantch_db->compileStatement("insert INTO message (student_paper_id , message_type) VALUES (:student_paper_id,:message_type)");
- stmt4.bind(":student_paper_id", conflict_ids[m]);
- stmt4.bind(":message_type", WM_IDENTIFOR_PAPER_STATE_CHAGED);
- stmt4.execDML();
- if (m_hwnd != NULL)::PostMessage(m_hwnd, WM_IDENTIFOR_PAPER_STATE_CHAGED, (WPARAM)NULL, (LPARAM)conflict_ids[m]);
- if (g_upload_manager&&g_upload_manager->IsEanble()){
- g_upload_manager->UploadOnScanCmd(UPLOAD_ON_SCAN_CMD::CMD_DEL_UPLOAD_REPORT, std::to_string(conflict_ids[m]).c_str());
- }
- }
- stmt3.bind(":student_paper_id", it->second[m]);
- stmt3.bind(":exception_type", SHIFT_KAOHAOCHONGTU);
- stmt3.bind(":exception_name", "考号冲突");
- stmt3.execDML();
- }
- sprintf_s(sql5, "update student_paper set paper_state =paper_state -%d+%d,student_id ='%s',student_code ='%s' ,Is_Covered=0 where student_paper_id =%d",
- EX_KAOHAODAIPIPEI,
- all_conflict_ids.empty() ? 0 : EX_KAOHAOCHONGTU,
- utf82ascii(it2->second["studentCode"].GetString()).c_str(),
- utf82ascii(it2->second["studentCard"].GetString()).c_str(),
- it->second[m]);
- bantch_db->execDML(sql5);
- statement.bind(":student_id", it2->second["studentCode"].GetString());
- statement.bind(":student_code", it2->second["studentCard"].GetString());
- auto name = it2->second["studentName"].GetString();
- statement.bind(":class_name", it2->second["className"].GetString());
- statement.bind(":grade_name", it2->second["gradeName"].GetString());
- statement.bind(":student_name", it2->second["studentName"].GetString());
- statement.bind(":class_id", it2->second["clazzId"].GetString());
- statement.bind(":score_total", 0);
- statement.bind(":school_id", 1);
- statement.bind(":studentCard", strStuCode.c_str());
- statement.bind(":schoolStudentCard", it2->second["schoolStudentCard"].GetString());
- statement.execDML();
- }
- //updatefile(bantch_db, it->second[m], m_norimg_dir, m_excimg_dir);
- CppSQLite3Statement stmt4 = bantch_db->compileStatement("insert INTO message (student_paper_id , message_type) VALUES (:student_paper_id,:message_type)");
- stmt4.bind(":student_paper_id", it->second[m]);
- stmt4.bind(":message_type", WM_IDENTIFOR_PAPER_STATE_CHAGED);
- stmt4.execDML();
- if (m_hwnd != NULL)::PostMessage(m_hwnd, WM_IDENTIFOR_PAPER_STATE_CHAGED, (WPARAM)NULL, (LPARAM)it->second[m]);
- if (g_upload_manager&&bUpload){
- std::string paper_state_qry_sql = "select paper_state from student_paper where student_paper_id=";
- paper_state_qry_sql += std::to_string(it->second[m]);
- auto paper_state_qry = bantch_db->execQuery(paper_state_qry_sql.c_str());
- if (!paper_state_qry.eof() &&
- paper_state_qry.getIntField("paper_state") == 0 && !m_bUseQr){
- g_upload_manager->UploadOnScanCmd(UPLOAD_ON_SCAN_CMD::CMD_UPLOAD_SUCCESSSJUAN, std::to_string(it->second[m]).c_str());
- }
- }
- LOGFMTI("WM_IDENTIFOR_PAPER_STATE_CHAGED match paper_id :%d\n", it->second[m]);
- }
- }
- }
- else{
- // 考号不存在
- for (auto it = code_id_map.begin(); it != code_id_map.end(); ++it){
- for (std::size_t m = 0; m<it->second.size(); m++){
- sprintf_s(sql5, "update student_paper set paper_state =paper_state -%d +%d where student_paper_id =%d", EX_KAOHAODAIPIPEI, EX_KAOHAOBUCUNZAI, it->second[m]);
- bantch_db->execDML(sql5);
- CppSQLite3Statement stmt4 = bantch_db->compileStatement("insert INTO message (student_paper_id , message_type) VALUES (:student_paper_id,:message_type)");
- stmt4.bind(":student_paper_id", it->second[m]);
- stmt4.bind(":message_type", WM_IDENTIFOR_PAPER_STATE_CHAGED);
- stmt4.execDML();
- if (m_hwnd != NULL)::PostMessage(m_hwnd, WM_IDENTIFOR_PAPER_STATE_CHAGED, (WPARAM)NULL, (LPARAM)it->second[m]);
- }
- }
- }
- bantch_db->execDML("commit transaction");
- LeaveCriticalSection(db_lock);
- }
- else
- {
- // 使用考号流程(学校准考证号、系统准考证号)
- string response;
- CString postData;
- string strStuCode;
- m_examId = 16;
- CString strPaperId;
- readPaperId(strPaperId);
- postData.Format(_T("exam_group_id="));
- postData += strPaperId;
- postData += "&studentCard=";
- int studentCount = 0;
- std::map<std::string, vector<int>> code_id_map;
- while (!query.eof()){
- code_id_map[query.getStringField("student_code")].push_back(query.getIntField("student_paper_id"));
- if (studentCount>0){ postData.Append(_T(",")); }
- postData.Append(CString(query.getStringField("student_code")));
- strStuCode = query.getStringField("student_code");
- query.nextRow();
- studentCount++;
- }
- postData.Append(CString("&cardStatus=0"));
- CString strBarcodeFlag, strBar;
- strBarcodeFlag.Format(_T("%d"), g_schoolCardStatus);
- strBar = "&barcodeFlag=";
- strBar = strBar + strBarcodeFlag;
- postData.Append(strBar);
- CHttpClient httpClient;
- httpClient.SetSendHeader(MarkHttpHeaderData());
- httpClient.HttpPost(url_str, postData, response);
- rapidjson::Document root;
- root.Parse(ascii2utf8(response).c_str());
- Sleep(1000);//休眠1秒
- EnterCriticalSection(db_lock);
- bantch_db->execDML("begin transaction");
- if (root.IsObject() && root["success"].IsInt() && root["success"].GetInt()){
- rapidjson::Value& rows = root["object"];
- std::map<std::string, rapidjson::Value> code_obj_map;
- //string strT;
- //strT = rows[0]["examineeCode"].GetString();
- for (int i = 0; i<rows.Size(); i++)
- {
- code_obj_map[utf82ascii(rows[i]["examineeCode"].GetString())] = rows[i];
- }
- std::map<string, vector<int>>::iterator it;
- char * sql = "INSERT INTO student ( student_id, student_code, class_name, school_id, grade_name, student_name, class_id, score_total ,studentCard,schoolStudentCard ) SELECT t.student_id, t.student_code, t.class_name, t.school_id, t.grade_name, t.student_name, t.class_id, t.score_total,t.studentCard ,t.schoolStudentCard FROM ( SELECT :student_id student_id, :student_code student_code, :class_name class_name, :school_id school_id, :grade_name grade_name, :student_name student_name, :class_id class_id, :score_total score_total, :studentCard studentCard , :schoolStudentCard schoolStudentCard ) t LEFT JOIN student s ON s.student_id = t.student_id WHERE s.student_id IS NULL";
- CppSQLite3Statement statement = bantch_db->compileStatement(sql);
- for (it = code_id_map.begin(); it != code_id_map.end(); ++it)
- {
- bool bUpload = true;
- std::map<std::string, rapidjson::Value>::iterator it2 = code_obj_map.find(it->first);
- for (int m = 0; m<it->second.size(); m++)
- {
- if (it2 == code_obj_map.end()){//不存在该考生
- //if (it2 != code_obj_map.end()){//不存在该考生
- // LOG4CPLUS_INFO_FMT(pTestLogger, LOG4CPLUS_TEXT("没有找到考号为%s的考生"), CString(it->first.c_str()));
- sprintf_s(sql5, "update student_paper set paper_state =paper_state -%d +%d where student_paper_id =%d", EX_KAOHAODAIPIPEI, EX_KAOHAOBUCUNZAI, it->second[m]);
- bantch_db->execDML(sql5);
- bUpload = false;
- }
- else{
- //检查是否有考号冲突的试卷
- sprintf_s(sql5, "select sp.student_paper_id,sp.paper_state,sp.student_id from student_paper sp where sp.student_id = '%s' and sp.student_paper_id!=%d ", utf82ascii(it2->second["studentId"].GetString()).c_str(), it->second[m]);
- CppSQLite3Query q2 = bantch_db->execQuery(sql5);
- vector<int> all_conflict_ids;
- vector<int> conflict_ids;
- while (!q2.eof()){
- long paper_state_t = q2.getInt64Field("paper_state");
- all_conflict_ids.push_back(q2.getIntField("student_paper_id"));
- if (!(paper_state_t&EX_KAOHAOCHONGTU))
- conflict_ids.push_back(q2.getIntField("student_paper_id"));
- q2.nextRow();
- }
- bUpload = all_conflict_ids.empty();
- if (!all_conflict_ids.empty()){
- CppSQLite3Statement stmt3 = bantch_db->compileStatement("insert into exception (exception_type ,exception_name,page_id,student_paper_id) values(:exception_type ,:exception_name,:page_id,:student_paper_id)");
- for (int m = 0; m<conflict_ids.size(); m++){//将与之冲突的试卷标记为考号冲突
- sprintf_s(sql5, "update student_paper set paper_state =paper_state|%d ,Is_Covered=0 where student_paper_id=%d", EX_KAOHAOCHONGTU, conflict_ids[m]);
- bantch_db->execDML(sql5);
- stmt3.bind(":student_paper_id", conflict_ids[m]);
- stmt3.bind(":exception_type", SHIFT_KAOHAOCHONGTU);
- stmt3.bind(":exception_name", "考号冲突");
- stmt3.execDML();
- CppSQLite3Statement stmt4 = bantch_db->compileStatement("insert INTO message (student_paper_id , message_type) VALUES (:student_paper_id,:message_type)");
- stmt4.bind(":student_paper_id", conflict_ids[m]);
- stmt4.bind(":message_type", WM_IDENTIFOR_PAPER_STATE_CHAGED);
- stmt4.execDML();
- if (m_hwnd != NULL)::PostMessage(m_hwnd, WM_IDENTIFOR_PAPER_STATE_CHAGED, (WPARAM)NULL, (LPARAM)conflict_ids[m]);
- if (g_upload_manager&&g_upload_manager->IsEanble()){
- g_upload_manager->UploadOnScanCmd(UPLOAD_ON_SCAN_CMD::CMD_DEL_UPLOAD_REPORT, std::to_string(conflict_ids[m]).c_str());
- }
- }
- stmt3.bind(":student_paper_id", it->second[m]);
- stmt3.bind(":exception_type", SHIFT_KAOHAOCHONGTU);
- stmt3.bind(":exception_name", "考号冲突");
- stmt3.execDML();
- }
- sprintf_s(sql5, "update student_paper set paper_state =paper_state -%d+%d,student_id ='%s' ,Is_Covered=0 where student_paper_id =%d",
- EX_KAOHAODAIPIPEI,
- all_conflict_ids.empty() ? 0 : EX_KAOHAOCHONGTU,
- utf82ascii(it2->second["studentId"].GetString()).c_str(),
- it->second[m]);
- bantch_db->execDML(sql5);
- statement.bind(":student_id", utf82ascii(it2->second["studentId"].GetString()).c_str());
- statement.bind(":student_code", utf82ascii(it2->second["examineeCode"].GetString()).c_str());
- statement.bind(":class_name", utf82ascii(it2->second["clazzName"].GetString()).c_str());
- statement.bind(":school_id", it2->second["schoolId"].GetInt());
- statement.bind(":grade_name", utf82ascii(it2->second["gradeName"].GetString()).c_str());
- statement.bind(":student_name", utf82ascii(it2->second["studentName"].GetString()).c_str());
- statement.bind(":class_id", (long long)it2->second["clazzId"].GetInt64());
- statement.bind(":score_total", 0);
- statement.bind(":studentCard", it2->second["studentCard"].GetString());
- statement.bind(":schoolStudentCard", it2->second["schoolStudentCard"].GetString());
- statement.execDML();
- }
- CppSQLite3Statement stmt4 = bantch_db->compileStatement("insert INTO message (student_paper_id , message_type) VALUES (:student_paper_id,:message_type)");
- stmt4.bind(":student_paper_id", it->second[m]);
- stmt4.bind(":message_type", WM_IDENTIFOR_PAPER_STATE_CHAGED);
- stmt4.execDML();
- if (m_hwnd != NULL)::PostMessage(m_hwnd, WM_IDENTIFOR_PAPER_STATE_CHAGED, (WPARAM)NULL, (LPARAM)it->second[m]);
- if (g_upload_manager&&bUpload){
- std::string paper_state_qry_sql = "select paper_state from student_paper where student_paper_id=";
- paper_state_qry_sql += std::to_string(it->second[m]);
- auto paper_state_qry = bantch_db->execQuery(paper_state_qry_sql.c_str());
- if (!paper_state_qry.eof() &&
- paper_state_qry.getIntField("paper_state") == 0 && !m_bUseQr){
- g_upload_manager->UploadOnScanCmd(UPLOAD_ON_SCAN_CMD::CMD_UPLOAD_SUCCESSSJUAN, std::to_string(it->second[m]).c_str());
- }
- }
- printf("WM_IDENTIFOR_PAPER_STATE_CHAGED match paper_id :%d\n", it->second[m]);
- }
- }
- }
- else{
- std::map<string, vector<int>>::iterator it;
- for (it = code_id_map.begin(); it != code_id_map.end(); ++it)
- {
- for (int m = 0; m<it->second.size(); m++)
- {
- sprintf_s(sql5, "update student_paper set paper_state =paper_state -%d +%d where student_paper_id =%d", EX_KAOHAODAIPIPEI, EX_KAOHAOBUCUNZAI, it->second[m]);
- bantch_db->execDML(sql5);
- CppSQLite3Statement stmt4 = bantch_db->compileStatement("insert INTO message (student_paper_id , message_type) VALUES (:student_paper_id,:message_type)");
- stmt4.bind(":student_paper_id", it->second[m]);
- stmt4.bind(":message_type", WM_IDENTIFOR_PAPER_STATE_CHAGED);
- stmt4.execDML();
- if (m_hwnd != NULL)::PostMessage(m_hwnd, WM_IDENTIFOR_PAPER_STATE_CHAGED, (WPARAM)NULL, (LPARAM)it->second[m]);
- }
- }
- }
- bantch_db->execDML("commit transaction");
- LeaveCriticalSection(db_lock);
- }
- }
- else if (m_resultHandler->GetServiceSate() == stoped){
- return stoping;
- }
- //休息5秒
- Sleep(2 * 1000);
- return running;
- }
|