diff --git a/DataBase/版本日志/SGGLDB_CD_V2023-07-23-001.sql b/DataBase/版本日志/SGGLDB_CD_V2023-07-23-001.sql new file mode 100644 index 00000000..9285e7f2 Binary files /dev/null and b/DataBase/版本日志/SGGLDB_CD_V2023-07-23-001.sql differ diff --git a/SGGL/BLL/API/HSSE/APITestRecordService.cs b/SGGL/BLL/API/HSSE/APITestRecordService.cs index ed438f87..0bb7ffd0 100644 --- a/SGGL/BLL/API/HSSE/APITestRecordService.cs +++ b/SGGL/BLL/API/HSSE/APITestRecordService.cs @@ -754,11 +754,11 @@ namespace BLL if (getTestRecord.TestStartTime.HasValue) { getTestRecord.TestEndTime = DateTime.Now; - var getRItem = db.Training_TestRecordItem.Where(x => x.TestRecordId == getTestRecord.TestRecordId); - if (getRItem.Count() > 0) - { - getTestRecord.TestScores = getRItem.Sum(x => x.SubjectScore); - } + //var getRItem = db.Training_TestRecordItem.Where(x => x.TestRecordId == getTestRecord.TestRecordId); + //if (getRItem.Count() > 0) + //{ + getTestRecord.TestScores = db.Training_TestRecordItem.Where(x => x.TestRecordId == getTestRecord.TestRecordId).Sum(x => x.SubjectScore); + //} db.SubmitChanges(); getCode = getTestRecord.TestScores ?? 0; diff --git a/SGGL/BLL/Common/NPOIHelper.cs b/SGGL/BLL/Common/NPOIHelper.cs index b9e469f5..196c188d 100644 --- a/SGGL/BLL/Common/NPOIHelper.cs +++ b/SGGL/BLL/Common/NPOIHelper.cs @@ -546,8 +546,72 @@ namespace BLL.Common } return result; } + public static string DataSetToExcel(DataTable dt, string Path) + { + var result = string.Empty; + FileStream fs = null; + XSSFWorkbook workbook = new XSSFWorkbook(); - private static string GetValue(string cellValue, string type) + + XSSFSheet sheet = (XSSFSheet)workbook.CreateSheet(dt.TableName); + + XSSFCellStyle dateStyle = (XSSFCellStyle)workbook.CreateCellStyle(); + XSSFDataFormat format = (XSSFDataFormat)workbook.CreateDataFormat(); + dateStyle.DataFormat = format.GetFormat("yyyy-mm-dd"); + + int rowIndex = 0; + + #region 新建表,填充表头,填充列头,样式 + if (rowIndex == 0) + { + //#region 列头及样式 + //{ + // XSSFRow headerRow = (XSSFRow)sheet.CreateRow(0); + // XSSFCellStyle headStyle = (XSSFCellStyle)workbook.CreateCellStyle(); + // //headStyle.Alignment = CellHorizontalAlignment.CENTER; + // XSSFFont font = (XSSFFont)workbook.CreateFont(); + // font.FontHeightInPoints = 10; + // font.Boldweight = 700; + // headStyle.SetFont(font); + //} + //#endregion + //填充表头 + XSSFRow dataRow = (XSSFRow)sheet.CreateRow(rowIndex); + foreach (DataColumn column in dt.Columns) + { + dataRow.CreateCell(column.Ordinal).SetCellValue(column.ColumnName); + } + + rowIndex = 1; + } + #endregion + + foreach (DataRow row in dt.Rows) + { + XSSFRow dataRow = (XSSFRow)sheet.CreateRow(rowIndex); + + #region 填充内容 + foreach (DataColumn column in dt.Columns) + { + XSSFCell newCell = (XSSFCell)dataRow.CreateCell(column.Ordinal); + string type = row[column].GetType().FullName.ToString(); + newCell.SetCellValue(GetValue(row[column].ToString(), type)); + } + #endregion + + rowIndex++; + } + + + using (fs = File.OpenWrite(Path)) + { + workbook.Write(fs);//向打开的这个xls文件中写入数据 + result = Path; + } + return result; + } + + private static string GetValue(string cellValue, string type) { object value = string.Empty; switch (type) diff --git a/SGGL/FineUIPro.Web/CQMS/Check/CheckFineListEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/CheckFineListEdit.aspx.cs index 16ac123e..d1aada07 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/CheckFineListEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/CheckFineListEdit.aspx.cs @@ -679,9 +679,9 @@ namespace FineUIPro.Web.CQMS.Check approve.ApproveDate = DateTime.Now.AddMinutes(1); } BLL.CheckFineApproveService.AddCheckFineApprove(approve); - //APICommonService.SendSubscribeMessage(approve.ApproveMan, "质量巡检问题待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); - } - if (saveType == "save") + APICommonService.SendSubscribeMessage(approve.ApproveMan, "质量罚款单待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); + } + if (saveType == "save") { checkControl.SaveHandleMan = this.drpHandleMan.SelectedValue; } @@ -721,7 +721,7 @@ namespace FineUIPro.Web.CQMS.Check approve.ApproveType = this.drpHandleType.SelectedValue; BLL.CheckFineApproveService.AddCheckFineApprove(approve); - //APICommonService.SendSubscribeMessage(approve.ApproveMan, "质量巡检问题待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); + APICommonService.SendSubscribeMessage(approve.ApproveMan, "质量罚款单待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); } else { diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementEdit.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementEdit.aspx index 2ddec632..dfd8eec3 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementEdit.aspx @@ -17,7 +17,7 @@ - + diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementEdit.aspx.cs index d369cda7..ade40f70 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementEdit.aspx.cs @@ -39,8 +39,9 @@ namespace FineUIPro.Web.CQMS.ProcessControl drpAudit.DataTextField = "UserName"; this.drpAudit.DataSource = userList.ToList(); this.drpAudit.DataBind(); + Funs.FineUIPleaseSelect(drpAudit); - this.hdInspectionNoticeId.Text = Request.Params["inspectionId"]; + this.hdInspectionNoticeId.Text = Request.Params["inspectionId"]; this.agree.Hidden = true; this.options.Hidden = true; this.Panel1.Hidden = true; @@ -116,10 +117,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl this.Panel1.Hidden = false; this.options.Hidden = false; this.drpAudit.Hidden = true; - } - - - + } } @@ -155,8 +153,12 @@ namespace FineUIPro.Web.CQMS.ProcessControl Alert.ShowInTop("请先选择专业!", MessageBoxIcon.Warning); return; } - - Model.ProcessControl_InspectionManagement inspectionManagement = new Model.ProcessControl_InspectionManagement(); + if (this.drpAudit.Hidden==false && this.drpAudit.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请先选择专业工程师!", MessageBoxIcon.Warning); + return; + } + Model.ProcessControl_InspectionManagement inspectionManagement = new Model.ProcessControl_InspectionManagement(); inspectionManagement.ProjectId = this.CurrUser.LoginProjectId; if (this.drpUnit.SelectedValue != BLL.Const._Null) { diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx index 0ad24c0c..39d5fe04 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx @@ -175,14 +175,7 @@ - - - - - - - - + diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.cs index 1db2d234..6a4dc23c 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.cs @@ -21,7 +21,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl if (!IsPostBack) { GetButtonPower(); - BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商 + BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商 drpUnit.DataValueField = "UnitId"; drpUnit.DataTextField = "UnitName"; @@ -52,23 +52,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl //抄送单位 gvCCUnit.DataSource = UnitService.GetUnitByProjectIdList(CurrUser.LoginProjectId); gvCCUnit.DataBind(); + - - var db = Funs.DB; - var userList = from x in db.Sys_User - join y in db.Project_ProjectUnit - on x.UnitId equals y.UnitId - join p in db.Project_ProjectUser - on x.UserId equals p.UserId - where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId - where p.RoleId.Contains(Const.ZBCNEngineer) - select new { UserId = x.UserId, UserName=x.UserName }; - drpAudit.DataValueField = "UserId"; - drpAudit.DataTextField = "UserName"; - this.drpAudit.DataSource = userList.ToList(); - this.drpAudit.DataBind(); - this.hdInspectionNoticeId.Text = Request.Params["inspectionId"]; + this.hdInspectionNoticeId.Text = Request.Params["inspectionId"]; if (!string.IsNullOrEmpty(this.hdInspectionNoticeId.Text)) { Model.ProcessControl_InspectionManagement inspectionManagement = BLL.InspectionManagementService.GetInspectionManagementById(this.hdInspectionNoticeId.Text.Trim()); @@ -107,11 +94,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl if (!string.IsNullOrEmpty(inspectionManagement.CCUnitIds)) { txtCCUnit.Values = inspectionManagement.CCUnitIds.Split(','); - } - if (!string.IsNullOrEmpty(inspectionManagement.AuditMan)) - { - drpAudit.SelectedValue = inspectionManagement.AuditMan; - } + } if (inspectionManagement.PlanComplateDate != null) { this.dpPlanComplateDate.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", inspectionManagement.PlanComplateDate); @@ -123,7 +106,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl this.Grid1.DataSource = BLL.InspectionManagementDetailService.GetInspectionDetails(this.hdInspectionNoticeId.Text.Trim()); this.Grid1.DataBind(); - if (inspectionManagement.Status == "3" ||(inspectionManagement.Status=="2" && inspectionManagement.AuditMan!=CurrUser.UserId)||(inspectionManagement.Status=="1"&&inspectionManagement.CompileMan!=CurrUser.UserId)) + if (inspectionManagement.Status == "3" ||(inspectionManagement.Status=="1"&&inspectionManagement.CompileMan!=CurrUser.UserId)) { this.drpWorkArea.Enabled = false; this.drpUnit.Enabled = false; @@ -138,30 +121,9 @@ namespace FineUIPro.Web.CQMS.ProcessControl this.btnSubmit.Hidden = true; this.btnSave.Hidden = true; this.txtCCUnit.Enabled = false; - this.drpAudit.Enabled = false; this.Grid1.Columns[9].Hidden = true; } - else if(inspectionManagement.Status == "2" && inspectionManagement.AuditMan == CurrUser.UserId) - { - this.drpWorkArea.Enabled = false; - this.drpUnit.Enabled = false; - this.drpCNProfessionalId.Enabled = false; - this.txtNoticeCode.Enabled = false; - this.txtAcceptanceSite.Enabled = false; - this.txtAcceptanceCheckMan.Enabled = false; - this.dpPlanComplateDate.Enabled = false; - this.drpMainSendUnit.Enabled = false; - this.txtCCUnit.EnableEdit = false; - this.Toolbar4.Hidden = true; - this.txtCCUnit.Enabled = false; - this.Grid1.Columns[9].Hidden = true; - this.btnSubmit.ToolTip = "确认"; - this.btnSubmit.Text = "确认"; - this.dpRePlanComplateDate.Hidden = false; - this.dpRePlanComplateDate.Enabled = false; - this.btnSave.Hidden = true; - this.drpAudit.Hidden = true; - } + } } } @@ -197,8 +159,8 @@ namespace FineUIPro.Web.CQMS.ProcessControl { Alert.ShowInTop("请先选择专业!", MessageBoxIcon.Warning); return; - } - if (this.Grid1.Rows.Count == 0) + } + if (this.Grid1.Rows.Count == 0) { Alert.ShowInTop("请先选择共检内容!", MessageBoxIcon.Warning); return; @@ -226,8 +188,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl inspectionManagement.NoticeCode = this.txtNoticeCode.Text.Trim(); inspectionManagement.AcceptanceSite = this.txtAcceptanceSite.Text.Trim(); inspectionManagement.AcceptanceCheckMan = this.txtAcceptanceCheckMan.Text.Trim(); - inspectionManagement.Status = "2"; - if (!string.IsNullOrEmpty(this.dpPlanComplateDate.Text.Trim())) + inspectionManagement.Status = "3"; + inspectionManagement.AuditMan = this.CurrUser.UserId; + + if (!string.IsNullOrEmpty(this.dpPlanComplateDate.Text.Trim())) { inspectionManagement.PlanComplateDate = Convert.ToDateTime(this.dpPlanComplateDate.Text.Trim()); } @@ -235,10 +199,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl { inspectionManagement.RePlanComplateDate = Convert.ToDateTime(this.dpRePlanComplateDate.Text.Trim()); } - if (this.drpAudit.SelectedValue != BLL.Const._Null) - { - inspectionManagement.AuditMan = drpAudit.SelectedValue; - } + if (string.IsNullOrEmpty(Request.Params["inspectionId"])) { inspectionManagement.CompileMan = this.CurrUser.UserId; @@ -259,19 +220,9 @@ namespace FineUIPro.Web.CQMS.ProcessControl Model.ProcessControl_InspectionManagement oldInspectionManagement = BLL.InspectionManagementService.GetInspectionManagementById(this.hdInspectionNoticeId.Text.Trim()); inspectionManagement.AttachUrl2 = oldInspectionManagement.AttachUrl2; inspectionManagement.InspectionCode = oldInspectionManagement.InspectionCode; - - inspectionManagement.InspectionId = this.hdInspectionNoticeId.Text.Trim(); - if (oldInspectionManagement.Status == "2") - { - inspectionManagement.Status = "3"; - } - if (oldInspectionManagement.AuditMan != inspectionManagement.AuditMan) - { - changeAudit = true; - inspectionManagement.Status = "2"; - } - - BLL.InspectionManagementService.UpdateInspectionManagement(inspectionManagement); + inspectionManagement.InspectionId = this.hdInspectionNoticeId.Text.Trim(); + inspectionManagement.Status = "3"; + BLL.InspectionManagementService.UpdateInspectionManagement(inspectionManagement); BLL.InspectionManagementDetailService.DeleteAllInspectionDetail(inspectionManagement.InspectionId); } var details = jerqueSaveList(); @@ -280,18 +231,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl detail.InspectionId = inspectionManagement.InspectionId; BLL.InspectionManagementDetailService.AddInspectionDetail(detail); } - if (inspectionManagement.Status == "2") - { - APICommonService.SendSubscribeMessage(inspectionManagement.AuditMan, "控制点通知单待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); - - ShowNotify("提交成功!", MessageBoxIcon.Success); - } - else - { - APICommonService.SendSubscribeMessage(inspectionManagement.CompileMan, "控制点通知单已确认", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); - - ShowNotify("确认成功!", MessageBoxIcon.Success); - } + ShowNotify("提交成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } #region 保存 @@ -346,10 +286,6 @@ namespace FineUIPro.Web.CQMS.ProcessControl { inspectionManagement.PlanComplateDate = Convert.ToDateTime(this.dpPlanComplateDate.Text.Trim()); } - if (this.drpAudit.SelectedValue != BLL.Const._Null) - { - inspectionManagement.AuditMan = drpAudit.SelectedValue; - } if (string.IsNullOrEmpty(Request.Params["inspectionId"])) { inspectionManagement.CompileMan = this.CurrUser.UserId; @@ -369,12 +305,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl { Model.ProcessControl_InspectionManagement oldInspectionManagement = BLL.InspectionManagementService.GetInspectionManagementById(this.hdInspectionNoticeId.Text.Trim()); inspectionManagement.AttachUrl2 = oldInspectionManagement.AttachUrl2; - inspectionManagement.InspectionId = this.hdInspectionNoticeId.Text.Trim(); - if (oldInspectionManagement.Status == "2") - { - inspectionManagement.Status = "2"; - - } + inspectionManagement.InspectionId = this.hdInspectionNoticeId.Text.Trim(); BLL.InspectionManagementService.UpdateInspectionManagement(inspectionManagement); BLL.InspectionManagementDetailService.DeleteAllInspectionDetail(inspectionManagement.InspectionId); } diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.designer.cs index 18415565..04298b7d 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.designer.cs @@ -11,286 +11,277 @@ namespace FineUIPro.Web.CQMS.ProcessControl { - public partial class InspectionNoticeEdit - { + public partial class InspectionNoticeEdit + { - /// - /// form1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; - /// - /// PageManager1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.PageManager PageManager1; + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; - /// - /// SimpleForm1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form SimpleForm1; + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; - /// - /// drpUnit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpUnit; + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; - /// - /// drpWorkArea 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpWorkArea; + /// + /// drpWorkArea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpWorkArea; - /// - /// drpCNProfessionalId 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpCNProfessionalId; + /// + /// drpCNProfessionalId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCNProfessionalId; - /// - /// txtNoticeCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtNoticeCode; + /// + /// txtNoticeCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtNoticeCode; - /// - /// txtAcceptanceSite 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtAcceptanceSite; + /// + /// txtAcceptanceSite 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAcceptanceSite; - /// - /// txtAcceptanceCheckMan 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtAcceptanceCheckMan; + /// + /// txtAcceptanceCheckMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAcceptanceCheckMan; - /// - /// dpPlanComplateDate 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker dpPlanComplateDate; + /// + /// dpPlanComplateDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpPlanComplateDate; - /// - /// dpRePlanComplateDate 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker dpRePlanComplateDate; + /// + /// dpRePlanComplateDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpRePlanComplateDate; - /// - /// drpMainSendUnit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpMainSendUnit; + /// + /// drpMainSendUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpMainSendUnit; - /// - /// txtCCUnit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownBox txtCCUnit; + /// + /// txtCCUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownBox txtCCUnit; - /// - /// gvCCUnit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Grid gvCCUnit; + /// + /// gvCCUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvCCUnit; - /// - /// Grid1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Grid Grid1; + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; - /// - /// Toolbar4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar4; + /// + /// Toolbar4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar4; - /// - /// btnNew 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnNew; + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; - /// - /// Label2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.Label Label2; + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; - /// - /// Label3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.Label Label3; + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; - /// - /// Label5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.Label Label5; + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; - /// - /// Label4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.Label Label4; + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; - /// - /// txtUnqualifiedReason 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtUnqualifiedReason; + /// + /// txtUnqualifiedReason 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtUnqualifiedReason; - /// - /// txtUnqualifiedOption 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtUnqualifiedOption; + /// + /// txtUnqualifiedOption 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtUnqualifiedOption; - /// - /// drpAudit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpAudit; + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; - /// - /// Toolbar1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar1; + /// + /// hdItemsString 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdItemsString; - /// - /// hdItemsString 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.HiddenField hdItemsString; + /// + /// hdInspectionNoticeId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdInspectionNoticeId; - /// - /// hdInspectionNoticeId 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.HiddenField hdInspectionNoticeId; + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; - /// - /// btnSave 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSave; + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; - /// - /// btnSubmit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSubmit; + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; - /// - /// Window1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window Window1; - - /// - /// WindowAtt 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window WindowAtt; - } + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } } diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/ShowUnitWork.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/ShowUnitWork.aspx index bff64516..d7d07e69 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/ShowUnitWork.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/ShowUnitWork.aspx @@ -53,10 +53,10 @@ - - diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlPoint.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlPoint.aspx.cs index 78b7943b..7f20da51 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlPoint.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlPoint.aspx.cs @@ -576,8 +576,8 @@ namespace FineUIPro.Web.CQMS.WBS /// private void BindGrid() { - string strSql = @"SELECT BreakdownId,BreakdownCode,BreakdownName,Basis,CheckPoints,RecordAndCode,Class,FenBao,WuHuan,JianLi,YeZhu,Remark,ModelURL" - + @" FROM WBS_Breakdown "; + string strSql = @"SELECT BreakdownId,BreakdownCode,BreakdownName,Basis,CheckPoints,RecordAndCode,Class,FenBao,WuHuan,JianLi,YeZhu,Remark,ModelURL,SortIndex + FROM WBS_Breakdown "; List listStr = new List(); strSql += " where DivisionId = @DivisionId "; listStr.Add(new SqlParameter("@DivisionId", this.trWBS.SelectedNodeID)); diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx index 93fb9cd1..fad7eb8f 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx @@ -46,7 +46,7 @@ diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs index 23e76f22..1e9930ad 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs @@ -10,6 +10,7 @@ using System.IO; using System.Data.SqlClient; using Newtonsoft.Json.Linq; using AspNet = System.Web.UI.WebControls; +using Model; namespace FineUIPro.Web.CQMS.WBS { @@ -388,14 +389,20 @@ namespace FineUIPro.Web.CQMS.WBS { for (int i = 0; i < this.Grid1.Rows.Count; i++) { - if (this.Grid1.SelectedRowIDArray.Contains(this.Grid1.Rows[i].RowID)) - { - SelectedList.Add(this.Grid1.Rows[i].RowID); - } - else - { - NoSelectedList.Add(this.Grid1.Rows[i].RowID); - } + if (this.Grid1.SelectedRowIDArray.Contains(this.Grid1.Rows[i].RowID)) + { + if (!SelectedList.Contains(this.Grid1.Rows[i].RowID)) + { + SelectedList.Add(this.Grid1.Rows[i].RowID); + } + } + else + { + if (!NoSelectedList.Contains(this.Grid1.Rows[i].RowID)) + { + NoSelectedList.Add(this.Grid1.Rows[i].RowID); + } + } } string divisionProjectId = this.trWBS.SelectedNode.NodeID; var temp = BLL.DivisionProjectService.GetDivisionProjectById(divisionProjectId); @@ -799,8 +806,12 @@ namespace FineUIPro.Web.CQMS.WBS /// private void BindGrid() { - string strSql = @"SELECT BreakdownProjectId,BreakdownCode,BreakdownName,Basis,CheckPoints,RecordAndCode,Class,FenBao,WuHuan,JianLi,YeZhu,Remark,ModelURL" - + @" FROM WBS_BreakdownProject "; + WBS_BreakdownProject d=null; + + d.SortIndex = 0; + + string strSql = @"SELECT BreakdownProjectId,BreakdownCode,BreakdownName,Basis,CheckPoints,RecordAndCode,Class,FenBao,WuHuan,JianLi,YeZhu,Remark,ModelURL,SortIndex" + + @" FROM WBS_BreakdownProject "; List listStr = new List(); strSql += " where DivisionProjectId = @DivisionProjectId and ProjectId=@ProjectId"; listStr.Add(new SqlParameter("@DivisionProjectId", this.trWBS.SelectedNodeID)); @@ -1280,23 +1291,27 @@ namespace FineUIPro.Web.CQMS.WBS #region 保存事件 protected void btnSave_Click(object sender, EventArgs e) { - for (int i = 0; i < this.Grid1.Rows.Count; i++) - { - if (this.Grid1.SelectedRowIDArray.Contains(this.Grid1.Rows[i].RowID)) - { - SelectedList.Add(this.Grid1.Rows[i].RowID); - } - else - { - NoSelectedList.Add(this.Grid1.Rows[i].RowID); - } - } - foreach (var item in SelectedList.Distinct()) - { - Model.WBS_BreakdownProject breakdownProject = BLL.BreakdownProjectService.GetBreakdownProjectById(item); - breakdownProject.IsSelected = true; - BLL.BreakdownProjectService.UpdateBreakdownProject(breakdownProject); - } + var gridIds = this.Grid1.Rows.Select(x => x.RowID).ToList(); + SelectedList.RemoveAll(x=>gridIds.Contains(x)); + + for (int i = 0; i < this.Grid1.Rows.Count; i++) + { + if (this.Grid1.SelectedRowIDArray.Contains(this.Grid1.Rows[i].RowID)) + { + if (!SelectedList.Contains(this.Grid1.Rows[i].RowID)) + { + SelectedList.Add(this.Grid1.Rows[i].RowID); + } + } + else + { + if (!NoSelectedList.Contains(this.Grid1.Rows[i].RowID)) + { + NoSelectedList.Add(this.Grid1.Rows[i].RowID); + } + } + } + NoSelectedList = NoSelectedList.Distinct().ToList(); var q = NoSelectedList.Distinct().ToList(); foreach (var item in q) @@ -1314,11 +1329,44 @@ namespace FineUIPro.Web.CQMS.WBS Model.WBS_BreakdownProject breakdownProject = BLL.BreakdownProjectService.GetBreakdownProjectById(item); breakdownProject.IsSelected = null; BLL.BreakdownProjectService.UpdateBreakdownProject(breakdownProject); - } - Alert.ShowInTop("保存成功!", MessageBoxIcon.Success); - } - #endregion + Model.WBS_DivisionProject divisionProject = BLL.DivisionProjectService.GetDivisionProjectById(breakdownProject.DivisionProjectId); + divisionProject.IsSelected = false; + checknode(this.trWBS.Nodes.ToArray(), breakdownProject.DivisionProjectId, false); + BLL.DivisionProjectService.UpdateDivisionProject(divisionProject); + this.UpdateParentDivision(divisionProject.SuperDivisionId, false); + } + + foreach (var item in SelectedList.Distinct()) + { + Model.WBS_BreakdownProject breakdownProject = BLL.BreakdownProjectService.GetBreakdownProjectById(item); + breakdownProject.IsSelected = true; + BLL.BreakdownProjectService.UpdateBreakdownProject(breakdownProject); + Model.WBS_DivisionProject divisionProject = BLL.DivisionProjectService.GetDivisionProjectById(breakdownProject.DivisionProjectId); + checknode(this.trWBS.Nodes.ToArray(), breakdownProject.DivisionProjectId, true); + divisionProject.IsSelected = true; + BLL.DivisionProjectService.UpdateDivisionProject(divisionProject); + this.UpdateParentDivision(divisionProject.SuperDivisionId, true); + } + + + Alert.ShowInTop("保存成功!", MessageBoxIcon.Success); + } + #endregion + private void checknode(TreeNode[] nodes, string nodeId, bool check) + { + foreach (var node in nodes) + { + if (node.NodeID == nodeId) + { + node.Checked = check; + } + if (node.Nodes.Count > 0) + { + checknode(node.Nodes.ToArray(), nodeId, check); + } + } + } #region 获取按钮权限 /// /// 获取按钮权限 diff --git a/SGGL/FineUIPro.Web/Controls/FlowOperateControl.ascx.cs b/SGGL/FineUIPro.Web/Controls/FlowOperateControl.ascx.cs index 53b834c3..28ee217b 100644 --- a/SGGL/FineUIPro.Web/Controls/FlowOperateControl.ascx.cs +++ b/SGGL/FineUIPro.Web/Controls/FlowOperateControl.ascx.cs @@ -489,9 +489,9 @@ namespace FineUIPro.Web.Controls newNextFlowOperate.IsClosed = false; newNextFlowOperate.State = BLL.Const.State_1; Funs.DB.Sys_FlowOperate.InsertOnSubmit(newNextFlowOperate); - Funs.DB.SubmitChanges(); - } - } + Funs.DB.SubmitChanges(); + } + } } #endregion diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckColligationEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/CheckColligationEdit.aspx.cs index 05249910..73354de1 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckColligationEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckColligationEdit.aspx.cs @@ -366,11 +366,11 @@ namespace FineUIPro.Web.HSSE.Check } ////保存流程审核数据 this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.ProjectCheckColligationMenuId, this.CheckColligationId, (type == BLL.Const.BtnSubmit ? true : false), this.txtCheckDate.Text.Trim(), "~/Check/CheckColligationView.aspx?CheckColligationId={0}"); - //if (type == BLL.Const.BtnSubmit) - //{ - // APICommonService.SendSubscribeMessage(this.ctlAuditFlow.NextPerson, "职业健康安全待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); - //} - } + if (type == BLL.Const.BtnSubmit) + { + APICommonService.SendSubscribeMessage(this.ctlAuditFlow.NextPerson, "综合检查", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); + } + } #region 关闭弹出窗 /// diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/HazardList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/HazardList.aspx.cs index b3dde689..8b094e9e 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/HazardList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/HazardList.aspx.cs @@ -1,8 +1,10 @@ using BLL; +using BLL.Common; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using System.IO; using System.Linq; using System.Text; using AspNet = System.Web.UI.WebControls; @@ -367,29 +369,79 @@ namespace FineUIPro.Web.HSSE.Hazard /// protected void btnOut_Click(object sender, EventArgs e) { - Response.ClearContent(); + + string strSql = @"select CodeRecords.Code 清单编号, HazardList.VersionNo 版本号, WorkStage .WorkStageName 工作阶段, HazardList.WorkAreaName 单位工程, HazardList.IdentificationDate 评估时间, + ControllingPersonUsers.UserName AS 风险责任人 , Users.UserName 编制人 , HazardList.CompileDate 编制日期, + (CASE WHEN HazardList.States = 0 OR HazardList.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN HazardList.States = 2 THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS 状态, + SupHazardListType.HazardListTypeName 危险源类别, HazardListType.HazardListTypeName 危险源项, HazardItems 危险因素明细,DefectsType 缺陷类型, MayLeadAccidents 可能导致的事故, + HelperMethod 辅助方法, HazardJudge_L L,HazardJudge_E E,HazardJudge_C C, HazardJudge_D D, HazardLevel 危险级别, ControlMeasures 控制措施 + from Hazard_HazardList AS HazardList + LEFT JOIN Sys_FlowOperate AS FlowOperate ON HazardList.HazardListId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1 + LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId + LEFT JOIN Sys_User AS Users ON HazardList.CompileMan=Users.UserId + LEFT JOIN Sys_User AS ControllingPersonUsers ON HazardList.ControllingPerson=ControllingPersonUsers.UserId + LEFT JOIN Sys_CodeRecords AS CodeRecords ON HazardList.HazardListId=CodeRecords.DataId + LEFT JOIN Hazard_HazardSelectedItem AS Item ON Item.HazardListId = HazardList.HazardListId + LEFT JOIN Technique_HazardListType AS HazardListType ON HazardListType.HazardListTypeId=Item.HazardListTypeId + LEFT JOIN Technique_HazardListType AS SupHazardListType ON HazardListType.HazardListTypeId=SupHazardListType.HazardListTypeId + LEFT JOIN Base_WorkStage AS WorkStage on WorkStage.WorkStageId = Item.WorkStage + WHERE 1=1 "; + List listStr = new List(); + strSql += " AND HazardList.ProjectId = @ProjectId"; + if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值 + { + listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"])); + strSql += " AND HazardList.States = @States"; ///状态为已完成 + listStr.Add(new SqlParameter("@States", BLL.Const.State_2)); + } + else + + { + listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); + } + if (!string.IsNullOrEmpty(this.txtHazardListCode.Text.Trim())) + { + strSql += " AND HazardListCode LIKE @HazardListCode"; + listStr.Add(new SqlParameter("@HazardListCode", "%" + this.txtHazardListCode.Text.Trim() + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + tb.TableName = "风险评估"; + 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 = Grid1.RecordCount; - this.BindGrid(); + string uploadfilepath = Server.MapPath("~/") + filename; + NPOIHelper.DataSetToExcel(tb, uploadfilepath); - Response.Write(GetGridTableHtml(Grid1)); + string fileName = Path.GetFileName(filename); + FileInfo info = new FileInfo(uploadfilepath); + if (info.Exists) + { + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("风险评估" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.Flush(); + Response.Close(); + } + else + { + ShowNotify("文件不存在!", MessageBoxIcon.Warning); + } + Response.Write(GetGridTableHtml(Grid1)); Response.End(); } -#pragma warning disable CS0108 // “HazardList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。 /// /// 导出方法 /// /// /// private string GetGridTableHtml(Grid grid) -#pragma warning restore CS0108 // “HazardList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。 { StringBuilder sb = new StringBuilder(); sb.Append(""); diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/HazardListView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/HazardListView.aspx.cs index 2976482a..2ba2bd79 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/HazardListView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/HazardListView.aspx.cs @@ -192,7 +192,7 @@ namespace FineUIPro.Web.HSSE.Hazard { if (this.drpHazardLevel.Items[i].Selected) { - if (hazardTemplate.HazardLevel.ToString() == this.drpHazardLevel.Items[i].Value) + if (hazardTemplate.HazardLevel == this.drpHazardLevel.Items[i].Value) { newHazardTemplates2.Add(hazardTemplate); } diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs index 7e937d98..50dd97b5 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs @@ -174,12 +174,12 @@ namespace FineUIPro.Web.HSSE.HiddenInspection } if (this.drpStates.SelectedValueArray.Contains("2")) { - strSqlTemp += " ( States in( '2','3') and datediff(DAY,RectificationPeriod,RectificationTime)>0 ) OR"; + strSqlTemp += " ( States in( '2','3') and datediff(DAY,RectificationPeriod,RectificationTime)<=0 ) OR"; } if (this.drpStates.SelectedValueArray.Contains("3")) { - strSqlTemp += " (States in( '2','3') and datediff(DAY,RectificationPeriod,RectificationTime)<=0 ) OR"; + strSqlTemp += " (States in( '2','3') and datediff(DAY,RectificationPeriod,RectificationTime)>0 ) OR"; } if (this.drpStates.SelectedValueArray.Contains("4")) @@ -705,15 +705,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection Response.Write(GetGridTableHtml(Grid1)); Response.End(); } - -#pragma warning disable CS0108 // “HiddenRectificationList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。 + /// /// 导出方法 /// /// /// - private string GetGridTableHtml(Grid grid) -#pragma warning restore CS0108 // “HiddenRectificationList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。 + private string GetGridTableHtml(Grid grid) { StringBuilder sb = new StringBuilder(); sb.Append(""); diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/RiskAnalysisChart.aspx b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/RiskAnalysisChart.aspx index 3b20219e..51cee34b 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/RiskAnalysisChart.aspx +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/RiskAnalysisChart.aspx @@ -49,7 +49,7 @@ - -
+
diff --git a/SGGL/FineUIPro.Web/HSSE/QualityAudit/EquipmentPersonQuality.aspx b/SGGL/FineUIPro.Web/HSSE/QualityAudit/EquipmentPersonQuality.aspx index b62611f1..e9eefd68 100644 --- a/SGGL/FineUIPro.Web/HSSE/QualityAudit/EquipmentPersonQuality.aspx +++ b/SGGL/FineUIPro.Web/HSSE/QualityAudit/EquipmentPersonQuality.aspx @@ -95,6 +95,9 @@ <%-- --%> + diff --git a/SGGL/FineUIPro.Web/HSSE/QualityAudit/PersonQuality.aspx b/SGGL/FineUIPro.Web/HSSE/QualityAudit/PersonQuality.aspx index 3bae1dd2..a4ba4ad2 100644 --- a/SGGL/FineUIPro.Web/HSSE/QualityAudit/PersonQuality.aspx +++ b/SGGL/FineUIPro.Web/HSSE/QualityAudit/PersonQuality.aspx @@ -97,9 +97,11 @@ FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="审核时间" HeaderTextAlign="Center" TextAlign="Center"> --%> - - + + <%----%> diff --git a/SGGL/FineUIPro.Web/HSSE/QualityAudit/SafePersonQuality.aspx b/SGGL/FineUIPro.Web/HSSE/QualityAudit/SafePersonQuality.aspx index 409caee2..9df9fc60 100644 --- a/SGGL/FineUIPro.Web/HSSE/QualityAudit/SafePersonQuality.aspx +++ b/SGGL/FineUIPro.Web/HSSE/QualityAudit/SafePersonQuality.aspx @@ -49,11 +49,11 @@ - - @@ -73,11 +73,11 @@ SortField="CertificateNo" FieldType="String" HeaderText="证书编号" HeaderTextAlign="Center" TextAlign="Left"> - - @@ -85,13 +85,16 @@ SortField="Grade" FieldType="String" HeaderText="操作类别" HeaderTextAlign="Center" TextAlign="Left"> - - + <%-- + HeaderTextAlign="Center" ColumnID="attWindow" />--%> diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs index eea5e9ae..966d2c90 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs @@ -392,27 +392,27 @@ namespace FineUIPro.Web.HSSE.SitePerson this.EditData(); } - /// - /// 编辑 - /// - private void EditData() - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); - return; - } + /// + /// 编辑 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } - this.PersonId = Grid1.SelectedRowID; - string id = this.tvProjectAndUnit.SelectedNodeID; - string[] str = id.Split('|'); - if (str.Count() > 1) - { - string unitId = id.Split('|')[0]; - string projectId = id.Split('|')[1]; - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonListEdit.aspx?PersonId={0}&&ProjectId={1}&&UnitId={2}", this.PersonId, projectId, unitId, "编辑 - "))); - } - } + this.PersonId = Grid1.SelectedRowID; + var person = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.PersonId == PersonId); + + if (person != null) + { + string unitId = person.UnitId; + string projectId = person.ProjectId; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonListEdit.aspx?PersonId={0}&&ProjectId={1}&&UnitId={2}", this.PersonId, projectId, unitId, "编辑 - "))); + } + } /// /// Grid双击事件 diff --git a/SGGL/FineUIPro.Web/SysManage/UserList.aspx b/SGGL/FineUIPro.Web/SysManage/UserList.aspx index 76bc48bf..33cb7000 100644 --- a/SGGL/FineUIPro.Web/SysManage/UserList.aspx +++ b/SGGL/FineUIPro.Web/SysManage/UserList.aspx @@ -103,7 +103,7 @@