提交代码
This commit is contained in:
parent
f659c21387
commit
0eedd04ad8
|
@ -0,0 +1,2 @@
|
|||
update Sys_Menu set MenuName='工作包及检测点' where MenuId='858E83E9-ADE5-452E-BD65-82D8DFF872C0'
|
||||
GO
|
|
@ -609,6 +609,8 @@
|
|||
<Compile Include="JDGL\WBS\CostControlService.cs" />
|
||||
<Compile Include="JDGL\WBS\EquipmentMaterialBigTypeService.cs" />
|
||||
<Compile Include="JDGL\WBS\EquipmentMaterialTypeService.cs" />
|
||||
<Compile Include="JDGL\WBS\JDGLWBSDetailService.cs" />
|
||||
<Compile Include="JDGL\WBS\JDGLWBSService.cs" />
|
||||
<Compile Include="JDGL\WBS\MilePostService.cs" />
|
||||
<Compile Include="JDGL\WBS\UnitProjectInitService.cs" />
|
||||
<Compile Include="JDGL\WBS\UnitProjectService.cs" />
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class JDGLWBSDetailService
|
||||
{
|
||||
public static List<Model.JDGL_WBSDetail> GetWBSDetailsByWorkPackageId(string workPackageId)
|
||||
{
|
||||
return (from x in Funs.DB.JDGL_WBSDetail where x.WorkPackageId == workPackageId select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class JDGLWBSService
|
||||
{
|
||||
public static List<Model.JDGL_WBS> GetWBSsByProjectId(string projectId,string parentId)
|
||||
{
|
||||
return (from x in Funs.DB.JDGL_WBS where x.ParentId == parentId && x.ProjectId == projectId orderby x.PathCode select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -45,7 +45,7 @@
|
|||
<f:Panel ID="Panel1" CssClass="blockpanel" Margin="20px" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true" RegionSplitWidth="3px" EnableCollapse="true"
|
||||
Width="300px" Title="分部、工作项及费用清单设置" ShowBorder="true" ShowHeader="true" BodyPadding="10px" Layout="Fit">
|
||||
Width="300px" Title="工作包及检测点" ShowBorder="true" ShowHeader="true" BodyPadding="10px" Layout="Fit">
|
||||
<Items>
|
||||
<f:Tree ID="trWBS" Width="290" EnableCollapse="true" ShowHeader="true" OnNodeCommand="trWBS_NodeCommand"
|
||||
OnNodeExpand="trWBS_NodeExpand" OnNodeCheck="trWBS_NodeCheck" EnableCheckBox="true"
|
||||
|
@ -64,13 +64,17 @@
|
|||
Title="中间面板" ShowBorder="true" ShowHeader="false" BodyPadding="10px">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" Width="870px" ShowBorder="true" ShowHeader="false" EnableCollapse="true" ForceFit="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="CostControlId" AllowSorting="true" EnableColumnLines="true" EnableCheckBoxSelect="true"
|
||||
SortField="CostControlCode,CostControlName" SortDirection="ASC" AllowCellEditing="true" ClicksToEdit="1" ShowSelectedCell="true"
|
||||
DataIDField="CostControlId" AllowPaging="true" IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
runat="server" BoxFlex="1" DataKeyNames="Id" AllowSorting="true" EnableColumnLines="true"
|
||||
SortField="Id" SortDirection="ASC" AllowCellEditing="true" ClicksToEdit="1" ShowSelectedCell="true"
|
||||
DataIDField="Id" AllowPaging="true" IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
OnRowDataBound="Grid1_RowDataBound" AllowFilters="true" OnFilterChange="Grid1_FilterChange">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Button ID="btnMenuDown" Icon="ArrowDown" runat="server" Text="抽取" ToolTip="抽取" Hidden="true"
|
||||
OnClick="btnMenuDown_Click">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnAdd" Icon="Add" runat="server" ToolTip="增加" Hidden="true"
|
||||
OnClick="btnAdd_Click">
|
||||
</f:Button>
|
||||
|
@ -80,43 +84,10 @@
|
|||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RenderField Width="100px" ColumnID="CostControlCode" DataField="CostControlCode" FieldType="String"
|
||||
HeaderText="费用清单编号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<f:RenderField Width="400px" ColumnID="Name" DataField="Name" FieldType="String"
|
||||
HeaderText="检测点" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="400px" ColumnID="CostControlName" DataField="CostControlName" FieldType="String"
|
||||
HeaderText="内容" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="EquipmentMaterialTypeName" DataField="EquipmentMaterialTypeName" FieldType="String"
|
||||
HeaderText="设备材料分类" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="70px" ColumnID="Unit" DataField="Unit" FieldType="String"
|
||||
HeaderText="单位" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<%--<f:RenderField Width="130px" ColumnID="TotalNum" DataField="TotalNum" FieldType="Double"
|
||||
HeaderText="合同工作量" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:NumberBox ID="nbTotalNum" NoDecimal="false" NoNegative="true" MinValue="0"
|
||||
runat="server">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="RealPrice" DataField="RealPrice" FieldType="Double"
|
||||
HeaderText="实际单价" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:NumberBox ID="nbRealPrice" NoDecimal="false" NoNegative="true" MinValue="0"
|
||||
runat="server">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanPrice" DataField="PlanPrice" FieldType="Double"
|
||||
HeaderText="预算单价" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:NumberBox ID="nbPlanPrice" NoDecimal="false" NoNegative="true" MinValue="0"
|
||||
runat="server">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField Width="70px" ColumnID="CostControlId" DataField="CostControlId" FieldType="String"
|
||||
<f:RenderField Width="70px" ColumnID="Id" DataField="Id" FieldType="String"
|
||||
HeaderText="主键" HeaderTextAlign="Center" TextAlign="Left" Hidden="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
|
|
|
@ -37,31 +37,13 @@ namespace FineUIPro.Web.JDGL.WBS
|
|||
this.trWBS.EnableIcons = true;
|
||||
this.trWBS.AutoScroll = true;
|
||||
this.trWBS.EnableSingleClickExpand = true;
|
||||
//var project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
|
||||
//if (project != null)
|
||||
//{
|
||||
// TreeNode rootNode = new TreeNode();
|
||||
// rootNode.Text = project.ProjectName;
|
||||
// rootNode.NodeID = project.ProjectId;
|
||||
// rootNode.CommandName = "project";
|
||||
// rootNode.EnableExpandEvent = true;
|
||||
// rootNode.EnableCheckBox = false;
|
||||
// this.trWBS.Nodes.Add(rootNode);
|
||||
// if (BLL.Project_InstallationService.IsExitProjectInstallation(project.ProjectId))
|
||||
// {
|
||||
// TreeNode emptyNode = new TreeNode();
|
||||
// emptyNode.Text = "";
|
||||
// emptyNode.NodeID = "";
|
||||
// rootNode.Nodes.Add(emptyNode);
|
||||
// }
|
||||
//}
|
||||
Model.Project_Installation installation = BLL.Project_InstallationService.GetProjectInstallationByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (installation != null)
|
||||
List<Model.JDGL_WBS> wbss = BLL.JDGLWBSService.GetWBSsByProjectId(this.CurrUser.LoginProjectId, "0");
|
||||
foreach (var w in wbss)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "[" + installation.InstallationCode + "]" + installation.InstallationName;
|
||||
newNode.NodeID = installation.InstallationId;
|
||||
newNode.CommandName = "installation";
|
||||
newNode.Text = w.ItemName;
|
||||
newNode.NodeID = w.Id;
|
||||
newNode.CommandName = "WBS";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableClickEvent = true;
|
||||
newNode.EnableCheckBox = false;
|
||||
|
@ -84,255 +66,27 @@ namespace FineUIPro.Web.JDGL.WBS
|
|||
protected void trWBS_NodeExpand(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
bool needAddTempNode = false; //是否需要增加空节点
|
||||
if (e.Node.CommandName == "project") //展开项目节点
|
||||
if (e.Node.CommandName == "WBS") //展开项目节点
|
||||
{
|
||||
var installations = from x in Funs.DB.Project_Installation
|
||||
where x.ProjectId == e.Node.NodeID && x.SuperInstallationId == "0"
|
||||
orderby x.InstallationCode
|
||||
select x;
|
||||
foreach (var installation in installations)
|
||||
var wbss = BLL.JDGLWBSService.GetWBSsByProjectId(this.CurrUser.LoginProjectId, e.Node.NodeID);
|
||||
foreach (var w in wbss)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "[" + installation.InstallationCode + "]" + installation.InstallationName;
|
||||
newNode.NodeID = installation.InstallationId;
|
||||
newNode.CommandName = "installation";
|
||||
newNode.Text = w.ItemName;
|
||||
newNode.NodeID = w.Id;
|
||||
newNode.CommandName = "WBS";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableClickEvent = true;
|
||||
newNode.EnableCheckBox = false;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
newNode.Nodes.Add(emptyNode);
|
||||
}
|
||||
}
|
||||
else if (e.Node.CommandName == "installation") //展开装置/单元节点
|
||||
{
|
||||
var installations = from x in Funs.DB.Project_Installation
|
||||
where x.SuperInstallationId == e.Node.NodeID
|
||||
orderby x.InstallationCode
|
||||
select x;
|
||||
if (installations.Count() > 0)
|
||||
{
|
||||
foreach (var installation in installations)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "[" + installation.InstallationCode + "]" + installation.InstallationName;
|
||||
newNode.NodeID = installation.InstallationId;
|
||||
newNode.CommandName = "installation";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableClickEvent = true;
|
||||
newNode.EnableCheckBox = false;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
newNode.Nodes.Add(emptyNode);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var cnProfessions = from x in Funs.DB.WBS_CnProfession where x.InstallationId == e.Node.NodeID orderby x.OldId select x;
|
||||
if (cnProfessions.Count() > 0) //普通装置主项
|
||||
{
|
||||
foreach (var cnProfession in cnProfessions)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = cnProfession.CnProfessionName;
|
||||
newNode.NodeID = cnProfession.CnProfessionId;
|
||||
newNode.CommandName = "cnProfession";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableClickEvent = true;
|
||||
newNode.EnableCheckBox = false;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
newNode.Nodes.Add(emptyNode);
|
||||
}
|
||||
}
|
||||
else //总图
|
||||
{
|
||||
var unitProjects = from x in Funs.DB.Wbs_UnitProject where x.InstallationId == e.Node.NodeID && x.SuperUnitProjectId == null orderby x.SortIndex, x.UnitProjectCode select x;
|
||||
foreach (var unitProject in unitProjects)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = unitProject.UnitProjectName;
|
||||
newNode.NodeID = unitProject.UnitProjectId;
|
||||
newNode.CommandName = "unitProject";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableCheckBox = false;
|
||||
if (unitProject.IsSelected == true && unitProject.IsApprove == null)
|
||||
{
|
||||
unitProject.IsApprove = true;
|
||||
BLL.UnitProjectService.UpdateUnitProject(unitProject);
|
||||
}
|
||||
if (unitProject.IsApprove == true)
|
||||
{
|
||||
newNode.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Checked = false;
|
||||
}
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
newNode.Nodes.Add(emptyNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (e.Node.CommandName == "cnProfession") //展开专业节点
|
||||
{
|
||||
var unitProjects = from x in Funs.DB.Wbs_UnitProject where x.CnProfessionId == e.Node.NodeID && x.SuperUnitProjectId == null orderby x.SortIndex, x.UnitProjectCode select x;
|
||||
foreach (var unitProject in unitProjects)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = unitProject.UnitProjectName;
|
||||
newNode.NodeID = unitProject.UnitProjectId;
|
||||
newNode.CommandName = "unitProject";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableCheckBox = true;
|
||||
newNode.EnableCheckEvent = true;
|
||||
if (unitProject.IsSelected == true && unitProject.IsApprove == null)
|
||||
{
|
||||
unitProject.IsApprove = true;
|
||||
BLL.UnitProjectService.UpdateUnitProject(unitProject);
|
||||
}
|
||||
if (unitProject.IsApprove == true)
|
||||
{
|
||||
newNode.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Checked = false;
|
||||
}
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
newNode.Nodes.Add(emptyNode);
|
||||
}
|
||||
}
|
||||
else if (e.Node.CommandName == "unitProject") //展开单位工程节点
|
||||
{
|
||||
var wbsSet1s = from x in Funs.DB.Wbs_WbsSet where x.UnitProjectId == e.Node.NodeID && x.SuperWbsSetId == null orderby x.WbsSetCode select x;
|
||||
if (wbsSet1s.Count() > 0)
|
||||
{
|
||||
foreach (var wbsSet1 in wbsSet1s)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = wbsSet1.WbsSetName;
|
||||
newNode.NodeID = wbsSet1.WbsSetId;
|
||||
newNode.CommandName = "wbsSet";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableCheckBox = true;
|
||||
newNode.EnableCheckEvent = true;
|
||||
if (wbsSet1.IsSelected == true && wbsSet1.IsApprove == null)
|
||||
{
|
||||
wbsSet1.IsApprove = true;
|
||||
BLL.WbsSetService.UpdateWbsSet(wbsSet1);
|
||||
}
|
||||
if (wbsSet1.IsApprove == true)
|
||||
{
|
||||
newNode.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Checked = false;
|
||||
}
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
var wbsSets = BLL.WbsSetService.GetWbsSetsBySuperWbsSetId(wbsSet1.WbsSetId);
|
||||
if (wbsSets.Count > 0)
|
||||
{
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
newNode.Nodes.Add(emptyNode);
|
||||
}
|
||||
//needAddTempNode = false;
|
||||
//var wbsSets = BLL.WbsSetService.GetWbsSetsBySuperWbsSetId(wbsSet1.WbsSetId);
|
||||
//foreach (var wbsSet in wbsSets)
|
||||
//{
|
||||
// var childWbsSets = from x in Funs.DB.Wbs_WbsSet where x.SuperWbsSetId == wbsSet.WbsSetId select x;
|
||||
// if (childWbsSets.Count() > 0)
|
||||
// {
|
||||
// needAddTempNode = true;
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
//if (needAddTempNode)
|
||||
//{
|
||||
// TreeNode emptyNode = new TreeNode();
|
||||
// emptyNode.Text = "";
|
||||
// emptyNode.NodeID = "";
|
||||
// newNode.Nodes.Add(emptyNode);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (e.Node.CommandName == "wbsSet") //展开分部/子分部/分项/子分项工程节点
|
||||
{
|
||||
var childWbsSets = BLL.WbsSetService.GetWbsSetsBySuperWbsSetId(e.Node.NodeID);
|
||||
foreach (var wbsSet in childWbsSets)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = wbsSet.WbsSetName;
|
||||
newNode.NodeID = wbsSet.WbsSetId;
|
||||
newNode.CommandName = "wbsSet";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableCheckBox = true;
|
||||
newNode.EnableCheckEvent = true;
|
||||
|
||||
if (wbsSet.IsSelected == true && wbsSet.IsApprove == null)
|
||||
{
|
||||
wbsSet.IsApprove = true;
|
||||
BLL.WbsSetService.UpdateWbsSet(wbsSet);
|
||||
}
|
||||
if (wbsSet.IsApprove == true)
|
||||
{
|
||||
newNode.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Checked = false;
|
||||
}
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
var wbsSets = BLL.WbsSetService.GetWbsSetsBySuperWbsSetId(wbsSet.WbsSetId);
|
||||
if (wbsSets.Count > 0)
|
||||
var wbs2s = BLL.JDGLWBSService.GetWBSsByProjectId(this.CurrUser.LoginProjectId, w.Id);
|
||||
if (wbs2s.Count > 0)
|
||||
{
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
newNode.Nodes.Add(emptyNode);
|
||||
}
|
||||
//needAddTempNode = false;
|
||||
//var wbsSets = BLL.WbsSetService.GetWbsSetsBySuperWbsSetId(wbsSet.WbsSetId);
|
||||
//foreach (var wbsSetc in wbsSets)
|
||||
//{
|
||||
// var childWbsSets1 = from x in Funs.DB.Wbs_WbsSet where x.SuperWbsSetId == wbsSetc.WbsSetId select x;
|
||||
// if (childWbsSets1.Count() > 0)
|
||||
// {
|
||||
// needAddTempNode = true;
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
//if (needAddTempNode)
|
||||
//{
|
||||
// TreeNode emptyNode = new TreeNode();
|
||||
// emptyNode.Text = "";
|
||||
// emptyNode.NodeID = "";
|
||||
// newNode.Nodes.Add(emptyNode);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1743,19 +1497,12 @@ namespace FineUIPro.Web.JDGL.WBS
|
|||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var codeList = BLL.WbsSetMatchCostControlService.GetWbsSetMatchCostControls(this.trWBS.SelectedNodeID);
|
||||
Model.Wbs_WbsSet wbeSet = BLL.WbsSetService.GetWbsSetByWbsSetId(this.trWBS.SelectedNodeID);
|
||||
if (codeList.Count > 0) //存在费控对应关系项
|
||||
var list = BLL.JDGLWBSDetailService.GetWBSDetailsByWorkPackageId(this.trWBS.SelectedNodeID);
|
||||
if (list.Count > 0)
|
||||
{
|
||||
string codes = string.Empty;
|
||||
foreach (var item in codeList)
|
||||
{
|
||||
codes += item.CostControlCode + ",";
|
||||
}
|
||||
string strSql = "SELECT c.*,e.EquipmentMaterialTypeName FROM WBS_CostControl c left join WBS_EquipmentMaterialType e on c.EquipmentMaterialTypeId=e.EquipmentMaterialTypeId where @CostControlCodes like '%'+CostControlCode+'%' and WbsSetId=@WbsSetId";
|
||||
string strSql = "SELECT * FROM JDGL_WBSDetail where WorkPackageId=@WorkPackageId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@CostControlCodes", codes));
|
||||
listStr.Add(new SqlParameter("@WbsSetId", this.trWBS.SelectedNodeID));
|
||||
listStr.Add(new SqlParameter("@WorkPackageId", this.trWBS.SelectedNodeID));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
|
@ -1764,12 +1511,6 @@ namespace FineUIPro.Web.JDGL.WBS
|
|||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
var costControls = BLL.CostControlService.GetSelectedCostControlsByWbsSetId(this.trWBS.SelectedNodeID);
|
||||
if (costControls.Count > 0)
|
||||
{
|
||||
var selectIds = costControls.Select(x => x.CostControlId).ToArray();
|
||||
this.Grid1.SelectedRowIDArray = selectIds;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2713,33 +2454,115 @@ namespace FineUIPro.Web.JDGL.WBS
|
|||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnMenuAdd.Hidden = false;
|
||||
this.btnAdd.Hidden = false;
|
||||
this.btnMenuCopy.Hidden = false;
|
||||
//this.btnMenuDetail.Hidden = false;
|
||||
//this.btnMenuWeekDetail.Hidden = false;
|
||||
//this.btnMenuCopy2.Hidden = false;
|
||||
//this.btnMenuAdd.Hidden = false;
|
||||
//this.btnAdd.Hidden = false;
|
||||
//this.btnMenuCopy.Hidden = false;
|
||||
this.btnMenuDown.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
this.btnMenuModify.Hidden = false;
|
||||
//this.btnMenuEdit.Hidden = false;
|
||||
//this.btnMenuModify.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
//this.btnSave.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
this.btnMenuDel.Hidden = false;
|
||||
//this.btnMenuDelete.Hidden = false;
|
||||
//this.btnMenuDel.Hidden = false;
|
||||
}
|
||||
//if (buttonList.Contains(BLL.Const.BtnAuditing))
|
||||
//{
|
||||
// this.btnMenuAudit.Hidden = false;
|
||||
//}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 抽取
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDown_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.JDGL_WBS wbs1 = db.JDGL_WBS.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId);
|
||||
if (wbs1 != null)
|
||||
{
|
||||
ShowNotify("项目已存在数据,无法抽取!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
|
||||
string contenttype = "application/json;charset=utf-8";
|
||||
var returndata0 = BLL.APIGetHttpService.ControlHttp(Funs.ControlApiUrl + "/project/api/hcoud-wuhuan/projectwbsconstruct/constructionTree?wuId=" + project.KZProjectCode, "GET", contenttype, null, null);
|
||||
var returndata1 = BLL.APIGetHttpService.ControlHttp(Funs.ControlApiUrl + "/project/api/hcoud-wuhuan/projectwbsconstruct/checkPointList?wuId=" + project.KZProjectCode, "GET", contenttype, null, null);
|
||||
List<Model.JDGL_WBS> wbss = new List<Model.JDGL_WBS>();
|
||||
List<Model.JDGL_WBSDetail> wbsDetails = new List<Model.JDGL_WBSDetail>();
|
||||
if (!string.IsNullOrEmpty(returndata0))
|
||||
{
|
||||
JObject obj0 = JObject.Parse(returndata0);
|
||||
if (obj0["code"].ToString() == "200")
|
||||
{
|
||||
JArray arr0 = JArray.Parse(obj0["data"].ToString());
|
||||
string proId = string.Empty;
|
||||
|
||||
List<string> list = new List<string>();
|
||||
foreach (var item in arr0)
|
||||
{
|
||||
Model.JDGL_WBS wBS = new Model.JDGL_WBS();
|
||||
wBS.Id = item["id"].ToString();
|
||||
wBS.ProjectId = this.CurrUser.LoginProjectId;
|
||||
wBS.ParentId = item["parentId"].ToString();
|
||||
wBS.Leave = Funs.GetNewInt(item["leave"].ToString());
|
||||
wBS.PathCode = item["pathCode"].ToString();
|
||||
wBS.ItemName = item["itemName"].ToString();
|
||||
wBS.PlanQuantities = Funs.GetNewDecimal(item["planQuantities"].ToString());
|
||||
wBS.PlanEnd = Funs.GetNewDateTime(item["planEnd"].ToString());
|
||||
wBS.RealityEnd = Funs.GetNewDateTime(item["realityEnd"].ToString());
|
||||
wBS.RealityPrice = Funs.GetNewDecimal(item["realityPrice"].ToString());
|
||||
wBS.Total = Funs.GetNewDecimal(item["total"].ToString());
|
||||
wBS.Num = Funs.GetNewDecimal(item["num"].ToString());
|
||||
wBS.Cycle = item["cycle"].ToString();
|
||||
wBS.PlanPrice = Funs.GetNewDecimal(item["planPrice"].ToString());
|
||||
if (!list.Contains(wBS.Id))
|
||||
{
|
||||
wbss.Add(wBS);
|
||||
list.Add(wBS.Id);
|
||||
}
|
||||
}
|
||||
//InitTreeMenu();
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(returndata1))
|
||||
{
|
||||
JObject obj0 = JObject.Parse(returndata1);
|
||||
if (obj0["code"].ToString() == "200")
|
||||
{
|
||||
JArray arr0 = JArray.Parse(obj0["data"].ToString());
|
||||
string proId = string.Empty;
|
||||
|
||||
List<string> list = new List<string>();
|
||||
foreach (var item in arr0)
|
||||
{
|
||||
Model.JDGL_WBSDetail wBSDetail = new Model.JDGL_WBSDetail();
|
||||
wBSDetail.Id = item["id"].ToString();
|
||||
wBSDetail.ProjectId = this.CurrUser.LoginProjectId;
|
||||
wBSDetail.CompletionTime = Funs.GetNewDateTime(item["completionTime"].ToString());
|
||||
wBSDetail.WorkPackageId = item["workPackageId"].ToString();
|
||||
wBSDetail.Name = item["name"].ToString();
|
||||
wBSDetail.RealityCompletePercent = Funs.GetNewDecimal(item["realityCompletePercent"].ToString());
|
||||
if (!list.Contains(wBSDetail.Id))
|
||||
{
|
||||
wbsDetails.Add(wBSDetail);
|
||||
list.Add(wBSDetail.Id);
|
||||
}
|
||||
}
|
||||
//InitTreeMenu();
|
||||
}
|
||||
}
|
||||
db.JDGL_WBS.InsertAllOnSubmit(wbss);
|
||||
db.JDGL_WBSDetail.InsertAllOnSubmit(wbsDetails);
|
||||
db.SubmitChanges();
|
||||
ShowNotify("抽取成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -102,6 +102,15 @@ namespace FineUIPro.Web.JDGL.WBS {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDown 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnMenuDown;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace FineUIPro.Web.ProjectData
|
|||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnMenuDown.Hidden = false;
|
||||
//this.btnMenuDown.Hidden = false;
|
||||
this.btnMenuAdd.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
|
@ -307,16 +307,17 @@ namespace FineUIPro.Web.ProjectData
|
|||
wBSDetail.WorkPackageId = item["workPackageId"].ToString();
|
||||
wBSDetail.Name = item["name"].ToString();
|
||||
wBSDetail.RealityCompletePercent = Funs.GetNewDecimal(item["realityCompletePercent"].ToString());
|
||||
//if (!list.Contains(wBS.Id))
|
||||
//{
|
||||
// wbss.Add(wBS);
|
||||
// list.Add(wBS.Id);
|
||||
//}
|
||||
if (!list.Contains(wBSDetail.Id))
|
||||
{
|
||||
wbsDetails.Add(wBSDetail);
|
||||
list.Add(wBSDetail.Id);
|
||||
}
|
||||
}
|
||||
//InitTreeMenu();
|
||||
}
|
||||
}
|
||||
db.JDGL_WBS.InsertAllOnSubmit(wbss);
|
||||
db.JDGL_WBSDetail.InsertAllOnSubmit(wbsDetails);
|
||||
db.SubmitChanges();
|
||||
ShowNotify("抽取成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
|
||||
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
||||
</httpHandlers>
|
||||
<compilation debug="true" targetFramework="4.6.1"/>
|
||||
<compilation debug="false" targetFramework="4.6.1"/>
|
||||
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
|
||||
<authentication mode="Forms">
|
||||
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>
|
||||
|
|
|
@ -441,7 +441,7 @@ namespace FineUIPro.Web.common
|
|||
/// <returns></returns>
|
||||
protected int GetCompletedNum()
|
||||
{
|
||||
var result = Project_HSSEData_HSSEService.GetCompletedNum(ProjectId);
|
||||
var result = Project_HSSEData_HSSEService.GetFinishedNum(ProjectId);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -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>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
|
|
Loading…
Reference in New Issue