From 8bafdef064b3db7e3c5f97727958a4763f0b953f Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Mon, 25 Sep 2023 10:15:51 +0800 Subject: [PATCH 1/2] 2023 --- SGGL/BLL/DigData/ProjectWBSAnalysisService.cs | 24 +- SGGL/BLL/DigData/WBSAnalysisService.cs | 141 +++++++++- .../DigData/ProjectWBSAnalysis.aspx | 6 +- SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx | 4 +- SGGL/FineUIPro.Web/ErrLog.txt | 247 ++++++++++++++++++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +- SGGL/Model/Model.cs | 96 +++---- 7 files changed, 447 insertions(+), 73 deletions(-) diff --git a/SGGL/BLL/DigData/ProjectWBSAnalysisService.cs b/SGGL/BLL/DigData/ProjectWBSAnalysisService.cs index 907dcbf9..44b0b565 100644 --- a/SGGL/BLL/DigData/ProjectWBSAnalysisService.cs +++ b/SGGL/BLL/DigData/ProjectWBSAnalysisService.cs @@ -48,14 +48,16 @@ namespace BLL List listWork = new List(); Model.WBS_WorkPackage work1 = new Model.WBS_WorkPackage { - WorkPackageCode = "1", + WorkPackageId = "Type1", PackageContent = "建筑工程", + ProjectId = projectId, }; listWork.Add(work1); Model.WBS_WorkPackage work2 = new Model.WBS_WorkPackage { - WorkPackageCode = "2", + WorkPackageId = "Type2", PackageContent = "安装工程", + ProjectId = projectId, }; listWork.Add(work2); getDataList = listWork.AsQueryable(); @@ -88,8 +90,9 @@ namespace BLL { Model.WBS_WorkPackage workItem = new Model.WBS_WorkPackage { - WorkPackageCode = item.UnitWorkId, + WorkPackageId = item.UnitWorkId, PackageContent = item.UnitWorkCode + "-" + item.UnitWorkName, + ProjectId = item.ProjectId, }; listWork.Add(workItem); } @@ -107,17 +110,16 @@ namespace BLL return from x in getDataList select new { - x.WorkPackageCode, + x.WorkPackageId, x.PackageContent, - Count1 = 0, - Count2 = 0, - Count3 = 0, - Count4 = 0, - Count5 = 0, - Count6 = 0, + Count1 = WBSAnalysisService.getWBSExpertArgumentCount(projectId,x.WorkPackageId), + Count2 = WBSAnalysisService.getWBSAccidentCount(projectId, x.WorkPackageId), + Count3 = WBSAnalysisService.getWBSHSEProblemCount(projectId, x.WorkPackageId), + Count4 = WBSAnalysisService.getWBSSpotCheckRate(projectId, x.WorkPackageId), + Count5 = WBSAnalysisService.getWBSSpotCheckDataRate(projectId, x.WorkPackageId), + Count6 = WBSAnalysisService.getWBSCheckControlCount(projectId, x.WorkPackageId), }; } #endregion - } } \ No newline at end of file diff --git a/SGGL/BLL/DigData/WBSAnalysisService.cs b/SGGL/BLL/DigData/WBSAnalysisService.cs index 6ada1642..bcd596ff 100644 --- a/SGGL/BLL/DigData/WBSAnalysisService.cs +++ b/SGGL/BLL/DigData/WBSAnalysisService.cs @@ -1,5 +1,7 @@ using FineUIPro; +using Microsoft.SqlServer.Dts.Runtime; using NPOI.SS.Formula.Functions; +using Org.BouncyCastle.Crypto.Tls; using System; using System.Collections; using System.Collections.Generic; @@ -46,13 +48,13 @@ namespace BLL List listWork = new List(); Model.WBS_WorkPackageInit work1 = new Model.WBS_WorkPackageInit { - WorkPackageCode = "1", + WorkPackageCode = "Type1", PackageContent = "建筑工程", }; listWork.Add(work1); Model.WBS_WorkPackageInit work2 = new Model.WBS_WorkPackageInit { - WorkPackageCode = "2", + WorkPackageCode = "Type2", PackageContent = "安装工程", }; listWork.Add(work2); @@ -85,15 +87,138 @@ namespace BLL { x.WorkPackageCode, x.PackageContent, - Count1=0, - Count2 = 0, - Count3 = 0, - Count4 = 0, - Count5 = 0, - Count6 = 0, + Count1= getWBSExpertArgumentCount(null, x.WorkPackageCode), + Count2 = getWBSAccidentCount(null,x.WorkPackageCode), + Count3 = getWBSHSEProblemCount(null, x.WorkPackageCode), + Count4 = getWBSSpotCheckRate(null, x.WorkPackageCode), + Count5 = getWBSSpotCheckDataRate(null, x.WorkPackageCode), + Count6 = getWBSCheckControlCount(null, x.WorkPackageCode), }; } #endregion + /// + /// 危大工程数量 + /// + /// + /// + public static int getWBSExpertArgumentCount(string projectId,string workPackageId) + { + var getLargerHazardListItem = from x in Funs.DB.Solution_LargerHazardListItem + join y in Funs.DB.Solution_LargerHazardList on x.LargerHazardListId equals y.LargerHazardListId + where x.WorkPackageId.Contains(workPackageId) + && y.States == Const.State_1 + select new {x.LargerHazardListItemId,y.LargerHazardListId,y.ProjectId,x.WorkPackageId }; + if (!string.IsNullOrEmpty(projectId)) + { + getLargerHazardListItem = getLargerHazardListItem.Where(x => x.ProjectId == projectId); + } + + return getLargerHazardListItem.Count(); + } + + /// + /// 安全事故数量 + /// + /// + /// + public static int getWBSAccidentCount(string projectId, string workPackageId) + { + var getAccidentPersonRecord = from x in Funs.DB.Accident_AccidentPersonRecord + where x.WorkPackageId.Contains(workPackageId) + && x.States == Const.State_2 + select x; + if (!string.IsNullOrEmpty(projectId)) + { + getAccidentPersonRecord = getAccidentPersonRecord.Where(x => x.ProjectId == projectId); + } + + return getAccidentPersonRecord.Count(); + } + + /// + /// 安全巡检问题总数 + /// + /// + /// + public static int getWBSHSEProblemCount(string projectId, string workPackageId) + { + var getHazardRegister = from x in Funs.DB.HSSE_Hazard_HazardRegister + where x.States != "4" && x.States != "0" + && x.WorkPackageId.Contains(workPackageId) + select x; + if (!string.IsNullOrEmpty(projectId)) + { + getHazardRegister = getHazardRegister.Where(x => x.ProjectId == projectId); + } + + return getHazardRegister.Count(); + } + + /// + /// 实体验收一次合格率 + /// + /// + /// + public static string getWBSSpotCheckRate(string projectId, string workPackageId) + { + var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail + join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode + where x.WorkPackageId.Contains(workPackageId) && (projectId ==null || y.ProjectId == projectId) + && y.State == "8" + select new { x.SpotCheckCode ,y.ProjectId,x.IsDataOK,x.IsOnesOK}; + if (!string.IsNullOrEmpty(projectId)) + { + getSpotCheckDetail = getSpotCheckDetail.Where(x => x.ProjectId == projectId); + } + + int all = getSpotCheckDetail.Count(); + // this.lbSpotCheck1.Text = all.ToString(); + int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格 + return (all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%"); + } + + /// + /// 施工资料同步率 + /// + /// + /// + public static string getWBSSpotCheckDataRate(string projectId, string workPackageId) + { + //// 实体验收 资料验收 + var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail + join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode + where x.WorkPackageId.Contains(workPackageId) + && y.State == "8" + select new { x.SpotCheckCode, y.ProjectId, x.IsDataOK, x.IsOnesOK,x.IsOK }; + if (!string.IsNullOrEmpty(projectId)) + { + getSpotCheckDetail = getSpotCheckDetail.Where(x => x.ProjectId == projectId); + } + /// 资料验收合格项目 + 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 int getWBSCheckControlCount(string projectId, string workPackageId) + { + var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl + where x.WorkPackageId.Contains(workPackageId) + select x; + if (!string.IsNullOrEmpty(projectId)) + { + getCheck_CheckControl = getCheck_CheckControl.Where(x => x.ProjectId == projectId); + } + + return getCheck_CheckControl.Count(); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx index 1230a48d..01e5fb67 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx @@ -30,7 +30,7 @@ TitleToolTip="WBS数据分析" AutoScroll="true"> @@ -53,10 +53,10 @@ FieldType="Int" HeaderText="安全巡检问题总数" HeaderTextAlign="Center" TextAlign="Right"> + FieldType="String" HeaderText="实体验收一次合格率" HeaderTextAlign="Center" TextAlign="Right"> + FieldType="String" HeaderText="施工资料同步率" HeaderTextAlign="Center" TextAlign="Right"> diff --git a/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx b/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx index ba8ab06f..b0c4ff0c 100644 --- a/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx +++ b/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx @@ -53,10 +53,10 @@ FieldType="Int" HeaderText="安全巡检问题总数" HeaderTextAlign="Center" TextAlign="Right"> + FieldType="String" HeaderText="实体验收一次合格率" HeaderTextAlign="Center" TextAlign="Right"> + FieldType="String" HeaderText="施工资料同步率" HeaderTextAlign="Center" TextAlign="Right"> diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index e69de29b..e07efab4 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -0,0 +1,247 @@ + +错误信息开始=====> +错误类型:ArgumentNullException +错误信息:值不能为 null。 +参数名: text +错误堆栈: + 在 System.Data.Linq.SqlClient.SqlHelpers.GetStringContainsPattern(String text, Char escape, Boolean& usedEscapeChar) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.TranslateStringMethod(SqlMethodCall mc) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitMethodCall(SqlMethodCall mc) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitBinaryOperator(SqlBinary bo) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitBinaryOperator(SqlBinary bo) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSelectCore(SqlSelect select) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitSelect(SqlSelect select) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitAlias(SqlAlias a) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSource(SqlSource source) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSelectCore(SqlSelect select) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitSelect(SqlSelect select) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitAlias(SqlAlias a) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSource(SqlSource source) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSelectCore(SqlSelect select) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitSelect(SqlSelect select) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Convert(SqlNode node, SqlFactory sql, ProviderMode providerMode) + 在 System.Data.Linq.SqlClient.SqlProvider.BuildQuery(ResultShape resultShape, Type resultType, SqlNode node, ReadOnlyCollection`1 parentParameters, SqlNodeAnnotations annotations) + 在 System.Data.Linq.SqlClient.SqlProvider.BuildQuery(Expression query, SqlNodeAnnotations annotations) + 在 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) + 在 BLL.WBSAnalysisService.getWBSExpertArgumentCount(String projectId, String workPackageId) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\DigData\WBSAnalysisService.cs:行号 117 + 在 lambda_method(Closure , WBS_WorkPackage ) + 在 System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() + 在 (IEnumerator ) + 在 FineUIPro.Grid.CRTRkdQFrrBRFQuCddjZPswlTORP(IEnumerable , Boolean ) + 在 (Grid , IEnumerable , Boolean ) + 在 FineUIPro.Grid.DataBind(Boolean keepCurrentData) + 在 (Grid , Boolean ) + 在 FineUIPro.Grid.DataBind() + 在 FineUIPro.Web.DigData.ProjectWBSAnalysis.BindGrid() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\DigData\ProjectWBSAnalysis.aspx.cs:行号 58 + 在 FineUIPro.Web.DigData.ProjectWBSAnalysis.changeTree(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\DigData\ProjectWBSAnalysis.aspx.cs:行号 46 + 在 FineUIPro.Web.Controls.ProjectWBSControl.trWBS_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\Controls\ProjectWBSControl.ascx.cs:行号 78 + 在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e) + 在 (Tree , TreeCommandEventArgs ) + 在 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/25/2023 09:52:02 +出错文件:http://localhost:2325/DigData/ProjectWBSAnalysis.aspx +IP地址:::1 +操作人员:JT + +出错时间:09/25/2023 09:52:02 + + +错误信息开始=====> +错误类型:IOException +错误信息:句柄无效。 + +错误堆栈: + 在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) + 在 System.IO.__Error.WinIOError() + 在 System.Threading.EventWaitHandle.Set() + 在 System.Net.TimerThread.Prod() + 在 System.Net.TimerThread.TimerQueue.CreateTimer(Callback callback, Object context) + 在 System.Net.HttpWebRequest.SubmitRequest(ServicePoint servicePoint) + 在 System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) + 在 System.Net.HttpWebRequest.GetRequestStream() + 在 Microsoft.WebTools.BrowserLink.Runtime.Tracing.DataDispatchExecutionListener.Initialize(HttpWebRequest request) + 在 Microsoft.WebTools.BrowserLink.Runtime.Tracing.PageInspectorHttpModule.OnPreRequestHandlerExecute(Object sender, EventArgs e) + 在 System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) + 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +出错时间:09/25/2023 09:53:44 +出错文件:http://localhost:2325/indexProject.aspx?projectId=7b691ed0-6bad-468f-9e54-f0f5ba4df21f +IP地址:::1 +操作人员:JT + +出错时间:09/25/2023 09:53:45 + + +错误信息开始=====> +错误类型:ArgumentNullException +错误信息:值不能为 null。 +参数名: text +错误堆栈: + 在 System.Data.Linq.SqlClient.SqlHelpers.GetStringContainsPattern(String text, Char escape, Boolean& usedEscapeChar) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.TranslateStringMethod(SqlMethodCall mc) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitMethodCall(SqlMethodCall mc) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitBinaryOperator(SqlBinary bo) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitBinaryOperator(SqlBinary bo) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSelectCore(SqlSelect select) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitSelect(SqlSelect select) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitAlias(SqlAlias a) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSource(SqlSource source) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSelectCore(SqlSelect select) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitSelect(SqlSelect select) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitAlias(SqlAlias a) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSource(SqlSource source) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSelectCore(SqlSelect select) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitSelect(SqlSelect select) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Convert(SqlNode node, SqlFactory sql, ProviderMode providerMode) + 在 System.Data.Linq.SqlClient.SqlProvider.BuildQuery(ResultShape resultShape, Type resultType, SqlNode node, ReadOnlyCollection`1 parentParameters, SqlNodeAnnotations annotations) + 在 System.Data.Linq.SqlClient.SqlProvider.BuildQuery(Expression query, SqlNodeAnnotations annotations) + 在 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) + 在 BLL.WBSAnalysisService.getWBSExpertArgumentCount(String projectId, String workPackageId) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\DigData\WBSAnalysisService.cs:行号 114 + 在 lambda_method(Closure , WBS_WorkPackage ) + 在 System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() + 在 (IEnumerator ) + 在 FineUIPro.Grid.CRTRkdQFrrBRFQuCddjZPswlTORP(IEnumerable , Boolean ) + 在 (Grid , IEnumerable , Boolean ) + 在 FineUIPro.Grid.DataBind(Boolean keepCurrentData) + 在 (Grid , Boolean ) + 在 FineUIPro.Grid.DataBind() + 在 FineUIPro.Web.DigData.ProjectWBSAnalysis.BindGrid() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\DigData\ProjectWBSAnalysis.aspx.cs:行号 58 + 在 FineUIPro.Web.DigData.ProjectWBSAnalysis.changeTree(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\DigData\ProjectWBSAnalysis.aspx.cs:行号 46 + 在 FineUIPro.Web.Controls.ProjectWBSControl.trWBS_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\Controls\ProjectWBSControl.ascx.cs:行号 78 + 在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e) + 在 (Tree , TreeCommandEventArgs ) + 在 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/25/2023 09:57:30 +出错文件:http://localhost:2325/DigData/ProjectWBSAnalysis.aspx +IP地址:::1 +操作人员:JT + +出错时间:09/25/2023 09:57:30 + + +错误信息开始=====> +错误类型:ArgumentNullException +错误信息:值不能为 null。 +参数名: text +错误堆栈: + 在 System.Data.Linq.SqlClient.SqlHelpers.GetStringContainsPattern(String text, Char escape, Boolean& usedEscapeChar) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.TranslateStringMethod(SqlMethodCall mc) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitMethodCall(SqlMethodCall mc) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitBinaryOperator(SqlBinary bo) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitBinaryOperator(SqlBinary bo) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSelectCore(SqlSelect select) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitSelect(SqlSelect select) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitAlias(SqlAlias a) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSource(SqlSource source) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSelectCore(SqlSelect select) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitSelect(SqlSelect select) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitAlias(SqlAlias a) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSource(SqlSource source) + 在 System.Data.Linq.SqlClient.SqlVisitor.VisitSelectCore(SqlSelect select) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitSelect(SqlSelect select) + 在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node) + 在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Convert(SqlNode node, SqlFactory sql, ProviderMode providerMode) + 在 System.Data.Linq.SqlClient.SqlProvider.BuildQuery(ResultShape resultShape, Type resultType, SqlNode node, ReadOnlyCollection`1 parentParameters, SqlNodeAnnotations annotations) + 在 System.Data.Linq.SqlClient.SqlProvider.BuildQuery(Expression query, SqlNodeAnnotations annotations) + 在 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) + 在 BLL.WBSAnalysisService.getWBSExpertArgumentCount(String projectId, String workPackageId) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\DigData\WBSAnalysisService.cs:行号 114 + 在 lambda_method(Closure , WBS_WorkPackage ) + 在 System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() + 在 (IEnumerator ) + 在 FineUIPro.Grid.CRTRkdQFrrBRFQuCddjZPswlTORP(IEnumerable , Boolean ) + 在 (Grid , IEnumerable , Boolean ) + 在 FineUIPro.Grid.DataBind(Boolean keepCurrentData) + 在 (Grid , Boolean ) + 在 FineUIPro.Grid.DataBind() + 在 FineUIPro.Web.DigData.ProjectWBSAnalysis.BindGrid() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\DigData\ProjectWBSAnalysis.aspx.cs:行号 58 + 在 FineUIPro.Web.DigData.ProjectWBSAnalysis.changeTree(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\DigData\ProjectWBSAnalysis.aspx.cs:行号 46 + 在 FineUIPro.Web.Controls.ProjectWBSControl.trWBS_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\Controls\ProjectWBSControl.ascx.cs:行号 78 + 在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e) + 在 (Tree , TreeCommandEventArgs ) + 在 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/25/2023 10:02:17 +出错文件:http://localhost:2325/DigData/ProjectWBSAnalysis.aspx +IP地址:::1 +操作人员:JT + +出错时间:09/25/2023 10:02:17 + + +错误信息开始=====> +错误类型: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/25/2023 10:05:00 +出错文件:http://localhost:2325/DigData/ProjectWBSAnalysis.aspx +IP地址:::1 +操作人员:JT + +出错时间:09/25/2023 10:05:00 + + +错误信息开始=====> +错误类型: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/25/2023 10:05:02 +出错文件:http://localhost:2325/DigData/ProjectWBSAnalysis.aspx +IP地址:::1 +操作人员:JT + +出错时间:09/25/2023 10:05:02 + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 911aa7ea..9bec6a10 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -14233,7 +14233,7 @@ True 0 / - http://localhost:12669/ + http://localhost:2325/ False False diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index e49dff5f..5d993b06 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -39388,10 +39388,10 @@ namespace Model private string _SaveHandleMan; - private string _WorkPackageId; - private string _WorkPackageName; + private string _WorkPackageId; + private EntityRef _Base_Project; private EntityRef _Person_Persons; @@ -39448,10 +39448,10 @@ namespace Model partial void OnProposeUnitIdChanged(); partial void OnSaveHandleManChanging(string value); partial void OnSaveHandleManChanged(); - partial void OnWorkPackageIdChanging(string value); - partial void OnWorkPackageIdChanged(); partial void OnWorkPackageNameChanging(string value); partial void OnWorkPackageNameChanged(); + partial void OnWorkPackageIdChanging(string value); + partial void OnWorkPackageIdChanged(); #endregion public Check_CheckControl() @@ -39930,26 +39930,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageId", DbType="NVarChar(2000)")] - public string WorkPackageId - { - get - { - return this._WorkPackageId; - } - set - { - if ((this._WorkPackageId != value)) - { - this.OnWorkPackageIdChanging(value); - this.SendPropertyChanging(); - this._WorkPackageId = value; - this.SendPropertyChanged("WorkPackageId"); - this.OnWorkPackageIdChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageName", DbType="NVarChar(2000)")] public string WorkPackageName { @@ -39970,6 +39950,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageId", DbType="NVarChar(2000)")] + public string WorkPackageId + { + get + { + return this._WorkPackageId; + } + set + { + if ((this._WorkPackageId != value)) + { + this.OnWorkPackageIdChanging(value); + this.SendPropertyChanging(); + this._WorkPackageId = value; + this.SendPropertyChanged("WorkPackageId"); + this.OnWorkPackageIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckControl_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -100637,10 +100637,10 @@ namespace Model private string _HazardValue; - private string _WorkPackageId; - private string _WorkPackageName; + private string _WorkPackageId; + private EntityRef _Base_Unit; private EntityRef _HSSE_Hazard_HazardRegisterTypes; @@ -100741,10 +100741,10 @@ namespace Model partial void OnRegisterTypes4IdChanged(); partial void OnHazardValueChanging(string value); partial void OnHazardValueChanged(); - partial void OnWorkPackageIdChanging(string value); - partial void OnWorkPackageIdChanged(); partial void OnWorkPackageNameChanging(string value); partial void OnWorkPackageNameChanged(); + partial void OnWorkPackageIdChanging(string value); + partial void OnWorkPackageIdChanged(); #endregion public HSSE_Hazard_HazardRegister() @@ -101682,26 +101682,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageId", DbType="NVarChar(2000)")] - public string WorkPackageId - { - get - { - return this._WorkPackageId; - } - set - { - if ((this._WorkPackageId != value)) - { - this.OnWorkPackageIdChanging(value); - this.SendPropertyChanging(); - this._WorkPackageId = value; - this.SendPropertyChanged("WorkPackageId"); - this.OnWorkPackageIdChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageName", DbType="NVarChar(2000)")] public string WorkPackageName { @@ -101722,6 +101702,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageId", DbType="NVarChar(2000)")] + public string WorkPackageId + { + get + { + return this._WorkPackageId; + } + set + { + if ((this._WorkPackageId != value)) + { + this.OnWorkPackageIdChanging(value); + this.SendPropertyChanging(); + this._WorkPackageId = value; + this.SendPropertyChanged("WorkPackageId"); + this.OnWorkPackageIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HSSE_Hazard_HazardRegister_Base_Unit", Storage="_Base_Unit", ThisKey="ResponsibleUnit", OtherKey="UnitId", IsForeignKey=true)] public Base_Unit Base_Unit { From 6921fd418849ac8607eaa2618f85a401ad8a239b Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Mon, 25 Sep 2023 11:06:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?20230925=E6=96=B0=E5=A2=9Ewbs=E4=B8=8B?= =?UTF-8?q?=E5=88=86=E9=83=A8=E5=88=86=E9=A1=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/API/APIBaseInfoService.cs | 23 +++++++++++++++++++ SGGL/WebAPI/Controllers/BaseInfoController.cs | 21 +++++++++++++++++ SGGL/WebAPI/WebAPI.csproj | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/SGGL/BLL/API/APIBaseInfoService.cs b/SGGL/BLL/API/APIBaseInfoService.cs index ce396ca6..52a65a14 100644 --- a/SGGL/BLL/API/APIBaseInfoService.cs +++ b/SGGL/BLL/API/APIBaseInfoService.cs @@ -93,6 +93,29 @@ namespace BLL return getDataLists; } } + + /// + /// + + /// + /// + /// + public static List getProjectWBSByUnitWorkId(string projectId, string unitWorkId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var getDataLists = (from x in db.WBS_WorkPackage + where x.ProjectId == projectId && x.SuperWorkPack == null && x.UnitWorkId == unitWorkId + orderby x.WorkPackageCode + select new Model.BaseInfoItem + { + BaseInfoId = x.WorkPackageId, + BaseInfoCode = x.WorkPackageCode, + BaseInfoName = x.PackageContent, + } + ).ToList(); + return getDataLists; + } + } /// /// 根据项目、单位ID获取单位工程 diff --git a/SGGL/WebAPI/Controllers/BaseInfoController.cs b/SGGL/WebAPI/Controllers/BaseInfoController.cs index f7217e6e..ccd86fc0 100644 --- a/SGGL/WebAPI/Controllers/BaseInfoController.cs +++ b/SGGL/WebAPI/Controllers/BaseInfoController.cs @@ -100,6 +100,27 @@ namespace WebAPI.Controllers return responeData; } + /// + /// 获取单位工程下分部分项 + /// + /// + /// + /// + public Model.ResponeData getProjectWBSByUnitWorkId(string projectId, string unitWorkId) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = BLL.APIBaseInfoService.getProjectWBSByUnitWorkId(projectId, unitWorkId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } /// /// 根据项目,单位Id获取单位工程 diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj index 25e3b181..7ace3eb3 100644 --- a/SGGL/WebAPI/WebAPI.csproj +++ b/SGGL/WebAPI/WebAPI.csproj @@ -362,7 +362,7 @@ True 0 / - http://localhost:14920/ + http://localhost:1766/ False False