|
|
@ -157,10 +157,10 @@ void DisinfectionLogsService::initialize() { |
|
|
|
GET_TO_SERVICE(m_udiskMgrService); |
|
|
|
|
|
|
|
REG_EXTFN_VOID(getRecordList, void()); |
|
|
|
REG_EXTFN_VOID(getRecord, void()); |
|
|
|
REG_EXTFN(getRecord, void(string), logName); |
|
|
|
REG_EXTFN(deleteReport, void(string), logName); |
|
|
|
REG_EXTFN(exportRecord, void(vector<string>), logNames); |
|
|
|
REG_EXTFN_VOID(printRecord, void()); |
|
|
|
REG_EXTFN(printRecord, void(string), logName); |
|
|
|
REG_EXTFN_VOID(selftest, void()); |
|
|
|
|
|
|
|
m_csvHeaderDict.insert(CSVHeader::time, "时间"); |
|
|
@ -561,8 +561,7 @@ void DisinfectionLogsService::getRecordList(shared_ptr<MsgProcessContext> cxt) { |
|
|
|
cxt->rely = record; |
|
|
|
return; |
|
|
|
} |
|
|
|
void DisinfectionLogsService::getRecord(shared_ptr<MsgProcessContext> cxt) { |
|
|
|
string logName = cxt->params["logName"]; |
|
|
|
void DisinfectionLogsService::getRecord(shared_ptr<MsgProcessContext> cxt, string logName) { |
|
|
|
string content = FileUtils().readFileAsString(fmt::format("{}{}.csv", LOG_STORGE_PATH, logName)); |
|
|
|
vector<string> lines; |
|
|
|
split(content, lines, '\n'); |
|
|
@ -586,9 +585,8 @@ void DisinfectionLogsService::exportRecord(shared_ptr<MsgProcessContext> cxt, ve |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
void DisinfectionLogsService::printRecord(shared_ptr<MsgProcessContext> cxt) { |
|
|
|
void DisinfectionLogsService::printRecord(shared_ptr<MsgProcessContext> cxt,string logName) { |
|
|
|
//
|
|
|
|
string logName = cxt->params["logName"]; |
|
|
|
printRecordFile(logName); |
|
|
|
} |
|
|
|
|
|
|
|