项目环境设置增加云眸设置
This commit is contained in:
@@ -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();
|
||||||
|
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
@@ -165,7 +164,7 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var device = Funs.DB.Project_Devices.FirstOrDefault(x=>x.DeviceId== Grid1.SelectedRowID) ;
|
var device = Funs.DB.Project_Devices.FirstOrDefault(x => x.DeviceId == Grid1.SelectedRowID);
|
||||||
if (device != null)
|
if (device != null)
|
||||||
{
|
{
|
||||||
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||||
@@ -201,13 +200,14 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||||
var token = YunMouHelper.getToken();
|
var token = YunMouHelper.getToken();
|
||||||
var res = YunMouHelper.addDevicesToGroups(project.YunMouGroupId, new string[] { device.DeviceSerial }, token);//添加到权限组
|
var res = YunMouHelper.addDevicesToGroups(project.YunMouGroupId, new string[] { device.DeviceSerial }, token);//添加到权限组
|
||||||
YunMouHelper.setDefence(device.DeviceSerial,"1",token);
|
YunMouHelper.setDefence(device.DeviceSerial, "1", token);
|
||||||
if (string.IsNullOrEmpty(res))
|
if (string.IsNullOrEmpty(res))
|
||||||
{
|
{
|
||||||
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);
|
||||||
@@ -255,7 +255,7 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectDevicesEdit.aspx?DeviceId={0}", Grid1.SelectedRowID), "编辑项目单位", 800, 300));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectDevicesEdit.aspx?DeviceId={0}", Grid1.SelectedRowID), "编辑项目单位", 800, 300));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,7 +293,7 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
}
|
}
|
||||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||||
{
|
{
|
||||||
this.btnMenuDeletePermission.Hidden= false;
|
this.btnMenuDeletePermission.Hidden = false;
|
||||||
this.btnAdd.Hidden = false;
|
this.btnAdd.Hidden = false;
|
||||||
this.btnMenuEdit.Hidden = false;
|
this.btnMenuEdit.Hidden = false;
|
||||||
this.btnMenuDeviceToYunMou.Hidden = false;
|
this.btnMenuDeviceToYunMou.Hidden = false;
|
||||||
|
|||||||
@@ -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
|
||||||
{
|
{
|
||||||
@@ -43,7 +46,7 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
this.DeviceId = Request.Params["DeviceId"];
|
this.DeviceId = Request.Params["DeviceId"];
|
||||||
if (!string.IsNullOrEmpty(this.DeviceId))
|
if (!string.IsNullOrEmpty(this.DeviceId))
|
||||||
{
|
{
|
||||||
Model.Project_Devices device = Funs.DB.Project_Devices.FirstOrDefault(x=>x.DeviceId==this.DeviceId);
|
Model.Project_Devices device = Funs.DB.Project_Devices.FirstOrDefault(x => x.DeviceId == this.DeviceId);
|
||||||
if (device != null)
|
if (device != null)
|
||||||
{
|
{
|
||||||
this.txtDeviceName.Text = device.DeviceName;
|
this.txtDeviceName.Text = device.DeviceName;
|
||||||
@@ -60,7 +63,7 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
this.dpCreateDate.Text = string.Format("{0:yyyy-MM-dd}", device.CreateDate);
|
this.dpCreateDate.Text = string.Format("{0:yyyy-MM-dd}", device.CreateDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -82,7 +85,7 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
DeviceName = this.txtDeviceName.Text.Trim(),
|
DeviceName = this.txtDeviceName.Text.Trim(),
|
||||||
DeviceSerial = this.txtDeviceSerial.Text.Trim(),
|
DeviceSerial = this.txtDeviceSerial.Text.Trim(),
|
||||||
Address = txtAddress.Text.Trim(),
|
Address = txtAddress.Text.Trim(),
|
||||||
ValidateCode=txtValidateCode.Text.Trim(),
|
ValidateCode = txtValidateCode.Text.Trim(),
|
||||||
CreateDate = Funs.GetNewDateTime(this.dpCreateDate.Text.Trim())
|
CreateDate = Funs.GetNewDateTime(this.dpCreateDate.Text.Trim())
|
||||||
};
|
};
|
||||||
if (this.drpInOut.SelectedValue != BLL.Const._Null)
|
if (this.drpInOut.SelectedValue != BLL.Const._Null)
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user