diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx index 1c66d2a0..a60e74d8 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx @@ -27,6 +27,7 @@ OnClick="btnQuery_Click"> + diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs index cc586d61..087f0edc 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs @@ -23,7 +23,20 @@ namespace FineUIPro.Web.HJGL.PointTrust where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType && x.PointState == "1" select new { x.WeldJointId, z.WeldJointCode, z.JointAttribute }); - this.lbDef.Text = "预制口:" + pointJoints.Count(x => x.JointAttribute == "预制口").ToString() + "个,安装口:" + pointJoints.Count(x => x.JointAttribute == "安装口").ToString()+"个。"; + int totalJointNum = (from x in db.HJGL_WeldJoint + join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId + where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionType == detectionType + select x).Count(); + int needJointNum = 0, needYZJointNum = 0, needAZJointNum = 0; + Model.Base_DetectionRate rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(rateId); + if (rate != null) + { + needJointNum = Convert.ToInt32(Math.Ceiling((totalJointNum * rate.DetectionRateValue.Value) * 0.01)); + needAZJointNum = Convert.ToInt32(Math.Ceiling(needJointNum * 0.4)); + needYZJointNum = needJointNum - needAZJointNum; + } + this.lbDef.Text = "预制口:" + pointJoints.Count(x => x.JointAttribute == "预制口").ToString() + "个,安装口:" + pointJoints.Count(x => x.JointAttribute == "安装口").ToString() + "个。"; + this.lbNeedDef.Text = "预制口:" + (needYZJointNum - pointJoints.Count(x => x.JointAttribute == "预制口")).ToString() + "个,安装口:" + (needAZJointNum- pointJoints.Count(x => x.JointAttribute == "安装口")).ToString() + "个。"; BindGrid(); } } diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs index 537048b0..c26c6e7a 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs @@ -84,6 +84,15 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// protected global::FineUIPro.Label lbDef; + /// + /// lbNeedDef 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbNeedDef; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx index fd1d0ad3..cf6561bf 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx @@ -30,10 +30,13 @@ + EmptyText="输入查询条件" + Width="230px" LabelWidth="60px"> + + <%-- --%> @@ -57,10 +60,17 @@ EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="240px" LabelWidth="80px" LabelAlign="Right"> - + + + + + + + - + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs index 6f72f7b0..fe2c5a20 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs @@ -85,7 +85,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { foreach (var q in unitWork1) { - int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count(); + int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count(); var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn1 = new TreeNode(); tn1.NodeID = q.UnitWorkId; @@ -109,7 +109,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { foreach (var q in unitWork2) { - int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count(); + int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count(); var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn2 = new TreeNode(); tn2.NodeID = q.UnitWorkId; @@ -169,29 +169,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage var AuditCount = (from x in hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == true && x.AuditDate != null select x).Count(); TreeNode newNode = new TreeNode(); - if (jotCount == AuditCount) //全部审核 - { - newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; - - } - else if (AuditCount == 0) //全部未审核 - { - newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; - - } - else //部分审核 - { - newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; - - } - //if (jotCount > weldJotCount) + //if (jotCount == AuditCount) //全部审核 //{ - // newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; + // newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; + //} - //else + //else if (AuditCount == 0) //全部未审核 //{ - // newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; + // newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; + //} + //else //部分审核 + //{ + // newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; + + //} + newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; newNode.ToolTip = "管线号【焊口数】"; newNode.NodeID = item.PipelineId; newNode.EnableClickEvent = true; @@ -239,7 +232,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage else { this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID; - ckIsAudit.Checked = true; NoAuditBindGrid(); } @@ -290,13 +282,26 @@ namespace FineUIPro.Web.HJGL.WeldingManage strSql += " AND TwoJointType = @TwoJointType"; listStr.Add(new SqlParameter("@TwoJointType", DropTwoJointType.SelectedValue)); } - if (ckIsAudit.Checked == true) + if (rbIsAudit.SelectedValue != "2") { - strSql += " and AuditDate is null"; + if (rbIsAudit.SelectedValue == "0") + { + strSql += " and AuditDate is null"; + } + else + { + strSql += " and AuditDate is not null"; + } + } + if (!string.IsNullOrEmpty(this.txtAuditDate.Text.Trim())) + { + strSql += " AND CONVERT(VARCHAR(20),AuditDate,23) =@AuditDate"; + listStr.Add(new SqlParameter("@AuditDate", this.txtAuditDate.Text.Trim())); } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - var SizeSum = tb.AsEnumerable().Select(x => x.Field("Size")).Sum(); + decimal? d = 0; + var SizeSum = tb.AsEnumerable().Select(x => x.Field("Size") ?? d).Sum(); lbSize.Text = SizeSum.ToString(); // 2.获取当前分页数据 Grid1.RecordCount = tb.Rows.Count; @@ -333,9 +338,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage strSql += " AND TwoJointType = @TwoJointType"; listStr.Add(new SqlParameter("@TwoJointType", DropTwoJointType.SelectedValue)); } - if (ckIsAudit.Checked == true) + if (rbIsAudit.SelectedValue != "2") { - strSql += " and AuditDate is null"; + if (rbIsAudit.SelectedValue == "0") + { + strSql += " and AuditDate is null"; + } + else + { + strSql += " and AuditDate is not null"; + } + } + if (!string.IsNullOrEmpty(this.txtAuditDate.Text.Trim())) + { + strSql += " AND CONVERT(VARCHAR(20),AuditDate,23) =@AuditDate"; + listStr.Add(new SqlParameter("@AuditDate", this.txtAuditDate.Text.Trim())); } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); @@ -805,12 +822,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage this.BindGrid(); } - /// - /// 查询 - /// - /// - /// - protected void Tree_TextChanged(object sender, EventArgs e) + protected void btnTreeFind_Click(object sender, EventArgs e) { this.InitTreeMenu(); this.BindGrid(); @@ -1127,7 +1139,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } #endregion - protected void ckIsAudit_CheckedChanged(object sender, CheckedEventArgs e) + protected void rbIsAudit_SelectedIndexChanged(object sender, EventArgs e) { Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID); this.hdUnitWorkId.Text = string.Empty; @@ -1141,7 +1153,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID; NoAuditBindGrid(); } + } + protected void txtAuditDate_TextChanged(object sender, EventArgs e) + { + Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID); + this.hdUnitWorkId.Text = string.Empty; + if (pipeline != null) + { + this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID; + this.BindGrid(); + } + else + { + this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID; + NoAuditBindGrid(); + } } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs index 8a5836cc..4cb68f6e 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs @@ -75,6 +75,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// protected global::FineUIPro.HiddenField hdUnitWorkId; + /// + /// btnTreeFind 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnTreeFind; + /// /// tvControlItem 控件。 /// @@ -112,13 +121,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage { protected global::FineUIPro.TextBox txtWeldJointCode; /// - /// ckIsAudit 控件。 + /// rbIsAudit 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.CheckBox ckIsAudit; + protected global::FineUIPro.RadioButtonList rbIsAudit; + + /// + /// txtAuditDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtAuditDate; /// /// lbSize 控件。