From 396611a39d55b9001affea75fcc696161e1f890b Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Wed, 10 Jan 2024 19:41:14 +0800 Subject: [PATCH] 2024-01-10 --- .vs/SGGL_SeDin/v17/.wsuo | Bin 265216 -> 265216 bytes .../HJGL/WeldingManage/WeldJointList.aspx | 34 +- .../HJGL/WeldingManage/WeldJointList.aspx.cs | 553 ++++++++++++++---- .../WeldJointList.aspx.designer.cs | 263 ++++++--- 4 files changed, 645 insertions(+), 205 deletions(-) diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo index b771a094c15c2dd18e87468af421ec39357e80ca..5ad24617fbf478b53338d469033cb9760e12bb4c 100644 GIT binary patch delta 2813 zcmcIldrVVT81K3F6l{CTvqc2tA&6L7ER;tJ0@sQ<2M#urm^cZv(3OW+9_8(NnL7WF zOzoHKx`&IwrCGMcM4P3FZb@Y(E}7X_mKbBQ?D5B9%n~yr8yJP1Qwk!*2U~WUU(a{G z_xa9u&J|8a38$k@ZbtG`rK@GJ5{X1b5burFo_y!r>3MNQ} zXl>$pns5w3IKh0v^P8b-I?{;dYMS{PqC|K7yv)@^=NXxAMyp1M##;nX6QdH7Fxo4n z)tkA{cIMqmRrm5v#(~6mG}9&e8K_2^M1Xs08#jOsc9mT0_dFBhW8L!Krph4^s=6 zj{e|3=8!~l7$VMw2@VmwN#G(72;9XL97AT>-3###fHTzvJ*i0$Rgw=^)p}G3&a`Td z9&hp@#dk5rFqK#dUze1Ekko@5Fqz~+2f?}4g*v>GYpW5LM)aSkZBNQ5Txj|N&NS?T z@pWaur~6@0lO@*6aiREOIL@D=MrCtUE8JuffX^1(aTOfRaK7mSl{(^e#vMmv8F(xQ z|2wbRC=}<7E}TUul3eV&$epw`bUOtuX$RRy8BD7ypO%C>;VLI5O7oYD=0^+Uol01R zD50d;(}79BgTc)A!v=}XCI%jucPbG*i8-BMCk%jdt4rEV*mW>nK7@9HlXsz)V3PcA z0Oyv&(kdd8z@s(SIC>qI28XGH8u&)7g`UJw_u^oKh`O%k=<|?4K%>%(xj-z!pku|& zK@WT0Q=mEelj0$&qA4_QROOxCwnK@`u%)(~L&T0^+pg`qp|p7;?5|RAhPv9C0CQ_? z4P39yKj+`WjP1o2U*pkA%)I_RJOd}{#^<_i{}n*#<?h85LV zwoqgEynnZhz7=%5SUEkJ4EAI&jCgMrC5ZZOSNZ?8+t?RP~gr5dA9hO0!N5{uENbQrm1*rf&w)%!pMM2{4@+} VMMoGO6@OOXG*K(Za*%5r{{VKzsiFV? delta 2495 zcmcgueN0nV6o2Qwhm_Jn3#g^wsI0@PbiS7I8NsJ$bh?!;Fk_-3Ewo`nXZfgu3byLh zEb|ZPF?r5xiDL$1O?GjTEd(0v$VvVRw|EYldfh>@{#J4!IZ=CW)j`Ssp= z&bjw|-uoIoWr&_KoLCLn!}W`^772o|m|%_@<#!;)cI(@IEx+t8z5y$VtKb0J4{u_U zHR*J;&Ld0_p)uDAuVP4yKoFDSlXmU2fD0`&=gJv`-)Wso;{w7`!YV=z8s&U!lO+8l zNx256$zku}^?DK;34gMtrky%nUqNdFp`2iyC38&A;}@m(KrcxDG>Xh+dLD&D zun?AzmqigCa3+EK%{}EFr@@^mCO#iI@%Ylw@O2@rA19c6(wiq3n4)M_Loq*gHjYl4 zIz}TFYd!Hk?Qs|mYOp2Gpqo!PmeU8YEFQ{rQ+gQfOF);lWaFow z$?G?y8P5=d&(W3v~E+fNuI3=s|xB7`VTR$tOR zK{MWUX}hsHDSod;12I>l9(cR){+K1ie)Ayg#iTg`FJq`E0(;`gq9)KilHa~1$77~O z{CuGU@0yD7gsB6%Flln@Q_akKAbl!q#!z8XDto-8(rofXL(3GQ!ym#Qea|5)X~3>_ z1(lNV5vw#8TRoaBh1D;!C9AqCOWK6jnR!%{ASN52fbRS)7_mw7={#1O*(#?A4z~48_o5xnu|J~gE=cgGHz&2SwkOe z!cap5He!-~%P_R&u!fh8Q*8C!1p_o*1-!p546k6QK9bQxjIB7aVgI8WL5fdo+^B~Q zxb}rLx{9sM9w6lnjm;h$@-N4o?(EoBWvoSkzt9+KRoKY3IV$A+EIzi&130|vqqyP& z7GLW-E1JtooA>tgd3yE+{XKmHZtos{X?Gc6-PHiN zl;z|1-Q}qCbS(@BvS1fn^y?D*shLl3;&_jOG#{cvY*n~-cf7!R>)O$hpXBV z@YmK<1p>~w(-{RkcW4tD&YBW!7Ip@VPAbF0x%>|^Ji3Ch(K05DKFyeVX9~=!{FSIn zl$Em^pk8<$!pFigON3?d=v%7tHfR&tYvOM(`n9M*`MY2u_>*`7Mz4!GIF@v(r>}@r ziO!qisa)0F3p>={FqEr`p6L=N?~A)Z9br;cqUxS_8PsnNQoVu?Xg99A->SAUX%L;) zH>=SJ(Uy32QanHJ8(AkA_#XmJ{JG;F*0|U93#cz@r3d)HQl*9$NG?9XR*Or0H%pS$ p546%Je72IeSnrII+LS46Q9oQDH52P4uHc^8cREuFsJpWz^B;!bW - + + + WeldJointlist = new List(); - /// - /// 预制口总达因 - /// - public static string ShopSumSize = "0"; - /// - /// 安装口总达因 - /// - public static string FieldSumSize = "0"; - - /// - /// 预制口总数量 - /// - public static string ShopSum = "0"; - /// - /// 安装口总数量 - /// - public static string FieldSum = "0"; protected void Page_Load(object sender, EventArgs e) { @@ -241,30 +224,41 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (pipeline != null) { this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID; + TbPipeline.Hidden = false; + TbUnitWork.Hidden = true; + TbUnitWork2.Hidden = true; this.BindGrid1(this.tvControlItem.SelectedNodeID); this.BindGrid2(this.tvControlItem.SelectedNodeID); this.BindGrid3(this.tvControlItem.SelectedNodeID); - this.lbSinglePreRate.Label = "图纸预制率(达因)"; - this.lbSinglePreRate.Text = GetRateByPipelineid(this.tvControlItem.SelectedNodeID); - - this.lbSinglePreRateByWeldJoint.Label = "图纸预制率(焊口)"; - this.lbSinglePreRateByWeldJoint.Text = GetWeldJointRateByPipelineid(this.tvControlItem.SelectedNodeID); + lbPipeSinglePreRate.Text = GetRateByPipelineid(this.tvControlItem.SelectedNodeID); + lbPipeShopSize.Text = GetShopSumDinByPipelineid(this.tvControlItem.SelectedNodeID).ToString(); + lbPipeFiledSize.Text = GetFieldSumDinByPipelineid(this.tvControlItem.SelectedNodeID).ToString(); + lbPipeSinglePreRateByWeldJoint.Text = GetWeldJointRateByPipelineid(this.tvControlItem.SelectedNodeID); + lbPipeShopSum.Text = GetShopSumByPipelineid(this.tvControlItem.SelectedNodeID).ToString(); + lbPipeFiledSum.Text = GetFieldSumByPipelineid(this.tvControlItem.SelectedNodeID).ToString(); } else { this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID; - this.lbSinglePreRate.Label = "主项预制率(达因)"; - this.lbSinglePreRate.Text = GetRateByUnitWork(this.tvControlItem.SelectedNodeID); - this.lbSinglePreRateByWeldJoint.Label = "主项预制率(焊口)"; - this.lbSinglePreRateByWeldJoint.Text = GetWeldJointRateByUnitWork(this.tvControlItem.SelectedNodeID); + TbPipeline.Hidden = true; + TbUnitWork.Hidden = false; + TbUnitWork2.Hidden = false; + lbUWTotalDin.Text= GetSumDinByUnitWorkId(this.tvControlItem.SelectedNodeID).ToString(); + lbUWPreRate.Text = GetRateByUnitWork(this.tvControlItem.SelectedNodeID); + lbUWShopSize.Text = GetShopSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); + lbUWFiledSize.Text = GetFieldSumDinByUnitWork2(this.tvControlItem.SelectedNodeID).ToString(); + lbUWSinglePreRateByDin.Text = GetShopRateByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); + lbUWShopSizeByLineShop.Text= GetShopSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); + lbUWFiledSizeByLineShop.Text= GetFieldSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); + lbUWSinglePreRateByWeldJoint.Text = GetWeldJointRateByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); + lbUWShopSum.Text = GetShopSumByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); + lbUWFiledSum.Text = GetFieldSumByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); + } - this.lbShopSize.Text = ShopSumSize; - this.lbFiledSize.Text = FieldSumSize; - this.lbShopSum.Text = ShopSum; - this.lbFiledSum.Text = FieldSum; + } } @@ -411,90 +405,18 @@ 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; - string rate = ""; - ShopSumSize = "0"; - FieldSumSize = "0"; - 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 FieldSum = (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; - proSum = (proSum != null) ? proSum : 0; - FieldSum = (FieldSum != null) ? FieldSum : 0; - ShopSumSize = proSum.ToString(); - FieldSumSize = FieldSum.ToString(); - if (AllSum > 0) - { - var a = (decimal)100 * proSum / AllSum; - rate = Math.Round((decimal)a, 1).ToString() + "%"; - } - - return rate; - } - return "0%"; - } - - private string GetWeldJointRateByUnitWork(string unitworkid) - { - string rate = ""; - int shopNum = 0; - int fieldNum = 0; - int AllNum = 0; - 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) - { - shopNum = (from x in q - where x.JointAttribute == "预制口" - select x - ).Count(); - fieldNum = (from x in q - where x.JointAttribute == "安装口" - select x - ).Count(); - ShopSum = shopNum.ToString(); - FieldSum = fieldNum.ToString(); - AllNum = shopNum + fieldNum; - - if (AllNum > 0) - { - var a = (decimal)100 * shopNum / AllNum; - rate = Math.Round((decimal)a, 1).ToString() + "%"; - } - - return rate; - } - return "0%"; - } + #region 管线预制率计算 + /// + /// 图纸预制率(达因)(预制口总达因/主项总达因数) + /// + /// + /// private string GetRateByPipelineid(string pipelineid) { - string rate = ""; - ShopSumSize = "0"; - FieldSumSize = "0"; + string rate = ""; + var db = Funs.DB; - var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid select x; + var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid && x.IsTwoJoint == null select x; if (q != null && q.Count() > 0) { var proSumModel = (from x in q @@ -505,14 +427,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage SizeSum = g.Sum(x => x.Size) }).FirstOrDefault(); var proSum = (proSumModel != null) ? proSumModel.SizeSum : 0; - var FieldSumModel = (from x in q - where x.JointAttribute == "安装口" - group x by x.PipelineId into g - select new - { - SizeSum = g.Sum(x => x.Size) - }).FirstOrDefault(); - var FieldSum = (FieldSumModel != null) ? FieldSumModel.SizeSum : 0; + var AllSumModel = (from x in q group x by x.PipelineId into g select new @@ -522,9 +437,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage var AllSum = (AllSumModel != null) ? AllSumModel.SizeSum : 0; proSum = (proSum != null) ? proSum : 0; - FieldSum = (FieldSum != null) ? FieldSum : 0; - ShopSumSize = proSum.ToString(); - FieldSumSize = FieldSum.ToString(); if (AllSum > 0) { var a = (decimal)100 * proSum / AllSum; @@ -535,8 +447,60 @@ namespace FineUIPro.Web.HJGL.WeldingManage } return "0%"; } + /// - /// 获取预制率(焊口) 预制口数量/总焊口数量 + /// 管线预制口总达因 + /// + /// + /// + private decimal GetShopSumDinByPipelineid(string pipelineid) + { + decimal sum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid && x.IsTwoJoint == null select x; + if (q != null && q.Count() > 0) + { + var ShopSum = (from x in q + where x.JointAttribute == "预制口" + group x by x.PipelineId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault()?.SizeSum; + ShopSum = (ShopSum != null) ? ShopSum : 0; + sum = (decimal)ShopSum; + return sum; + } + return 0; + } + + /// + /// 管线安装口总达因 + /// + /// + /// + private decimal GetFieldSumDinByPipelineid(string pipelineid) + { + decimal sum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid && x.IsTwoJoint == null select x; + if (q != null && q.Count() > 0) + { + var FieldSum = (from x in q + where x.JointAttribute == "安装口" + group x by x.PipelineId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault()?.SizeSum; + FieldSum = (FieldSum != null) ? FieldSum : 0; + sum = (decimal)FieldSum; + return sum; + } + return 0; + } + /// + /// 图纸预制率(焊口) 预制口数量/总焊口数量 /// /// /// @@ -547,7 +511,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage int fieldNum = 0; int AllNum = 0; var db = Funs.DB; - var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid select x; + var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid && x.IsTwoJoint == null select x; if (q != null && q.Count() > 0) { shopNum = (from x in q @@ -558,8 +522,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage where x.JointAttribute == "安装口" select x ).Count(); - ShopSum = shopNum.ToString(); - FieldSum = fieldNum.ToString(); + AllNum = shopNum + fieldNum; if (AllNum > 0) @@ -573,6 +536,344 @@ namespace FineUIPro.Web.HJGL.WeldingManage return "0%"; } + /// + /// 管线预制口总数量 + /// + /// + /// + private int GetShopSumByPipelineid(string pipelineid) + { + int sum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid && x.IsTwoJoint == null select x; + if (q != null && q.Count() > 0) + { + sum = (from x in q + where x.JointAttribute == "预制口" + select x + ).Count(); + return sum; + } + return 0; + } + + /// + /// 管线安装口总数量 + /// + /// + /// + private int GetFieldSumByPipelineid(string pipelineid) + { + int sum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid && x.IsTwoJoint == null select x; + if (q != null && q.Count() > 0) + { + sum = (from x in q + where x.JointAttribute == "安装口" + select x + ).Count(); + return sum; + } + return 0; + } + + /// + ///管线总达因(根据管线id获取达因之和) + /// + /// + /// + private decimal GetSumDinByPipelineId(string pipelineid) + { + decimal sum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid && x.IsTwoJoint == null select x; + if (q != null && q.Count() > 0) + { + sum = (from x in q + select x.Size + ).Sum() ?? 0; + return sum; + } + return 0; + } + + #endregion + #region 主项预制率计算 + + /// + /// 主项预制率(达因) 主项预制口总达因/主项总达因数 + /// + /// + /// + private string GetRateByUnitWork(string unitworkid) + { + + string rate = ""; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null select x; + if (q != null && q.Count() > 0) + { + var proSumModel = (from x in q + where x.JointAttribute == "预制口" && x.PipeArea == PipelineService.PipeArea_SHOP + group x by x.UnitWorkId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault(); + var proSum = (proSumModel != null) ? proSumModel.SizeSum : 0; + + var AllSumModel = (from x in q + group x by x.UnitWorkId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault(); + var AllSum = (AllSumModel != null) ? AllSumModel.SizeSum : 0; + + 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%"; + + } + + /// + ///主项预制口总达因《管线划分工厂预制下的所有预制口达因数》 + /// + /// + /// + private decimal GetShopSumDinByUnitWork(string unitworkid) + { + decimal sum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null && x.PipeArea == PipelineService.PipeArea_SHOP select x; + if (q != null && q.Count() > 0) + { + var ShopSum = (from x in q + where x.JointAttribute == "预制口" + group x by x.UnitWorkId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault()?.SizeSum; + ShopSum = (ShopSum != null) ? ShopSum : 0; + sum = (decimal)ShopSum; + return sum; + } + return 0; + } + + /// + /// 主项安装口总达因数《管线划分工厂预制下的安装口达因数+管线划分现场安装下所有焊口达因数》 + /// + /// + /// + private decimal GetFieldSumDinByUnitWork2(string unitworkid) + { + decimal sum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null && x.PipeArea == PipelineService.PipeArea_SHOP select x; + if (q != null && q.Count() > 0) + { + var FieldSum = (from x in q + where x.JointAttribute == "安装口" + group x by x.UnitWorkId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault()?.SizeSum; + FieldSum = (FieldSum != null) ? FieldSum : 0; + sum = (decimal)FieldSum; + + } + var q2 = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null && x.PipeArea == PipelineService.PipeArea_FIELD select x; + if (q2 != null && q2.Count() > 0) + { + var FieldSum2 = (from x in q2 + group x by x.UnitWorkId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault()?.SizeSum; + FieldSum2 = (FieldSum2 != null) ? FieldSum2 : 0; + sum = sum + (decimal)FieldSum2; + } + return sum; + } + + + /// + /// 主项预制率(焊口) 预制口数量/总焊口数量 + /// + /// + /// + private string GetWeldJointRateByUnitWork(string unitworkid) + { + string rate = ""; + int shopNum = 0; + int fieldNum = 0; + int AllNum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null select x; + if (q != null && q.Count() > 0) + { + shopNum = (from x in q + where x.JointAttribute == "预制口" && x.PipeArea == PipelineService.PipeArea_SHOP + select x + ).Count(); + fieldNum = (from x in q + where x.JointAttribute == "安装口" + select x + ).Count(); + AllNum = shopNum + fieldNum; + + if (AllNum > 0) + { + var a = (decimal)100 * shopNum / AllNum; + rate = Math.Round((decimal)a, 1).ToString() + "%"; + } + + return rate; + } + return "0%"; + } + + + /// + ///主项预制口数量(工厂):《管线划分工厂预制下的所有预制口个数》 + /// + /// + /// + private int GetShopSumByUnitWork(string unitworkid) + { + int sum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null && x.PipeArea == PipelineService.PipeArea_SHOP select x; + if (q != null && q.Count() > 0) + { + sum = (from x in q + where x.JointAttribute == "预制口" + select x + ).Count(); + return sum; + } + return 0; + } + /// + /// //主项安装口数量(工厂):《管线划分工厂预制下的所有安装口个数》 + /// + /// + /// + private int GetFieldSumByUnitWork(string unitworkid) + { + int sum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null && x.PipeArea == PipelineService.PipeArea_SHOP select x; + if (q != null && q.Count() > 0) + { + sum = (from x in q + where x.JointAttribute == "安装口" + select x + ).Count(); + return sum; + } + return 0; + } + + /// + /// 工厂主项预制率(达因) + /// + /// + /// + private string GetShopRateByUnitWork(string unitworkid) + { + string rate = "0%"; + int shopNum = 0; + int fieldNum = 0; + int AllNum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null && x.PipeArea == PipelineService.PipeArea_SHOP select x; + if (q != null && q.Count() > 0) + { + shopNum = (from x in q + where x.JointAttribute == "预制口" + select x + ).Count(); + fieldNum = (from x in q + where x.JointAttribute == "安装口" + select x + ).Count(); + AllNum = shopNum + fieldNum; + + if (AllNum > 0) + { + var a = (decimal)100 * shopNum / AllNum; + rate = Math.Round((decimal)a, 1).ToString() + "%"; + } + + return rate; + } + return "0%"; + } + + + + /// + ///安装口达因数(工厂)《管线划分工厂预制下的所有安装口达因数》 + /// + /// + /// + private decimal GetFieldSumDinByUnitWork(string unitworkid) + { + decimal sum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null && x.PipeArea == PipelineService.PipeArea_SHOP select x; + if (q != null && q.Count() > 0) + { + var FieldSum = (from x in q + where x.JointAttribute == "安装口" + group x by x.UnitWorkId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault()?.SizeSum; + FieldSum = (FieldSum != null) ? FieldSum : 0; + sum = (decimal)FieldSum; + return sum; + } + return 0; + } + + + + + /// + /// 主项总达因(根据主项id获取达因之和) + /// + /// + /// + private decimal GetSumDinByUnitWorkId(string unitworkid) + { + decimal sum = 0; + var db = Funs.DB; + var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint==null select x; + if (q != null && q.Count() > 0) + { + sum = (from x in q + select x.Size + ).Sum() ?? 0; + return sum; + } + return 0; + } + #endregion #region 焊口信息 维护事件 diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.designer.cs index 7ba41839..4020a7bb 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.WeldingManage { - - - public partial class WeldJointList { - +namespace FineUIPro.Web.HJGL.WeldingManage +{ + + + public partial class WeldJointList + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// Toolbar1 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// tvPipeCode 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox tvPipeCode; - + /// /// hdUnitWorkId 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdUnitWorkId; - + /// /// btnTreeFind 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnTreeFind; - + /// /// tvControlItem 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// Panel2 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// panelCenterRegion 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar3 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// txtWeldJointCode 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWeldJointCode; - + /// /// txtMaterialCode 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtMaterialCode; - + /// /// ToolbarFill1 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnNew 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnPrint 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPrint; - + /// /// btnImport 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnImport; - + /// /// btnUpdateImport 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnUpdateImport; - + /// /// btnPDMSImport 控件。 /// @@ -191,7 +193,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPDMSImport; - + /// /// btnMatImport 控件。 /// @@ -200,43 +202,43 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnMatImport; - + /// - /// Toolbar2 控件。 + /// TbPipeline 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Toolbar Toolbar2; - + protected global::FineUIPro.Toolbar TbPipeline; + /// - /// lbSinglePreRate 控件。 + /// lbPipeSinglePreRate 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lbSinglePreRate; - + protected global::FineUIPro.Label lbPipeSinglePreRate; + /// - /// lbShopSize 控件。 + /// lbPipeShopSize 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lbShopSize; - + protected global::FineUIPro.Label lbPipeShopSize; + /// - /// lbFiledSize 控件。 + /// lbPipeFiledSize 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lbFiledSize; - + protected global::FineUIPro.Label lbPipeFiledSize; + /// /// Label2 控件。 /// @@ -245,34 +247,151 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label2; - + /// - /// lbSinglePreRateByWeldJoint 控件。 + /// lbPipeSinglePreRateByWeldJoint 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lbSinglePreRateByWeldJoint; - + protected global::FineUIPro.Label lbPipeSinglePreRateByWeldJoint; + /// - /// lbShopSum 控件。 + /// lbPipeShopSum 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lbShopSum; - + protected global::FineUIPro.Label lbPipeShopSum; + /// - /// lbFiledSum 控件。 + /// lbPipeFiledSum 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lbFiledSum; - + protected global::FineUIPro.Label lbPipeFiledSum; + + /// + /// TbUnitWork 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar TbUnitWork; + + /// + /// lbUWTotalDin 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUWTotalDin; + + /// + /// lbUWPreRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUWPreRate; + + /// + /// lbUWShopSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUWShopSize; + + /// + /// lbUWFiledSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUWFiledSize; + + /// + /// Label6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label6; + + /// + /// TbUnitWork2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar TbUnitWork2; + + /// + /// lbUWSinglePreRateByDin 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUWSinglePreRateByDin; + + /// + /// lbUWShopSizeByLineShop 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUWShopSizeByLineShop; + + /// + /// lbUWFiledSizeByLineShop 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUWFiledSizeByLineShop; + + /// + /// lbUWSinglePreRateByWeldJoint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUWSinglePreRateByWeldJoint; + + /// + /// lbUWShopSum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUWShopSum; + + /// + /// lbUWFiledSum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUWFiledSum; + /// /// Grid1 控件。 /// @@ -281,7 +400,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Label1 控件。 /// @@ -290,7 +409,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label1; - + /// /// panelBottomRegion 控件。 /// @@ -299,7 +418,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelBottomRegion; - + /// /// TabStrip1 控件。 /// @@ -308,7 +427,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TabStrip TabStrip1; - + /// /// TabJoint 控件。 /// @@ -317,7 +436,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab TabJoint; - + /// /// Grid3 控件。 /// @@ -326,7 +445,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid3; - + /// /// TabPipeMat 控件。 /// @@ -335,7 +454,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab TabPipeMat; - + /// /// Grid2 控件。 /// @@ -344,7 +463,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid2; - + /// /// Window1 控件。 /// @@ -353,7 +472,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -362,7 +481,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + /// /// Window3 控件。 /// @@ -371,7 +490,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window3; - + /// /// Window4 控件。 /// @@ -380,7 +499,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window4; - + /// /// Window5 控件。 /// @@ -389,7 +508,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window5; - + /// /// Menu1 控件。 /// @@ -398,7 +517,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuPipeLineEdit 控件。 /// @@ -407,7 +526,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuPipeLineEdit; - + /// /// btnMenuPipeLineDelete 控件。 /// @@ -416,7 +535,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuPipeLineDelete; - + /// /// Menu4 控件。 /// @@ -425,7 +544,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu4; - + /// /// btnMenuPipeLineAllDelete 控件。 /// @@ -434,7 +553,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuPipeLineAllDelete; - + /// /// Menu2 控件。 /// @@ -443,7 +562,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu2; - + /// /// btnDelMat 控件。 /// @@ -452,7 +571,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnDelMat; - + /// /// Menu3 控件。 /// @@ -461,7 +580,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu3; - + /// /// btnMenuEdit 控件。 /// @@ -470,7 +589,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnMenuInsert 控件。 /// @@ -479,7 +598,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuInsert; - + /// /// btnView 控件。 /// @@ -488,7 +607,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnView; - + /// /// btnMenuDelete 控件。 ///