项目环境设置增加云眸设置

This commit is contained in:
2025-12-25 20:17:07 +08:00
parent 07aa1370e2
commit 3fc9aeab38
4 changed files with 64 additions and 33 deletions
@@ -27,7 +27,6 @@ namespace FineUIPro.Web.ProjectData
if (!IsPostBack) if (!IsPostBack)
{ {
Funs.DropDownPageSize(this.ddlPageSize); Funs.DropDownPageSize(this.ddlPageSize);
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格 // 绑定表格
@@ -207,7 +206,8 @@ namespace FineUIPro.Web.ProjectData
Alert.ShowInTop("关联权限出错!", MessageBoxIcon.Warning); Alert.ShowInTop("关联权限出错!", MessageBoxIcon.Warning);
} }
else { else
{
device.YunMouPermission = "是"; device.YunMouPermission = "是";
Funs.DB.SubmitChanges(); Funs.DB.SubmitChanges();
ShowNotify("关联成功", MessageBoxIcon.Success); ShowNotify("关联成功", MessageBoxIcon.Success);
@@ -7,6 +7,9 @@ using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using BLL; using BLL;
using BLL.Common; using BLL.Common;
using FastReport.Cloud.OAuth;
using FineUIPro.Web.DataShow;
using Org.BouncyCastle.Crypto;
namespace FineUIPro.Web.ProjectData namespace FineUIPro.Web.ProjectData
{ {
@@ -31,11 +31,6 @@
</f:FormRow> </f:FormRow>
</Rows> </Rows>
</f:Form> </f:Form>
</Items> </Items>
</f:GroupPanel> </f:GroupPanel>
<f:GroupPanel ID="GroupPanel2" Layout="Anchor" Title="焊接环境设置" runat="server" > <f:GroupPanel ID="GroupPanel2" Layout="Anchor" Title="焊接环境设置" runat="server" >
@@ -51,6 +51,35 @@ namespace FineUIPro.Web.common.ProjectSet
ShowNotify("请选择项目!", MessageBoxIcon.Warning); ShowNotify("请选择项目!", MessageBoxIcon.Warning);
return; return;
} }
#region
///通用
var getProject = ProjectService.GetProjectByProjectId(projectId);
if (getProject != null)
{
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
#region #region
// 焊接 // 焊接
Model.Project_Sys_Set dayReport = BLL.Project_SysSetService.GetSysSetBySetId("1", projectId); Model.Project_Sys_Set dayReport = BLL.Project_SysSetService.GetSysSetBySetId("1", projectId);
@@ -339,7 +368,11 @@ namespace FineUIPro.Web.common.ProjectSet
SetCheckFromDict(dict, "10", this.ckPressMustCheckBItem); SetCheckFromDict(dict, "10", this.ckPressMustCheckBItem);
if (dict.ContainsKey("11")) this.rbMaterialColorAttribute.SelectedValue = dict["11"].SetValue == "1" ? "1" : "2"; if (dict.ContainsKey("11")) this.rbMaterialColorAttribute.SelectedValue = dict["11"].SetValue == "1" ? "1" : "2";
} }
var getProject = ProjectService.GetProjectByProjectId(projectId);
if (getProject != null && getProject.IsYunMou == true)
{
this.ckbIsYunMou.Checked = true;
}
//颜色模型设置 //颜色模型设置
var m1 = BLL.Project_SysSetService.GetSysSetBySetName("管线未完成", this.CurrUser.LoginProjectId); var m1 = BLL.Project_SysSetService.GetSysSetBySetName("管线未完成", this.CurrUser.LoginProjectId);
if (m1 != null) this.txtPipelineNOComplete.Text = m1.SetValue; if (m1 != null) this.txtPipelineNOComplete.Text = m1.SetValue;