2023-03-01 合同增加主办部门

This commit is contained in:
2023-03-01 13:57:09 +08:00
parent a5f63ba887
commit 79ea15741e
38 changed files with 607 additions and 187 deletions
@@ -7,6 +7,12 @@
<head runat="server">
<title>管线信息</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<style>
.customlabel span {
color: red;
font-weight: bold;
}
</style>
</head>
<body>
<form id="form1" runat="server">
@@ -54,6 +60,8 @@
<Toolbars>
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="right">
<Items>
<f:Label ID="lbSinglePreRate" CssClass="customlabel" runat="server" Label="图纸预制率"></f:Label>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSetShop" ToolTip="工厂预制" Text="工厂预制" Icon="ApplicationEdit"
EnablePostBack="true" OnClick="btnSetShop_Click" runat="server">
</f:Button>
@@ -212,6 +212,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
var table = this.GetPagedDataTable(Grid1, list);
Grid1.DataSource = table;
Grid1.DataBind();
lbSinglePreRate.Text= GetSinglePreRateByUnitWork(this.tvControlItem.SelectedNodeID);
}
#endregion
@@ -394,7 +395,47 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
return PipeAreaValue;
}
/// <summary>
/// 获取图纸预制率(工厂预制管线的预制达因/工厂预制管线的总达因)
/// </summary>
/// <param name="unitworkid"></param>
/// <returns></returns>
private string GetSinglePreRateByUnitWork(string unitworkid)
{
var db = Funs.DB;
var pipeline=from x in db.View_HJGL_Pipeline where x.UnitWorkId == unitworkid && x.PipeArea=="1" select x;
var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x;
string rate = "";
if (q != null && q.Count() > 0)
{
var proSum = (from x in q
join y in pipeline on x.PipelineId equals y.PipelineId into temp
from tt in temp.DefaultIfEmpty()
where x.JointAttribute == "预制口"
group x by x.UnitWorkId into g
select new
{
SizeSum = g.Sum(x => x.Size)
}).FirstOrDefault().SizeSum;
var AllSum = (from x in pipeline
group x by x.UnitWorkId into g
select new
{
SizeSum = g.Sum(x => x.TotalDin)
}).FirstOrDefault().SizeSum;
proSum = (proSum != null) ? proSum : 0;
if (AllSum > 0)
{
var a = (decimal)100 * proSum / AllSum;
rate = Math.Round((decimal)a, 1).ToString() + "%";
}
return rate;
}
return "0%";
}
}
}
@@ -131,6 +131,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar4;
/// <summary>
/// lbSinglePreRate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbSinglePreRate;
/// <summary>
/// btnSetShop 控件。
/// </summary>