Browse Source

v2.1.6

master
zhaohe 8 months ago
parent
commit
a74f3e75e4
  1. 5
      README.md
  2. 2
      appsrc/appconfig/basic/zappversion.hpp
  3. 2
      appsrc/baseservice/db/formula_db_dao.cpp
  4. 2
      appsrc/baseservice/db/setting_db_dao.cpp
  5. 5
      appsrc/service/app/disinfection_ctrl_service_ext.cpp
  6. 6
      appsrc/service/audit_mgr_service.cpp
  7. 8
      appsrc/service/device_info_mgr_service.cpp

5
README.md

@ -135,6 +135,11 @@ VERSION 2.1.2
3. 增加 手动设置H2O2称重偏移。 3. 增加 手动设置H2O2称重偏移。
VERSION 2.1.3 VERSION 2.1.3
1.修复去皮功能的BUG 1.修复去皮功能的BUG
VERSION 2.1.5
1. 修改 新公式 -> 新配方
2. 修改默认log
VERSION 2.1.6
1. 修复默认部分bug
TODO: TODO:
1. 设备使用时间维护(UI接口已经准备好,考虑是否使用文件袋放在设备中的方案) 1. 设备使用时间维护(UI接口已经准备好,考虑是否使用文件袋放在设备中的方案)

2
appsrc/appconfig/basic/zappversion.hpp

@ -1,3 +1,3 @@
#pragma once #pragma once
#define VERSION "2.1.4"
#define VERSION "2.1.6"
#define PROJECT_NAME "TRANSMIT_DM" #define PROJECT_NAME "TRANSMIT_DM"

2
appsrc/baseservice/db/formula_db_dao.cpp

