海康云眸

This commit is contained in:
2026-05-13 07:06:29 +08:00
parent f9b2fe12a0
commit 16640dfed4
19 changed files with 2336 additions and 284 deletions
@@ -3,7 +3,9 @@ using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text.RegularExpressions;
using BLL;
using BLL.Common;
namespace FineUIPro.Web.common.ProjectSet
{
@@ -87,6 +89,9 @@ namespace FineUIPro.Web.common.ProjectSet
ShowNotify("请选择项目!", MessageBoxIcon.Warning);
return;
}
#region
///通用
var getProject = ProjectService.GetProjectByProjectId(projectId);
@@ -94,6 +99,31 @@ namespace FineUIPro.Web.common.ProjectSet
{
getProject.IsFace = this.ckbIsFace.Checked;
getProject.IsAutoFetch = this.ckbIsAutoFetch.Checked;
getProject.IsYunMou = this.ckbIsYunMou.Checked;
if (this.ckbIsYunMou.Checked)
{
var token = YunMouHelper.getToken();
string data;
data = Regex.Replace(getProject.ProjectCode, "[^0-9A-Fa-f]", "", RegexOptions.IgnoreCase);
YunMouHelper.addDevicesGroups(getProject.ProjectName, data, token);
var groupId = YunMouHelper.addPermissionGroups(getProject.ProjectName, token);
if (!string.IsNullOrEmpty(groupId))
{
getProject.YunMouGroupId = groupId;
}
}
else
{
var token = YunMouHelper.getToken();
string data;
data = Regex.Replace(getProject.ProjectCode, "[^0-9A-Fa-f]", "", RegexOptions.IgnoreCase);
YunMouHelper.deleteDevicesGroups(data, token);//删除设备分组,如果有子节点,可以不删除
}
Funs.DB.SubmitChanges();
}
#endregion
@@ -455,6 +485,11 @@ namespace FineUIPro.Web.common.ProjectSet
{
this.ckbIsFace.Checked = true;
}
///是否启用云眸
if (getProject != null && getProject.IsYunMou == true)
{
this.ckbIsYunMou.Checked = true;
}
if (getProject != null && getProject.IsAutoFetch == true)
{
this.ckbIsAutoFetch.Checked = true;