add ledger update
This commit is contained in:
@@ -179,6 +179,54 @@ class qvvr_event
|
||||
std::vector<qvvr_file> qvvrfile; //暂态文件组列表
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////台账更新用
|
||||
|
||||
class update_monitor
|
||||
{
|
||||
public:
|
||||
std::string monitor_id; //监测点id
|
||||
std::string terminal_id; //监测点的终端id
|
||||
std::string monitor_name; //监测点名
|
||||
std::string logical_device_seq; //监测点序号
|
||||
std::string voltage_level; //监测点电压等级
|
||||
std::string terminal_connect; //监测点接线方式
|
||||
std::string timestamp; //更新时间
|
||||
std::string status; //监测点状态
|
||||
double PT1; // 电压变比1
|
||||
double PT2; // 电压变比2
|
||||
double CT1; // 电流变比1
|
||||
double CT2; // 电流变比2
|
||||
|
||||
};
|
||||
|
||||
//终端台账
|
||||
class update_dev
|
||||
{
|
||||
public:
|
||||
|
||||
std::string terminal_id;
|
||||
std::string terminal_name;
|
||||
std::string org_name;
|
||||
std::string maint_name;
|
||||
std::string station_name;
|
||||
std::string tmnl_factory;
|
||||
std::string tmnl_status;
|
||||
std::string dev_type;
|
||||
std::string dev_key;
|
||||
std::string dev_series;
|
||||
std::string addr_str; //装置ip
|
||||
std::string port; //装置端口
|
||||
std::string timestamp; //更新时间
|
||||
std::string Righttime; //对时
|
||||
std::string processNo;
|
||||
std::string maxProcessNum;
|
||||
std::string mac; // 装置MAC地址,接口中从addr_str获取,因为ip和mac放同一位置
|
||||
|
||||
std::vector<ledger_monitor> line;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////台账更新用
|
||||
|
||||
//监测点台账
|
||||
class ledger_monitor
|
||||
{
|
||||
@@ -213,6 +261,8 @@ public:
|
||||
class terminal_dev
|
||||
{
|
||||
public:
|
||||
//int dev_index;
|
||||
|
||||
std::string guid; //正在进行的guid
|
||||
int busytype; //业务类型,使用状态机
|
||||
int isbusy; //业务进行标志
|
||||
@@ -239,7 +289,6 @@ public:
|
||||
std::string Righttime; //对时
|
||||
std::string processNo;
|
||||
std::string maxProcessNum;
|
||||
|
||||
std::string mac; // 装置MAC地址,接口中从addr_str获取,因为ip和mac放同一位置
|
||||
|
||||
std::vector<ledger_monitor> line;
|
||||
@@ -400,10 +449,10 @@ public:
|
||||
#define MAX_UPDATEA_NUM 10
|
||||
typedef struct trigger_update_xml_t trigger_update_xml_t;
|
||||
struct trigger_update_xml_t {
|
||||
std::vector<terminal_dev> new_updates;
|
||||
std::vector<terminal_dev> modify_updates;
|
||||
std::vector<terminal_dev> delete_updates;
|
||||
std::vector<terminal_dev> work_updates;
|
||||
std::vector<update_dev> new_updates;
|
||||
std::vector<update_dev> modify_updates;
|
||||
std::vector<update_dev> delete_updates;
|
||||
std::vector<update_dev> work_updates;
|
||||
|
||||
trigger_update_xml_t() = default;
|
||||
};
|
||||
@@ -673,6 +722,11 @@ void filemenu_cache_put(const std::string& dev_id,
|
||||
//提取目录信息
|
||||
bool filemenu_cache_take(const std::string& dev_id, std::vector<tag_dir_info>& out);
|
||||
|
||||
//清空装置台账
|
||||
size_t erase_one_terminals_by_id(const std::string& terminal_id);
|
||||
|
||||
//转换结构
|
||||
DeviceInfo make_device_from_terminal(const terminal_dev& t);
|
||||
|
||||
//小工具
|
||||
inline std::string trim_cstr(const char* s, size_t n) {
|
||||
@@ -750,10 +804,9 @@ void enqueue_stat_pq(const std::string& max_base64Str,
|
||||
extern int g_front_seg_index;
|
||||
extern std::string FRONT_INST;
|
||||
extern std::string FRONT_PATH;
|
||||
|
||||
extern std::string WEB_FILEUPLOAD;
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// 响应码枚举
|
||||
// 云平台响应码枚举
|
||||
enum class ResponseCode : int {
|
||||
OK = 200, // 请求成功
|
||||
ACCEPTED = 201, // 请求被接受,开始处理
|
||||
|
||||
Reference in New Issue
Block a user