Browse Source

update

master
zhaohe 1 year ago
parent
commit
718128c43a
  1. 20
      src/service/disfection_ctl/disinfection_service.cpp

20
src/service/disfection_ctl/disinfection_service.cpp

@ -67,11 +67,11 @@ string DisinfectionService::createDisinfectionID() {
logger->error("localtime_r failed");
exit(-1);
}
return fmt::format("{:0>4}-{:0>2}{:0>2}-{:0>2}{:0>2}{:0>2}", tm.tm_year + 1900, //
tm.tm_mon + 1, //
tm.tm_mday, //
tm.tm_hour, //
tm.tm_min, tm.tm_sec);
return fmt::format("{:0>4}-{:0>2}{:0>2}-{:0>2}{:0>2}", tm.tm_year + 1900, //
tm.tm_mon + 1, //
tm.tm_mday, //
tm.tm_hour, //
tm.tm_min);
}
static string formattimeS(int sec) {
@ -156,9 +156,9 @@ void DisinfectionService::__dumpDisinfectionLogsToCSV(bool header) {
#if (defined PROJECT_TYPE_LARGE_SPACE_DISINFECTION) || (defined PROJECT_TYPE_SMALL_SPACE_DISINFECTION)
if (header) {
content += fmt::format(" {} , {} , {} , {} ,", ZIconv::noChange("仓内-气化过氧化氢浓度"), ZIconv::noChange("仓内-温度"), ZIconv::noChange("仓内-相对湿度"), ZIconv::noChange("仓内-相对饱和度"));
content += fmt::format(" {} , {} , {} , {} ,", ZIconv::noChange("环境1-气化过氧化氢浓度"), ZIconv::noChange("环境1-温度"), ZIconv::noChange("环境1-相对湿度"), ZIconv::noChange("环境1-相对饱和度"));
content += fmt::format(" {} , {} , {} , {} ,", ZIconv::noChange("环境2-气化过氧化氢浓度"), ZIconv::noChange("环境2-温度"), ZIconv::noChange("环境2-相对湿度"), ZIconv::noChange("环境2-相对饱和度"));
content += fmt::format(" {} , {} , {} , {} ,", ZIconv::noChange("仓内-过氧化氢"), ZIconv::noChange("仓内-温度"), ZIconv::noChange("仓内-相对湿度"), ZIconv::noChange("仓内-相对饱和度"));
content += fmt::format(" {} , {} , {} , {} ,", ZIconv::noChange("环境1-过氧化氢"), ZIconv::noChange("环境1-温度"), ZIconv::noChange("环境1-相对湿度"), ZIconv::noChange("环境1-相对饱和度"));
content += fmt::format(" {} , {} , {} , {} ,", ZIconv::noChange("环境2-过氧化氢"), ZIconv::noChange("环境2-温度"), ZIconv::noChange("环境2-相对湿度"), ZIconv::noChange("环境2-相对饱和度"));
} else {
for (int i = 0; i < MAX_H2O2_SENSOR_NUM; i++) {
content += fmt::format(" {} , {} , {} , {} ,", h2o2str[i], tempstr[i], humidstr[i], satstr[i]);
@ -166,9 +166,9 @@ void DisinfectionService::__dumpDisinfectionLogsToCSV(bool header) {
}
#else
if (header) {
content += fmt::format(" {} , {} , {} ,", ZIconv::noChange("仓内-气化过氧化氢浓度"), ZIconv::noChange("仓内-温度"), ZIconv::noChange("仓内-相对湿度"));
content += fmt::format(" {} , {} , {} , {} ,", ZIconv::noChange("仓内-过氧化氢浓度"), ZIconv::noChange("仓内-温度"), ZIconv::noChange("仓内-相对湿"), ZIconv::noChange("仓内-相对饱和"));
} else {
content += fmt::format(" {} , {} , {} ,", h2o2str[0], tempstr[0], humidstr[0]);
content += fmt::format(" {} , {} , {} ,", h2o2str[0], tempstr[0], humidstr[0], satstr[0]);
}
#endif

Loading…
Cancel
Save