提交集团数据穿透修改

This commit is contained in:
2023-06-19 09:04:34 +08:00
parent efed3c7f6f
commit 1e709abb1a
184 changed files with 10777 additions and 3631 deletions
@@ -200,37 +200,97 @@ namespace FineUIPro.Web.CQMS.WBS
{
cNProfessionalId = e.NodeID.Split('|')[1];
}
var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == cNProfessionalId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
orderby x.SortIndex
select x).ToList();
foreach (var q in divisions)
if (cNProfessionalId == BLL.Const.CNProfessionalConstructId)
{
TreeNode newNode = new TreeNode();
newNode.Text = q.DivisionName;
newNode.NodeID = q.DivisionProjectId;
newNode.CommandName = "DivisionProject";
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
newNode.EnableCheckBox = true;
newNode.EnableCheckEvent = true;
e.Node.Nodes.Add(newNode);
if (q.IsSelected == true)
{
newNode.Checked = true;
}
var list = (from x in Funs.DB.WBS_DivisionProject
where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.CurrUser.LoginProjectId
orderby x.SortIndex
select x).ToList();
if (list.Count > 0)
var divisionsCV = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == BLL.Const.CNProfessionalCVId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId && x.IsSelected == true
orderby x.SortIndex
select x).ToList();
if (divisionsCV.Count > 0) //建筑工程下存在土建内容
{
TreeNode newNode = new TreeNode();
newNode.Text = "土建";
newNode.NodeID = BLL.Const.CNProfessionalCVId;
newNode.CommandName = "CNProfessional";
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
TreeNode tempNode = new TreeNode();
tempNode.NodeID = "";
tempNode.Text = "";
tempNode.EnableExpandEvent = true;
tempNode.EnableClickEvent = true;
newNode.Nodes.Add(tempNode);
}
else
{
var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == cNProfessionalId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
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.EnableCheckEvent = true;
e.Node.Nodes.Add(newNode);
if (q.IsSelected == true)
{
newNode.Checked = true;
}
var list = (from x in Funs.DB.WBS_DivisionProject
where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.CurrUser.LoginProjectId
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 BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == cNProfessionalId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
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.EnableCheckBox = true;
newNode.EnableCheckEvent = true;
e.Node.Nodes.Add(newNode);
if (q.IsSelected == true)
{
newNode.Checked = true;
}
var list = (from x in Funs.DB.WBS_DivisionProject
where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.CurrUser.LoginProjectId
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") //展开分部节点
@@ -303,8 +363,8 @@ namespace FineUIPro.Web.CQMS.WBS
{
if (string.IsNullOrEmpty(superDivisionProject.SuperDivisionId))
{
// if (!string.IsNullOrEmpty(superDivisionProject.CNProfessionalId))
//{
// if (!string.IsNullOrEmpty(superDivisionProject.CNProfessionalId))
//{
superDivisionProject.IsSelected = b;
BLL.DivisionProjectService.UpdateDivisionProject(superDivisionProject);
}