From 00908cc582a1ae2622d68cc2e6c83f6743223226 Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Fri, 7 Apr 2023 15:26:45 +0800 Subject: [PATCH] 2023-04-07-001 --- .vs/SGGL_SeDin/v17/.wsuo | Bin 28672 -> 29184 bytes .../HotProessTrustItemEdit.aspx | 2 +- .../HotProessTrustItemEdit.aspx.cs | 79 +++++++++++++----- .../TestPackage/TestPackageItemEdit.aspx.cs | 2 +- 4 files changed, 61 insertions(+), 22 deletions(-) diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo index d752fa047c333c154764936a95d12eea55dae050..ab63736c7d49bb5ccf8f6c6c2870c405977981cb 100644 GIT binary patch delta 727 zcmb7=zb`{k6vun7*G9F7YD!YHR7z;2y{dhU9~BdWL1Hq9MpYzFpFv0IGmAk_Y=qoM zNK}IR4@hcbGuaGw27{2`yn2;}NO;NTo$vW^Pww|>cSO4QSFfc}bos)|J?oN6R5`>K3J#9@nbCq7o z{`7T!_0oZR^tUm*ly345D-A!qz?{?~9;=Ti%+*M+W1E)NaJ_i49aMd<*lFIiO41_h z$`Q*VPMw>@i_b#2L*mUAxKKx7U+sn~g~6se2-|JPpn0_4>fA5!0R62C36EKr1Fu!* ztVl(%XP9t5jnUm@@JJ delta 925 zcmb7?&ubGw6vyYyu1kKc#2AxSF(z?^1iQ@-k~WE^gjPyD6fO237&N;{Q$kY;X)C>y z#JiVdE((G&2wrXWA5el`J$Uk#gGUb@EJ6?J8=FX|81OM4X5O25Z@+J6TA!iShu3v# zcZUPE7v)cI&f2BVq3Ixm{5)Y!jJc5W$YtcmU|-B0^xeoA#D`o$&LX2FyeE9I7sQx4 z64!8jg%F)YMuJgXPmTCGuBVY0l1ADqUfT@Lr;&pd4LY=L|N8Obupi|WxJ5s9L}<4m zn9>}ld)S-M_%GcdtRwz|I5W`wKeFMEZa)?gy1R}iAg`mto;g=#A;J3Qd@21Ea#8M+ zJDwfbw{|^EP^y^HJ!KtDDvDJI7J$7eDvr7D@AkFY7d7;dwL@{%3bn@Vb>cnNQ}a9l z+)KG8cak?;LYC-F7+VQw)=u&<@F{s*oo>8GRWgB@7Y5lP6HMzc=>$GQ`5fibwBuV) ziFi)Kt3NL9y9FwU7bafP@T)Ls9bS`w_K9_LT>)N@`6A`>lpQSjE&oz2aI=r6#T{u` zGj3)Qm5g34n^iq!&YHS8o2lyA%vz diff --git a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrustItemEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrustItemEdit.aspx.cs index f0aa1a60..722346c7 100644 --- a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrustItemEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrustItemEdit.aspx.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Data; +using System.Drawing; using System.Linq; namespace FineUIPro.Web.HJGL.HotProcessHard @@ -68,7 +69,6 @@ namespace FineUIPro.Web.HJGL.HotProcessHard ViewState["SelectedList"] = value; } } - /// /// 未被选择项列表 /// @@ -83,6 +83,9 @@ namespace FineUIPro.Web.HJGL.HotProcessHard ViewState["NoSelectedList"] = value; } } + public int pageSize = 20; + + public List TreeNodes=new List(); #endregion #region 加载页面 @@ -129,29 +132,62 @@ namespace FineUIPro.Web.HJGL.HotProcessHard { iso = iso.Where(e => e.PipelineCode.Contains(this.txtIsono.Text.Trim())); } - - iso = iso.OrderBy(x => x.PipelineCode); - if (iso.Count() > 0) + var q = (from x in iso + select new + { + x.PipelineId, + x.PipelineCode, + jointcount = (from y in Funs.DB.HJGL_WeldJoint where y.PipelineId == x.PipelineId && y.IsHotProess == true select y).Count(), + Trustcount = (from z in Funs.DB.HJGL_HotProess_TrustItem join m in Funs.DB.HJGL_WeldJoint on z.WeldJointId equals m.WeldJointId where m.PipelineId == x.PipelineId select z).Count(), + }).ToList().Where(x=>x.jointcount>x.Trustcount).OrderBy(x=>x.PipelineCode); + if (q.Count()>0) { - foreach (var q in iso) + foreach (var item in q) { - var jots = from x in Funs.DB.HJGL_WeldJoint - where x.PipelineId == q.PipelineId && x.IsHotProess == true - select x; - var hotItem = from x in Funs.DB.HJGL_HotProess_TrustItem - join y in Funs.DB.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId - where y.PipelineId == q.PipelineId - select x; - if (jots.Count() > hotItem.Count()) - { - TreeNode newNode = new TreeNode(); - newNode.NodeID = q.PipelineId; - newNode.Text = q.PipelineCode; - newNode.EnableClickEvent = true; - rootNode.Nodes.Add(newNode); - } + TreeNode newNode = new TreeNode(); + newNode.NodeID = item.PipelineId; + newNode.Text = item.PipelineCode; + newNode.EnableClickEvent = true; + rootNode.Nodes.Add(newNode); + } + } + // iso = iso.OrderBy(x => x.PipelineCode); + //if (iso.Count() > 0) + //{ + // foreach (var q in iso) + // { + // var jots = (from x in Funs.DB.HJGL_WeldJoint + // where x.PipelineId == q.PipelineId && x.IsHotProess == true + // select x).Count(); + // var hotItem = (from x in Funs.DB.HJGL_HotProess_TrustItem + // join y in Funs.DB.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId + // where y.PipelineId == q.PipelineId + // select x).Count(); + // if (jots> hotItem) + // { + // TreeNode newNode = new TreeNode(); + // newNode.NodeID = q.PipelineId; + // newNode.Text = q.PipelineCode; + // newNode.EnableClickEvent = true; + // TreeNodes.Add(newNode); + // //rootNode.Nodes.Add(newNode); + // } + // } + // if (TreeNodes.Count>0) + // { + // rootNode.CommandName = 1 + "|" + Funs.GetEndPageNumber(TreeNodes.Count, pageSize); + // rootNode.EnableClickEvent = true; + // rootNode.EnableExpandEvent = true; + // // BindNodes(tn1); + // TreeNode newNode = new TreeNode(); + // newNode.Text = "加载管线..."; + // newNode.NodeID = "加载管线..."; + // rootNode.Nodes.Add(newNode); + + // } + //} } #endregion @@ -182,7 +218,10 @@ namespace FineUIPro.Web.HJGL.HotProcessHard SelectedList.Add(id); } this.BindGrid(); + + } + #endregion #region 数据绑定 diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageItemEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageItemEdit.aspx.cs index 176678f8..fb61886b 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageItemEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageItemEdit.aspx.cs @@ -384,7 +384,7 @@ namespace FineUIPro.Web.HJGL.TestPackage Model.PTP_PipelineList newView = new Model.PTP_PipelineList(); newView.PTP_ID = this.PTP_ID; newView.PipelineId = Grid1.DataKeys[i][0].ToString(); - newView.TestMedium = Grid1.DataKeys[i][1].ToString(); + newView.TestMedium = Grid1.DataKeys[i][1]?.ToString(); if (!string.IsNullOrEmpty(values.Value("DesignPress").ToString())) { newView.DesignPress = Funs.GetNewDecimal(values.Value("DesignPress").ToString());