2023-2-14 001
This commit is contained in:
@@ -7,6 +7,7 @@ using System.Data.SqlClient;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
|
||||
@@ -230,6 +231,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID);
|
||||
this.BindGrid3(this.tvControlItem.SelectedNodeID);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -374,7 +379,46 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
//}
|
||||
#endregion
|
||||
#endregion
|
||||
#region 预制率计算
|
||||
private string GetRateByUnitWork(string unitworkid)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var q=from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x ;
|
||||
if (q!=null&&q.Count()>0)
|
||||
{
|
||||
var proSum = (from x in q
|
||||
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 q
|
||||
group x by x.UnitWorkId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
var a = (decimal)100 * proSum / AllSum;
|
||||
var rate = Math.Round((decimal)a, 1);
|
||||
return rate.ToString()+"%";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
void GetRateByPipelineid(string pipelineid)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var q = (from x in db.View_HJGL_WeldJoint
|
||||
group x by x.PipelineId into g
|
||||
where g.Key == pipelineid
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region 焊口信息 维护事件
|
||||
/// <summary>
|
||||
/// Grid双击事件
|
||||
|
||||
Reference in New Issue
Block a user