From de0a1d28d35d5719f1229cf8f3b0b82cad9225e3 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 27 Nov 2023 16:06:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HJGL/WeldingManage/WeldJointEdit.aspx.cs | 56 +++++----- .../HJGL/WeldingManage/WeldReport.aspx.cs | 2 +- SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx | 36 +++++-- .../common/mainMenu_HJGL3.aspx.cs | 101 ++++++++++++++---- .../common/mainMenu_HJGL3.aspx.designer.cs | 65 +++++++++-- 5 files changed, 190 insertions(+), 70 deletions(-) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs index a93fde9f..529ca0e1 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs @@ -277,45 +277,35 @@ namespace FineUIPro.Web.HJGL.WeldingManage protected void btnSave_Click(object sender, EventArgs e) { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnSave)) + string weldJointCode = string.Empty; + + int joint = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim()); + + if (joint != 0) { - string weldJointCode = string.Empty; - - int joint = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim()); - - if (joint != 0) + if (joint < 10) { - if (joint < 10) - { - weldJointCode = "0" + Convert.ToString(joint); - } - else - { - weldJointCode = Convert.ToString(joint); - } + weldJointCode = "0" + Convert.ToString(joint); } else { - weldJointCode = this.txtWeldJointCode.Text; + weldJointCode = Convert.ToString(joint); } - - if (BLL.WeldJointService.IsExistWeldJointCode(weldJointCode, this.PipelineId, WeldJointId)) - { - Alert.ShowInTop("该管线焊口已存在!", MessageBoxIcon.Warning); - return; - } - else - { - SaveData(); - } - } else { - ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - return; + weldJointCode = this.txtWeldJointCode.Text; } + if (BLL.WeldJointService.IsExistWeldJointCode(weldJointCode, this.PipelineId, WeldJointId)) + { + Alert.ShowInTop("该管线焊口已存在!", MessageBoxIcon.Warning); + return; + } + else + { + SaveData(); + } } /// /// 提交数据 @@ -740,7 +730,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { string dn = string.Empty; string s = string.Empty; - this.txtSize.Text = string.Empty; + //this.txtSize.Text = string.Empty; this.txtSpecification.Text = string.Empty; if (!string.IsNullOrEmpty(this.txtDia.Text.Trim())) { @@ -768,6 +758,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage this.txtSpecification.Text = "Φ" + dn + "*" + this.txtThickness.Text.Trim(); } } + if (!string.IsNullOrEmpty(this.txtDNDia.Text.Trim())) + { + dn = this.txtDNDia.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtThickness.Text.Trim())) + { + this.txtSpecification.Text = dn + "*" + this.txtThickness.Text.Trim(); + } + } } #endregion diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs index cd36c6bd..9c6bbf37 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs @@ -439,7 +439,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } BLL.WeldingDailyService.DeleteWeldingDaily(weldingDailyId); - //BLL.Sys_LogService.AddLog(BLL.Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldReportMenuId, Const.BtnDelete, weldingDailyId); + BLL.LogService.AddLog(this.CurrUser.PersonId, "删除焊接日报"); ShowNotify("删除成功!", MessageBoxIcon.Success); this.InitTreeMenu(); this.BindGrid(); diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx index 16cb6492..e3f3a568 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx @@ -90,15 +90,18 @@ + + @@ -120,7 +123,7 @@ - - - - - + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs index 218ce128..ca5e2f58 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs @@ -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 /// 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 listStr = new List(); 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 /// /// /// - 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; + } + } + + /// + /// 查询 + /// + /// + /// + 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; } } diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs index c2bda08d..899587dc 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs @@ -193,48 +193,93 @@ namespace FineUIPro.Web.common { protected global::FineUIPro.Form Form2; /// - /// lbNotCompleteDin 控件。 + /// lbNotCompleteDin1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lbNotCompleteDin; + protected global::FineUIPro.Label lbNotCompleteDin1; /// - /// txtLeaveDay 控件。 + /// txtLeaveDay1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.NumberBox txtLeaveDay; + protected global::FineUIPro.NumberBox txtLeaveDay1; /// - /// txtWorkEfficiency 控件。 + /// txtWorkEfficiency1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.NumberBox txtWorkEfficiency; + protected global::FineUIPro.NumberBox txtWorkEfficiency1; /// - /// lbNeedWelderNum 控件。 + /// lbNeedWelderNum1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lbNeedWelderNum; + protected global::FineUIPro.Label lbNeedWelderNum1; /// - /// btnQuery 控件。 + /// btnQuery1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Button btnQuery; + protected global::FineUIPro.Button btnQuery1; + + /// + /// lbNotCompleteDin2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbNotCompleteDin2; + + /// + /// txtLeaveDay2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtLeaveDay2; + + /// + /// txtWorkEfficiency2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtWorkEfficiency2; + + /// + /// lbNeedWelderNum2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbNeedWelderNum2; + + /// + /// btnQuery2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnQuery2; } }