diff --git a/DataBase/版本日志/SUBQHSE_V2025-09-18-gf.sql b/DataBase/版本日志/SUBQHSE_V2025-09-18-gf.sql new file mode 100644 index 00000000..f3ddf97f --- /dev/null +++ b/DataBase/版本日志/SUBQHSE_V2025-09-18-gf.sql @@ -0,0 +1,4 @@ +alter table dbo.Comprehensive_NCRManagement drop constraint FK_Comprehensive_NCRManagement_Sys_User +GO +alter table Comprehensive_NCRManagement alter column Supervisor nvarchar(1000) null +GO \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx index 9be113a7..9cc30045 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx @@ -90,9 +90,11 @@ - - + + + + + <%-- diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs index 10423154..b933ca8c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs @@ -248,6 +248,36 @@ namespace FineUIPro.Web.Comprehensive } } + /// + /// 监督人 + /// + /// + /// + protected string ConvertSupervisorName(object Supervisor) + { + string SupervisorName = string.Empty; + if (Supervisor != null) + { + string[] Ids = Supervisor.ToString().Split(','); + foreach (string t in Ids) + { + var user = BLL.UserService.GetUserByUserId(t); + if (user != null) + { + SupervisorName += user.UserName + ","; + } + } + } + if (SupervisorName != string.Empty) + { + return SupervisorName.Substring(0, SupervisorName.Length - 1); + } + else + { + return ""; + } + } + public static string ConvertState(object Status) { if (Status != null) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs index f8629a3c..cf2a31a3 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs @@ -147,6 +147,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::System.Web.UI.WebControls.Label Label3; + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + /// /// lbtnFileUrl 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataInNew.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataInNew.aspx.cs index ea7b9fe6..49aa293f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataInNew.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataInNew.aspx.cs @@ -328,11 +328,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive && (x.SuperUnitWork == null || x.SuperUnitWork == "0") 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; + var users = from x in Funs.DB.Sys_User + where x.UnitId == BLL.Const.UnitId_CWCEC + select x; var dataInTemp = from x in Funs.DB.Sys_CQMS_DataInTemp where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == "NCR" @@ -419,11 +417,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive } if (!string.IsNullOrEmpty(tempData.Value6.Trim())) { - if (tempData.Value6.Trim() != "过程监督不到位" && tempData.Value6.Trim() != "质量缺陷" && tempData.Value6.Trim() != "质量管理问题" && tempData.Value6.Trim() != "不按设计要求施工" && tempData.Value6.Trim() != "不按程序施工" && tempData.Value6.Trim() != "成品保护不到位") + string[] strs = tempData.Value6.Trim().Split(','); + bool b = true; + foreach (var item in strs) { - errInfo += "问题类别[" + tempData.Value6.Trim() + "]错误;"; + if (item != "过程监督不到位" && item != "质量缺陷" && item != "质量管理问题" && item != "不按设计要求施工" && item != "不按程序施工" && item != "成品保护不到位") + { + errInfo += "问题类别[" + item + "]错误;"; + b = false; + } } - else + if (b) { Ins.Problem = tempData.Value6.Trim(); } @@ -516,14 +520,28 @@ namespace FineUIPro.Web.CQMS.Comprehensive } if (!string.IsNullOrEmpty(tempData.Value14.Trim()))//监督人 { - var user = users.FirstOrDefault(x => x.UserName == tempData.Value14.Trim()); - if (user != null) + string[] strs = tempData.Value14.Trim().Split(','); + bool b = true; + string supervisor = string.Empty; + foreach (var item in strs) { - Ins.Supervisor = user.UserId; + var user = users.FirstOrDefault(x => x.UserName == item); + if (user == null) + { + errInfo += "监督人[" + item + "]错误;"; + b = false; + } + else + { + supervisor += user.UserId + ","; + } } - else + if (b) { - errInfo += "监督人[" + tempData.Value14.Trim() + "]错误;"; + if (!string.IsNullOrEmpty(supervisor)) + { + Ins.Supervisor = supervisor.Substring(0, supervisor.Length - 1); + } } } if (!string.IsNullOrEmpty(tempData.Value15)) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx index 42f53823..c508e8bd 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx @@ -29,8 +29,7 @@ - - + @@ -59,7 +58,7 @@ - + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs index 64226a04..84fdad89 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs @@ -39,11 +39,11 @@ 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; - + BLL.UserService.InitUserProjectIdUnitIdDropDownList(this.drpSupervisor, this.CurrUser.LoginProjectId, BLL.Const.UnitId_CWCEC, false);//监督人 + //LoadAuditSelect(); + //this.agree.Hidden = true; + //this.options.Hidden = true; + this.NCRManagementId = Request.Params["NCRManagementId"]; Model.Comprehensive_NCRManagement nCRManagement = BLL.NCRManagementService.GetNCRManagementById(this.NCRManagementId); if (nCRManagement != null) @@ -80,9 +80,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.txtCompleteDate.Text = string.Format("{0:yyyy-MM-dd}", nCRManagement.CompleteDate); } - if (nCRManagement.Problem!=null) + if (nCRManagement.Problem != null) { - this.ddlProblem.SelectedValue = nCRManagement.Problem; + string[] strs = nCRManagement.Problem.Split(','); + this.ddlProblem.SelectedValueArray = strs; } this.txtMeasure.Text = nCRManagement.Measure; this.txtRemarkCode.Text = nCRManagement.RemarkCode.HasValue ? nCRManagement.RemarkCode.ToString() : ""; @@ -93,9 +94,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive if (!string.IsNullOrEmpty(nCRManagement.Supervisor)) { - this.drpSupervisor.SelectedValue = nCRManagement.Supervisor; + var users = BLL.UserService.GetUserListByProjectIdAndUnitId(this.CurrUser.LoginProjectId, BLL.Const.UnitId_CWCEC); + var totalUsers = from x in Funs.DB.Sys_User where x.UnitId == BLL.Const.UnitId_CWCEC select x; + var userIds = users.Select(x => x.UserId); + string[] strs = nCRManagement.Supervisor.Split(','); + foreach (var item in strs) + { + if (!userIds.Contains(item)) + { + var user = totalUsers.FirstOrDefault(x => x.UserId == item); + users.Add(user); + } + } + this.drpSupervisor.DataSource = users; + this.drpSupervisor.DataBind(); + this.drpSupervisor.SelectedValueArray = strs; } - + //var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId); //if (currApprove != null) //{ @@ -195,7 +210,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// protected void btnSave_Click(object sender, EventArgs e) { - if (this.drpSendUnit.SelectedValue==BLL.Const._Null) + if (this.drpSendUnit.SelectedValue == BLL.Const._Null) { Alert.ShowInTop("请选择发出单位!", MessageBoxIcon.Warning); return; @@ -230,10 +245,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive nCRManagement.Contents = this.txtContents.Text.Trim(); #region 新增2024-03-29 - if (this.ddlProblem.SelectedValue != BLL.Const._Null) + string problem = string.Empty; + foreach (var item in this.ddlProblem.SelectedValueArray) { - nCRManagement.Problem = this.ddlProblem.SelectedValue; + problem += item + ","; } + if (!string.IsNullOrEmpty(problem)) + { + problem = problem.Substring(0, problem.Length - 1); + } + nCRManagement.Problem = problem; nCRManagement.Measure = this.txtMeasure.Text.Trim(); #endregion @@ -252,7 +273,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive } nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim(); nCRManagement.ImplementationFrontState = this.ddlImplementationFrontState.SelectedValue.Trim(); - + string ids = string.Empty; var lists = this.drpUnitWorkIds.SelectedValueArray; @@ -278,10 +299,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive } nCRManagement.ReceiveUnit = unitIds; nCRManagement.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); - if (this.drpSupervisor.SelectedValue!=BLL.Const._Null) + string supervisor = string.Empty; + foreach (var item in this.drpSupervisor.SelectedValueArray) { - nCRManagement.Supervisor = this.drpSupervisor.SelectedValue; + supervisor += item + ","; } + if (!string.IsNullOrEmpty(supervisor)) + { + supervisor = supervisor.Substring(0, supervisor.Length - 1); + } + nCRManagement.Supervisor = supervisor; if (string.IsNullOrEmpty(this.NCRManagementId)) { if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) @@ -560,7 +587,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive //} //else //{ - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/nCRManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.NCRManagementMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/nCRManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.NCRManagementMenuId))); //} } #endregion diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs index dd80fe6b..dbf08c3d 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs @@ -2382,9 +2382,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew Row row = new Row(doc); row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1")); row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width, "", "", "unit")); - row.Cells.Add(CreateCell(Convert.ToString(item.RectificationRate), doc, table.FirstRow.Cells[2].CellFormat.Width)); - row.Cells.Add(CreateCell(Convert.ToString(item.TotationRate), doc, table.FirstRow.Cells[3].CellFormat.Width)); - row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width)); + row.Cells.Add(CreateCell(Convert.ToString(item.MonthsCount), doc, table.FirstRow.Cells[2].CellFormat.Width)); + row.Cells.Add(CreateCell(Convert.ToString(item.ProjectCount), doc, table.FirstRow.Cells[3].CellFormat.Width)); + row.Cells.Add(CreateCell(Convert.ToString(item.RectificationRate), doc, table.FirstRow.Cells[4].CellFormat.Width)); + row.Cells.Add(CreateCell(Convert.ToString(item.MonthsBackCount), doc, table.FirstRow.Cells[5].CellFormat.Width)); + row.Cells.Add(CreateCell(Convert.ToString(item.TotalNoBackCount), doc, table.FirstRow.Cells[6].CellFormat.Width)); + row.Cells.Add(CreateCell(Convert.ToString(item.TotationRate), doc, table.FirstRow.Cells[7].CellFormat.Width)); + row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[8].CellFormat.Width)); table.Rows.Insert(numberIndex, row); //num1 += MonthsCountstring; //num2 += ProjectCountstring; @@ -2421,9 +2425,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew Row rowhj = new Row(doc); rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width)); rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width, "", "", "unit")); - rowhj.Cells.Add(CreateCell(QuantitySum1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width)); - rowhj.Cells.Add(CreateCell(QuantitySum2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width)); - rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width)); + rowhj.Cells.Add(CreateCell(CheckNum.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width)); + rowhj.Cells.Add(CreateCell(OKNum.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width)); + rowhj.Cells.Add(CreateCell(QuantitySum1.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width)); + rowhj.Cells.Add(CreateCell(TotalCheckNum.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width)); + rowhj.Cells.Add(CreateCell(TotalOKNum.ToString(), doc, table.FirstRow.Cells[6].CellFormat.Width)); + rowhj.Cells.Add(CreateCell(QuantitySum2.ToString(), doc, table.FirstRow.Cells[7].CellFormat.Width)); + rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[8].CellFormat.Width)); table.Rows.Insert(numberIndex, rowhj); //自动设置表格样式 diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx index 8950371d..106ccefc 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx @@ -41,6 +41,11 @@ height: 300px; vertical-align: middle; } + + .f-grid-colheader-text { + white-space: normal; + word-break: break-all; + } @@ -1358,11 +1363,23 @@ - + - + + + + + + + + + @@ -1370,18 +1387,6 @@ - - - - -