提交代码
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
OnClick="btnQuery_Click">
|
||||
</f:Button>
|
||||
<f:Label runat="server" Label="已检测口明细" ID="lbDef" LabelWidth="120px" LabelAlign="Right"></f:Label>
|
||||
<f:Label runat="server" Label="尚需检测口数量" ID="lbNeedDef" LabelWidth="120px" LabelAlign="Right"></f:Label>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +84,15 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbDef;
|
||||
|
||||
/// <summary>
|
||||
/// lbNeedDef 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbNeedDef;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user