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.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpUnitWorkId);//单位工程
|
||||
|
||||
Funs.FineUIPleaseSelect(this.drpChirldUnitWorkId);//子单位工程
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);//分部工程
|
||||
Funs.FineUIPleaseSelect(this.drpChildBranch);//子分部工程
|
||||
|
|
|
@ -71,20 +71,49 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
this.trWBS.EnableIcons = true;
|
||||
this.trWBS.AutoScroll = true;
|
||||
this.trWBS.EnableSingleClickExpand = true;
|
||||
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)
|
||||
if (this.CurrUser.UserId == BLL.Const.hfnbdId)//测试账号用
|
||||
{
|
||||
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);
|
||||
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;
|
||||
foreach (var q in unitWorks)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -102,64 +131,174 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
if (e.Node.CommandName == "UnitWork") //展开工程类型
|
||||
{
|
||||
string cnProfessionalId = Request.Params["CNPrefessionalId"];
|
||||
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
|
||||
select x).ToList();
|
||||
Model.Base_CNProfessional cNProfessional = new Model.Base_CNProfessional();
|
||||
if (divisions.Count() == 0 && cnProfessionalId == BLL.Const.CNProfessionalCVId)
|
||||
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
|
||||
{
|
||||
cNProfessional = (from x in db.Base_CNProfessional where x.CNProfessionalId == BLL.Const.CNProfessionalConstructId orderby x.SortIndex select x).FirstOrDefault();
|
||||
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
|
||||
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
|
||||
{
|
||||
cNProfessional = (from x in db.Base_CNProfessional where x.CNProfessionalId == cnProfessionalId orderby x.SortIndex select x).FirstOrDefault();
|
||||
}
|
||||
if (cNProfessional != 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);
|
||||
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
|
||||
select x).ToList();
|
||||
Model.Base_CNProfessional cNProfessional = new Model.Base_CNProfessional();
|
||||
if (divisions.Count() == 0 && cnProfessionalId == BLL.Const.CNProfessionalCVId)
|
||||
{
|
||||
cNProfessional = (from x in db.Base_CNProfessional where x.CNProfessionalId == BLL.Const.CNProfessionalConstructId orderby x.SortIndex select x).FirstOrDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
cNProfessional = (from x in db.Base_CNProfessional where x.CNProfessionalId == cnProfessionalId orderby x.SortIndex select x).FirstOrDefault();
|
||||
}
|
||||
if (cNProfessional != 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 if (e.Node.CommandName == "CNProfessional") //展开专业
|
||||
{
|
||||
string unitWorkId = e.Node.ParentNode.NodeID;
|
||||
string cNProfessionalId = Request.Params["CNPrefessionalId"];
|
||||
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)
|
||||
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
|
||||
{
|
||||
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)
|
||||
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)
|
||||
{
|
||||
TreeNode tempNode = new TreeNode();
|
||||
tempNode.NodeID = "";
|
||||
tempNode.Text = "";
|
||||
newNode.Nodes.Add(tempNode);
|
||||
professionalName = "设备";
|
||||
}
|
||||
else
|
||||
{
|
||||
professionalName = pointCropping.FirstOrDefault().DetectionItems;
|
||||
}
|
||||
var divisions = (from x in db.WBS_DivisionProject
|
||||
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
|
||||
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
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<FineUIPro DebugMode="true" Theme="Cupertino"/>
|
||||
<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="SystemName" value="智慧施工管理信息系统V1.0"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
|
|
Loading…
Reference in New Issue