From d6e4a943e09d61e7ee9c344701d1db761b5480bb Mon Sep 17 00:00:00 2001 From: zhaohe Date: Thu, 29 Aug 2024 13:42:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ appdep/iflytop/core/components/timeutils.hpp | 2 +- appsrc/appsetting/project_port/basic/zappversion.hpp | 2 +- appsrc/service/app_core.cpp | 6 +++--- appsrc/service/disinfection_logs_service.cpp | 4 ++-- html/debug/index.html | 1 + 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b6c8ca3..3ef6c67 100644 --- a/README.md +++ b/README.md @@ -29,4 +29,9 @@ VERSION 1.0.5 VERSION 1.0.6 1. 修改消毒时空压机关闭时机 2. 修改气密性测试逻辑 +VERSION 1.0.7 + 1. 修改消毒日志格式化,时间错误问题 + 2. 修改调试页面AppCore打不开的问题 + 3. 修改消毒日志log等级打印小数点太多的问题。 + 4. 调试页面调用新指令时,会自动清空上一条指令的日志 ``` \ No newline at end of file diff --git a/appdep/iflytop/core/components/timeutils.hpp b/appdep/iflytop/core/components/timeutils.hpp index b09f3fe..b9dd01d 100644 --- a/appdep/iflytop/core/components/timeutils.hpp +++ b/appdep/iflytop/core/components/timeutils.hpp @@ -75,7 +75,7 @@ class T_TimeUtils { * @return string */ static string fmt(time_point tp, const char* fmt) { - std::time_t now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); + std::time_t now = std::chrono::system_clock::to_time_t(tp); std::string s(30, '\0'); std::strftime(&s[0], s.size(), fmt, std::localtime(&now)); return s.c_str(); diff --git a/appsrc/appsetting/project_port/basic/zappversion.hpp b/appsrc/appsetting/project_port/basic/zappversion.hpp index cf1fbd9..6ead0c4 100644 --- a/appsrc/appsetting/project_port/basic/zappversion.hpp +++ b/appsrc/appsetting/project_port/basic/zappversion.hpp @@ -1,3 +1,3 @@ #pragma once -#define VERSION "1.0.6" +#define VERSION "1.0.7" #define PROJECT_NAME "TRANSMIT_DM" \ No newline at end of file diff --git a/appsrc/service/app_core.cpp b/appsrc/service/app_core.cpp index ed759e2..4a51309 100644 --- a/appsrc/service/app_core.cpp +++ b/appsrc/service/app_core.cpp @@ -55,7 +55,6 @@ static void installEcodeInfo() { REG_ENUM_TYPE(SettingId, SettingId::getEnumStrList()); REG_ENUM_TYPE(AirLeakTestMode, AirLeakTestMode::getEnumStrList()); - AppEcodeInfoMgr::ins().regEcodeInfo(kerr_motor_reset_error, "电机复位错误"); AppEcodeInfoMgr::ins().regEcodeInfo(kerr_motor_subdevice_offline, "电机子设备离线"); @@ -108,7 +107,6 @@ static void installEcodeInfo() { AppEcodeInfoMgr::ins().regEcodeInfo(kappe_exception_flag_is_setted, "设备硬件异常"); AppEcodeInfoMgr::ins().regEcodeInfo(kappe_disinfection_state_is_wrong, "消毒状态错误"); - // AppEcodeInfoMgr::ins().regEcodeInfo(kerr_motor_reset_error, "电机复位错误"); // AppEcodeInfoMgr::ins().regEcodeInfo(kerr_motor_subdevice_offline, "电机子设备离线"); // AppEcodeInfoMgr::ins().regEcodeInfo(kerr_motor_driver_error, "电机驱动器错误"); @@ -206,9 +204,11 @@ void AppCore::initialize() { REG_EXTFN_VOID(promptGetNext, void(void)); REG_EXTFN_VOID(enterTestMode, void(void)); REG_EXTFN_VOID(exitTestMode, void(void)); - REG_EXTFN(startGenFakeH2O2Data, void(void), data); + REG_EXTFN(startGenFakeH2O2Data, void(json), data); REG_EXTFN_VOID(stopGenFakeH2O2Data, void(void)); REG_EXTFN_VOID(getGenFakeH2O2DataDemoJson, void(void)); + + }; int AppCore::demofn(int a, int b) { return 0; } diff --git a/appsrc/service/disinfection_logs_service.cpp b/appsrc/service/disinfection_logs_service.cpp index 37ef050..128ccc6 100644 --- a/appsrc/service/disinfection_logs_service.cpp +++ b/appsrc/service/disinfection_logs_service.cpp @@ -358,7 +358,7 @@ void DisinfectionLogsService::dumpDisinfectionRecord(string sessionId, listdval)); - csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::nlog), /******************/ fmt::format("{}", s->nlog)); + csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::nlog), /******************/ fmt::format("\"{:.2f}\"", s->nlog)); csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::tlog), /******************/ fmt::format("{}", s->tlog)); // 拉杆箱消毒机没有消毒剂剩余量 @@ -436,7 +436,7 @@ void DisinfectionLogsService::dumpDisinfectionToPrinterLog(string sessionId, lis } if (state == DisinfectionState::disinfection) { - float nlog = nlog < snapshot->tlog ? nlog : snapshot->nlog; + float nlog = snapshot->nlog < snapshot->tlog ? snapshot->nlog : snapshot->tlog; auto h2o2data = snapshot->h2o2Snapshot; for (int i = 0; i < h2o2data->getSensorDataNum(); i++) { if (i == 0) { diff --git a/html/debug/index.html b/html/debug/index.html index 374fb60..2682254 100644 --- a/html/debug/index.html +++ b/html/debug/index.html @@ -193,6 +193,7 @@ } request.params[param] = value; } + this.logs = []; this.wsCall(request); },