mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
实现系统管理表格操作接口、分页操作
This commit is contained in:
@@ -45,7 +45,7 @@ int Device::startComm()
|
||||
}
|
||||
|
||||
// 从属性列表中获取通讯方式和通讯地址、端口
|
||||
std::string commType = attrs.getStr("commType");
|
||||
std::string commType = attrs.value("commType");
|
||||
|
||||
// 如果entity的通讯协议类型当前配置不一致,需要关闭连接删除通讯后创建新的通讯
|
||||
if (commEntity && commEntity->type != commType)
|
||||
@@ -64,15 +64,15 @@ int Device::startComm()
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::shared_ptr<Device> Device::create(DataFields& fields)
|
||||
std::shared_ptr<Device> Device::create(Fields& fields)
|
||||
{
|
||||
auto device = std::make_shared<Device>();
|
||||
device->deviceId = fields.getInt("device_id");
|
||||
device->type = fields.getInt("type");
|
||||
device->name = fields.getStr("name");
|
||||
device->code = fields.getStr("code");
|
||||
device->name = fields.value("name");
|
||||
device->code = fields.value("code");
|
||||
device->isOpen = fields.getInt("is_open");
|
||||
device->attrsJson = fields.getStr("attrs");
|
||||
device->attrsJson = fields.value("attrs");
|
||||
|
||||
// 解析属性的JSON字符串,转换成键值对
|
||||
NJson jsonroot;
|
||||
|
||||
Reference in New Issue
Block a user