@ -60,7 +60,7 @@ json FormulaDBDao::newFormula() {
auto allSettings = SettingDBDao::ins()->getAllSetting(); auto allSettings = SettingDBDao::ins()->getAllSetting();
json formula; json formula;
formula["formula_id"] = UUID().toString(); formula["formula_id"] = UUID().toString();
formula["name"] = "公式";
formula["name"] = "配方";
for (auto& setting : allSettings) { for (auto& setting : allSettings) {
if (setting->is_visible_in_formula_page) { if (setting->is_visible_in_formula_page) {
formula[string(setting->setting_id)] = setting->default_val; formula[string(setting->setting_id)] = setting->default_val;

2
appsrc/baseservice/db/setting_db_dao.cpp

@ -79,7 +79,7 @@ static Setting settingInitTable[] = {
INT_SETTING(SettingId::kproportional_valve_default_value, "正负压默认开合比例", "10", "0", "100", /* */ true, true, true, true), INT_SETTING(SettingId::kproportional_valve_default_value, "正负压默认开合比例", "10", "0", "100", /* */ true, true, true, true),
INT_SETTING(SettingId::krecord_period_min, "消毒日志记录间隔(Min)", "2", "1", "30", /* */ true, true, false, false), INT_SETTING(SettingId::krecord_period_min, "消毒日志记录间隔(Min)", "2", "1", "30", /* */ true, true, false, false),
INT_SETTING(SettingId::krecord_printer_period_min, "消毒日志打印间隔(Min)", "5", "1", "30", /* */ true, true, false, false), INT_SETTING(SettingId::krecord_printer_period_min, "消毒日志打印间隔(Min)", "5", "1", "30", /* */ true, true, false, false),
ENUM_SETTING(SettingId::kloglevel, "消毒等级", "1", vector<string>({"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}), //
ENUM_SETTING(SettingId::kloglevel, "消毒等级", "6", vector<string>({"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}), //
vector<string>({"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}), /* */ true, false, true, true), vector<string>({"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}), /* */ true, false, true, true),
BOOL_SETTING(SettingId::kenable_bd_dehumidify, "是否启用消毒前除湿", "false", /* */ true, false, false, false), BOOL_SETTING(SettingId::kenable_bd_dehumidify, "是否启用消毒前除湿", "false", /* */ true, false, false, false),
INT_SETTING(SettingId::kbd_dehumidify_threshold, "消毒前除湿阈值", "0", "0", "100", /* */ true, false, false, false), INT_SETTING(SettingId::kbd_dehumidify_threshold, "消毒前除湿阈值", "0", "0", "100", /* */ true, false, false, false),

5
appsrc/service/app/disinfection_ctrl_service_ext.cpp

@ -61,8 +61,9 @@ void DisinfectionCtrlServiceExt::start(shared_ptr<MsgProcessContext> cxt, string
if (stateUpdateThread) stateUpdateThread->wake(); if (stateUpdateThread) stateUpdateThread->wake();
} }
void DisinfectionCtrlServiceExt::startWithFormula(shared_ptr<MsgProcessContext> cxt, string formulaid) { // void DisinfectionCtrlServiceExt::startWithFormula(shared_ptr<MsgProcessContext> cxt, string formulaid) { //
json formula = dcs->startWithFormula(formulaid);
ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("启动配置方{}Log{}", formula["name"], formula[SettingId::toString(SettingId::kloglevel)]));
json formula = dcs->startWithFormula(formulaid);
string logLevel = formula[SettingId::toString(SettingId::kloglevel)];
ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("启动配置方{}Log{}", formula["name"], logLevel));
if (stateUpdateThread) stateUpdateThread->wake(); if (stateUpdateThread) stateUpdateThread->wake();
} }
void DisinfectionCtrlServiceExt::stop(shared_ptr<MsgProcessContext> cxt) { void DisinfectionCtrlServiceExt::stop(shared_ptr<MsgProcessContext> cxt) {

6
appsrc/service/audit_mgr_service.cpp

@ -1,7 +1,7 @@
#include "audit_mgr_service.hpp" #include "audit_mgr_service.hpp"
using namespace iflytop; using namespace iflytop;
#define EXPORT_PATH "/mnt/exportdata/Transmit/"
#define EXPORT_PATH "/mnt/exportdata/TrySmet/"
#define IF_ERROR_RETURN(x) \ #define IF_ERROR_RETURN(x) \
if (!x) { \ if (!x) { \
return err::kappe_udisk_wr_fail; \ return err::kappe_udisk_wr_fail; \
@ -68,8 +68,8 @@ int AuditMgrService::callExportData() {
// 挂载目录 // 挂载目录
IF_ERROR_RETURN(dosystem(fmt::format("mount {} /mnt/exportdata", diskpath))); IF_ERROR_RETURN(dosystem(fmt::format("mount {} /mnt/exportdata", diskpath)));
// 拷贝文件 // 拷贝文件
IF_ERROR_RETURN(dosystem(fmt::format("mkdir -p /mnt/exportdata/Transmit/")));
IF_ERROR_RETURN(dosystem(fmt::format("cp -rf {} /mnt/exportdata/Transmit/", filename)));
IF_ERROR_RETURN(dosystem(fmt::format("mkdir -p /mnt/exportdata/TrySmet/")));
IF_ERROR_RETURN(dosystem(fmt::format("cp -rf {} /mnt/exportdata/TrySmet/", filename)));
// 卸载目录 // 卸载目录
IF_ERROR_RETURN(dosystem(fmt::format("umount /mnt/exportdata"))); IF_ERROR_RETURN(dosystem(fmt::format("umount /mnt/exportdata")));
// 删除目录 // 删除目录

8
appsrc/service/device_info_mgr_service.cpp

@ -1,4 +1,5 @@
#include "device_info_mgr_service.hpp" #include "device_info_mgr_service.hpp"
#include "appconfig/basic/zappversion.hpp" #include "appconfig/basic/zappversion.hpp"
using namespace iflytop; using namespace iflytop;
@ -19,7 +20,12 @@ void DeviceInfoMgrService::getDeviceInfo(shared_ptr<MsgProcessContext> cxt) { /
auto& content = cxt->rely; auto& content = cxt->rely;
content["projectType"] = PORT.getProjTypeString(); content["projectType"] = PORT.getProjTypeString();
content["appVersion"] = VERSION; content["appVersion"] = VERSION;
content["deviceType"] = DeviceExtSettingDAO::ins()->getDeviceExtSetting().deviceType;
// content["deviceType"] = DeviceExtSettingDAO::ins()->getDeviceExtSetting().deviceType;
string deviceType = DeviceExtSettingDAO::ins()->getDeviceExtSetting().deviceType;
// 替换"_"给"-"
std::replace(deviceType.begin(), deviceType.end(), '_', '-');
content["deviceType"] = deviceType;
// content["mircoVersion"] = "3.0.0"; // TODO:换成真实的版本信息 // content["mircoVersion"] = "3.0.0"; // TODO:换成真实的版本信息
content["ip"] = "192.168.73.10"; content["ip"] = "192.168.73.10";
content["deviceId"] = DeviceExtSettingDAO::ins()->getDeviceExtSetting().deviceId; content["deviceId"] = DeviceExtSettingDAO::ins()->getDeviceExtSetting().deviceId;

Loading…
Cancel
Save