|
@ -170,7 +170,7 @@ void DisinfectionLogsService::initialize() { |
|
|
REG_EXTFN(deleteReport, void(string), logName); |
|
|
REG_EXTFN(deleteReport, void(string), logName); |
|
|
REG_EXTFN(exportRecord, void(vector<string>), logNames); |
|
|
REG_EXTFN(exportRecord, void(vector<string>), logNames); |
|
|
REG_EXTFN(printRecord, void(string), logName); |
|
|
REG_EXTFN(printRecord, void(string), logName); |
|
|
REG_EXTFN_VOID(selftest, void()); |
|
|
|
|
|
|
|
|
REG_EXTFN(createFakeData, void(bool), printInPrinter); |
|
|
|
|
|
|
|
|
m_csvHeaderDict.insert(CSVHeader::time, "时间"); |
|
|
m_csvHeaderDict.insert(CSVHeader::time, "时间"); |
|
|
m_csvHeaderDict.insert(CSVHeader::state, "设备状态"); |
|
|
m_csvHeaderDict.insert(CSVHeader::state, "设备状态"); |
|
@ -261,7 +261,7 @@ void DisinfectionLogsService::onAppDisinfectionFinishedEvent(shared_ptr<Disinfec |
|
|
* 1.创建打印文件缓存 |
|
|
* 1.创建打印文件缓存 |
|
|
* 2.创建PDF文件缓存 |
|
|
* 2.创建PDF文件缓存 |
|
|
*/ |
|
|
*/ |
|
|
printRecordFile(m_sessionId); |
|
|
|
|
|
|
|
|
if (printfLogWhenDisinfectionFinished) printRecordFile(m_sessionId); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/**
|
|
|
/**
|
|
@ -627,7 +627,7 @@ chrono::system_clock::time_point time_point_increment(chrono::system_clock::time |
|
|
return tp; |
|
|
return tp; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void DisinfectionLogsService::selftest(shared_ptr<MsgProcessContext> cxt) { |
|
|
|
|
|
|
|
|
void DisinfectionLogsService::createFakeData(shared_ptr<MsgProcessContext> cxt, bool printInPrinter) { |
|
|
string ssid = createDisinfectionID(); |
|
|
string ssid = createDisinfectionID(); |
|
|
onAppDisinfectionStartEvent(ssid); |
|
|
onAppDisinfectionStartEvent(ssid); |
|
|
|
|
|
|
|
@ -661,7 +661,9 @@ void DisinfectionLogsService::selftest(shared_ptr<MsgProcessContext> cxt) { |
|
|
statistics->tLog = 10; |
|
|
statistics->tLog = 10; |
|
|
statistics->finalLog = 9; |
|
|
statistics->finalLog = 9; |
|
|
|
|
|
|
|
|
|
|
|
printfLogWhenDisinfectionFinished = false; |
|
|
onAppDisinfectionFinishedEvent(statistics); |
|
|
onAppDisinfectionFinishedEvent(statistics); |
|
|
|
|
|
printfLogWhenDisinfectionFinished = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
shared_ptr<DisinfectionStateSnapshot> DisinfectionLogsService::selftest_createFakeSnapshot(zsystem_tp time, DisinfectionState state, int sensorNum, bool forceLog) { |
|
|
shared_ptr<DisinfectionStateSnapshot> DisinfectionLogsService::selftest_createFakeSnapshot(zsystem_tp time, DisinfectionState state, int sensorNum, bool forceLog) { |
|
|