提交代码
This commit is contained in:
@@ -90,15 +90,18 @@
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="160px" Title="单位工程进度统计"
|
||||
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="147px" Title="单位工程进度统计"
|
||||
TitleToolTip="单位工程进度统计" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="单位工程进度统计"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="UnitWorkId"
|
||||
EnableColumnLines="true" DataIDField="UnitWorkId"
|
||||
AllowSorting="true" SortField="UnitWorkId" SortDirection="ASC"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipeArea"
|
||||
EnableColumnLines="true" DataIDField="PipeArea"
|
||||
PageSize="15">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="管线划分" ColumnID="PipeArea"
|
||||
DataField="PipeArea" SortField="PipeArea" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="总达因数" ColumnID="TotalDin" ExpandUnusedSpace="true"
|
||||
DataField="TotalDin" SortField="TotalDin" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="350px">
|
||||
@@ -120,7 +123,7 @@
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panel4" RegionPosition="Bottom" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="110px" Title="单位工程进度预测"
|
||||
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="147px" Title="单位工程进度预测"
|
||||
TitleToolTip="单位工程进度预测" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
@@ -128,12 +131,23 @@
|
||||
<Rows>
|
||||
<f:FormRow ColumnWidths="23% 23% 23% 23% 8%">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbNotCompleteDin" Label="未完成达因"></f:Label>
|
||||
<f:NumberBox runat="server" ID="txtLeaveDay" Label="剩余工期(天)" LabelWidth="120px" NoNegative="true" NoDecimal="true"></f:NumberBox>
|
||||
<f:NumberBox runat="server" ID="txtWorkEfficiency" Label="日工效" NoNegative="true" NoDecimal="false"></f:NumberBox>
|
||||
<f:Label runat="server" ID="lbNeedWelderNum" Label="每日所需焊工数" LabelWidth="120px" LabelAlign="Right"></f:Label>
|
||||
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" Text="查询"
|
||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||
<f:Label runat="server" ID="lbNotCompleteDin1" Label="工厂预制未完成达因" LabelWidth="150px"></f:Label>
|
||||
<f:NumberBox runat="server" ID="txtLeaveDay1" Label="剩余工期(天)" LabelWidth="120px" NoNegative="true" NoDecimal="true"></f:NumberBox>
|
||||
<f:NumberBox runat="server" ID="txtWorkEfficiency1" Label="日工效" NoNegative="true" NoDecimal="false"></f:NumberBox>
|
||||
<f:Label runat="server" ID="lbNeedWelderNum1" Label="每日所需焊工数" LabelWidth="120px" LabelAlign="Right"></f:Label>
|
||||
<f:Button ID="btnQuery1" ToolTip="查询" Icon="SystemSearch" Text="查询"
|
||||
EnablePostBack="true" OnClick="btnQuery1_Click" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="23% 23% 23% 23% 8%">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbNotCompleteDin2" Label="现场安装未完成达因" LabelWidth="150px"></f:Label>
|
||||
<f:NumberBox runat="server" ID="txtLeaveDay2" Label="剩余工期(天)" LabelWidth="120px" NoNegative="true" NoDecimal="true"></f:NumberBox>
|
||||
<f:NumberBox runat="server" ID="txtWorkEfficiency2" Label="日工效" NoNegative="true" NoDecimal="false"></f:NumberBox>
|
||||
<f:Label runat="server" ID="lbNeedWelderNum2" Label="每日所需焊工数" LabelWidth="120px" LabelAlign="Right"></f:Label>
|
||||
<f:Button ID="btnQuery2" ToolTip="查询" Icon="SystemSearch" Text="查询"
|
||||
EnablePostBack="true" OnClick="btnQuery2_Click" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace FineUIPro.Web.common
|
||||
string strSql = @"select ProjectId,TotalDin,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0
|
||||
ELSE 100.0 * ISNULL(FinishSize,0)/(1.0 * TotalDin) END) AS DECIMAL(8,2))))+'%'
|
||||
AS Rate from
|
||||
(select ProjectId,CAST((SELECT SUM(ISNULL(Size,0)) FROM dbo.HJGL_WeldJoint WHERE ProjectId=b.ProjectId) AS DECIMAL(12,3)) AS TotalDin,
|
||||
(select ProjectId,CAST((SELECT ISNULL(SUM(ISNULL(Size,0)),0) FROM dbo.HJGL_WeldJoint WHERE ProjectId=b.ProjectId) AS DECIMAL(12,3)) AS TotalDin,
|
||||
CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot WHERE ProjectId=b.ProjectId AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(12,3)) AS FinishSize
|
||||
from Base_Project b) v where ProjectId=@ProjectId ";
|
||||
|
||||
@@ -150,12 +150,19 @@ namespace FineUIPro.Web.common
|
||||
/// </summary>
|
||||
private void BindGrid2(string unitWorkId)
|
||||
{
|
||||
string strSql = @"select UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0
|
||||
string strSql = @"select '工厂预制' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0
|
||||
ELSE 100.0 * ISNULL(FinishSize,0)/(1.0 * TotalDin) END) AS DECIMAL(8,2))))+'%'
|
||||
AS Rate from
|
||||
(select UnitWorkId,CAST((SELECT SUM(ISNULL(Size,0)) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId) AS DECIMAL(12,3)) AS TotalDin,
|
||||
CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(12,3)) AS FinishSize
|
||||
from WBS_UnitWork b) v where UnitWorkId=@UnitWorkId ";
|
||||
(select UnitWorkId,CAST((SELECT ISNULL(SUM(ISNULL(Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1') AS DECIMAL(12,3)) AS TotalDin,
|
||||
CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1' AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(12,3)) AS FinishSize
|
||||
from WBS_UnitWork b) v where UnitWorkId=@UnitWorkId
|
||||
union
|
||||
select '现场安装' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0
|
||||
ELSE 100.0 * ISNULL(FinishSize,0)/(1.0 * TotalDin) END) AS DECIMAL(8,2))))+'%'
|
||||
AS Rate from
|
||||
(select UnitWorkId,CAST((SELECT ISNULL(SUM(ISNULL(Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='2') AS DECIMAL(12,3)) AS TotalDin,
|
||||
CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='2' AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(12,3)) AS FinishSize
|
||||
from WBS_UnitWork b) v where UnitWorkId=@UnitWorkId";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", unitWorkId));
|
||||
@@ -166,10 +173,14 @@ namespace FineUIPro.Web.common
|
||||
var table = GetPagedDataTable(Grid2, tb);
|
||||
Grid2.DataSource = table;
|
||||
Grid2.DataBind();
|
||||
decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[0].ToString());
|
||||
decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[1].ToString());
|
||||
decimal notCompleteDin = totalDin - finishSize;
|
||||
this.lbNotCompleteDin.Text = notCompleteDin.ToString();
|
||||
decimal totalDin1 = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[1].ToString());
|
||||
decimal finishSize1 = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[2].ToString());
|
||||
decimal notCompleteDin1 = totalDin1 - finishSize1;
|
||||
this.lbNotCompleteDin1.Text = notCompleteDin1.ToString();
|
||||
decimal totalDin2 = Funs.GetNewDecimalOrZero(this.Grid2.Rows[1].Values[1].ToString());
|
||||
decimal finishSize2 = Funs.GetNewDecimalOrZero(this.Grid2.Rows[1].Values[2].ToString());
|
||||
decimal notCompleteDin2 = totalDin2 - finishSize2;
|
||||
this.lbNotCompleteDin2.Text = notCompleteDin2.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -178,26 +189,26 @@ namespace FineUIPro.Web.common
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
protected void btnQuery1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.tvControlItem.SelectedNodeID.Length > 1)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.txtLeaveDay.Text.Trim()))
|
||||
if (string.IsNullOrEmpty(this.txtLeaveDay1.Text.Trim()))
|
||||
{
|
||||
ShowNotify("请输入剩余工期(天)!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.txtWorkEfficiency.Text.Trim()))
|
||||
if (string.IsNullOrEmpty(this.txtWorkEfficiency1.Text.Trim()))
|
||||
{
|
||||
ShowNotify("请输入日工效!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[0].ToString());
|
||||
decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[1].ToString());
|
||||
decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[1].ToString());
|
||||
decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[2].ToString());
|
||||
decimal notCompleteDin = totalDin - finishSize;
|
||||
this.lbNotCompleteDin.Text = notCompleteDin.ToString();
|
||||
decimal leaveDay = Funs.GetNewDecimalOrZero(this.txtLeaveDay.Text.Trim());
|
||||
decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiency.Text.Trim());
|
||||
this.lbNotCompleteDin1.Text = notCompleteDin.ToString();
|
||||
decimal leaveDay = Funs.GetNewDecimalOrZero(this.txtLeaveDay1.Text.Trim());
|
||||
decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiency1.Text.Trim());
|
||||
if (notCompleteDin > 0)
|
||||
{
|
||||
if (leaveDay == 0)
|
||||
@@ -210,11 +221,63 @@ namespace FineUIPro.Web.common
|
||||
ShowNotify("日工效为0!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
this.lbNeedWelderNum.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString();
|
||||
this.lbNeedWelderNum1.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("未完成达因为0!", MessageBoxIcon.Warning);
|
||||
ShowNotify("工厂预制未完成达因为0!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择单位工程", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnQuery2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.tvControlItem.SelectedNodeID.Length > 1)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.txtLeaveDay1.Text.Trim()))
|
||||
{
|
||||
ShowNotify("请输入剩余工期(天)!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.txtWorkEfficiency1.Text.Trim()))
|
||||
{
|
||||
ShowNotify("请输入日工效!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid2.Rows[1].Values[1].ToString());
|
||||
decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid2.Rows[1].Values[2].ToString());
|
||||
decimal notCompleteDin = totalDin - finishSize;
|
||||
this.lbNotCompleteDin2.Text = notCompleteDin.ToString();
|
||||
decimal leaveDay = Funs.GetNewDecimalOrZero(this.txtLeaveDay2.Text.Trim());
|
||||
decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiency2.Text.Trim());
|
||||
if (notCompleteDin > 0)
|
||||
{
|
||||
if (leaveDay == 0)
|
||||
{
|
||||
ShowNotify("剩余工期(天)为0!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (workEfficiency == 0)
|
||||
{
|
||||
ShowNotify("日工效为0!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
this.lbNeedWelderNum2.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("现场安装未完成达因为0!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
+55
-10
@@ -193,48 +193,93 @@ namespace FineUIPro.Web.common {
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// lbNotCompleteDin 控件。
|
||||
/// lbNotCompleteDin1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbNotCompleteDin;
|
||||
protected global::FineUIPro.Label lbNotCompleteDin1;
|
||||
|
||||
/// <summary>
|
||||
/// txtLeaveDay 控件。
|
||||
/// txtLeaveDay1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtLeaveDay;
|
||||
protected global::FineUIPro.NumberBox txtLeaveDay1;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkEfficiency 控件。
|
||||
/// txtWorkEfficiency1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtWorkEfficiency;
|
||||
protected global::FineUIPro.NumberBox txtWorkEfficiency1;
|
||||
|
||||
/// <summary>
|
||||
/// lbNeedWelderNum 控件。
|
||||
/// lbNeedWelderNum1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbNeedWelderNum;
|
||||
protected global::FineUIPro.Label lbNeedWelderNum1;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// btnQuery1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
protected global::FineUIPro.Button btnQuery1;
|
||||
|
||||
/// <summary>
|
||||
/// lbNotCompleteDin2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbNotCompleteDin2;
|
||||
|
||||
/// <summary>
|
||||
/// txtLeaveDay2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtLeaveDay2;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkEfficiency2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtWorkEfficiency2;
|
||||
|
||||
/// <summary>
|
||||
/// lbNeedWelderNum2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbNeedWelderNum2;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user