提交代码

This commit is contained in:
2023-11-30 18:46:59 +08:00
parent 86c248dae5
commit 66a8cb638a
5 changed files with 164 additions and 59 deletions
+47 -18
View File
@@ -27,6 +27,18 @@
<f:Panel runat="server" ID="panel6" RegionPosition="Center" ShowBorder="true" BoxConfigAlign="StretchMax"
Layout="Fit" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="进度统计"
TitleToolTip="进度统计" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker ID="txtWeldingDate" Label="日期" runat="server"
DateFormatString="yyyy-MM-dd" LabelWidth="120px"
LabelAlign="Right" OnTextChanged="WeldingDateText_OnTextChanged" AutoPostBack="true">
</f:DatePicker>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BoxFlex="1"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
@@ -35,7 +47,7 @@
<Items>
<f:Panel runat="server" ID="panel3" RegionPosition="Top" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="110px" Title="项目进度统计"
TitleToolTip="项目进度统计" >
TitleToolTip="项目进度统计">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="项目进度统计"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ProjectId"
@@ -47,13 +59,17 @@
DataField="TotalDin" SortField="TotalDin" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="350px">
</f:RenderField>
<f:RenderField HeaderText="完成达因数" ColumnID="FinishSize"
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="350px">
<f:RenderField HeaderText="当日完成达因数" ColumnID="TodayFinishSize"
DataField="TodayFinishSize" SortField="TodayFinishSize" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="250px">
</f:RenderField>
<f:RenderField HeaderText="完成进度" ColumnID="Rate"
<f:RenderField HeaderText="累计已完成达因数" ColumnID="FinishSize"
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="250px">
</f:RenderField>
<f:RenderField HeaderText="累计完成进度" ColumnID="Rate"
DataField="Rate" SortField="Rate" FieldType="String" HeaderTextAlign="Center"
TextAlign="Center" Width="350px">
TextAlign="Center" Width="250px">
</f:RenderField>
</Columns>
</f:Grid>
@@ -70,10 +86,13 @@
<f:Form ID="Form3" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="110px">
<Rows>
<f:FormRow ColumnWidths="23% 23% 23% 23% 8%">
<f:FormRow ColumnWidths="18% 24% 14% 18% 18% 8%">
<Items>
<f:Label runat="server" ID="lbNotCompleteDinTotal" Label="未完成达因"></f:Label>
<f:NumberBox runat="server" ID="txtLeaveDayTotal" Label="剩余工期(天)" LabelWidth="120px" NoNegative="true" NoDecimal="true"></f:NumberBox>
<f:DatePicker ID="txtPlanEndDate" Label="计划完成日期" runat="server"
DateFormatString="yyyy-MM-dd" LabelWidth="120px" LabelAlign="Right">
</f:DatePicker>
<f:Label runat="server" ID="lbDayNeedSize" Label="每日完成达因" LabelWidth="120px" LabelAlign="Right"></f:Label>
<f:NumberBox runat="server" ID="txtWorkEfficiencyTotal" Label="日工效" NoNegative="true" NoDecimal="false"></f:NumberBox>
<f:Label runat="server" ID="lbNeedWelderNumTotal" Label="每日所需焊工数" LabelWidth="120px" LabelAlign="Right"></f:Label>
<f:Button ID="btnQueryTotal" ToolTip="查询" Icon="SystemSearch" Text="查询"
@@ -98,7 +117,7 @@
EnableColumnLines="true" DataIDField="PipeArea"
PageSize="15">
<Columns>
<f:RenderField HeaderText="管线划分" ColumnID="PipeArea"
<f:RenderField HeaderText="管线划分" ColumnID="PipeArea"
DataField="PipeArea" SortField="PipeArea" FieldType="String" HeaderTextAlign="Center"
TextAlign="Center" Width="100px">
</f:RenderField>
@@ -106,13 +125,17 @@
DataField="TotalDin" SortField="TotalDin" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="350px">
</f:RenderField>
<f:RenderField HeaderText="完成达因数" ColumnID="FinishSize"
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="350px">
<f:RenderField HeaderText="当日完成达因数" ColumnID="TodayFinishSize"
DataField="TodayFinishSize" SortField="TodayFinishSize" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="250px">
</f:RenderField>
<f:RenderField HeaderText="完成进度" ColumnID="Rate"
<f:RenderField HeaderText="累计已完成达因数" ColumnID="FinishSize"
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="250px">
</f:RenderField>
<f:RenderField HeaderText="累计完成进度" ColumnID="Rate"
DataField="Rate" SortField="Rate" FieldType="String" HeaderTextAlign="Center"
TextAlign="Center" Width="350px">
TextAlign="Center" Width="250px">
</f:RenderField>
</Columns>
</f:Grid>
@@ -129,10 +152,13 @@
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="110px">
<Rows>
<f:FormRow ColumnWidths="23% 23% 23% 23% 8%">
<f:FormRow ColumnWidths="18% 24% 14% 18% 18% 8%">
<Items>
<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:DatePicker ID="txtPlanEndDate1" Label="计划完成日期" runat="server"
DateFormatString="yyyy-MM-dd" LabelWidth="120px" LabelAlign="Right">
</f:DatePicker>
<f:Label runat="server" ID="lbDayNeedSize1" Label="每日完成达因" LabelWidth="120px" LabelAlign="Right"></f:Label>
<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="查询"
@@ -140,10 +166,13 @@
</f:Button>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="23% 23% 23% 23% 8%">
<f:FormRow ColumnWidths="18% 24% 14% 18% 18% 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:DatePicker ID="txtPlanEndDate2" Label="计划完成日期" runat="server"
DateFormatString="yyyy-MM-dd" LabelWidth="120px" LabelAlign="Right">
</f:DatePicker>
<f:Label runat="server" ID="lbDayNeedSize2" Label="每日完成达因" LabelWidth="120px" LabelAlign="Right"></f:Label>
<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="查询"
@@ -17,10 +17,17 @@ namespace FineUIPro.Web.common
if (!IsPostBack)
{
this.InitTreeMenu();//加载树
this.txtWeldingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
BindGrid1();
}
}
protected void WeldingDateText_OnTextChanged(object sender, EventArgs e)
{
BindGrid1();
BindGrid2(this.tvControlItem.SelectedNodeID);
}
#region --
/// <summary>
/// 加载树
@@ -123,15 +130,17 @@ namespace FineUIPro.Web.common
/// </summary>
private void BindGrid1()
{
string strSql = @"select ProjectId,TotalDin,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0
string strSql = @"select ProjectId,TotalDin,TodayFinishSize,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 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
(select b.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 left join dbo.HJGL_WeldingDaily d on d.WeldingDailyId=jot.WeldingDailyId WHERE jot.ProjectId=b.ProjectId AND jot.WeldingDailyId IS NOT NULL and d.WeldingDate=@WeldingDate) AS DECIMAL(12,3)) AS TodayFinishSize,
CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_WeldingDaily d on d.WeldingDailyId=jot.WeldingDailyId WHERE jot.ProjectId=b.ProjectId AND jot.WeldingDailyId IS NOT NULL and d.WeldingDate<=@WeldingDate) AS DECIMAL(12,3)) AS FinishSize
from Base_Project b) v where ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", (CurrUser != null) ? CurrUser.LoginProjectId : ""));
listStr.Add(new SqlParameter("@WeldingDate", this.txtWeldingDate.Text.Trim()));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -150,22 +159,25 @@ namespace FineUIPro.Web.common
/// </summary>
private void BindGrid2(string unitWorkId)
{
string strSql = @"select '工厂预制' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0
string strSql = @"select '工厂预制' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,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='1' and jot.JointAttribute='预制口') 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.JointAttribute='预制口' AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(12,3)) AS FinishSize
(select b.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' and jot.JointAttribute='预制口') 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 left join dbo.HJGL_WeldingDaily d on d.WeldingDailyId=jot.WeldingDailyId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1' and jot.JointAttribute='预制口' AND jot.WeldingDailyId IS NOT NULL and d.WeldingDate=@WeldingDate) AS DECIMAL(12,3)) AS TodayFinishSize,
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 left join dbo.HJGL_WeldingDaily d on d.WeldingDailyId=jot.WeldingDailyId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1' and jot.JointAttribute='预制口' AND jot.WeldingDailyId IS NOT NULL and d.WeldingDate<=@WeldingDate) 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
select '现场安装' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,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')+(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' and jot.JointAttribute='安装口') 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)+(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.JointAttribute='安装口' AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(12,3)) AS FinishSize
(select b.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')+(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' and jot.JointAttribute='安装口') 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 left join dbo.HJGL_WeldingDaily d on d.WeldingDailyId=jot.WeldingDailyId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='2' AND jot.WeldingDailyId IS NOT NULL and d.WeldingDate=@WeldingDate)+(SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId left join dbo.HJGL_WeldingDaily d on d.WeldingDailyId=jot.WeldingDailyId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1' and jot.JointAttribute='安装口' AND jot.WeldingDailyId IS NOT NULL and d.WeldingDate=@WeldingDate) AS DECIMAL(12,3)) AS TodayFinishSize,
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 left join dbo.HJGL_WeldingDaily d on d.WeldingDailyId=jot.WeldingDailyId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='2' AND jot.WeldingDailyId IS NOT NULL and d.WeldingDate<=@WeldingDate)+(SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId left join dbo.HJGL_WeldingDaily d on d.WeldingDailyId=jot.WeldingDailyId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1' and jot.JointAttribute='安装口' AND jot.WeldingDailyId IS NOT NULL and d.WeldingDate<=@WeldingDate) 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));
listStr.Add(new SqlParameter("@WeldingDate", this.txtWeldingDate.Text.Trim()));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid2.RecordCount = tb.Rows.Count;
@@ -173,14 +185,17 @@ select '现场安装' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHA
var table = GetPagedDataTable(Grid2, tb);
Grid2.DataSource = table;
Grid2.DataBind();
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();
if (Grid2.RecordCount > 0)
{
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
@@ -193,9 +208,9 @@ select '现场安装' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHA
{
if (this.tvControlItem.SelectedNodeID.Length > 1)
{
if (string.IsNullOrEmpty(this.txtLeaveDay1.Text.Trim()))
if (string.IsNullOrEmpty(this.txtPlanEndDate1.Text.Trim()))
{
ShowNotify("请输入剩余工期(天)", MessageBoxIcon.Warning);
ShowNotify("请输入计划完成日期", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(this.txtWorkEfficiency1.Text.Trim()))
@@ -207,7 +222,8 @@ select '现场安装' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHA
decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[2].ToString());
decimal notCompleteDin = totalDin - finishSize;
this.lbNotCompleteDin1.Text = notCompleteDin.ToString();
decimal leaveDay = Funs.GetNewDecimalOrZero(this.txtLeaveDay1.Text.Trim());
TimeSpan ts = (TimeSpan)(Funs.GetNewDateTime(this.txtPlanEndDate1.Text.Trim()) - Funs.GetNewDateTime(this.txtWeldingDate.Text.Trim()));
decimal leaveDay = Convert.ToDecimal(ts.Days);
decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiency1.Text.Trim());
if (notCompleteDin > 0)
{
@@ -221,6 +237,7 @@ select '现场安装' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHA
ShowNotify("日工效为0", MessageBoxIcon.Warning);
return;
}
this.lbDayNeedSize1.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay)).ToString();
this.lbNeedWelderNum1.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString();
}
else
@@ -245,12 +262,12 @@ select '现场安装' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHA
{
if (this.tvControlItem.SelectedNodeID.Length > 1)
{
if (string.IsNullOrEmpty(this.txtLeaveDay1.Text.Trim()))
if (string.IsNullOrEmpty(this.txtPlanEndDate2.Text.Trim()))
{
ShowNotify("请输入剩余工期(天)", MessageBoxIcon.Warning);
ShowNotify("请输入计划完成日期", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(this.txtWorkEfficiency1.Text.Trim()))
if (string.IsNullOrEmpty(this.txtWorkEfficiency2.Text.Trim()))
{
ShowNotify("请输入日工效!", MessageBoxIcon.Warning);
return;
@@ -259,7 +276,8 @@ select '现场安装' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHA
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());
TimeSpan ts = (TimeSpan)(Funs.GetNewDateTime(this.txtPlanEndDate2.Text.Trim()) - Funs.GetNewDateTime(this.txtWeldingDate.Text.Trim()));
decimal leaveDay = Convert.ToDecimal(ts.Days);
decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiency2.Text.Trim());
if (notCompleteDin > 0)
{
@@ -273,6 +291,7 @@ select '现场安装' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHA
ShowNotify("日工效为0", MessageBoxIcon.Warning);
return;
}
this.lbDayNeedSize2.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay)).ToString();
this.lbNeedWelderNum2.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString();
}
else
@@ -295,9 +314,9 @@ select '现场安装' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHA
/// <param name="e"></param>
protected void btnQueryTotal_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.txtLeaveDayTotal.Text.Trim()))
if (string.IsNullOrEmpty(this.txtPlanEndDate.Text.Trim()))
{
ShowNotify("请输入剩余工期(天)", MessageBoxIcon.Warning);
ShowNotify("请输入计划完成日期", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(this.txtWorkEfficiencyTotal.Text.Trim()))
@@ -308,7 +327,8 @@ select '现场安装' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHA
decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[0].ToString());
decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[1].ToString());
decimal notCompleteDin = totalDin - finishSize;
decimal leaveDay = Funs.GetNewDecimalOrZero(this.txtLeaveDayTotal.Text.Trim());
TimeSpan ts= (TimeSpan)(Funs.GetNewDateTime(this.txtPlanEndDate.Text.Trim()) - Funs.GetNewDateTime(this.txtWeldingDate.Text.Trim()));
decimal leaveDay = Convert.ToDecimal(ts.Days);
decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiencyTotal.Text.Trim());
if (notCompleteDin > 0)
{
@@ -322,6 +342,7 @@ select '现场安装' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHA
ShowNotify("日工效为0", MessageBoxIcon.Warning);
return;
}
this.lbDayNeedSize.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay)).ToString();
this.lbNeedWelderNumTotal.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString();
}
else
+60 -6
View File
@@ -66,6 +66,33 @@ namespace FineUIPro.Web.common {
/// </remarks>
protected global::FineUIPro.Panel panel6;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtWeldingDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtWeldingDate;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -121,13 +148,22 @@ namespace FineUIPro.Web.common {
protected global::FineUIPro.Label lbNotCompleteDinTotal;
/// <summary>
/// txtLeaveDayTotal 控件。
/// txtPlanEndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtLeaveDayTotal;
protected global::FineUIPro.DatePicker txtPlanEndDate;
/// <summary>
/// lbDayNeedSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbDayNeedSize;
/// <summary>
/// txtWorkEfficiencyTotal 控件。
@@ -202,13 +238,22 @@ namespace FineUIPro.Web.common {
protected global::FineUIPro.Label lbNotCompleteDin1;
/// <summary>
/// txtLeaveDay1 控件。
/// txtPlanEndDate1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtLeaveDay1;
protected global::FineUIPro.DatePicker txtPlanEndDate1;
/// <summary>
/// lbDayNeedSize1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbDayNeedSize1;
/// <summary>
/// txtWorkEfficiency1 控件。
@@ -247,13 +292,22 @@ namespace FineUIPro.Web.common {
protected global::FineUIPro.Label lbNotCompleteDin2;
/// <summary>
/// txtLeaveDay2 控件。
/// txtPlanEndDate2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtLeaveDay2;
protected global::FineUIPro.DatePicker txtPlanEndDate2;
/// <summary>
/// lbDayNeedSize2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbDayNeedSize2;
/// <summary>
/// txtWorkEfficiency2 控件。