diff --git a/appsrc/appconfig/basic/zappversion.hpp b/appsrc/appconfig/basic/zappversion.hpp index e104544..a3eab0a 100644 --- a/appsrc/appconfig/basic/zappversion.hpp +++ b/appsrc/appconfig/basic/zappversion.hpp @@ -1,3 +1,3 @@ #pragma once -#define VERSION "3.3.2" +#define VERSION "3.3.3" #define PROJECT_NAME "TRANSMIT_DM" \ No newline at end of file diff --git a/appsrc/service/app/disinfection_ctrl_service_ext.cpp b/appsrc/service/app/disinfection_ctrl_service_ext.cpp index 62a150b..92d81f8 100644 --- a/appsrc/service/app/disinfection_ctrl_service_ext.cpp +++ b/appsrc/service/app/disinfection_ctrl_service_ext.cpp @@ -77,14 +77,14 @@ void DisinfectionCtrlServiceExt::start(shared_ptr cxt, string // 从setting中获取实时参数 int level = atoi(loglevel.c_str()); dcs->start(level); - ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("开始消毒Log{}", level)); + ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("开始消毒 Log{}", level)); // m_state = DisinfectionState::preheat; if (stateUpdateThread) stateUpdateThread->wake(); } void DisinfectionCtrlServiceExt::startWithFormula(shared_ptr cxt, string formulaid) { // json formula = dcs->startWithFormula(formulaid); string logLevel = formula[SettingId::toString(SettingId::kloglevel)]; - ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("启动配置方{}Log{}", formula["name"], logLevel)); + ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("启动配方 {}, Log{}", formula["name"], logLevel)); if (stateUpdateThread) stateUpdateThread->wake(); } void DisinfectionCtrlServiceExt::stop(shared_ptr cxt) { @@ -103,7 +103,7 @@ void DisinfectionCtrlServiceExt::getRealtimeConfig(shared_ptr void DisinfectionCtrlServiceExt::updateTargetLogLevel(shared_ptr cxt, float loglevel) { auto tLog = dcs->getTlog(); dcs->updateTargetLogLevel(loglevel); - ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("实时修改LOG{}->{}", int(tLog + 0.5), (int)(loglevel + 0.5))); + ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("实时修改 Log{}->Log{}", int(tLog + 0.5), (int)(loglevel + 0.5))); } void DisinfectionCtrlServiceExt::setRealtimeConfig(shared_ptr cxt, string key, string val) { diff --git a/appsrc/service/setting_mgr_service.cpp b/appsrc/service/setting_mgr_service.cpp index 0056d10..bf408ae 100644 --- a/appsrc/service/setting_mgr_service.cpp +++ b/appsrc/service/setting_mgr_service.cpp @@ -30,7 +30,7 @@ void SettingMgrService::setSettingVal(shared_ptr cxt, Setting APPCHECK(suc, err::kappe_db_operate_error, "setSettingVal failed"); auto setting = SETTING_DB->getSetting(settingName.toString()); - ADD_USER_BEHAVIOR(DS->getLoginName(), fmt::format("设置{}为{}", setting ? setting->name_ch : settingName.toString(), settingVal)); + ADD_USER_BEHAVIOR(DS->getLoginName(), fmt::format("设置 {} 为 {}", setting ? setting->name_ch : settingName.toString(), settingVal)); } void SettingMgrService::getAllFormula(shared_ptr cxt) { cxt->rely = FORMULA_DB->getAllFormula(); } @@ -62,6 +62,22 @@ void SettingMgrService::updateFormula(shared_ptr cxt, string } FORMULA_DB->updateFormula(formula_id, formula); + + string formulaName; + try { + formulaName = formula["name"]; + } catch (const std::exception& e) { + } + + string formulaContent = formula.dump(0); + //替换 { 为 | } 为 | + replace(formulaContent.begin(), formulaContent.end(), '{', '|'); + replace(formulaContent.begin(), formulaContent.end(), '}', '|'); + //替换" 为 空格 + replace(formulaContent.begin(), formulaContent.end(), '"', ' '); + + + ADD_USER_BEHAVIOR(DS->getLoginName(), fmt::format("更新配方 {} {}", formulaName, formula.dump())); return; } void SettingMgrService::updateFormulaIterm(shared_ptr cxt, string formula_id, string itemName, string val) { @@ -73,3 +89,4 @@ void SettingMgrService::factoryResetSettings(shared_ptr cxt) ADD_USER_BEHAVIOR(DS->getLoginName(), fmt::format("恢复出厂设置")); cxt->rely = SETTING_DB->getAllSetting(); } +