From 19feba17678431bfa430eef0525f04f0618694c8 Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Thu, 14 Sep 2023 15:07:33 +0800 Subject: [PATCH 1/9] 2023-09-14 --- .vs/SGGL_SeDin/v17/.wsuo | Bin 263168 -> 264704 bytes SGGL/BLL/Common/Funs.cs | 2 +- SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo index 14d066e14a2fc405e4ee562c99c34f380ab1b512..24509a06840e0a7db92b957cb451c93de84bb9e8 100644 GIT binary patch delta 2472 zcmcgsU2Kz8816Y=x0UgAD_vQ;ts5OHqk|RNuG>1Y&Tnh^5tenhnV>O|bw47SWsDYw zU{;l&5n`aP`Yql-3NC2$LV8iW&@{o22nIG{KndI!gW=A|ng|)2@B6JSow~r4CwY3# zdA_&rd4HaBBJb-WAL&lCR*Nc?iX-Oc=jU-!F~mwl3Brgl$C>*Ki}FrZ1J!($w);}q z%3F7TVe9c*5)Sf1ED9+e5c6?gj6gT@u(QSrAt9n2LgF<9jb*^p#?2WMGOI+EW*T|8 z)+5Nx3PdS_Lek;<2yMR0i$hZPr*|%nSCJ!S;BPqTeC#)WedR< zZj1X1FR*B4F7m-e?mQDJVyqIv#Q~AZW=%(>RDGs6Kqe5IY2WTgp_%~ zkkZN;4nVjvAXXz)m`nFVsDtp|YCZss}Nu*PSsYQ}8vz2l!^uq%)I)F;+~|7D@vTXl8MjwMO1_zzUPjADx&Vc6;XFA>Q^34aByr@ zR#&l3O|)v8#@P z#QgC3ds0X1#HsslbXDB!x+!(QzMv`A#m@(AqP|l#`os42x{19z&fPry_H%O=z5wg+ zhVp;YX}>D@9V>5x$gsoPv9YIjle59G$+78>)7dmIjb~FYtpfv|hM;4x+1}@I4cgtV zmS%gf#o1(cHhTI!LyrDNXR|Z$m6Zc3Z&YH%u7;uhx9BMrltW2|F`wUCp1nGze-v;{;;^0{VX>e_ z{xikOWycjkOw^Y0+bqua_NwJlE7u#B$P>ng+wIwW`aRCZ#(^Q1y>HObWOp~W^x1>K z7LUEb+1Kb880Z^pakwd;8w@UvdLcQQgyen+BKxI+UDxPsR3*0B_%|%-l9s$-N7wPm zb;9XM3+Eq8OfAp)*lKv`m?p8|s&G9|KJqzc&~4=EMAc>CS2p>Rz~!mUY>PbdyC5Zw z{w%z?eDX)++V1d?#K;Zd1U@BSyW~%=3QdVUcZCV99Gk;s({I9MChwkRugfE|LRI2} nzk~x!j@=O=iO7r)5zeaBpF9+9#h-W8GWq&A`I;5>a%KNF&DVn~ delta 2559 zcmcImZA?>F7{2G+3zTxpXQ>qxfpw)~skMNj1FV7{an4pDhD4Xq@*!W+25t#NjdkwB zOt(Pag{%AJWFhh9PU z4UM%!EUi>e;YbK_pY&5GqaOX%T;yp83MJt-aSDrEqA^h(&J$mTe1Yquo@LKlhWOU`{LK6Fe#lueNK-JKBc-2qp)6_moMg{`G5JssNCAah)o_#9@t)4Uu;%oTCdEf6!i;4-(fO%Nz`$@G0C zS6HUjAxlK#&N2pBE+;svJ_BZ}mzScD{3430R%|X(8=kI{n1;R>qB$qSit#i{I7D{l zcTGR*(6-s2lYJ)dwx0@Ftl@0yeKzXXNEuinuvkp;3=Z-U21K~o@-dsVKVX`;+ZcJm z<#A^f3r8JJ26r4m$%xj&%=(yx9L{-Zh^q0gsxNhjHUSpD3j($AQOZGFybm63I?QSz;5^1^AcoIn5ZHV|L&pnIXfds+^ucou zk7{;8!%Dm#xalKb0a91qn}^WEN_;EYroYaALOS;^owdnBzo%PciP_ z*!i8B$>wMZL|=}wt#EwTCb?o?qZ^AOY^`r}gU4MNcD@pops=L}ddj|>?Wfhz$rg*O zTFl(GO2H$_FSvz%!6$U%wpu~NpCG&>91vVWEB42$Tl(rm zoP-m7wK>gSP)d-d_uo#s_Q^KJp5VF*EO^3K}8W zYtQ{#t%Ms4Uhl2@q?BJ`+Sa3sB`GVB{Z?TBV=RO$|5{3YxYK`zy=CJQHu0Q#^?P2R zx{J9KDf~*j%T(uCrj2NS6n|$EQ)24GHzEi7HGjnalQ_cEo9~LjNbr^z%m|$_tJm){ zIpTOAUS}}*i$ncjN?aG|yeFQ~LG-Ftz3`nl7zsWWgCgAga4$?dk2}H}dmcQI950aI}^xb@Rxr2cnsMBuRe)xyyM% diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs index 74b20799..0b7c7911 100644 --- a/SGGL/BLL/Common/Funs.cs +++ b/SGGL/BLL/Common/Funs.cs @@ -1409,7 +1409,7 @@ namespace BLL var request = new RestRequest(Method.POST); request.AddHeader("token", Token); request.AddHeader("ClientId", SysConstSetService.ClientId); - request.AddHeader("OperationCode", Baseurl.Substring(Baseurl.LastIndexOf("/", StringComparison.Ordinal))); + request.AddHeader("OperationCode", Baseurl.Substring(Baseurl.LastIndexOf("/", StringComparison.Ordinal)+1)); if (!string.IsNullOrEmpty(JsonBody)) { request.AddJsonBody(JsonBody); diff --git a/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj b/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj index 8ac391f6..c4c16785 100644 --- a/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj +++ b/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj @@ -3322,6 +3322,7 @@ uploader.aspx + ASPXCodeBehind uploader.aspx From 508d10c3e5541b591104f559a4be46fcda8b28c4 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Fri, 15 Sep 2023 10:27:20 +0800 Subject: [PATCH 2/9] =?UTF-8?q?20230915wbs=E6=95=B0=E6=8D=AE=E5=88=86?= =?UTF-8?q?=E6=9E=90=E9=A1=B5=E9=9D=A2=E6=A1=86=E6=9E=B6=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/BLL.csproj | 1 + SGGL/BLL/DigData/ProjectWBSAnalysisService.cs | 123 +++++++++++++ SGGL/BLL/DigData/WBSAnalysisService.cs | 50 ++--- .../Controls/ProjectWBSControl.ascx.cs | 10 +- .../FineUIPro.Web/Controls/WBSControl.ascx.cs | 45 +---- .../DigData/ProjectWBSAnalysis.aspx | 2 +- .../DigData/ProjectWBSAnalysis.aspx.cs | 31 +++- .../ProjectWBSAnalysis.aspx.designer.cs | 2 +- .../FineUIPro.Web/DigData/WBSAnalysis.aspx.cs | 6 +- SGGL/FineUIPro.Web/ErrLog.txt | 171 ------------------ SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +- 11 files changed, 191 insertions(+), 252 deletions(-) create mode 100644 SGGL/BLL/DigData/ProjectWBSAnalysisService.cs diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index b1cfa731..4c988148 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -341,6 +341,7 @@ + diff --git a/SGGL/BLL/DigData/ProjectWBSAnalysisService.cs b/SGGL/BLL/DigData/ProjectWBSAnalysisService.cs new file mode 100644 index 00000000..907dcbf9 --- /dev/null +++ b/SGGL/BLL/DigData/ProjectWBSAnalysisService.cs @@ -0,0 +1,123 @@ +using FineUIPro; +using NPOI.SS.Formula.Functions; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Web.Util; + +namespace BLL +{ + /// + /// WBS分析 + /// + public static class ProjectWBSAnalysisService + { + public static Model.SGGLDB db = Funs.DB; + + #region WBS分析 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + + /// + /// 定义变量 + /// + private static IQueryable getDataLists = from x in db.WBS_WorkPackage + where x.IsApprove == true + select x; + + /// + /// 合同管理数据仓库 + /// + /// + /// + /// + /// + /// + public static IEnumerable getDataDWList(string projectId, string workPackageId, Grid Grid1) + { + var getDataList = getDataLists.Where(x => x.ProjectId == projectId); + if (string.IsNullOrEmpty(workPackageId)) + { + List listWork = new List(); + Model.WBS_WorkPackage work1 = new Model.WBS_WorkPackage + { + WorkPackageCode = "1", + PackageContent = "建筑工程", + }; + listWork.Add(work1); + Model.WBS_WorkPackage work2 = new Model.WBS_WorkPackage + { + WorkPackageCode = "2", + PackageContent = "安装工程", + }; + listWork.Add(work2); + getDataList = listWork.AsQueryable(); + } + else + { + if (workPackageId != "1" && workPackageId != "2") + { + var getUnitWork = db.WBS_UnitWork.FirstOrDefault(x => x.ProjectId == projectId && x.UnitWorkId == workPackageId); + if (getUnitWork != null) + { + getDataList = getDataList.Where(x => x.UnitWorkId == workPackageId && x.SuperWorkPack == null); + } + else + { + getDataList = getDataList.Where(x => x.SuperWorkPack == workPackageId); + if (getDataList.Count() == 0) + { + getDataList = getDataLists.Where(x => x.WorkPackageId == workPackageId); + } + } + } + else + { + var getUnitWork = from x in db.WBS_UnitWork + where x.ProjectId == projectId && x.SuperUnitWork == null && x.ProjectType == workPackageId + select x; + List listWork = new List(); + foreach (var item in getUnitWork) + { + Model.WBS_WorkPackage workItem = new Model.WBS_WorkPackage + { + WorkPackageCode = item.UnitWorkId, + PackageContent = item.UnitWorkCode + "-" + item.UnitWorkName, + }; + listWork.Add(workItem); + } + + getDataList = listWork.AsQueryable(); + } + } + + count = getDataList.Count(); + if (count == 0) + { + return null; + } + getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in getDataList + select new + { + x.WorkPackageCode, + x.PackageContent, + Count1 = 0, + Count2 = 0, + Count3 = 0, + Count4 = 0, + Count5 = 0, + Count6 = 0, + }; + } + #endregion + + } +} \ No newline at end of file diff --git a/SGGL/BLL/DigData/WBSAnalysisService.cs b/SGGL/BLL/DigData/WBSAnalysisService.cs index 69e53550..6ada1642 100644 --- a/SGGL/BLL/DigData/WBSAnalysisService.cs +++ b/SGGL/BLL/DigData/WBSAnalysisService.cs @@ -38,49 +38,39 @@ namespace BLL /// /// /// - public static IEnumerable getDataDWList(string level,string workPackageId, Grid Grid1) + public static IEnumerable getDataDWList(string workPackageId, Grid Grid1) { var getDataList = getDataLists; - if (level == "0") + if (string.IsNullOrEmpty(workPackageId) ) { List listWork = new List(); - if (string.IsNullOrEmpty(workPackageId) || workPackageId == "1") + Model.WBS_WorkPackageInit work1 = new Model.WBS_WorkPackageInit { - Model.WBS_WorkPackageInit work1 = new Model.WBS_WorkPackageInit - { - WorkPackageCode = "1", - PackageContent = "建筑工程", - }; - listWork.Add(work1); - } - if (string.IsNullOrEmpty(workPackageId) || workPackageId == "2") + WorkPackageCode = "1", + PackageContent = "建筑工程", + }; + listWork.Add(work1); + Model.WBS_WorkPackageInit work2 = new Model.WBS_WorkPackageInit { - Model.WBS_WorkPackageInit work2 = new Model.WBS_WorkPackageInit - { - WorkPackageCode = "2", - PackageContent = "安装工程", - }; - listWork.Add(work2); - } + WorkPackageCode = "2", + PackageContent = "安装工程", + }; + listWork.Add(work2); getDataList = listWork.AsQueryable(); } else { - if (level == "1") + if (workPackageId != "1" && workPackageId != "2") { - getDataList = getDataList.Where(x => x.SuperWorkPack == null); + getDataList = getDataList.Where(x => x.SuperWorkPack == workPackageId); + if (getDataList.Count() == 0) + { + getDataList = getDataLists.Where(x => x.WorkPackageCode == workPackageId); + } } - - if (!string.IsNullOrEmpty(workPackageId)) + else { - if (workPackageId != "1" && workPackageId != "2") - { - getDataList = getDataList.Where(x => x.SuperWorkPack == workPackageId); - } - else - { - getDataList = getDataList.Where(x => x.ProjectType == workPackageId); - } + getDataList = getDataList.Where(x => x.ProjectType == workPackageId && x.SuperWorkPack == null); } } diff --git a/SGGL/FineUIPro.Web/Controls/ProjectWBSControl.ascx.cs b/SGGL/FineUIPro.Web/Controls/ProjectWBSControl.ascx.cs index 811c7fa3..a32cb52e 100644 --- a/SGGL/FineUIPro.Web/Controls/ProjectWBSControl.ascx.cs +++ b/SGGL/FineUIPro.Web/Controls/ProjectWBSControl.ascx.cs @@ -23,6 +23,13 @@ namespace FineUIPro.Web.Controls } } + public bool IsShowLevel + { + get; + set; + } = true; + + /// /// 项目ID /// @@ -48,7 +55,8 @@ namespace FineUIPro.Web.Controls protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { + { + this.Toolbar1.Hidden = !IsShowLevel; ////加载树 SetSubUnitProjectTree(this.trWBS); } diff --git a/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.cs b/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.cs index f9f42da1..425edc6b 100644 --- a/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.cs +++ b/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.cs @@ -19,19 +19,7 @@ namespace FineUIPro.Web.Controls } } - public string Level - { - get - { - return (string)ViewState["Level"]; - } - set - { - ViewState["Level"] = value; - } - } - - public bool IsShowAll + public bool IsShowLevel { get; set; @@ -48,12 +36,7 @@ namespace FineUIPro.Web.Controls { if (!IsPostBack) { - if (!IsShowAll) - { - this.ckLevel.Items.Remove(this.ckLevel.Items[0]); - this.ckLevel.SelectedIndex = 0; - } - + this.Toolbar1.Hidden = !IsShowLevel; ////加载树 SetSubUnitProjectTree(this.trWBS); @@ -68,7 +51,7 @@ namespace FineUIPro.Web.Controls /// protected void trWBS_NodeCommand(object sender, TreeCommandEventArgs e) { - this.Level = this.ckLevel.SelectedValue; + //this.Level = this.ckLevel.SelectedValue; if (this.trWBS != null && !string.IsNullOrEmpty(this.trWBS.SelectedNodeID)) { this.WorkPackageCode = this.trWBS.SelectedNodeID; @@ -79,26 +62,18 @@ namespace FineUIPro.Web.Controls } } - protected void ckLevel_SelectedIndexChanged(object sender, EventArgs e) - { - this.Level = this.ckLevel.SelectedValue; - if (this.trWBS != null && !string.IsNullOrEmpty(this.trWBS.SelectedNodeID)) - { - this.WorkPackageCode = this.trWBS.SelectedNodeID; - } - ////加载树 - SetSubUnitProjectTree(this.trWBS); - if (this.change != null) - { - this.change(this, e); - } - } - public delegate void userEvent(object sender, EventArgs arg); public event userEvent change; + protected void ckLevel_SelectedIndexChanged(object sender, EventArgs e) + { + ////加载树 + SetSubUnitProjectTree(this.trWBS); + } + + #region 绑定分公司 单位-项目树 /// /// 绑定分公司 单位-项目树 diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx index 2da39ca2..1230a48d 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx @@ -1,6 +1,6 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectWBSAnalysis.aspx.cs" Inherits="FineUIPro.Web.DigData.ProjectWBSAnalysis" %> -<%@ Register Src="~/Controls/WBSControl.ascx" TagName="WBSControl" TagPrefix="uc1" %> +<%@ Register Src="~/Controls/ProjectWBSControl.ascx" TagName="WBSControl" TagPrefix="uc1" %> diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.cs b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.cs index a9015453..a728c737 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.cs @@ -8,7 +8,22 @@ using System.Linq; namespace FineUIPro.Web.DigData { public partial class ProjectWBSAnalysis : PageBase - { + { + /// + /// 项目ID + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + /// /// 加载页面 /// @@ -17,17 +32,17 @@ namespace FineUIPro.Web.DigData protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { - this.ucTree.IsShowAll = false; - this.ucTree.Level= this.hdLevel.Text = "0"; + { + this.ProjectId = this.CurrUser.LoginProjectId; + this.ucTree.ProjectId = this.ProjectId; + this.ucTree.IsShowLevel = false; BindGrid(); } } protected void changeTree(object sender, EventArgs e) { - this.hdWorkPackageCode.Text = this.ucTree.WorkPackageCode; - this.hdLevel.Text = this.ucTree.Level; + this.hdWorkPackageCode.Text = this.ucTree.WorkPackageId; BindGrid(); } @@ -37,8 +52,8 @@ namespace FineUIPro.Web.DigData /// private void BindGrid() { - var getData = WBSAnalysisService.getDataDWList(this.hdLevel.Text,this.hdWorkPackageCode.Text, this.Grid1); - Grid1.RecordCount = WBSAnalysisService.count; + var getData = ProjectWBSAnalysisService.getDataDWList(this.ProjectId, this.hdWorkPackageCode.Text, this.Grid1); + Grid1.RecordCount = ProjectWBSAnalysisService.count; Grid1.DataSource = getData; Grid1.DataBind(); } diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.designer.cs index c308ef13..86c4d0d7 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.designer.cs @@ -66,7 +66,7 @@ namespace FineUIPro.Web.DigData /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Web.Controls.WBSControl ucTree; + protected global::FineUIPro.Web.Controls.ProjectWBSControl ucTree; /// /// hdWorkPackageCode 控件。 diff --git a/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.cs b/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.cs index d2a493eb..48e9e431 100644 --- a/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.cs @@ -18,8 +18,7 @@ namespace FineUIPro.Web.DigData { if (!IsPostBack) { - this.ucTree.IsShowAll = false; - this.ucTree.Level= this.hdLevel.Text = "0"; + this.ucTree.IsShowLevel = false; BindGrid(); } } @@ -27,7 +26,6 @@ namespace FineUIPro.Web.DigData protected void changeTree(object sender, EventArgs e) { this.hdWorkPackageCode.Text = this.ucTree.WorkPackageCode; - this.hdLevel.Text = this.ucTree.Level; BindGrid(); } @@ -37,7 +35,7 @@ namespace FineUIPro.Web.DigData /// private void BindGrid() { - var getData = WBSAnalysisService.getDataDWList(this.hdLevel.Text,this.hdWorkPackageCode.Text, this.Grid1); + var getData = WBSAnalysisService.getDataDWList(this.hdWorkPackageCode.Text, this.Grid1); Grid1.RecordCount = WBSAnalysisService.count; Grid1.DataSource = getData; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 18eb3fcb..e69de29b 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1,171 +0,0 @@ - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 (TreeNode ) - 在 FineUIPro.TreeCommandEventArgs..ctor(TreeNode node, String commandName, String commandArgument) - 在 (TreeNode , String , String ) - 在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:09/07/2023 21:53:15 -出错文件:http://localhost:6422/DigData/WBSAnalysis.aspx -IP地址:::1 -操作人员:JT - -出错时间:09/07/2023 21:53:15 - - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 FineUIPro.Web.CQMS.Check.EditCheckMonth.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\CQMS\Check\EditCheckMonth.aspx.cs:行号 39 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:09/11/2023 11:02:10 -出错文件:http://localhost:6422/CQMS/Check/EditCheckMonth.aspx?months=2023-09-01 -IP地址:::1 - -出错时间:09/11/2023 11:02:10 - - -错误信息开始=====> -错误类型:HttpRequestValidationException -错误信息:从客户端(Panel1$Grid1$ctl04$txtUnit="m³")中检测到有潜在危险的 Request.Form 值。 -错误堆栈: - 在 System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) - 在 System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection) - 在 System.Web.HttpRequest.get_Form() - 在 System.Web.HttpRequest.get_HasForm() - 在 System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) - 在 System.Web.UI.Page.DeterminePostBackMode() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) - 在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) - 在 System.Web.UI.Page.ProcessRequest() - 在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) - 在 System.Web.UI.Page.ProcessRequest(HttpContext context) - 在 ASP.jdgl_check_planset_aspx.ProcessRequest(HttpContext context) - 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() - 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) - 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -出错时间:09/12/2023 09:47:37 -出错文件:http://localhost:6422/JDGL/Check/PlanSet.aspx -IP地址:::1 -操作人员:JT - -出错时间:09/12/2023 09:47:37 - - -错误信息开始=====> -错误类型:HttpRequestValidationException -错误信息:从客户端(Panel1$Grid1$ctl04$txtUnit="m³")中检测到有潜在危险的 Request.Form 值。 -错误堆栈: - 在 System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) - 在 System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection) - 在 System.Web.HttpRequest.get_Form() - 在 System.Web.HttpRequest.get_HasForm() - 在 System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) - 在 System.Web.UI.Page.DeterminePostBackMode() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) - 在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) - 在 System.Web.UI.Page.ProcessRequest() - 在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) - 在 System.Web.UI.Page.ProcessRequest(HttpContext context) - 在 ASP.jdgl_check_planset_aspx.ProcessRequest(HttpContext context) - 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() - 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) - 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -出错时间:09/12/2023 09:47:40 -出错文件:http://localhost:6422/JDGL/Check/PlanSet.aspx -IP地址:::1 -操作人员:JT - -出错时间:09/12/2023 09:47:40 - - -错误信息开始=====> -错误类型:HttpRequestValidationException -错误信息:从客户端(Panel1$Grid1$ctl04$txtUnit="m³")中检测到有潜在危险的 Request.Form 值。 -错误堆栈: - 在 System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) - 在 System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection) - 在 System.Web.HttpRequest.get_Form() - 在 System.Web.HttpRequest.get_HasForm() - 在 System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) - 在 System.Web.UI.Page.DeterminePostBackMode() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) - 在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) - 在 System.Web.UI.Page.ProcessRequest() - 在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) - 在 System.Web.UI.Page.ProcessRequest(HttpContext context) - 在 ASP.jdgl_check_planset_aspx.ProcessRequest(HttpContext context) - 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() - 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) - 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -出错时间:09/12/2023 09:47:42 -出错文件:http://localhost:6422/JDGL/Check/PlanSet.aspx -IP地址:::1 -操作人员:JT - -出错时间:09/12/2023 09:47:42 - - -错误信息开始=====> -错误类型:HttpRequestValidationException -错误信息:从客户端(Panel1$Grid1$ctl04$txtUnit="m³")中检测到有潜在危险的 Request.Form 值。 -错误堆栈: - 在 System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) - 在 System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection) - 在 System.Web.HttpRequest.get_Form() - 在 System.Web.HttpRequest.get_HasForm() - 在 System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) - 在 System.Web.UI.Page.DeterminePostBackMode() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) - 在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) - 在 System.Web.UI.Page.ProcessRequest() - 在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) - 在 System.Web.UI.Page.ProcessRequest(HttpContext context) - 在 ASP.jdgl_check_planset_aspx.ProcessRequest(HttpContext context) - 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() - 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) - 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -出错时间:09/12/2023 09:48:38 -出错文件:http://localhost:6422/JDGL/Check/PlanSet.aspx -IP地址:::1 -操作人员:JT - -出错时间:09/12/2023 09:48:38 - - -错误信息开始=====> -错误类型:HttpRequestValidationException -错误信息:从客户端(Panel1$Grid1$ctl04$txtUnit="m³")中检测到有潜在危险的 Request.Form 值。 -错误堆栈: - 在 System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) - 在 System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection) - 在 System.Web.HttpRequest.get_Form() - 在 System.Web.HttpRequest.get_HasForm() - 在 System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) - 在 System.Web.UI.Page.DeterminePostBackMode() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) - 在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) - 在 System.Web.UI.Page.ProcessRequest() - 在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) - 在 System.Web.UI.Page.ProcessRequest(HttpContext context) - 在 ASP.jdgl_check_planset_aspx.ProcessRequest(HttpContext context) - 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() - 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) - 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -出错时间:09/12/2023 09:48:39 -出错文件:http://localhost:6422/JDGL/Check/PlanSet.aspx -IP地址:::1 -操作人员:JT - -出错时间:09/12/2023 09:48:39 - diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 84ad8832..4cc3fbb9 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -14225,7 +14225,7 @@ True 0 / - http://localhost:6422/ + http://localhost:9243/ False False From 5bb940a5ccbf2463889a2f9bbb813f041339a2c8 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Fri, 15 Sep 2023 11:27:02 +0800 Subject: [PATCH 3/9] =?UTF-8?q?20230915=E6=96=B0=E5=A2=9E=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=BD=93=E5=89=8D=E5=9C=A8=E5=9C=BA=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-09-15.sql | 3 + .../1-3安全管理(Menu_HSSE).sql | 5 +- .../SitePerson/SitePerson_PersonService.cs | 99 ++++++++++- SGGL/BLL/ProjectData/TeamGroupService.cs | 15 ++ SGGL/FineUIPro.Web/ErrLog.txt | 32 ++++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 + .../HSSE/SitePerson/PersonUnitList.aspx.cs | 2 +- .../SitePerson/SitePersonNowStatistic.aspx | 90 ++++++++++ .../SitePerson/SitePersonNowStatistic.aspx.cs | 116 +++++++++++++ .../SitePersonNowStatistic.aspx.designer.cs | 161 ++++++++++++++++++ SGGL/FineUIPro.Web/common/Menu_DigData.xml | 4 +- SGGL/FineUIPro.Web/common/Menu_HSSE.xml | 1 + SGGL/FineUIPro.Web/common/Menu_JDGL.xml | 2 +- SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 25 ++- 14 files changed, 553 insertions(+), 10 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-09-15.sql create mode 100644 SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_V2023-09-15.sql b/DataBase/版本日志/SGGLDB_V2023-09-15.sql new file mode 100644 index 00000000..11bc14c7 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-09-15.sql @@ -0,0 +1,3 @@ +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('70282169-C09D-4D46-BAA3-9457535EAEA2','ǰֳԱͳ','HSSE/SitePerson/SitePersonNowStatistic.aspx',62,'EE260447-028F-46AF-8864-9A5DC9DAA5BD','Menu_HSSE',0,1,1) +GO \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql b/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql index 6a91ac74..88d645b9 100644 --- a/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql +++ b/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql @@ -340,7 +340,10 @@ GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('7D36E853-CC79-48B9-9E7F-E34797B4E87E','ֳԱͳ','HSSE/SitePerson/PersonStatistic.aspx',60,'EE260447-028F-46AF-8864-9A5DC9DAA5BD','Menu_HSSE',0,1,1) GO - + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('70282169-C09D-4D46-BAA3-9457535EAEA2','ǰֳԱͳ','HSSE/SitePerson/SitePersonNowStatistic.aspx',62,'EE260447-028F-46AF-8864-9A5DC9DAA5BD','Menu_HSSE',0,1,1) + GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('F291CAE4-2E53-48FC-BF44-382D42EA4DEC','ֳλ˹ʱͳ','HSSE/SitePerson/WorkPostStatistic.aspx',65,'EE260447-028F-46AF-8864-9A5DC9DAA5BD','Menu_HSSE',0,1,1) GO diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs index 09cd0116..7c164beb 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs @@ -137,7 +137,7 @@ namespace BLL /// 页码 /// 每页数量 /// - public static IEnumerable getInPsersonListData(string projectId, string unitId, string personName, string identityCard, Grid Grid1) + public static IEnumerable getInPersonListData(string projectId, string unitId, string personName, string identityCard, Grid Grid1) { IQueryable getInPersonList = getInPersonLists.Where(x => x.ProjectId == projectId); if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null) @@ -183,6 +183,103 @@ namespace BLL } #endregion + #region 现场当前人员列表 + /// + /// 记录数 + /// + public static int nowCount + { + get; + set; + } + + /// + /// 定义变量 + /// + private static IQueryable getNowPersonLists = from x in db.SitePerson_PersonInOutNow + select x; + + /// + /// 获取分页列表 + /// + /// 页码 + /// 每页数量 + /// + public static IEnumerable getNowPersonListData(string projectId, string unitId, string workPostId, string personName, string identityCard, DateTime dateValue, Grid Grid1) + { + IQueryable getDayAll = getNowPersonLists.Where(x=>x.ProjectId == projectId + && x.ChangeTime.Value.Year == dateValue.Year && x.ChangeTime.Value.Month == dateValue.Month + && x.ChangeTime.Value.Day == dateValue.Day); + if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null) + { + getDayAll = getDayAll.Where(x => x.UnitId == unitId); + } + if (!string.IsNullOrEmpty(personName)) + { + getDayAll = getDayAll.Where(x => x.PersonName.Contains(personName)); + } + if (!string.IsNullOrEmpty(identityCard)) + { + getDayAll = getDayAll.Where(x => x.IdentityCard.Contains(identityCard)); + } + if (!string.IsNullOrEmpty(workPostId) && workPostId != Const._Null) + { + getDayAll = getDayAll.Where(x => x.WorkPostId == workPostId); + } + + if (getDayAll.Count() > 0) + { + var getInMaxs = from x in getDayAll + group x by x.PersonId into g + select new + { + ProjectId = g.First().ProjectId, + PersonId = g.First().PersonId, + personName = g.First().PersonName, + identityCard = g.First().IdentityCard, + UnitId = g.First().UnitId, + UnitName = g.First().UnitName, + WorkPostName = g.First().WorkPostName, + ChangeTime = g.Max(x => x.ChangeTime), + IsIn = g.First().IsIn, + PostType = g.First().PostType, + WorkPostId = g.First().WorkPostId, + }; + + if (getInMaxs.Count() > 0) + { + getInMaxs = getInMaxs.Where(x => x.IsIn == true); + } + inCount = getInMaxs.Count(); + if (inCount == 0) + { + return null; + } + + getInMaxs = SortConditionHelper.SortingAndPaging(getInMaxs, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in getInMaxs + select new + { + x.PersonId, + x.personName, + x.identityCard, + CardNo =db.SitePerson_Person.First(p=>p.PersonId == x.PersonId && p.ProjectId ==x.ProjectId).CardNo, + x.UnitName, + x.UnitId, + x.WorkPostId, + x.WorkPostName, + TeamGroupName=TeamGroupService.GetTeamGroupNameByPersonId(x.ProjectId,x.PersonId), + x.ChangeTime, + }; + } + else + { + inCount =0; + return null; + } + } + #endregion + #region 获取项目人员 -- 按条件查询 #region 根据现场人员主键获取现场人员信息 /// diff --git a/SGGL/BLL/ProjectData/TeamGroupService.cs b/SGGL/BLL/ProjectData/TeamGroupService.cs index 6eaa579c..f4ef60c2 100644 --- a/SGGL/BLL/ProjectData/TeamGroupService.cs +++ b/SGGL/BLL/ProjectData/TeamGroupService.cs @@ -167,5 +167,20 @@ namespace BLL } return name; } + + public static string GetTeamGroupNameByPersonId(string projectId, string personId) + { + string name = string.Empty; + var getSitePerson = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.ProjectId == projectId && x.PersonId == personId); + if (getSitePerson != null) + { + var TeamGroup = Funs.DB.ProjectData_TeamGroup.FirstOrDefault(x => x.TeamGroupId == getSitePerson.TeamGroupId); + if (TeamGroup != null) + { + name = TeamGroup.TeamGroupName; + } + } + return name; + } } } diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index e69de29b..b6c9349c 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -0,0 +1,32 @@ + +错误信息开始=====> +错误类型:NullReferenceException +错误信息:未将对象引用设置到对象的实例。 +错误堆栈: + 在 (Object ) + 在 FineUIPro.GridRow.kxpUEMXYxcbykrOznAFBzkoxlAnb() + 在 (GridRow ) + 在 FineUIPro.GridRow.InitTemplateContainers() + 在 (GridRow ) + 在 FineUIPro.Grid.BkpgFeAELTFlAvoTrOBrConfcLJbA(Int32 , Object ) + 在 (Grid , Int32 , Object ) + 在 FineUIPro.Grid.CRTRkdQFrrBRFQuCddjZPswlTORP(IEnumerable , Boolean ) + 在 (Grid , IEnumerable , Boolean ) + 在 FineUIPro.Grid.DataBind(Boolean keepCurrentData) + 在 (Grid , Boolean ) + 在 FineUIPro.Grid.DataBind() + 在 FineUIPro.Web.HSSE.SitePerson.SitePersonNowStatistic.BindGrid() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\HSSE\SitePerson\SitePersonNowStatistic.aspx.cs:行号 58 + 在 FineUIPro.Web.HSSE.SitePerson.SitePersonNowStatistic.btnSearch_Click(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\HSSE\SitePerson\SitePersonNowStatistic.aspx.cs:行号 65 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:09/15/2023 11:18:13 +出错文件:http://localhost:9243/HSSE/SitePerson/SitePersonNowStatistic.aspx +IP地址:::1 +操作人员:JT + +出错时间:09/15/2023 11:18:13 + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 4cc3fbb9..a5e8716e 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1058,6 +1058,7 @@ + @@ -11319,6 +11320,13 @@ PersonOut.aspx + + SitePersonNowStatistic.aspx + ASPXCodeBehind + + + SitePersonNowStatistic.aspx + WorkPostStatistic.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonUnitList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonUnitList.aspx.cs index 7f972f89..b112e73a 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonUnitList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonUnitList.aspx.cs @@ -60,7 +60,7 @@ namespace FineUIPro.Web.HSSE.SitePerson /// private void BindGrid() { - var getData = SitePerson_PersonService.getInPsersonListData(this.ProjectId, this.drpUnit.SelectedValue, this.txtPersonName.Text.Trim(), this.txtIdentityCard.Text.Trim(), Grid1); + var getData = SitePerson_PersonService.getInPersonListData(this.ProjectId, this.drpUnit.SelectedValue, this.txtPersonName.Text.Trim(), this.txtIdentityCard.Text.Trim(), Grid1); Grid1.RecordCount = SitePerson_PersonService.inCount; Grid1.DataSource = getData; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx new file mode 100644 index 00000000..8748b642 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx @@ -0,0 +1,90 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SitePersonNowStatistic.aspx.cs" Inherits="FineUIPro.Web.HSSE.SitePerson.SitePersonNowStatistic" %> + + + + + 当前人员统计 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs new file mode 100644 index 00000000..cccd2a25 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs @@ -0,0 +1,116 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; + +namespace FineUIPro.Web.HSSE.SitePerson +{ + public partial class SitePersonNowStatistic : PageBase + { + /// + /// 项目id + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + this.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId) + { + this.ProjectId = Request.Params["projectId"]; + } + UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true); + this.drpUnit.SelectedValue = string.IsNullOrEmpty(this.CurrUser.UnitId) ? Const.UnitId_SEDIN : this.CurrUser.UnitId; + if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) + { + this.drpUnit.Enabled = false; + } + WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true); + this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + // 绑定表格 + this.BindGrid(); + } + } + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + var getData = SitePerson_PersonService.getNowPersonListData(this.ProjectId, this.drpUnit.SelectedValue, this.drpWorkPost.SelectedValue + , this.txtPersonName.Text.Trim(),this.txtIdcard.Text.Trim(),Funs.GetNewDateTimeOrNow(this.txtStartDate.Text), Grid1); + Grid1.RecordCount = SitePerson_PersonService.nowCount; + Grid1.DataSource = getData; + Grid1.DataBind(); + } + #endregion + + protected void btnSearch_Click(object sender, EventArgs e) + { + // 绑定表格 + this.BindGrid(); + } + + #region 分页选择下拉改变事件 + /// + /// 分页选择下拉改变事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + + #region 页索引改变事件 + /// + /// 页索引改变事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("现场岗位人工时统计" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.designer.cs new file mode 100644 index 00000000..0dcfb8f4 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.SitePerson +{ + + + public partial class SitePersonNowStatistic + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpWorkPost 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpWorkPost; + + /// + /// txtPersonName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPersonName; + + /// + /// txtIdcard 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIdcard; + + /// + /// txtStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartDate; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/common/Menu_DigData.xml b/SGGL/FineUIPro.Web/common/Menu_DigData.xml index b532a9bb..b3d0385c 100644 --- a/SGGL/FineUIPro.Web/common/Menu_DigData.xml +++ b/SGGL/FineUIPro.Web/common/Menu_DigData.xml @@ -3,7 +3,7 @@ - + @@ -12,7 +12,7 @@ - + diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index 5ce095a2..2edfbe00 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -31,6 +31,7 @@ + diff --git a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml index b241c0a1..8d4aa005 100644 --- a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml @@ -1,6 +1,6 @@  - + diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index 8cc2c0a1..342d91b8 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -1,8 +1,12 @@  - - + + + + + + @@ -15,11 +19,19 @@ - + - + + + + + + + + + @@ -78,4 +90,9 @@ + + + + + \ No newline at end of file From 9dc9075142d71e767ea5bf98436a04a789453194 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Mon, 18 Sep 2023 09:27:45 +0800 Subject: [PATCH 4/9] =?UTF-8?q?20230918=E8=B5=84=E8=B4=A8=E5=88=97?= =?UTF-8?q?=E8=A1=A8=20=E5=8A=A0=E7=8E=B0=E5=9C=BA=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/DropListService.cs | 49 ++++- SGGL/FineUIPro.Web/ErrLog.txt | 32 --- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +- .../QualityAudit/EquipmentPersonQuality.aspx | 203 +++++++++--------- .../EquipmentPersonQuality.aspx.cs | 7 + .../EquipmentPersonQuality.aspx.designer.cs | 66 ++++-- .../HSSE/QualityAudit/PersonQuality.aspx | 4 +- .../HSSE/QualityAudit/PersonQuality.aspx.cs | 18 +- .../PersonQuality.aspx.designer.cs | 4 +- .../HSSE/QualityAudit/SafePersonQuality.aspx | 202 ++++++++--------- .../QualityAudit/SafePersonQuality.aspx.cs | 7 + .../SafePersonQuality.aspx.designer.cs | 66 ++++-- 12 files changed, 360 insertions(+), 300 deletions(-) diff --git a/SGGL/BLL/DropListService.cs b/SGGL/BLL/DropListService.cs index dfd1a25d..7874419e 100644 --- a/SGGL/BLL/DropListService.cs +++ b/SGGL/BLL/DropListService.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using BLL; +using System.Collections.Generic; namespace BLL { @@ -40,6 +41,10 @@ namespace BLL { dropName.DataSource = HSSE_getCertificateType(); } + else if (groupId == Group_ProjectPersonStates) + { + dropName.DataSource = HSSE_getProjectPersonStates(); + } dropName.DataBind(); if (isShowPlease) { @@ -74,7 +79,10 @@ namespace BLL { rblName.DataSource = HSSE_getContractType(); } - + else if (groupId == Group_ProjectPersonStates) + { + rblName.DataSource = HSSE_getProjectPersonStates(); + } rblName.DataBind(); if (!string.IsNullOrEmpty(selectValue)) { @@ -105,6 +113,10 @@ namespace BLL /// public const string Group_PersonType = "PersonType"; /// + /// 项目人员状态 组id + /// + public const string Group_ProjectPersonStates = "ProjectPersonStates"; + /// /// 合同类型 组id /// public const string Group_ContractType = "ContractType"; @@ -330,6 +342,39 @@ namespace BLL } #endregion + #region 人员类型 + /// + /// 人员类型 名称 + /// + /// + /// + public static string HSSE_getProjectPersonStates(string value) + { + string name = string.Empty; + var getType = HSSE_getProjectPersonStates().FirstOrDefault(x => x.Value == value); + if (getType != null) + { + name = getType.Text; + } + return name; + } + + + /// + /// 人员类型 + /// + /// + public static ListItem[] HSSE_getProjectPersonStates() + { + ListItem[] list = new ListItem[4]; + list[0] = new ListItem("在审", Const.ProjectPersonStates_0); + list[1] = new ListItem("在岗", Const.ProjectPersonStates_1); + list[2] = new ListItem("离岗", Const.ProjectPersonStates_2); + list[3] = new ListItem("打回", Const.ProjectPersonStates_R); + return list; + } + #endregion + #region 合同类型 /// /// 人员类型 名称 diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index b6c9349c..e69de29b 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1,32 +0,0 @@ - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 (Object ) - 在 FineUIPro.GridRow.kxpUEMXYxcbykrOznAFBzkoxlAnb() - 在 (GridRow ) - 在 FineUIPro.GridRow.InitTemplateContainers() - 在 (GridRow ) - 在 FineUIPro.Grid.BkpgFeAELTFlAvoTrOBrConfcLJbA(Int32 , Object ) - 在 (Grid , Int32 , Object ) - 在 FineUIPro.Grid.CRTRkdQFrrBRFQuCddjZPswlTORP(IEnumerable , Boolean ) - 在 (Grid , IEnumerable , Boolean ) - 在 FineUIPro.Grid.DataBind(Boolean keepCurrentData) - 在 (Grid , Boolean ) - 在 FineUIPro.Grid.DataBind() - 在 FineUIPro.Web.HSSE.SitePerson.SitePersonNowStatistic.BindGrid() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\HSSE\SitePerson\SitePersonNowStatistic.aspx.cs:行号 58 - 在 FineUIPro.Web.HSSE.SitePerson.SitePersonNowStatistic.btnSearch_Click(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\HSSE\SitePerson\SitePersonNowStatistic.aspx.cs:行号 65 - 在 FineUIPro.Button.OnClick(EventArgs e) - 在 (Button , EventArgs ) - 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:09/15/2023 11:18:13 -出错文件:http://localhost:9243/HSSE/SitePerson/SitePersonNowStatistic.aspx -IP地址:::1 -操作人员:JT - -出错时间:09/15/2023 11:18:13 - diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index a5e8716e..e59c9ab6 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -14233,7 +14233,7 @@ True 0 / - http://localhost:9243/ + http://localhost:8513/ False False diff --git a/SGGL/FineUIPro.Web/HSSE/QualityAudit/EquipmentPersonQuality.aspx b/SGGL/FineUIPro.Web/HSSE/QualityAudit/EquipmentPersonQuality.aspx index 772f491e..0ce3fb53 100644 --- a/SGGL/FineUIPro.Web/HSSE/QualityAudit/EquipmentPersonQuality.aspx +++ b/SGGL/FineUIPro.Web/HSSE/QualityAudit/EquipmentPersonQuality.aspx @@ -1,4 +1,5 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentPersonQuality.aspx.cs" Inherits="FineUIPro.Web.HSSE.QualityAudit.EquipmentPersonQuality" %> + @@ -7,75 +8,75 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- @@ -87,43 +88,43 @@ FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="审核时间" HeaderTextAlign="Center" TextAlign="Center"> --%> - <%-- --%> - - <%-- --%> - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/SGGL/FineUIPro.Web/HSSE/QualityAudit/SafePersonQuality.aspx.cs b/SGGL/FineUIPro.Web/HSSE/QualityAudit/SafePersonQuality.aspx.cs index ada9fa71..25ef1724 100644 --- a/SGGL/FineUIPro.Web/HSSE/QualityAudit/SafePersonQuality.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/QualityAudit/SafePersonQuality.aspx.cs @@ -44,6 +44,8 @@ namespace FineUIPro.Web.HSSE.QualityAudit { this.ProjectId = Request.Params["projectId"]; } + DropListService.InitConstDropDownList(this.drpPersonStates, DropListService.Group_ProjectPersonStates, true); + this.drpPersonStates.SelectedValue = Const.ProjectPersonStates_1; BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true); if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) { @@ -94,6 +96,11 @@ namespace FineUIPro.Web.HSSE.QualityAudit strSql += " AND WorkPost.WorkPostName LIKE @WorkPostName"; listStr.Add(new SqlParameter("@WorkPostName", "%" + this.txtWorkPostName.Text.Trim() + "%")); } + if (this.drpPersonStates.SelectedValue != Const._Null && !string.IsNullOrEmpty(this.drpPersonStates.SelectedValue)) + { + strSql += " AND Person.States =@States "; + listStr.Add(new SqlParameter("@States", this.drpPersonStates.SelectedValue)); + } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); diff --git a/SGGL/FineUIPro.Web/HSSE/QualityAudit/SafePersonQuality.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/QualityAudit/SafePersonQuality.aspx.designer.cs index 3370ee0e..1ac00e54 100644 --- a/SGGL/FineUIPro.Web/HSSE/QualityAudit/SafePersonQuality.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/QualityAudit/SafePersonQuality.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.QualityAudit { - - - public partial class SafePersonQuality { - +namespace FineUIPro.Web.HSSE.QualityAudit +{ + + + public partial class SafePersonQuality + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// txtCardNo 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCardNo; - + /// /// drpUnitId 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitId; - + /// /// txtPersonName 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtPersonName; - + /// /// txtWorkPostName 控件。 /// @@ -92,7 +94,16 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkPostName; - + + /// + /// drpPersonStates 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpPersonStates; + /// /// ToolbarFill1 控件。 /// @@ -101,7 +112,16 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + + /// + /// btSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btSearch; + /// /// btnOut 控件。 /// @@ -110,7 +130,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + /// /// lblNumber 控件。 /// @@ -119,7 +139,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblNumber; - + /// /// ToolbarSeparator1 控件。 /// @@ -128,7 +148,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -137,7 +157,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -146,7 +166,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -155,7 +175,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// WindowAtt 控件。 /// @@ -164,7 +184,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window WindowAtt; - + /// /// Menu1 控件。 /// @@ -173,7 +193,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuEdit 控件。 /// From 5899ff57c02795f367010f81fccd553d3a2b7e0c Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Mon, 18 Sep 2023 13:04:48 +0800 Subject: [PATCH 5/9] 2023-09-18 --- .vs/SGGL_SeDin/v17/.wsuo | Bin 264704 -> 263680 bytes .../RepairAndExpand/RepairAndExpand.aspx.cs | 86 +++++++++--------- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo index 24509a06840e0a7db92b957cb451c93de84bb9e8..8a1ade310213944590ccfcab54451d66e7b5da16 100644 GIT binary patch delta 2840 zcmdUxUrbY19LIakya^WUJd zWm_T-(4Vu(9t?wo?7^4WXkS_ML0w|hhix%S=6rCv>E^PMxJ_Zd-!0d5les@{JIUvs zbI(2Jch2v7e&?JUK57Y%TE={(nFfP_BXjff^OzYJau~@+oT zr5&+M+_?q){0cPYy4gV(5Srmk?uLvWY)Z)tOkC!Zu!J_Xl$BC0#&Q~xfn+0gBptCJ zZp4a=D|YA=#pN`q2MZ)EC7*NSif!i_Y*>b@MX1__xf5|Lyz3n*@ZEz{B3@(z@)S~q zR3rD%Woo+#%RZzQsYB`!8Hw1!P6hKI(t&g$A*2g=71@dGLb?%>08ZEns$a)~iVPrw z$Q#H$WIu8MIfxuW-b99wVI+(sRW9Z$(=DBg%RH>htovueZX^;kv(@2ZC7<0y1WRWU! zLnfm=Li>dj0jsriN;NZ900UVqMp^*98WLIlM;n7`2}q=~zDdXeB+TJOEm&1(&o+v* zGeOPXXV)f&15m(HS;jnKI|PC3Jc$C7>L@^A!nQ4sUKR~HUqhxL4_o1PEooCwef~_t zlUQqB_>!EMFCbBy)v1+gZ8(Fr!U$r32e$1-+R@aE`tXeg7_<+u12AiEG3sHM93!U{ zw&gmf5;=@@!ffs^>wtk}&6$Qm?5_tXwM?VkR|h|@+%B!c62-P|9@L_ML_to6!NbZ# z5o)~>Yl>29)ncrr6NW-mZ<|hM;8q5|SYP|^;)*0L+_tqn#&vQ^9~9KTa-CW%=6d}> zRtp2NUz2}XiYexUS$UYPfPu|#8A%yRk>|I;Iqn3t@Y18vr7jPkxFKGtbzN?yw#%P)hx;S*rx4H6wc zWQtO9-OK%OhF8QAbrMUNDP1Ulll$Gkx*6!}%ZrY2aa}Y+5Y1rqtdGrjWCqtfa>OZ$ zBm{2GdrWtTX7+HL$2zn%DP^hxFh7NeAXxtlc!u+}~igo5(HXJA^FX#{3TQJ@Nx`7x@wS6&Y7bjif!p z#e~GBfJE1#eg!7A_60Ou6FyCIP-{mc^4UkC2ofd9olR#8jhgJdd30fYVrt$fiuawiN{1ZFb7UpaV9B!(Y zDqm;`peBYb4J`ps0^TY4Sz)q?$K=2agTi)svQ>mW|K-@_=JmoKVoYxTHs4v&vbSFi z^zZEr^{e}vl|7-7jU@rJW`JvJOQB485oYke#LY!5PnL}_V=&(c*LM|SY|zjKSkhf1 z;4XxQ?pm1Xu3P$w_IvY^;bp8l-(AHR6muKcdz=vN>B;HB`__g3C2l07m4XIOWcNt) zX$OCIRZUHYCs@%DbOn{Fkjq=?@wkE^#p_Z+ic;0(4FKOQTOM96n7Nyt86l8oW3aV)1~}8UlmkBo~o`&k4x$FR=T_%Z>Ouq-C5)62v&Nl zm6}ke*ZWT=GhNR4^d*7639D`7AmzAuE?F;TpF>I2ci mV5U!g-z(Zr*~JqqI#I`V#COaIlPnq@6|if%I3}bv5q<-e%e?Ub delta 3402 zcmbW(4|Ej89S88t?j~MvFS-07cL@PPa)glNlD$hVxug)5n#Ga^yg? zzRt@hvpYLGJ2U&6+0zD1+K_3-f;n6b6n&yRgUVW#+C3uZ7jllNt=HdrV7OK*;k zWwz609yEDmdKUI}#y!~Piy$G7@r`*~*-m~kZ?%C+DaCpiG_NsGXeJ8wjhPwi;wLQw%+LGs z+l*`uu1-s;k?O-q6F*(D+{oyzf~0HVU^9X``-cC20Mlszn_&xVg#pm`S@Ws$dqp$( zS$oBU)+4d$r|wdUk9_W6sK6~#%uu{dl^1wqS`~@Fi@(T%c4KS}6`oghM(p*b8Bw@| z@iVP${E$$|gDNUhoYGo9*Y23=kqsy)OD+s9ZjaC6yrj}pn$ng0bju2vR>AD4OJ%&@ zy@DTfE+ z;T$0oTlba$8LP$!8DIjcnT0$Xav+z=2$C7O1@fT)W4iyY9yAlUBsDf%xzzzbmcUY2 z2A_xJu!14jR^s3b&<5?`fmLuBtcEpkIa~o(!dmzuTm@G{2V4W!!k6GW=manLzz!`t-;AZHC_0R(wpcig|AoRgT_zLvHt#BJ`g3Yi6w!#2tz@t~He3rL@ zSCqZV)%nqoL*i>CQ@E({1PhhBx!baUYvnCQHW#r_3iN*CfnSaQEt)JjR~oDs9N30- zZ-+ZzJA4(s26w_;a5vlo_rf6D2lvC*VF&Dl5O5fRU9cN;cmN)RZ@@R0fDC_Dxu@HjjH--hqNlkgOL7rqBi!}no79Dp$V0DcJ1Km>jSKZc*cPvK|q zb9feh0Z|H-=Wy^#I0(Dx(I1Der%kT;ufuk@Azk}bytMD590bYkU z;269Ke}q55pW!WdyBh!g0>|O6@HhB7{0rzkC8zgLwzIR)^*-`3I0+xXDfkdh!x=aW ziTlQJEYL>;xT>gJ>n-D@f`w~}iF&7YJ8s= zEtAnTRTOG+%ZXCzPkg^_^2qa1HGi^tJUnwfaxMz!m&8=fMS~v;>ZDE78XhZ`Sx9|e zzSthk-6aYSE*=amS@x-$IktG(%@e=5;$8e7yE**`OIlsDo3D&@KY8~LkGTtJZ?B;n_s75`M5`9oJ& zLmn-xta|f8vMw_eq2|<#S|>kK=Y71!nqM)p3&v!Xow$)^hSKm_34aIL zG$Hnc;h+$X`ic#a;$k69;QzS!swR9=P|xbHcRD)*T|S%3S0Av|`dwaIXH8AOrZ@ui zj=H*9U#;Seje@b12gUwvS6lm4JceuC%EIRA)oU8xXEs>^V715HR|`fYP?EU zy{*&b=(5#18tQG{278^&?sWNF0mbLE*W1JY?&d7CAsXscd31xC>8J_#w$Sf)5fJ&+ z6ZT7J($=S}=SzDV!qHxp?LH%_e8V+I!$&)+#oITIY-D>bSOihM`LNKj`)MJAD~G1( z|4A1NkWL_u$QOX!L8yd&<&+%+uKMe2@=FN*r`o1zxcJ`gpgx2w?@~&cKDv!s8y9zo{{`f-1SS9g diff --git a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx.cs b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx.cs index 21cbc5bd..92173db4 100644 --- a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx.cs @@ -259,7 +259,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand var trustItems = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == r.RepairRecordId select x; if (trustItems.Count() == 0) //未生成返修委托单 { - bool b = false; + bool b = false; //查找无损检测委托单中是否已进行过返修 是 节点标记为红色 var trustItem = (from x in Funs.DB.HJGL_Batch_BatchTrustItem join y in Funs.DB.HJGL_Batch_NDEItem on x.TrustBatchItemId equals y.TrustBatchItemId where y.NDEItemID == r.NDEItemID @@ -702,27 +702,27 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand join y in Funs.DB.HJGL_Batch_NDEItem on x.TrustBatchItemId equals y.TrustBatchItemId where y.NDEItemID == repairRecord.NDEItemID select x).FirstOrDefault(); - if (trustItem != null) - { - var trustItems2 = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustItem.TrustBatchId select x; - foreach (var item in trustItems2) - { - var ndeItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == item.TrustBatchItemId); - if (ndeItem != null) - { - var repair = Funs.DB.HJGL_RepairRecord.FirstOrDefault(x => x.NDEItemID == ndeItem.NDEItemID); - if (repair != null) - { - var trustItem3s = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repair.RepairRecordId select x; - if (trustItem3s.Count() > 0) - { - Alert.ShowInTop("本次返修已扩透!", MessageBoxIcon.Warning); - return; - } - } - } - } - } + //if (trustItem != null) + //{ + // var trustItems2 = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustItem.TrustBatchId select x; + // foreach (var item in trustItems2) + // { + // var ndeItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == item.TrustBatchItemId); + // if (ndeItem != null) + // { + // var repair = Funs.DB.HJGL_RepairRecord.FirstOrDefault(x => x.NDEItemID == ndeItem.NDEItemID); + // if (repair != null) + // { + // var trustItem3s = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repair.RepairRecordId select x; + // if (trustItem3s.Count() > 0) + // { + // Alert.ShowInTop("本次返修已扩透!", MessageBoxIcon.Warning); + // return; + // } + // } + // } + // } + //} if (!repairRecord.AuditDate.HasValue) { // 更新返修记录 @@ -855,27 +855,27 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand join y in Funs.DB.HJGL_Batch_NDEItem on x.TrustBatchItemId equals y.TrustBatchItemId where y.NDEItemID == repairRecord.NDEItemID select x).FirstOrDefault(); - if (trustItem1 != null) - { - var trustItems2 = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustItem1.TrustBatchId select x; - foreach (var item in trustItems2) - { - var ndeItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == item.TrustBatchItemId); - if (ndeItem != null) - { - var repair = Funs.DB.HJGL_RepairRecord.FirstOrDefault(x => x.NDEItemID == ndeItem.NDEItemID); - if (repair != null) - { - var trustItem3s = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repair.RepairRecordId select x; - if (trustItem3s.Count() > 0) - { - Alert.ShowInTop("本次返修已委托!", MessageBoxIcon.Warning); - return; - } - } - } - } - } + //if (trustItem1 != null) + //{ + // var trustItems2 = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustItem1.TrustBatchId select x; + // foreach (var item in trustItems2) + // { + // var ndeItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == item.TrustBatchItemId); + // if (ndeItem != null) + // { + // var repair = Funs.DB.HJGL_RepairRecord.FirstOrDefault(x => x.NDEItemID == ndeItem.NDEItemID); + // if (repair != null) + // { + // var trustItem3s = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repair.RepairRecordId select x; + // if (trustItem3s.Count() > 0) + // { + // Alert.ShowInTop("本次返修已委托!", MessageBoxIcon.Warning); + // return; + // } + // } + // } + // } + //} var trustItem = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repairRecordId select x; if (trustItem.Count() == 0) { From 338b874e8513abd0d73a382b93859a075c80226d Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Mon, 18 Sep 2023 13:47:38 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E5=A4=A7=E6=95=B0=E6=8D=AE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/DigData/CQMSDataDWService .cs | 87 +++++++++++++++-- SGGL/BLL/DigData/HSEDataDWService.cs | 48 ++++++++-- SGGL/BLL/DigData/JDGLDataDWService.cs | 40 +++++++- SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx | 6 +- SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx | 4 +- SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx | 4 +- SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx | 4 +- SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx | 4 +- .../DigData/ProjectDataDW.aspx.cs | 96 ++++--------------- .../DigData/ProjectDataDW.aspx.designer.cs | 8 +- SGGL/FineUIPro.Web/DigData/WBSDW.aspx | 18 +--- SGGL/FineUIPro.Web/DigData/WBSDW.aspx.cs | 62 +++--------- .../DigData/WBSDW.aspx.designer.cs | 31 +----- SGGL/FineUIPro.Web/ErrLog.txt | 69 +++++++++++++ 14 files changed, 278 insertions(+), 203 deletions(-) diff --git a/SGGL/BLL/DigData/CQMSDataDWService .cs b/SGGL/BLL/DigData/CQMSDataDWService .cs index 1c2127c5..074789db 100644 --- a/SGGL/BLL/DigData/CQMSDataDWService .cs +++ b/SGGL/BLL/DigData/CQMSDataDWService .cs @@ -26,7 +26,8 @@ namespace BLL /// 定义变量 ///
private static IQueryable getDataLists = from x in db.Base_Project - select x; + where x.ProjectState == Const.ProjectState_1 + select x; /// /// 质量数据仓库 @@ -38,7 +39,7 @@ namespace BLL /// public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1) { - var getDataList = from x in Funs.DB.Base_Project select x; + IQueryable getDataList = getDataLists; if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null) { getDataList = getDataList.Where(x => x.ProjectId == projectId); @@ -56,13 +57,87 @@ namespace BLL x.ProjectId, x.ProjectName, x.ProjectCode, - Rate1 = "0%", //质量验收问题整改率 - Rate2 = "0%", //控制点完成率 - Rate3 = "0%", //质量检查问题整改率 - Rate4 = "0%", //管道焊接一次合格率 + Rate1 = getSpotCheckRate(x.ProjectId), //质量验收问题整改率 + Rate2 = getSpotCheckDataRate(x.ProjectId), //控制点完成率 + Rate3 = getCheckControlStates(x.ProjectId), //质量检查问题整改率 + Rate4 = getFirstPassRate(x.ProjectId), //管道焊接一次合格率 }; } #endregion + /// + /// 质量验收问题整改率 + /// + /// + /// + public static string getSpotCheckRate(string projectId) + { + + //// 实体验收 资料验收 + var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail + join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode + where (y.ProjectId == projectId || projectId == null) && y.State == "8" + select x; + int all = getSpotCheckDetail.Count(); + // this.lbSpotCheck1.Text = all.ToString(); + int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格 + // this.lbSpotCheck2.Text= okCount.ToString(); + + return all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%"; + } + + /// + /// 控制点完成率 + /// + /// + /// + public static string getSpotCheckDataRate(string projectId) + { + var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail + join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode + where (y.ProjectId == projectId || projectId == null) && y.State == "8" + select x; + /// 资料验收合格项目 + var getOKSpotCheckDetail = getSpotCheckDetail.Where(x => x.IsOK == true); + int okYSCount = getOKSpotCheckDetail.Count(); //验收合格 + int okDateCount = getSpotCheckDetail.Where(x => x.IsDataOK == "1").Count(); //资料合格 + return okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%"; + } + + /// + /// 质量检查问题整改率 + /// + /// + /// + public static string getCheckControlStates(string projectId) + { + var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl + where (x.ProjectId == projectId || projectId == null) + select x; + int allCheckControlCount = getCheck_CheckControl.Count(); + int okCheckControlCount = getCheck_CheckControl.Where(x => x.State == "7").Count(); ///已整改 + return allCheckControlCount > 0 ? Math.Round(okCheckControlCount * 100.0 / (allCheckControlCount * 1.0)).ToString() + "%" : "0%"; + + } + + /// + /// 管道焊接一次合格率 + /// + /// + /// + public static string getFirstPassRate(string projectId) + { + var getJots = from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId + join z in Funs.DB.HJGL_Batch_PointBatchItem on y.PointBatchItemId equals z.PointBatchItemId + join a in Funs.DB.HJGL_Batch_NDE on x.NDEID equals a.NDEID + where z.PointDate != null && z.PointState == "1" && y.RepairRecordId == null + && (a.ProjectId == projectId || projectId == null) + select x; + int allHJCount = getJots.Count(); + var getOk = getJots.Where(x => x.CheckResult == "1"); + int okHJCount = getOk.Count(); + return allHJCount > 0 ? Math.Round(okHJCount * 100.0 / (allHJCount * 1.0)).ToString() + "%" : "0%"; + } } } \ No newline at end of file diff --git a/SGGL/BLL/DigData/HSEDataDWService.cs b/SGGL/BLL/DigData/HSEDataDWService.cs index 3805288c..0e5d0ebf 100644 --- a/SGGL/BLL/DigData/HSEDataDWService.cs +++ b/SGGL/BLL/DigData/HSEDataDWService.cs @@ -26,7 +26,8 @@ namespace BLL /// 定义变量 /// private static IQueryable getDataLists = from x in db.Base_Project - select x; + where x.ProjectState == Const.ProjectState_1 + select x; /// /// 安全数据仓库 @@ -38,7 +39,7 @@ namespace BLL /// public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1) { - var getDataList = from x in Funs.DB.Base_Project select x; + IQueryable getDataList = getDataLists; if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null) { getDataList = getDataList.Where(x => x.ProjectId == projectId); @@ -56,13 +57,48 @@ namespace BLL x.ProjectId, x.ProjectName, x.ProjectCode, - Count1=0, //人员数量 - Count2 =0, //安全人工时 - Count3 =0, //安全培训次数 - ProblemRate = "0%", //安全巡检整改率 + Count1=db.SitePerson_Person.Where(p=>p.ProjectId == x.ProjectId && p.States == Const.ProjectPersonStates_1).Count(), //人员数量 + Count2 = getProjecctSafeHours(x.ProjectId), //安全人工时 + Count3 =db.EduTrain_TrainRecord.Where(p => p.ProjectId == x.ProjectId && p.States == BLL.Const.State_2).Count(), //安全培训次数 + ProblemRate = getProblemRate(x.ProjectId), //安全巡检整改率 }; } #endregion + /// + /// 安全人工时 + /// + /// + /// + public static int getProjecctSafeHours(string projectId) + { + int count = 0; + var getPersonInOutNumber = (from x in Funs.DB.SitePerson_PersonInOutNumber + where (x.ProjectId == projectId || projectId == null) + select x).OrderByDescending(x => x.InOutDate).FirstOrDefault(); + if (getPersonInOutNumber != null) + { + count = getPersonInOutNumber.WorkHours ?? 0; + } + + return count; + } + + /// + /// 安全问题整改率 + /// + /// + /// + public static string getProblemRate(string projectId) + { + var getAllHazardRegister = from x in Funs.DB.HSSE_Hazard_HazardRegister + where (x.ProjectId == projectId || projectId == null) + && x.States != null && x.States != "4" && x.States != "0" + select x; + int allHazardCount = getAllHazardRegister.Count(); + int cHazardCount = getAllHazardRegister.Where(x => x.States == "3").Count(); + return allHazardCount > 0 ? Math.Round(cHazardCount * 100.0 / (allHazardCount * 1.0)).ToString() + "%" : "0%"; + } + } } \ No newline at end of file diff --git a/SGGL/BLL/DigData/JDGLDataDWService.cs b/SGGL/BLL/DigData/JDGLDataDWService.cs index be372d94..c993cc47 100644 --- a/SGGL/BLL/DigData/JDGLDataDWService.cs +++ b/SGGL/BLL/DigData/JDGLDataDWService.cs @@ -26,7 +26,7 @@ namespace BLL /// 定义变量 /// private static IQueryable getDataLists = from x in db.Base_Project - select x; + select x; /// /// 进度数据仓库 @@ -36,7 +36,7 @@ namespace BLL /// /// /// - public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1) + public static IEnumerable getDataDWList(string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1) { var getDataList = from x in Funs.DB.Base_Project select x; if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null) @@ -56,10 +56,44 @@ namespace BLL x.ProjectId, x.ProjectName, x.ProjectCode, - JDRate = "0%", //项目进度完成百分比 + JDRate = getJDRate(x.ProjectId, startTime, endTime), //项目进度完成百分比 }; } #endregion + /// + /// 进度百分比 + /// + /// + public static string getJDRate(string projectId, DateTime? startTime, DateTime? endTime) + { + double totalSJCost = 0; ////累计实际费用 + decimal totalPlanCost = 0; ////计划费用 + var getViewWorkPackageParentDetail = from x in Funs.DB.View_WBS_WorkPackageParentDetail + where (x.ProjectId == projectId || projectId == null) && (x.ParentId == "1" || x.ParentId == "2") + select x; + if (startTime.HasValue) + { + getViewWorkPackageParentDetail = getViewWorkPackageParentDetail.Where(x => x.Months >= startTime); + } + if (endTime.HasValue) + { + getViewWorkPackageParentDetail = getViewWorkPackageParentDetail.Where(x => x.Months <= endTime); + } + if (getViewWorkPackageParentDetail.Count() > 0) + { + totalSJCost = getViewWorkPackageParentDetail.Sum(x => x.TotalThisValue ?? 0); + } + + var getUnitWork = from x in Funs.DB.WBS_UnitWork where x.ProjectId == projectId select x; + if (getUnitWork.Count() > 0) + { + totalPlanCost = getUnitWork.Sum(x => x.PlanCost ?? 0); + } + + ///项目进度完成百分比 + decimal s = Convert.ToDecimal(totalSJCost); + return totalPlanCost > 0 ? Math.Round(s / totalPlanCost).ToString() + "%" : "0%"; + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx b/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx index 2450ad19..ade89749 100644 --- a/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx +++ b/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx @@ -21,10 +21,10 @@ EmptyText="请选择项目" EnableEdit="true"> + ID="txtStartTime" EnableEdit="false" Hidden="true"> + ID="txtEndTime" EnableEdit="false" Hidden="true"> @@ -50,7 +50,7 @@ - + ID="txtStartTime" EnableEdit="false" Hidden="true"> + ID="txtEndTime" EnableEdit="false" Hidden="true"> diff --git a/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx b/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx index a4da4bcc..ef607b73 100644 --- a/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx +++ b/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx @@ -21,10 +21,10 @@ EmptyText="请选择项目" EnableEdit="true"> + ID="txtStartTime" EnableEdit="false" Hidden="true"> + ID="txtEndTime" EnableEdit="false" Hidden="true"> diff --git a/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx b/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx index 5c77240f..f0258bbb 100644 --- a/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx +++ b/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx @@ -21,10 +21,10 @@ EmptyText="请选择项目" EnableEdit="true"> + ID="txtStartTime" EnableEdit="false" Hidden="true"> + ID="txtEndTime" EnableEdit="false" Hidden="true"> diff --git a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx index 1e23034d..24f0e66e 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx +++ b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx @@ -76,9 +76,9 @@ - + - + diff --git a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs index 137ce1f2..76ab76ec 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs @@ -1,4 +1,6 @@ using BLL; +using FineUIPro.Web.HJGL.WeldingReport; +using Model; using System; using System.Data; using System.Data.SqlTypes; @@ -67,27 +69,14 @@ namespace FineUIPro.Web.DigData this.lbSitePersons.Text = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.ProjectId //&& y.States == Const.State_1 select x).Count().ToString(); - var getPersonInOutNumber = (from x in Funs.DB.SitePerson_PersonInOutNumber - where x.ProjectId == this.ProjectId - select x).OrderByDescending(x => x.InOutDate).FirstOrDefault(); - if (getPersonInOutNumber != null) - { - this.lbWorkHours.Text = (getPersonInOutNumber.WorkHours ?? 0).ToString(); - } - else - { - this.lbWorkHours.Text = "0"; - } + ///安全工时 + this.lbWorkHours.Text = HSEDataDWService.getProjecctSafeHours(this.ProjectId).ToString(); + ///安全教育 this.lbEduCount.Text = (from x in Funs.DB.EduTrain_TrainRecord where x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2 select x).Count().ToString(); - - var getAllHazardRegister = from x in Funs.DB.HSSE_Hazard_HazardRegister - where x.ProjectId == this.ProjectId && x.States != null && x.States != "4" && x.States != "0" - select x; - int allHazardCount = getAllHazardRegister.Count(); - int cHazardCount = getAllHazardRegister.Where(x => x.States == "3").Count(); - this.lbRectifyRate.Text = allHazardCount > 0 ? Math.Round(cHazardCount * 100.0 / (allHazardCount * 1.0)).ToString() + "%" : "0%"; + ///问题整改 + this.lbRectifyRate.Text = HSEDataDWService.getProblemRate(this.ProjectId); this.lbMeetingCount.Text = (Funs.DB.Meeting_AttendMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count() + Funs.DB.Meeting_ClassMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count() @@ -108,74 +97,21 @@ namespace FineUIPro.Web.DigData if (item == "CQMS") { this.gpCQMS.Hidden = false; - //// 实体验收 资料验收 - var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail - join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode - where y.ProjectId == this.ProjectId && y.State == "8" - select x; - int all = getSpotCheckDetail.Count(); - // this.lbSpotCheck1.Text = all.ToString(); - int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格 - // this.lbSpotCheck2.Text= okCount.ToString(); + ///质量验收问题整改率 + this.lbSpotCheckRate.Text = CQMSDataDWService.getSpotCheckRate(this.ProjectId); + ///控制点完成率 + this.lbSpotCheckDataRate.Text = CQMSDataDWService.getSpotCheckDataRate(this.ProjectId); - this.lbSpotCheckRate.Text = all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%"; + //// 质量检查问题整改率 + this.lbCheckControlStates.Text = CQMSDataDWService.getCheckControlStates(this.ProjectId); - /// 资料验收合格项目 - var getOKSpotCheckDetail = getSpotCheckDetail.Where(x => x.IsOK == true); - int okYSCount = getOKSpotCheckDetail.Count(); //验收合格 - int okDateCount = getSpotCheckDetail.Where(x => x.IsDataOK == "1").Count(); //资料合格 - this.lbSpotCheckDataRate.Text = okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%"; - - ///实体质量问题整改率 - //int allNoOk = all - onesOKCount; ///问题数 - //int oKCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count(); //合格数 - //int zgCount = oKCount - onesOKCount; ///整改数 - //this.lbSpotCheckOkRate.Text = allNoOk > 0 ? Math.Round(zgCount * 100.0 / (allNoOk * 1.0)).ToString() + "%" : "0%"; - - ////控制点 - //var getControlItemAndCycle=from x in Funs.DB.WBS_ControlItemAndCycle - // where x.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId) - // && (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId)) - // && x.ControlPoint.Contains("A") && x.CheckNum >0 - // select x; - /////A级控制点总量 - //int allControlItemCount = getControlItemAndCycle.Count(); - /////已完成A级控制点数 - //var getOKSpotCheckDetailCheckNum = from x in getOKSpotCheckDetail - // group x by x.ControlItemAndCycleId - // into g select new { g.First().ControlItemAndCycleId, num = g.Count() }; - - //var getOKControlItemAndCycle = from x in getControlItemAndCycle - // join y in getOKSpotCheckDetailCheckNum on x.ControlItemAndCycleId equals y.ControlItemAndCycleId - // where x.CheckNum == y.num - // select x; - //int okControlItemCount= getOKControlItemAndCycle.Count(); - //this.lbControlItemRate.Text = allControlItemCount > 0 ? Math.Round(okControlItemCount * 100.0 / (allControlItemCount * 1.0)).ToString() + "%" : "0%"; + ///焊接一次合格率 + this.lbFirstPassRate.Text = CQMSDataDWService.getFirstPassRate(this.ProjectId); } if (item == "JDGL") { this.gpJDGL.Hidden = false; - - double totalSJCost = 0; ////累计实际费用 - decimal totalPlanCost = 0; ////计划费用 - var getViewWorkPackageParentDetail = from x in Funs.DB.View_WBS_WorkPackageParentDetail - where x.ProjectId == this.ProjectId && (x.ParentId == "1" || x.ParentId == "2") - select x; - if (getViewWorkPackageParentDetail.Count() > 0) - { - totalSJCost = getViewWorkPackageParentDetail.Sum(x => x.TotalThisValue ?? 0); - } - - var getUnitWork = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.ProjectId select x; - if (getUnitWork.Count() > 0) - { - totalPlanCost = getUnitWork.Sum(x => x.PlanCost ?? 0); - } - - ///项目进度完成百分比 - decimal s = Convert.ToDecimal(totalSJCost); - this.lbJDRate.Text = totalPlanCost > 0 ? Math.Round(s / totalPlanCost).ToString() + "%" : "0%"; - + this.lbJDRate.Text = JDGLDataDWService.getJDRate(this.ProjectId, null, null); } if (item == "HTGL") { diff --git a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.designer.cs index 894b8118..e6515584 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.designer.cs @@ -177,22 +177,22 @@ namespace FineUIPro.Web.DigData protected global::FineUIPro.Label lbSpotCheckDataRate; /// - /// Label2 控件。 + /// lbCheckControlStates 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label Label2; + protected global::FineUIPro.Label lbCheckControlStates; /// - /// Label10 控件。 + /// lbFirstPassRate 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label Label10; + protected global::FineUIPro.Label lbFirstPassRate; /// /// gpJDGL 控件。 diff --git a/SGGL/FineUIPro.Web/DigData/WBSDW.aspx b/SGGL/FineUIPro.Web/DigData/WBSDW.aspx index e6688443..23c50c2f 100644 --- a/SGGL/FineUIPro.Web/DigData/WBSDW.aspx +++ b/SGGL/FineUIPro.Web/DigData/WBSDW.aspx @@ -51,7 +51,7 @@