20250115 共检通知单修改
This commit is contained in:
parent
a54da52b27
commit
79a4b53ee5
|
@ -59,6 +59,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
this.drpUnitWorkId.DataSource = q;
|
this.drpUnitWorkId.DataSource = q;
|
||||||
this.drpUnitWorkId.DataBind();
|
this.drpUnitWorkId.DataBind();
|
||||||
Funs.FineUIPleaseSelect(this.drpUnitWorkId);//单位工程
|
Funs.FineUIPleaseSelect(this.drpUnitWorkId);//单位工程
|
||||||
|
|
||||||
Funs.FineUIPleaseSelect(this.drpChirldUnitWorkId);//子单位工程
|
Funs.FineUIPleaseSelect(this.drpChirldUnitWorkId);//子单位工程
|
||||||
Funs.FineUIPleaseSelect(this.drpBranch);//分部工程
|
Funs.FineUIPleaseSelect(this.drpBranch);//分部工程
|
||||||
Funs.FineUIPleaseSelect(this.drpChildBranch);//子分部工程
|
Funs.FineUIPleaseSelect(this.drpChildBranch);//子分部工程
|
||||||
|
|
|
@ -71,6 +71,34 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
this.trWBS.EnableIcons = true;
|
this.trWBS.EnableIcons = true;
|
||||||
this.trWBS.AutoScroll = true;
|
this.trWBS.AutoScroll = true;
|
||||||
this.trWBS.EnableSingleClickExpand = true;
|
this.trWBS.EnableSingleClickExpand = true;
|
||||||
|
if (this.CurrUser.UserId == BLL.Const.hfnbdId)//测试账号用
|
||||||
|
{
|
||||||
|
var unitWorks = from x in Funs.DB.WBS_UnitWork
|
||||||
|
join y in Funs.DB.WBS_DivisionDivide on x.UnitWorkId equals y.UnitWorkId
|
||||||
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
|
||||||
|
orderby x.UnitWorkCode select new
|
||||||
|
{
|
||||||
|
x.UnitWorkId,
|
||||||
|
x.UnitWorkName
|
||||||
|
};
|
||||||
|
foreach (var q in unitWorks.Distinct())
|
||||||
|
{
|
||||||
|
TreeNode newNode = new TreeNode();
|
||||||
|
newNode.Text = q.UnitWorkName;
|
||||||
|
newNode.NodeID = q.UnitWorkId;
|
||||||
|
newNode.CommandName = "UnitWork";
|
||||||
|
newNode.EnableExpandEvent = true;
|
||||||
|
newNode.EnableClickEvent = true;
|
||||||
|
this.trWBS.Nodes.Add(newNode);
|
||||||
|
TreeNode emptyNode = new TreeNode();
|
||||||
|
emptyNode.Text = "";
|
||||||
|
emptyNode.NodeID = "";
|
||||||
|
newNode.Nodes.Add(emptyNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") orderby x.UnitWorkCode select x;
|
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") orderby x.UnitWorkCode select x;
|
||||||
foreach (var q in unitWorks)
|
foreach (var q in unitWorks)
|
||||||
{
|
{
|
||||||
|
@ -87,6 +115,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
newNode.Nodes.Add(emptyNode);
|
newNode.Nodes.Add(emptyNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 展开树
|
#region 展开树
|
||||||
|
@ -102,8 +131,71 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
if (e.Node.CommandName == "UnitWork") //展开工程类型
|
if (e.Node.CommandName == "UnitWork") //展开工程类型
|
||||||
{
|
{
|
||||||
string cnProfessionalId = Request.Params["CNPrefessionalId"];
|
string cnProfessionalId = Request.Params["CNPrefessionalId"];
|
||||||
|
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
|
||||||
|
{
|
||||||
|
string professionalName = string.Empty;
|
||||||
|
var pointCropping = from x in db.Control_PointCropping where x.ControlId == cnProfessionalId select x;
|
||||||
|
if (pointCropping.FirstOrDefault(x => x.DetectionItems.Contains("设备")) != null)
|
||||||
|
{
|
||||||
|
professionalName = "设备";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
professionalName = pointCropping.FirstOrDefault().DetectionItems;
|
||||||
|
}
|
||||||
var divisions = (from x in db.WBS_DivisionProject
|
var divisions = (from x in db.WBS_DivisionProject
|
||||||
where x.CNProfessionalId == cnProfessionalId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == e.NodeID && x.IsSelected == true
|
join y in db.Base_CNProfessional on x.CNProfessionalId equals y.CNProfessionalId
|
||||||
|
where y.ProfessionalName == professionalName
|
||||||
|
&& x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
&& x.SuperDivisionId == null
|
||||||
|
&& x.UnitWorkId == e.NodeID
|
||||||
|
&& x.IsSelected == true
|
||||||
|
orderby x.SortIndex
|
||||||
|
select x).ToList();
|
||||||
|
//}
|
||||||
|
//if (this.CurrUser.UserId == BLL.Const.hfnbdId)//测试阶段,仅hfnbd账号使用
|
||||||
|
//{
|
||||||
|
//Model.Control_PointCropping pc = new Model.Control_PointCropping();
|
||||||
|
Model.Base_CNProfessional cNProfessional = new Model.Base_CNProfessional();
|
||||||
|
var pc = Funs.DB.Control_PointCropping.FirstOrDefault(x => (x.ParentId == null || x.ParentId == "") && x.DetectionItems == "土建");
|
||||||
|
if (divisions.Count() == 0 && pc != null)
|
||||||
|
{
|
||||||
|
cNProfessional = (from x in db.Base_CNProfessional where x.ProfessionalName == "土建" orderby x.SortIndex select x).FirstOrDefault();
|
||||||
|
//pc = (from x in db.Control_PointCropping where (x.ParentId == null || x.ParentId == "") && x.ControlId == "E9AC9563-E338-48B7-867D-488222AD0557" orderby x.OperateTime select x).FirstOrDefault();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cNProfessional = (from x in db.Base_CNProfessional
|
||||||
|
where x.ProfessionalName.Contains(professionalName)
|
||||||
|
orderby x.SortIndex
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
//pc = (from x in db.Control_PointCropping where (x.ParentId == null || x.ParentId == "") && x.ControlId == cnProfessionalId orderby x.OperateTime select x).FirstOrDefault();
|
||||||
|
}
|
||||||
|
if (pc != null)
|
||||||
|
{
|
||||||
|
TreeNode newNode = new TreeNode();
|
||||||
|
newNode.Text = cNProfessional.ProfessionalName;
|
||||||
|
newNode.NodeID = cNProfessional.CNProfessionalId + "|" + e.NodeID;
|
||||||
|
newNode.CommandName = "CNProfessional";
|
||||||
|
newNode.EnableExpandEvent = true;
|
||||||
|
newNode.EnableClickEvent = true;
|
||||||
|
newNode.EnableExpandEvent = true;
|
||||||
|
e.Node.Nodes.Add(newNode);
|
||||||
|
TreeNode tempNode = new TreeNode();
|
||||||
|
tempNode.NodeID = "";
|
||||||
|
tempNode.Text = "";
|
||||||
|
newNode.Nodes.Add(tempNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var divisions = (from x in db.WBS_DivisionProject
|
||||||
|
where x.CNProfessionalId == cnProfessionalId
|
||||||
|
&& x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
&& x.SuperDivisionId == null
|
||||||
|
&& x.UnitWorkId == e.NodeID
|
||||||
|
&& x.IsSelected == true
|
||||||
orderby x.SortIndex
|
orderby x.SortIndex
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
Model.Base_CNProfessional cNProfessional = new Model.Base_CNProfessional();
|
Model.Base_CNProfessional cNProfessional = new Model.Base_CNProfessional();
|
||||||
|
@ -131,14 +223,29 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
newNode.Nodes.Add(tempNode);
|
newNode.Nodes.Add(tempNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (e.Node.CommandName == "CNProfessional") //展开专业
|
else if (e.Node.CommandName == "CNProfessional") //展开专业
|
||||||
{
|
{
|
||||||
string unitWorkId = e.Node.ParentNode.NodeID;
|
string unitWorkId = e.Node.ParentNode.NodeID;
|
||||||
string cNProfessionalId = Request.Params["CNPrefessionalId"];
|
string cNProfessionalId = Request.Params["CNPrefessionalId"];
|
||||||
|
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
|
||||||
|
{
|
||||||
|
string professionalName = string.Empty;
|
||||||
|
var pointCropping = from x in db.Control_PointCropping where x.ControlId == cNProfessionalId select x;
|
||||||
|
if (pointCropping.FirstOrDefault(x => x.DetectionItems.Contains("设备")) != null)
|
||||||
|
{
|
||||||
|
professionalName = "设备";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
professionalName = pointCropping.FirstOrDefault().DetectionItems;
|
||||||
|
}
|
||||||
var divisions = (from x in db.WBS_DivisionProject
|
var divisions = (from x in db.WBS_DivisionProject
|
||||||
where x.CNProfessionalId == cNProfessionalId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId && x.IsSelected == true
|
join y in db.Base_CNProfessional on x.CNProfessionalId equals y.CNProfessionalId
|
||||||
|
where y.ProfessionalName.Contains(professionalName) && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId && x.IsSelected == true
|
||||||
orderby x.SortIndex
|
orderby x.SortIndex
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
|
|
||||||
foreach (var q in divisions)
|
foreach (var q in divisions)
|
||||||
{
|
{
|
||||||
TreeNode newNode = new TreeNode();
|
TreeNode newNode = new TreeNode();
|
||||||
|
@ -163,6 +270,38 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var divisions = (from x in db.WBS_DivisionProject
|
||||||
|
where x.CNProfessionalId==cNProfessionalId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId && x.IsSelected == true
|
||||||
|
orderby x.SortIndex
|
||||||
|
select x).ToList();
|
||||||
|
|
||||||
|
foreach (var q in divisions)
|
||||||
|
{
|
||||||
|
TreeNode newNode = new TreeNode();
|
||||||
|
newNode.Text = q.DivisionName;
|
||||||
|
newNode.NodeID = q.DivisionProjectId;
|
||||||
|
newNode.CommandName = "DivisionProject";
|
||||||
|
newNode.EnableExpandEvent = true;
|
||||||
|
newNode.EnableClickEvent = true;
|
||||||
|
newNode.EnableExpandEvent = true;
|
||||||
|
e.Node.Nodes.Add(newNode);
|
||||||
|
var list = (from x in Funs.DB.WBS_DivisionProject
|
||||||
|
where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
&& x.IsSelected == true
|
||||||
|
orderby x.SortIndex
|
||||||
|
select x).ToList();
|
||||||
|
if (list.Count > 0)
|
||||||
|
{
|
||||||
|
TreeNode tempNode = new TreeNode();
|
||||||
|
tempNode.NodeID = "";
|
||||||
|
tempNode.Text = "";
|
||||||
|
newNode.Nodes.Add(tempNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (e.Node.CommandName == "DivisionProject") //展开分部节点
|
else if (e.Node.CommandName == "DivisionProject") //展开分部节点
|
||||||
{
|
{
|
||||||
string parentId = e.NodeID;
|
string parentId = e.NodeID;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<FineUIPro DebugMode="true" Theme="Cupertino"/>
|
<FineUIPro DebugMode="true" Theme="Cupertino"/>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<!--连接字符串-->
|
<!--连接字符串-->
|
||||||
<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||||
<!--<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
|
<!--<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
|
||||||
<!--系统名称-->
|
<!--系统名称-->
|
||||||
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
|
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||||
<UseIISExpress>true</UseIISExpress>
|
<UseIISExpress>true</UseIISExpress>
|
||||||
<Use64BitIISExpress />
|
<Use64BitIISExpress />
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
|
|
Loading…
Reference in New Issue