From 5b857c97fac66200f3ffa3f7e3264c82ec5a7b5a Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Fri, 25 Aug 2023 16:19:07 +0800 Subject: [PATCH] =?UTF-8?q?20230825=E9=83=A8=E9=97=A8=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=8A=A0=E5=B2=97=E4=BD=8D=E6=9F=A5=E8=AF=A2=E3=80=81=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E9=9B=86=E5=9B=A2=E6=8A=A5=E8=A1=A8=E5=B7=A5=E6=97=B6?= =?UTF-8?q?=E4=BB=8E=E6=9C=88=E6=8A=A5=E5=8F=96=E5=BD=93=E6=9C=88=E5=B7=A5?= =?UTF-8?q?=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/Person/Person_PersonsService.cs | 13 ++++-- SGGL/FineUIPro.Web/ErrLog.txt | 41 +++++++++++++++++++ .../Person/CompanyPerson.aspx.cs | 2 +- SGGL/FineUIPro.Web/Person/DepartPerson.aspx | 3 ++ .../FineUIPro.Web/Person/DepartPerson.aspx.cs | 6 ++- .../Person/DepartPerson.aspx.designer.cs | 9 ++++ SGGL/FineUIPro.Web/Person/PersonLib.aspx.cs | 2 +- .../MillionsMonthlyReportSave.aspx.cs | 9 +++- 8 files changed, 77 insertions(+), 8 deletions(-) diff --git a/SGGL/BLL/Person/Person_PersonsService.cs b/SGGL/BLL/Person/Person_PersonsService.cs index 3d90a881..92002ff1 100644 --- a/SGGL/BLL/Person/Person_PersonsService.cs +++ b/SGGL/BLL/Person/Person_PersonsService.cs @@ -46,7 +46,7 @@ namespace BLL /// 人员类型 /// /// - public static IEnumerable getListData(string unitId, string departId, string projetcId, string name, string idCard, string isPost, string personType,string account, Grid Grid1) + public static IEnumerable getListData(string unitId, string departId, string projetcId, string name, string idCard, string isPost, string personType, string account,string[] workPostIds, Grid Grid1) { IQueryable getDataList = getDataLists.OrderBy(x => x.UnitId).ThenBy(x => x.DepartId); if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null) @@ -59,8 +59,9 @@ namespace BLL } if (!string.IsNullOrEmpty(projetcId) && projetcId != Const._Null) { - var idLists=(from x in db.SitePerson_PersonItem where x.ProjectId == projetcId && !x.OutTime.HasValue - select x.PersonId).Distinct().ToList(); + var idLists = (from x in db.SitePerson_PersonItem + where x.ProjectId == projetcId && !x.OutTime.HasValue + select x.PersonId).Distinct().ToList(); getDataList = getDataList.Where(x => idLists.Contains(x.PersonId)); } @@ -80,7 +81,7 @@ namespace BLL { getDataList = getDataList.Where(e => e.IdentityCard.Contains(idCard)); } - + if (!string.IsNullOrEmpty(isPost) && isPost != "-1" && isPost != Const._Null) { if (isPost == Const._True) @@ -93,6 +94,10 @@ namespace BLL } } + if (workPostIds.Count() > 0) + { + getDataList = getDataList.Where(e => workPostIds.Contains(e.WorkPostId)); + } count = getDataList.Count(); if (count == 0) { diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index e69de29b..f421dbbd 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -0,0 +1,41 @@ + +错误信息开始=====> +错误类型:SqlException +错误信息:执行超时已过期。完成操作之前已超时或服务器未响应。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.ExecuteReader() + 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) + 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) + 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) + 在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) + 在 System.Linq.Queryable.Count[TSource](IQueryable`1 source) + 在 FineUIPro.Web.common.main.getSitePerson() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\common\main.aspx.cs:行号 90 + 在 FineUIPro.Web.common.main.Page_Load(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\common\main.aspx.cs:行号 20 + 在 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) +----错误类型:Win32Exception +----错误信息: +----等待的操作过时。 +----错误堆栈: + 出错时间:08/25/2023 15:46:55 +出错文件:http://localhost:8797/common/main.aspx +IP地址:::1 +操作人员:JT + +出错时间:08/25/2023 15:46:55 + diff --git a/SGGL/FineUIPro.Web/Person/CompanyPerson.aspx.cs b/SGGL/FineUIPro.Web/Person/CompanyPerson.aspx.cs index 6d93101d..a3718022 100644 --- a/SGGL/FineUIPro.Web/Person/CompanyPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/CompanyPerson.aspx.cs @@ -39,7 +39,7 @@ namespace FineUIPro.Web.Person private void BindGrid() { var getData = Person_PersonsService.getListData(Const.UnitId_SEDIN, this.drpDepart.SelectedValue, this.drpProject.SelectedValue, - this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, null, Grid1); + this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, null,null, Grid1); Grid1.RecordCount = Person_PersonsService.count; Grid1.DataSource = getData; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx index fe0153fd..b40c0eed 100644 --- a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx +++ b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx @@ -38,6 +38,9 @@ + + diff --git a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs index 46219f4d..6c7fcb49 100644 --- a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs @@ -28,6 +28,9 @@ namespace FineUIPro.Web.Person this.drpIsPost.SelectedValue = Const._True; DropListService.InitConstDropDownList(this.drpPersonType, DropListService.Group_PersonType, false); Funs.FineUIPleaseSelect(drpPersonType, "按员工类别查询"); + + WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, false); + Funs.FineUIPleaseSelect(drpWorkPost, "按岗位查询"); // 绑定表格 this.BindGrid(); @@ -100,8 +103,9 @@ namespace FineUIPro.Web.Person /// private void BindGrid() { + string[] workPostIds= this.drpWorkPost.SelectedValueArray.Where(x => x != Const._Null).ToArray(); var getData = Person_PersonsService.getListData(Const.UnitId_SEDIN, Const.Depart_constructionId, this.drpProject.SelectedValue, - this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, null, Grid1); + this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, null, workPostIds, Grid1); Grid1.RecordCount = Person_PersonsService.count; Grid1.DataSource = getData; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.designer.cs b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.designer.cs index 9c1a5ae5..17733d3e 100644 --- a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.designer.cs @@ -104,6 +104,15 @@ namespace FineUIPro.Web.Person /// protected global::FineUIPro.DropDownList drpPersonType; + /// + /// drpWorkPost 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpWorkPost; + /// /// btSearch 控件。 /// diff --git a/SGGL/FineUIPro.Web/Person/PersonLib.aspx.cs b/SGGL/FineUIPro.Web/Person/PersonLib.aspx.cs index 5ccccb5c..a8f51f4c 100644 --- a/SGGL/FineUIPro.Web/Person/PersonLib.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/PersonLib.aspx.cs @@ -43,7 +43,7 @@ namespace FineUIPro.Web.Person private void BindGrid() { var getData = Person_PersonsService.getListData(this.drpUnit.SelectedValue, this.drpDepart.SelectedValue, this.drpProject.SelectedValue, - this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, this.txtAccount.Text.Trim(), Grid1); + this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, this.txtAccount.Text.Trim(),null, Grid1); Grid1.RecordCount = Person_PersonsService.count; Grid1.DataSource = getData; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.cs index 32ca1f91..e86d2bad 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.cs @@ -1,5 +1,6 @@ using BLL; using FineUIPro.Web.BaseInfo; +using FineUIPro.Web.DataShow; using FineUIPro.Web.InformationProject; using Model; using Newtonsoft.Json.Linq; @@ -929,8 +930,14 @@ namespace FineUIPro.Web.ZHGL.Information item.PostPersonNum = getAllSedinPerson; item.SnapPersonNum = 0; item.ContractorNum = getSitePersons.Where(x => x.UnitId != Const.UnitId_SEDIN).Count(); - item.SumPersonNum = getSitePersons.Count(); + item.SumPersonNum = getSitePersons.Count(); item.TotalWorkNum = 0; + var getInfo = APISeDinMonthReportService.getSeDinMonthReport2ById(p.ProjectId, year + "-" + months); + if (getInfo != null) + { + item.TotalWorkNum = Math.Round(getInfo.MonthWorkTime / 10000 ?? 0, 4); + } + item.SeriousInjuriesNum = 0; item.SeriousInjuriesPersonNum = 0; item.SeriousInjuriesLossHour = 0;