diff --git a/DataBase/版本日志/SGGLDB_WH_2024-07-01-bwj.sql b/DataBase/版本日志/SGGLDB_WH_2024-07-01-bwj.sql new file mode 100644 index 00000000..47c59acc --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-07-01-bwj.sql @@ -0,0 +1,8 @@ +ALTER TABLE Comprehensive_NCRManagement ADD Supervisor nvarchar(50) +go +ALTER TABLE [dbo].[Comprehensive_NCRManagement] WITH CHECK ADD CONSTRAINT [FK_Comprehensive_NCRManagement_Sys_User] FOREIGN KEY([Supervisor]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[Comprehensive_NCRManagement] CHECK CONSTRAINT [FK_Comprehensive_NCRManagement_Sys_User] +GO diff --git a/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs b/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs index f02c6d4b..4bbfc43f 100644 --- a/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs @@ -119,6 +119,7 @@ namespace BLL newNCRManagement.Problem = nCRManagement.Problem; newNCRManagement.Measure = nCRManagement.Measure; newNCRManagement.RemarkCode = nCRManagement.RemarkCode; + newNCRManagement.Supervisor = nCRManagement.Supervisor; db.Comprehensive_NCRManagement.InsertOnSubmit(newNCRManagement); db.SubmitChanges(); } @@ -150,6 +151,7 @@ namespace BLL newNCRManagement.Problem = nCRManagement.Problem; newNCRManagement.Measure = nCRManagement.Measure; newNCRManagement.RemarkCode = nCRManagement.RemarkCode; + newNCRManagement.Supervisor = nCRManagement.Supervisor; db.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx index 5bd16ac2..65d9065b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx @@ -53,14 +53,14 @@ + + - - @@ -89,6 +89,9 @@ + + <%-- diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs index 61c7cb53..beaaf315 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs @@ -29,12 +29,13 @@ namespace FineUIPro.Web.Comprehensive } public void BindGrid() { - string strSql = @"select NCRManagementId, ProjectId, SendUnit, NCRCode, Contents,Problem,Measure,IssuedDate, ReceiveUnit,Status, - ClosedDate, CompleteDate, ResponsibleMan, AttachUrl, ImplementationFrontState, - CompileMan, UnitWorkId,CN.ProfessionalName,C.CNProfessionalId,u.UnitName,C.RemarkCode + string strSql = @"select C.NCRManagementId, C.ProjectId, C.SendUnit, C.NCRCode, C.Contents,C.Problem,C.Measure,C.IssuedDate, C.ReceiveUnit,C.Status, + C.ClosedDate, C.CompleteDate, C.ResponsibleMan, C.AttachUrl, C.ImplementationFrontState,C.Supervisor, + C.CompileMan, C.UnitWorkId,CN.ProfessionalName,C.CNProfessionalId,u.UnitName,C.RemarkCode,su.UserName as SupervisorName from Comprehensive_NCRManagement C left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId left join Base_Unit u on u.UnitId = C.SendUnit + left join Sys_User su on su.UserId = C.Supervisor where C.ProjectId = @ProjectId"; List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); @@ -417,11 +418,16 @@ namespace FineUIPro.Web.Comprehensive cell = row.CreateCell(3); cell.CellStyle = cellStyle; - cell.SetCellValue(item.Contents);//主要内容 + string unitWorkName = string.Empty; + if (!string.IsNullOrEmpty(item.UnitWorkId)) + { + unitWorkName = ConvertUnitWork(item.UnitWorkId); + } + cell.SetCellValue(unitWorkName);//单位工程 cell = row.CreateCell(4); cell.CellStyle = cellStyle; - cell.SetCellValue(item.IssuedDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.IssuedDate) : "");//下发日期 + cell.SetCellValue(item.Contents);//主要内容 cell = row.CreateCell(5); cell.CellStyle = cellStyle; @@ -433,13 +439,8 @@ namespace FineUIPro.Web.Comprehensive cell = row.CreateCell(7); cell.CellStyle = cellStyle; - string unitWorkName = string.Empty; - if (!string.IsNullOrEmpty(item.UnitWorkId)) - { - unitWorkName = ConvertUnitWork(item.UnitWorkId); - } - cell.SetCellValue(unitWorkName);//单位工程 - + cell.SetCellValue(item.IssuedDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.IssuedDate) : "");//下发日期 + cell = row.CreateCell(8); cell.CellStyle = cellStyle; string receiveUnitName = string.Empty; @@ -460,18 +461,27 @@ namespace FineUIPro.Web.Comprehensive cell = row.CreateCell(10); cell.CellStyle = cellStyle; - cell.SetCellValue(item.ResponsibleMan);//责任人 + cell.SetCellValue(item.ClosedDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ClosedDate) : "");//要求封闭日期 cell = row.CreateCell(11); cell.CellStyle = cellStyle; - cell.SetCellValue(item.ClosedDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ClosedDate) : "");//要求封闭日期 - + cell.SetCellValue(item.CompleteDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.CompleteDate) : "");//完成日期 + cell = row.CreateCell(12); cell.CellStyle = cellStyle; - cell.SetCellValue(item.CompleteDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.CompleteDate) : "");//完成日期 + cell.SetCellValue(item.ResponsibleMan);//责任人 cell = row.CreateCell(13); cell.CellStyle = cellStyle; + string supervisorName = string.Empty; + if (!string.IsNullOrEmpty(item.Supervisor)) + { + supervisorName = BLL.UserService.GetUserNameByUserId(item.Supervisor); + } + cell.SetCellValue(supervisorName);//监督人 + + cell = row.CreateCell(14); + cell.CellStyle = cellStyle; cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号 i++; diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs index 645fc344..3d2e31e4 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs @@ -126,7 +126,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL(ds.Tables[0], 14); + AddDatasetToSQL(ds.Tables[0], 15); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -178,6 +178,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive && x.SuperUnitWork == null select x; + var users = from x in Funs.DB.Project_ProjectUser + join y in Funs.DB.Sys_User on x.UserId equals y.UserId + where x.ProjectId == this.CurrUser.LoginProjectId + && x.UnitId == BLL.Const.UnitId_CWCEC + select y; + for (int i = 1; i < ir; i++) { string row0 = pds.Rows[i][0].ToString(); @@ -214,16 +220,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive result += (i + 2).ToString() + "," + "NCR单号" + "," + "此项为必填项!" + "|"; } - string row4 = pds.Rows[i][4].ToString(); - if (!string.IsNullOrEmpty(row4)) + string row3 = pds.Rows[i][3].ToString(); + if (!string.IsNullOrEmpty(row3)) { - try + string[] reunit = row3.Split(','); + foreach (string unitWork in reunit) { - DateTime date = Convert.ToDateTime(row4.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "下发日期" + "," + "[" + row4 + "]错误!" + "|"; + var u = unitWorks.Where(x => x.UnitWorkName == unitWork.Trim()).FirstOrDefault(); + if (u == null) + { + result += (i + 2).ToString() + "," + "单位工程名称" + "," + "[" + unitWork.Trim() + "]不存在!" + "|"; + } } } @@ -239,17 +246,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive string row7 = pds.Rows[i][7].ToString(); if (!string.IsNullOrEmpty(row7)) { - string[] reunit = row7.Split(','); - foreach (string unitWork in reunit) + try { - var u = unitWorks.Where(x => x.UnitWorkName == unitWork.Trim()).FirstOrDefault(); - if (u == null) - { - result += (i + 2).ToString() + "," + "单位工程名称" + "," + "[" + unitWork.Trim() + "]不存在!" + "|"; - } + DateTime date = Convert.ToDateTime(row7.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "下发日期" + "," + "[" + row7 + "]错误!" + "|"; } } + string row8 = pds.Rows[i][8].ToString(); if (!string.IsNullOrEmpty(row8)) { @@ -273,6 +280,19 @@ namespace FineUIPro.Web.CQMS.Comprehensive } } + string row10 = pds.Rows[i][10].ToString(); + if (!string.IsNullOrEmpty(row10)) + { + try + { + DateTime date = Convert.ToDateTime(row10.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "要求封闭日期" + "," + "[" + row10 + "]错误!" + "|"; + } + } + string row11 = pds.Rows[i][11].ToString(); if (!string.IsNullOrEmpty(row11)) { @@ -282,25 +302,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive } catch (Exception) { - result += (i + 2).ToString() + "," + "要求封闭日期" + "," + "[" + row11 + "]错误!" + "|"; - } - } - - string row12 = pds.Rows[i][12].ToString(); - if (!string.IsNullOrEmpty(row12)) - { - try - { - DateTime date = Convert.ToDateTime(row12.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "完成日期" + "," + "[" + row12 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "完成日期" + "," + "[" + row11 + "]错误!" + "|"; } } string row13 = pds.Rows[i][13].ToString(); - if (string.IsNullOrEmpty(row13)) + if (!string.IsNullOrEmpty(row13)) + { + var u = users.Where(x => x.UserName == row13).FirstOrDefault(); + if (u == null) + { + result += (i + 2).ToString() + "," + "监督人" + "," + "[" + row13 + "]不存在!" + "|"; + } + } + + string row14 = pds.Rows[i][14].ToString(); + if (string.IsNullOrEmpty(row14)) { result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|"; } @@ -308,11 +325,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive { try { - int t = Convert.ToInt32(row13); + int t = Convert.ToInt32(row14); } catch (Exception) { - result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row13 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row14 + "]错误!" + "|"; } } } @@ -420,7 +437,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL2(ds.Tables[0], 14); + AddDatasetToSQL2(ds.Tables[0], 15); } catch (Exception ex) { @@ -464,13 +481,19 @@ namespace FineUIPro.Web.CQMS.Comprehensive && x.SuperUnitWork == null select x; + var users = from x in Funs.DB.Project_ProjectUser + join y in Funs.DB.Sys_User on x.UserId equals y.UserId + where x.ProjectId == this.CurrUser.LoginProjectId + && x.UnitId == BLL.Const.UnitId_CWCEC + select y; + for (int i = 1; i < ir; i++) { Model.Comprehensive_NCRManagement oldViewInfo = new Model.Comprehensive_NCRManagement(); string row0 = pds.Rows[i][0].ToString().Trim(); string row1 = pds.Rows[i][1].ToString().Trim(); var cn = cns.Where(y => y.ProfessionalName == row1).FirstOrDefault(); - oldViewInfo = oldViewInfos.Where(x => x.RemarkCode ==Funs.GetNewInt( pds.Rows[i][13].ToString().Trim()) + oldViewInfo = oldViewInfos.Where(x => x.RemarkCode ==Funs.GetNewInt( pds.Rows[i][14].ToString().Trim()) ).FirstOrDefault(); if (oldViewInfo == null) { @@ -480,33 +503,36 @@ namespace FineUIPro.Web.CQMS.Comprehensive des.SendUnit = units.Where(x => x.UnitName == row0.Trim()).FirstOrDefault().UnitId; des.CNProfessionalId = cn.CNProfessionalId; des.NCRCode = pds.Rows[i][2].ToString().Trim(); - des.Contents = pds.Rows[i][3].ToString().Trim(); - if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim())) + if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim())) { - des.IssuedDate = Convert.ToDateTime(pds.Rows[i][4].ToString().Trim()); + des.UnitWorkId = BLL.UnitWorkService.GetUnitWorkIdsByUnitWorkNames(this.CurrUser.LoginProjectId, pds.Rows[i][3].ToString().Trim()); } + des.Contents = pds.Rows[i][4].ToString().Trim(); des.Problem = pds.Rows[i][5].ToString().Trim(); des.Measure = pds.Rows[i][6].ToString().Trim(); if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim())) { - des.UnitWorkId = BLL.UnitWorkService.GetUnitWorkIdsByUnitWorkNames(this.CurrUser.LoginProjectId, pds.Rows[i][7].ToString().Trim()); - } + des.IssuedDate = Convert.ToDateTime(pds.Rows[i][7].ToString().Trim()); + } if (!string.IsNullOrEmpty(pds.Rows[i][8].ToString().Trim())) { des.ReceiveUnit = BLL.UnitService.GetUnitIds(pds.Rows[i][8].ToString().Trim()); } - des.ImplementationFrontState = pds.Rows[i][9].ToString().Trim(); - des.ResponsibleMan = pds.Rows[i][10].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim())) + { + des.ClosedDate = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim()); + } if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim())) { - des.ClosedDate = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim()); + des.CompleteDate = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim()); } - if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim())) + des.ResponsibleMan = pds.Rows[i][12].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][13].ToString().Trim())) { - des.CompleteDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim()); + des.Supervisor = users.FirstOrDefault(x => x.UserName == pds.Rows[i][13].ToString().Trim()).UserId; } - des.RemarkCode = Funs.GetNewInt(pds.Rows[i][13].ToString().Trim()); + des.RemarkCode = Funs.GetNewInt(pds.Rows[i][14].ToString().Trim()); des.Status = BLL.Const.Comprehensive_Compile; des.CompileMan = this.CurrUser.UserId; BLL.NCRManagementService.AddNCRManagement(des); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx index 154872d5..42f53823 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx @@ -59,6 +59,7 @@ + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs index 9a25881e..64226a04 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs @@ -39,6 +39,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive BLL.UnitService.InitUnitDownList(this.drpUnitIds, this.CurrUser.LoginProjectId, false); BLL.UnitService.InitAllUnitDownList(this.drpSendUnit, this.CurrUser.LoginProjectId, true); BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); + BLL.UserService.InitUserProjectIdUnitIdDropDownList(this.drpSupervisor, this.CurrUser.LoginProjectId, BLL.Const.UnitId_CWCEC, true);//监督人 //LoadAuditSelect(); //this.agree.Hidden = true; //this.options.Hidden = true; @@ -89,6 +90,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.txtResponsibleMan.Text = nCRManagement.ResponsibleMan; //this.txtImplementationFrontState.Text = nCRManagement.ImplementationFrontState; this.ddlImplementationFrontState.SelectedValue = nCRManagement.ImplementationFrontState; + + if (!string.IsNullOrEmpty(nCRManagement.Supervisor)) + { + this.drpSupervisor.SelectedValue = nCRManagement.Supervisor; + } //var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId); //if (currApprove != null) @@ -154,8 +160,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.ddlProblem.Readonly = true; //this.btnAttach.Enabled = false; this.txtRemarkCode.Readonly = true; - - + this.drpSupervisor.Readonly = true; } ///// @@ -273,6 +278,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive } nCRManagement.ReceiveUnit = unitIds; nCRManagement.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); + if (this.drpSupervisor.SelectedValue!=BLL.Const._Null) + { + nCRManagement.Supervisor = this.drpSupervisor.SelectedValue; + } if (string.IsNullOrEmpty(this.NCRManagementId)) { if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs index ceac159c..d664072b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs @@ -129,6 +129,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// protected global::FineUIPro.DropDownList drpUnitIds; + /// + /// drpSupervisor 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpSupervisor; + /// /// ddlImplementationFrontState 控件。 /// diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index e69de29b..a29f5566 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -0,0 +1,97 @@ + +错误信息开始=====> +错误类型: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.Collections.Generic.IEnumerable.GetEnumerator() + 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) + 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) + 在 FineUIPro.Web.common.mainProject2.Page_Load(Object sender, EventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\common\mainProject2.aspx.cs:行号 52 + 在 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 +----错误信息: +----等待的操作过时。 +----错误堆栈: + 出错时间:07/01/2024 13:46:32 +出错文件:http://localhost:8579/common/mainProject2.aspx +IP地址:::1 +操作人员:JT + +出错时间:07/01/2024 13:46:32 + + +错误信息开始=====> +错误类型:FormatException +错误信息:该字符串未被识别为有效的 DateTime。有一个未知单词(从索引 0 处开始)。 +错误堆栈: + 在 FineUIPro.Web.CQMS.Comprehensive.NCRManagementDataIn.ImportXlsToData2(String fileName) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\NCRManagementDataIn.aspx.cs:行号 444 + 在 FineUIPro.Web.CQMS.Comprehensive.NCRManagementDataIn.btnImport_Click(Object sender, EventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\NCRManagementDataIn.aspx.cs:行号 387 + 在 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) +出错时间:07/01/2024 13:50:21 +出错文件:http://localhost:8579/CQMS/Comprehensive/NCRManagementDataIn.aspx +IP地址:::1 +操作人员:JT + +出错时间:07/01/2024 13:50:21 + + +错误信息开始=====> +错误类型:SqlException +错误信息:列名 'ProjectId' 不明确。 +错误堆栈: + 在 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.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.Comprehensive.NCRManagement.BindGrid() 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\NCRManagement.aspx.cs:行号 58 + 在 FineUIPro.Web.Comprehensive.NCRManagement.Page_Load(Object sender, EventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\NCRManagement.aspx.cs:行号 27 + 在 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) +出错时间:07/01/2024 14:06:06 +出错文件:http://localhost:8579/CQMS/Comprehensive/NCRManagement.aspx +IP地址:::1 +操作人员:JT + +出错时间:07/01/2024 14:06:06 + diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/NCR管理导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/NCR管理导入模板.xls index 0110c6be..925d07ce 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/NCR管理导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/NCR管理导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index cb873201..63722353 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true false diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config index 963148f2..eafda425 100644 --- a/SGGL/FineUIPro.Web/Web.config +++ b/SGGL/FineUIPro.Web/Web.config @@ -12,7 +12,7 @@ - + diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 19ee83c0..2597d86b 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -98557,6 +98557,8 @@ namespace Model private System.Nullable _RemarkCode; + private string _Supervisor; + private EntityRef _Sys_User; private EntityRef _Base_CNProfessional; @@ -98565,6 +98567,8 @@ namespace Model private EntityRef _Base_Unit; + private EntityRef _SupervisorSys_User; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -98609,6 +98613,8 @@ namespace Model partial void OnProblemChanged(); partial void OnRemarkCodeChanging(System.Nullable value); partial void OnRemarkCodeChanged(); + partial void OnSupervisorChanging(string value); + partial void OnSupervisorChanged(); #endregion public Comprehensive_NCRManagement() @@ -98617,6 +98623,7 @@ namespace Model this._Base_CNProfessional = default(EntityRef); this._Base_Project = default(EntityRef); this._Base_Unit = default(EntityRef); + this._SupervisorSys_User = default(EntityRef); OnCreated(); } @@ -99036,6 +99043,30 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Supervisor", DbType="NVarChar(50)")] + public string Supervisor + { + get + { + return this._Supervisor; + } + set + { + if ((this._Supervisor != value)) + { + if (this._SupervisorSys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnSupervisorChanging(value); + this.SendPropertyChanging(); + this._Supervisor = value; + this.SendPropertyChanged("Supervisor"); + this.OnSupervisorChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_NCRManagement_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] public Sys_User Sys_User { @@ -99172,6 +99203,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_NCRManagement_Sys_User", Storage="_SupervisorSys_User", ThisKey="Supervisor", OtherKey="UserId", IsForeignKey=true)] + public Sys_User SupervisorSys_User + { + get + { + return this._SupervisorSys_User.Entity; + } + set + { + Sys_User previousValue = this._SupervisorSys_User.Entity; + if (((previousValue != value) + || (this._SupervisorSys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._SupervisorSys_User.Entity = null; + previousValue.Comprehensive_NCRManagement_Sys_User.Remove(this); + } + this._SupervisorSys_User.Entity = value; + if ((value != null)) + { + value.Comprehensive_NCRManagement_Sys_User.Add(this); + this._Supervisor = value.UserId; + } + else + { + this._Supervisor = default(string); + } + this.SendPropertyChanged("SupervisorSys_User"); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -354844,6 +354909,8 @@ namespace Model private EntitySet _Comprehensive_InspectionPerson; + private EntitySet _Comprehensive_NCRManagement_Sys_User; + private EntitySet _Comprehensive_QualityAccident; private EntitySet _CostGoods_CostManage; @@ -355583,6 +355650,7 @@ namespace Model this._Comprehensive_DesignChangeOrder = new EntitySet(new Action(this.attach_Comprehensive_DesignChangeOrder), new Action(this.detach_Comprehensive_DesignChangeOrder)); this._Comprehensive_DesignDetails = new EntitySet(new Action(this.attach_Comprehensive_DesignDetails), new Action(this.detach_Comprehensive_DesignDetails)); this._Comprehensive_InspectionPerson = new EntitySet(new Action(this.attach_Comprehensive_InspectionPerson), new Action(this.detach_Comprehensive_InspectionPerson)); + this._Comprehensive_NCRManagement_Sys_User = new EntitySet(new Action(this.attach_Comprehensive_NCRManagement_Sys_User), new Action(this.detach_Comprehensive_NCRManagement_Sys_User)); this._Comprehensive_QualityAccident = new EntitySet(new Action(this.attach_Comprehensive_QualityAccident), new Action(this.detach_Comprehensive_QualityAccident)); this._CostGoods_CostManage = new EntitySet(new Action(this.attach_CostGoods_CostManage), new Action(this.detach_CostGoods_CostManage)); this._CostGoods_GoodsManage = new EntitySet(new Action(this.attach_CostGoods_GoodsManage), new Action(this.detach_CostGoods_GoodsManage)); @@ -357849,6 +357917,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_NCRManagement_Sys_User", Storage="_Comprehensive_NCRManagement_Sys_User", ThisKey="UserId", OtherKey="Supervisor", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_NCRManagement_Sys_User + { + get + { + return this._Comprehensive_NCRManagement_Sys_User; + } + set + { + this._Comprehensive_NCRManagement_Sys_User.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_QualityAccident_Sys_User", Storage="_Comprehensive_QualityAccident", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet Comprehensive_QualityAccident { @@ -362443,6 +362524,18 @@ namespace Model entity.Sys_User = null; } + private void attach_Comprehensive_NCRManagement_Sys_User(Comprehensive_NCRManagement entity) + { + this.SendPropertyChanging(); + entity.SupervisorSys_User = this; + } + + private void detach_Comprehensive_NCRManagement_Sys_User(Comprehensive_NCRManagement entity) + { + this.SendPropertyChanging(); + entity.SupervisorSys_User = null; + } + private void attach_Comprehensive_QualityAccident(Comprehensive_QualityAccident entity) { this.SendPropertyChanging(); diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index bd497c6b..5fe155da 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true