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

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
@@ -51,6 +51,35 @@ namespace FineUIPro.Web.common.ProjectSet
ShowNotify("请选择项目!", MessageBoxIcon.Warning);
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
// 焊接
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);
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);
if (m1 != null) this.txtPipelineNOComplete.Text = m1.SetValue;