From e58662ebcd9a7f2cc1410556bfcdea56a751146c Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Fri, 1 Mar 2024 15:37:22 +0800 Subject: [PATCH 1/4] 20240301 --- DataBase/版本日志/SGGLDB_V2024-02-28.sql | 10 +++ .../QualityAudit/EquipmentQualityEdit.aspx | 2 +- .../OfficeCheck/Check/RectifyEdit.aspx | 60 ++++++++----- .../OfficeCheck/Check/RectifyEdit.aspx.cs | 86 ++++++++++++++----- .../Check/RectifyEdit.aspx.designer.cs | 27 ++++-- SGGL/Model/Model.cs | 24 ++++++ 6 files changed, 153 insertions(+), 56 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2024-02-28.sql diff --git a/DataBase/版本日志/SGGLDB_V2024-02-28.sql b/DataBase/版本日志/SGGLDB_V2024-02-28.sql new file mode 100644 index 00000000..0789e374 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2024-02-28.sql @@ -0,0 +1,10 @@ +ALTER TABLE ProjectSupervision_RectifyItem ADD HiddenHazardType NVARCHAR(50) NULL +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1-һ㣬2-ϴ3-ش' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProjectSupervision_RectifyItem', @level2type=N'COLUMN',@level2name=N'HiddenHazardType' +GO +ALTER TABLE ProjectSupervision_RectifyItem ALTER COLUMN WrongContent NVARCHAR(500) NULL +GO +ALTER TABLE ProjectSupervision_RectifyItem ALTER COLUMN Requirement NVARCHAR(500) NULL +GO +ALTER TABLE ProjectSupervision_RectifyItem ALTER COLUMN RectifyResults NVARCHAR(500) NULL +GO \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/QualityAudit/EquipmentQualityEdit.aspx b/SGGL/FineUIPro.Web/HSSE/QualityAudit/EquipmentQualityEdit.aspx index a966adf7..a743aae7 100644 --- a/SGGL/FineUIPro.Web/HSSE/QualityAudit/EquipmentQualityEdit.aspx +++ b/SGGL/FineUIPro.Web/HSSE/QualityAudit/EquipmentQualityEdit.aspx @@ -42,7 +42,7 @@ - - + 隐患整改 - + @@ -19,31 +19,33 @@ - + - - + - - + + + <%-- - + --%> @@ -51,25 +53,25 @@ - + - + + + - - + - @@ -149,7 +163,7 @@ - + @@ -157,6 +171,6 @@ Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px" Height="500px"> - + diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.cs index 7c057bb3..3de15077 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.cs @@ -1,8 +1,6 @@ using BLL; -using FineUIPro.Web.DataShow; using Model; using Newtonsoft.Json.Linq; -using NPOI.SS.Formula.Functions; using System; using System.Collections.Generic; using System.Data; @@ -51,7 +49,7 @@ namespace FineUIPro.Web.OfficeCheck.Check this.btnSave.Hidden = true; this.btnAdd.Hidden = true; this.btnSubmit.Hidden = true; - this.Grid1.Columns[8].Hidden = true; + this.Grid1.Columns[9].Hidden = true; } this.CheckNoticeId = Request.Params["CheckNoticeId"]; @@ -71,16 +69,14 @@ namespace FineUIPro.Web.OfficeCheck.Check this.txtCheckPerson.Text = getRectify.CheckManNames; this.txtRectifyNoticesCode.Text = getRectify.RectifyCode; this.txtCheckedDate.Text = getRectify.CheckedDate.ToString(); - if (!string.IsNullOrEmpty(getRectify.HiddenHazardType)) - { - this.drpHiddenHazardType.SelectedValue = getRectify.HiddenHazardType; - } + //if (!string.IsNullOrEmpty(getRectify.HiddenHazardType)) + //{ + // this.drpHiddenHazardType.SelectedValue = getRectify.HiddenHazardType; + //} if (!string.IsNullOrEmpty(getRectify.SignPerson)) { this.drpSignPerson.SelectedValue = getRectify.SignPerson; - } - BindGrid(); - + } if (getRectify.States == Const.State_1 || getRectify.States == Const.State_2) { this.btnSure.Hidden = false; @@ -112,6 +108,7 @@ namespace FineUIPro.Web.OfficeCheck.Check this.txtCheckedDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); } + BindGrid(); rectifyItemLists.Clear(); } } @@ -132,10 +129,24 @@ namespace FineUIPro.Web.OfficeCheck.Check /// public void BindGrid() { - string strSql = @"select RectifyItemId, RectifyId, WrongContent, Requirement, LimitTime, RectifyResults, IsRectify from ProjectSupervision_RectifyItem "; - List listStr = new List(); - strSql += "where RectifyId = @RectifyId"; - listStr.Add(new SqlParameter("@RectifyId", this.hdRectifyNoticesId.Text)); + string strSql = string.Empty; + List listStr = new List(); + if (Funs.DB.ProjectSupervision_RectifyItem.FirstOrDefault(x => x.RectifyId == this.hdRectifyNoticesId.Text) != null) + { + strSql = @"select RectifyItemId,WrongContent,Requirement,LimitTime,RectifyResults,IsRectify,HiddenHazardType,null as CheckReportItemId + from ProjectSupervision_RectifyItem + where RectifyId = @RectifyId"; + listStr.Add(new SqlParameter("@RectifyId", this.hdRectifyNoticesId.Text)); + } + else + { + strSql = @"select newid() as RectifyItemId,UnConformItem as WrongContent,null as Requirement,null as LimitTime, null as RectifyResults,0 as IsRectify,'1' as HiddenHazardType,item.CheckReportItemId + from ProjectSupervision_CheckReportItem as item + left join ProjectSupervision_CheckReport as Report on item.CheckReportId=Report.CheckReportId + where Report.CheckNoticeId = @CheckNoticeId"; + listStr.Add(new SqlParameter("@CheckNoticeId", this.CheckNoticeId)); + } + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); var table = this.GetPagedDataTable(Grid1, tb); @@ -149,7 +160,7 @@ namespace FineUIPro.Web.OfficeCheck.Check { addViewTestPlanTrainingList(); Model.ProjectSupervision_RectifyItem notice = new Model.ProjectSupervision_RectifyItem(); - notice.RectifyItemId = SQLHelper.GetNewID(typeof(Model.ProjectSupervision_RectifyItem)); + notice.RectifyItemId = SQLHelper.GetNewID(); rectifyItemLists.Add(notice); //将gd数据保存在list中 Grid1.DataSource = rectifyItemLists; @@ -171,8 +182,9 @@ namespace FineUIPro.Web.OfficeCheck.Check string rectifyNoticesItemId = values.Value("RectifyItemId"); string requirement = values.Value("Requirement"); string rectifyResults = values.Value("RectifyResults"); - System.Web.UI.WebControls.TextBox txtlimitTim = (System.Web.UI.WebControls.TextBox)Grid1.Rows[i].FindControl("txtLimitTimes"); - System.Web.UI.WebControls.DropDownList drpIsRect = (System.Web.UI.WebControls.DropDownList)Grid1.Rows[i].FindControl("drpIsRectify"); + TextBox txtlimitTim = (TextBox)Grid1.Rows[i].FindControl("txtLimitTimes"); + + var item = new ProjectSupervision_RectifyItem(); item.RectifyItemId = rectifyNoticesItemId; item.RectifyId = hdRectifyNoticesId.Text.Trim(); @@ -180,6 +192,10 @@ namespace FineUIPro.Web.OfficeCheck.Check item.Requirement = requirement; item.LimitTime = Funs.GetNewDateTime(txtlimitTim.Text); item.RectifyResults = rectifyResults; + DropDownList drpIsRect = (DropDownList)Grid1.Rows[i].FindControl("drpIsRectify"); + item.IsRectify =Convert.ToBoolean( drpIsRect.SelectedValue); + DropDownList drpHiddenHazardType = (DropDownList)Grid1.Rows[i].FindControl("drpHiddenHazardTypeify"); + item.HiddenHazardType = drpHiddenHazardType.SelectedValue; rectifyItemLists.Add(item); } } @@ -242,7 +258,15 @@ namespace FineUIPro.Web.OfficeCheck.Check string itemId = Grid1.DataKeys[e.RowIndex][0].ToString(); if (e.CommandName == "AttachUrl") { - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Rectify&menuId={1}&type=0&strParam=1", itemId, BLL.Const.CheckInfoMenuId))); + if (Funs.DB.ProjectSupervision_RectifyItem.FirstOrDefault(x => x.RectifyItemId == itemId) != null) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Rectify&menuId={1}&type=0&strParam=1", itemId, BLL.Const.CheckInfoMenuId))); + } + else + { + string checkReportItemId= Grid1.Rows[e.RowIndex].Values[10].ToString(); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Rectify&menuId={1}&type=0&strParam=1", checkReportItemId, BLL.Const.CheckInfoMenuId))); + } } if (e.CommandName == "delete") { @@ -276,6 +300,13 @@ namespace FineUIPro.Web.OfficeCheck.Check drpIsRectify.SelectedValue = "false"; } } + + System.Web.UI.WebControls.DropDownList drpHiddenHazardType = (System.Web.UI.WebControls.DropDownList)(this.Grid1.Rows[i].FindControl("drpHiddenHazardType")); + HiddenField hdHiddenHazardType = (HiddenField)(this.Grid1.Rows[i].FindControl("hdHiddenHazardType")); + if (!string.IsNullOrEmpty(hdHiddenHazardType.Text)) + { + drpHiddenHazardType.SelectedValue = hdHiddenHazardType.Text; + } } } #endregion @@ -345,10 +376,10 @@ namespace FineUIPro.Web.OfficeCheck.Check { Notices.CheckedDate = Convert.ToDateTime(this.txtCheckedDate.Text.Trim()); } - if (this.drpHiddenHazardType.SelectedValue != BLL.Const._Null) - { - Notices.HiddenHazardType = this.drpHiddenHazardType.SelectedValue; - } + //if (this.drpHiddenHazardType.SelectedValue != BLL.Const._Null) + //{ + // Notices.HiddenHazardType = this.drpHiddenHazardType.SelectedValue; + //} if (this.drpSignPerson.SelectedValue != BLL.Const._Null) { Notices.SignPerson = this.drpSignPerson.SelectedValue; @@ -398,6 +429,7 @@ namespace FineUIPro.Web.OfficeCheck.Check string rectifyResults = values.Value("RectifyResults"); System.Web.UI.WebControls.TextBox txtlimitTim = (System.Web.UI.WebControls.TextBox)Grid1.Rows[i].FindControl("txtLimitTimes"); System.Web.UI.WebControls.DropDownList drpIsRect = (System.Web.UI.WebControls.DropDownList)Grid1.Rows[i].FindControl("drpIsRectify"); + System.Web.UI.WebControls.DropDownList drpHiddenHazardType = (System.Web.UI.WebControls.DropDownList)Grid1.Rows[i].FindControl("drpHiddenHazardType"); string limitTime = txtlimitTim.Text.Trim(); Model.ProjectSupervision_RectifyItem rectifyNoticesItem = Funs.DB.ProjectSupervision_RectifyItem.FirstOrDefault(e => e.RectifyItemId == rectifyNoticesItemId); if (rectifyNoticesItem != null) @@ -408,6 +440,7 @@ namespace FineUIPro.Web.OfficeCheck.Check rectifyNoticesItem.Requirement = requirement.Trim(); rectifyNoticesItem.LimitTime = Funs.GetNewDateTime(limitTime); rectifyNoticesItem.RectifyResults = rectifyResults.Trim(); + rectifyNoticesItem.HiddenHazardType = drpHiddenHazardType.SelectedValue; rectifyNoticesItem.IsRectify = Convert.ToBoolean(drpIsRect.SelectedValue); Funs.DB.SubmitChanges(); if (rectifyNoticesItem.IsRectify == true) @@ -417,7 +450,6 @@ namespace FineUIPro.Web.OfficeCheck.Check } else { - var item = new ProjectSupervision_RectifyItem(); item.RectifyItemId = rectifyNoticesItemId; item.RectifyId = this.hdRectifyNoticesId.Text.Trim(); @@ -425,9 +457,17 @@ namespace FineUIPro.Web.OfficeCheck.Check item.Requirement = requirement.Trim(); item.LimitTime = Funs.GetNewDateTime(limitTime); item.RectifyResults = rectifyResults.Trim(); + item.HiddenHazardType = drpHiddenHazardType.SelectedValue; item.IsRectify = Convert.ToBoolean(drpIsRect.SelectedValue); Funs.DB.ProjectSupervision_RectifyItem.InsertOnSubmit(item); Funs.DB.SubmitChanges(); + + string hdCheckReportItemId = values.Value("CheckReportItemId"); + var getAtt = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == hdCheckReportItemId + "#1"); + if (getAtt != null) + { + UploadFileService.SaveAttachUrl(getAtt.AttachSource, getAtt.AttachUrl, BLL.Const.CheckInfoMenuId, item.RectifyItemId + "#1"); + } } } if (j == data.Count) diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.designer.cs index 5155165d..8fec0a02 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.designer.cs @@ -95,15 +95,6 @@ namespace FineUIPro.Web.OfficeCheck.Check /// protected global::FineUIPro.DatePicker txtCheckedDate; - /// - /// drpHiddenHazardType 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpHiddenHazardType; - /// /// Toolbar1 控件。 /// @@ -194,6 +185,24 @@ namespace FineUIPro.Web.OfficeCheck.Check /// protected global::FineUIPro.TextBox tWrongContent; + /// + /// drpHiddenHazardType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.DropDownList drpHiddenHazardType; + + /// + /// hdHiddenHazardType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdHiddenHazardType; + /// /// tRequirement 控件。 /// diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 738f10eb..1adff4c6 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -204153,6 +204153,8 @@ namespace Model private string _States; + private string _HiddenHazardType; + private EntityRef _ProjectSupervision_Rectify; #region 可扩展性方法定义 @@ -204175,6 +204177,8 @@ namespace Model partial void OnIsRectifyChanged(); partial void OnStatesChanging(string value); partial void OnStatesChanged(); + partial void OnHiddenHazardTypeChanging(string value); + partial void OnHiddenHazardTypeChanged(); #endregion public ProjectSupervision_RectifyItem() @@ -204347,6 +204351,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiddenHazardType", DbType="NVarChar(50)")] + public string HiddenHazardType + { + get + { + return this._HiddenHazardType; + } + set + { + if ((this._HiddenHazardType != value)) + { + this.OnHiddenHazardTypeChanging(value); + this.SendPropertyChanging(); + this._HiddenHazardType = value; + this.SendPropertyChanged("HiddenHazardType"); + this.OnHiddenHazardTypeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ProjectSupervision_RectifyItem_ProjectSupervision_Rectify", Storage="_ProjectSupervision_Rectify", ThisKey="RectifyId", OtherKey="RectifyId", IsForeignKey=true)] public ProjectSupervision_Rectify ProjectSupervision_Rectify { From 9730da14651b770cb5cc3a1bf7d4d7adc225b5b5 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 4 Mar 2024 16:10:36 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs | 34 +++--- SGGL/BLL/CQMS/Check/SpotCheckService.cs | 42 +++---- .../CQMS/WBS/ControlItemAndCycleService.cs | 106 +++++++++--------- 3 files changed, 95 insertions(+), 87 deletions(-) diff --git a/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs b/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs index 58a8e9cc..bd3ebc94 100644 --- a/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs +++ b/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs @@ -76,24 +76,26 @@ namespace BLL /// public static void UpdateSpotCheckDetail(Model.Check_SpotCheckDetail SpotCheckDetail) { - Model.SGGLDB db = Funs.DB; - Model.Check_SpotCheckDetail newSpotCheckDetail = db.Check_SpotCheckDetail.FirstOrDefault(e => e.SpotCheckDetailId == SpotCheckDetail.SpotCheckDetailId); - if (newSpotCheckDetail != null) + using (var db = new Model.SGGLDB(Funs.ConnString)) { - newSpotCheckDetail.SpotCheckCode = SpotCheckDetail.SpotCheckCode; - newSpotCheckDetail.ControlItemAndCycleId = SpotCheckDetail.ControlItemAndCycleId; - newSpotCheckDetail.WorkPackageId = WorkPackageService.getWorkPageIdsByControlItemAndCycle(null, SpotCheckDetail.ControlItemAndCycleId); - newSpotCheckDetail.IsOnesOK = SpotCheckDetail.IsOnesOK; - newSpotCheckDetail.IsOK = SpotCheckDetail.IsOK; - newSpotCheckDetail.ConfirmDate = SpotCheckDetail.ConfirmDate; - newSpotCheckDetail.RectifyDescription = SpotCheckDetail.RectifyDescription; - newSpotCheckDetail.IsDataOK = SpotCheckDetail.IsDataOK; - newSpotCheckDetail.DataConfirmDate = SpotCheckDetail.DataConfirmDate; - newSpotCheckDetail.State = SpotCheckDetail.State; - newSpotCheckDetail.HandleMan = SpotCheckDetail.HandleMan; - newSpotCheckDetail.IsShow = SpotCheckDetail.IsShow; + Model.Check_SpotCheckDetail newSpotCheckDetail = db.Check_SpotCheckDetail.FirstOrDefault(e => e.SpotCheckDetailId == SpotCheckDetail.SpotCheckDetailId); + if (newSpotCheckDetail != null) + { + newSpotCheckDetail.SpotCheckCode = SpotCheckDetail.SpotCheckCode; + newSpotCheckDetail.ControlItemAndCycleId = SpotCheckDetail.ControlItemAndCycleId; + newSpotCheckDetail.WorkPackageId = WorkPackageService.getWorkPageIdsByControlItemAndCycle(null, SpotCheckDetail.ControlItemAndCycleId); + newSpotCheckDetail.IsOnesOK = SpotCheckDetail.IsOnesOK; + newSpotCheckDetail.IsOK = SpotCheckDetail.IsOK; + newSpotCheckDetail.ConfirmDate = SpotCheckDetail.ConfirmDate; + newSpotCheckDetail.RectifyDescription = SpotCheckDetail.RectifyDescription; + newSpotCheckDetail.IsDataOK = SpotCheckDetail.IsDataOK; + newSpotCheckDetail.DataConfirmDate = SpotCheckDetail.DataConfirmDate; + newSpotCheckDetail.State = SpotCheckDetail.State; + newSpotCheckDetail.HandleMan = SpotCheckDetail.HandleMan; + newSpotCheckDetail.IsShow = SpotCheckDetail.IsShow; - db.SubmitChanges(); + db.SubmitChanges(); + } } } diff --git a/SGGL/BLL/CQMS/Check/SpotCheckService.cs b/SGGL/BLL/CQMS/Check/SpotCheckService.cs index 56475f7e..5f5ef8b7 100644 --- a/SGGL/BLL/CQMS/Check/SpotCheckService.cs +++ b/SGGL/BLL/CQMS/Check/SpotCheckService.cs @@ -76,27 +76,29 @@ namespace BLL /// public static void UpdateSpotCheck(Model.Check_SpotCheck SpotCheck) { - Model.SGGLDB db = Funs.DB; - Model.Check_SpotCheck newSpotCheck = db.Check_SpotCheck.First(e => e.SpotCheckCode == SpotCheck.SpotCheckCode); - newSpotCheck.DocCode = SpotCheck.DocCode; - newSpotCheck.UnitId = SpotCheck.UnitId; - newSpotCheck.CheckDateType = SpotCheck.CheckDateType; - newSpotCheck.SpotCheckDate = SpotCheck.SpotCheckDate; - newSpotCheck.SpotCheckDate2 = SpotCheck.SpotCheckDate2; - newSpotCheck.CheckArea = SpotCheck.CheckArea; - newSpotCheck.IsOK = SpotCheck.IsOK; - newSpotCheck.JointCheckMans = SpotCheck.JointCheckMans; - newSpotCheck.JointCheckMans2 = SpotCheck.JointCheckMans2; - newSpotCheck.JointCheckMans3 = SpotCheck.JointCheckMans3; - newSpotCheck.CNProfessionalCode = SpotCheck.CNProfessionalCode; - newSpotCheck.AttachUrl = SpotCheck.AttachUrl; - newSpotCheck.State = SpotCheck.State; - newSpotCheck.ControlPointType = SpotCheck.ControlPointType; - newSpotCheck.State2 = SpotCheck.State2; - newSpotCheck.IsShow = SpotCheck.IsShow; - newSpotCheck.SaveHandleMan = SpotCheck.SaveHandleMan; + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + Model.Check_SpotCheck newSpotCheck = db.Check_SpotCheck.First(e => e.SpotCheckCode == SpotCheck.SpotCheckCode); + newSpotCheck.DocCode = SpotCheck.DocCode; + newSpotCheck.UnitId = SpotCheck.UnitId; + newSpotCheck.CheckDateType = SpotCheck.CheckDateType; + newSpotCheck.SpotCheckDate = SpotCheck.SpotCheckDate; + newSpotCheck.SpotCheckDate2 = SpotCheck.SpotCheckDate2; + newSpotCheck.CheckArea = SpotCheck.CheckArea; + newSpotCheck.IsOK = SpotCheck.IsOK; + newSpotCheck.JointCheckMans = SpotCheck.JointCheckMans; + newSpotCheck.JointCheckMans2 = SpotCheck.JointCheckMans2; + newSpotCheck.JointCheckMans3 = SpotCheck.JointCheckMans3; + newSpotCheck.CNProfessionalCode = SpotCheck.CNProfessionalCode; + newSpotCheck.AttachUrl = SpotCheck.AttachUrl; + newSpotCheck.State = SpotCheck.State; + newSpotCheck.ControlPointType = SpotCheck.ControlPointType; + newSpotCheck.State2 = SpotCheck.State2; + newSpotCheck.IsShow = SpotCheck.IsShow; + newSpotCheck.SaveHandleMan = SpotCheck.SaveHandleMan; - db.SubmitChanges(); + db.SubmitChanges(); + } } /// diff --git a/SGGL/BLL/CQMS/WBS/ControlItemAndCycleService.cs b/SGGL/BLL/CQMS/WBS/ControlItemAndCycleService.cs index fb13a94b..da8672b0 100644 --- a/SGGL/BLL/CQMS/WBS/ControlItemAndCycleService.cs +++ b/SGGL/BLL/CQMS/WBS/ControlItemAndCycleService.cs @@ -43,33 +43,35 @@ namespace BLL /// public static void AddControlItemAndCycle(Model.WBS_ControlItemAndCycle ControlItemAndCycle) { - Model.SGGLDB db = Funs.DB; - Model.WBS_ControlItemAndCycle newControlItemAndCycle = new Model.WBS_ControlItemAndCycle(); - //string newKeyID = SQLHelper.GetNewID(typeof(Model.WBS_ControlItemAndCycle)); - newControlItemAndCycle.ControlItemAndCycleId = ControlItemAndCycle.ControlItemAndCycleId; - newControlItemAndCycle.ControlItemAndCycleCode = ControlItemAndCycle.ControlItemAndCycleCode; - newControlItemAndCycle.WorkPackageId = ControlItemAndCycle.WorkPackageId; - newControlItemAndCycle.WorkPackageIds = WorkPackageService.getWorkPageIdsByControlItemAndCycle(ControlItemAndCycle.WorkPackageId, ControlItemAndCycle.ControlItemAndCycleId); - newControlItemAndCycle.ProjectId = ControlItemAndCycle.ProjectId; - newControlItemAndCycle.ControlItemContent = ControlItemAndCycle.ControlItemContent; - newControlItemAndCycle.ControlPoint = ControlItemAndCycle.ControlPoint; - newControlItemAndCycle.ControlItemDef = ControlItemAndCycle.ControlItemDef; - newControlItemAndCycle.IsSelected = ControlItemAndCycle.IsSelected; - newControlItemAndCycle.IsApprove = ControlItemAndCycle.IsApprove; - newControlItemAndCycle.AttachUrl = ControlItemAndCycle.AttachUrl; - newControlItemAndCycle.Weights = ControlItemAndCycle.Weights; - newControlItemAndCycle.HGForms = ControlItemAndCycle.HGForms; - newControlItemAndCycle.SHForms = ControlItemAndCycle.SHForms; - newControlItemAndCycle.Standard = ControlItemAndCycle.Standard; - newControlItemAndCycle.ClauseNo = ControlItemAndCycle.ClauseNo; - newControlItemAndCycle.CheckNum = ControlItemAndCycle.CheckNum; - newControlItemAndCycle.InitControlItemCode = ControlItemAndCycle.InitControlItemCode; - newControlItemAndCycle.PlanCompleteDate = ControlItemAndCycle.PlanCompleteDate; - newControlItemAndCycle.Costs = ControlItemAndCycle.Costs; - newControlItemAndCycle.CheckAcceptType = ControlItemAndCycle.CheckAcceptType; + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + Model.WBS_ControlItemAndCycle newControlItemAndCycle = new Model.WBS_ControlItemAndCycle(); + //string newKeyID = SQLHelper.GetNewID(typeof(Model.WBS_ControlItemAndCycle)); + newControlItemAndCycle.ControlItemAndCycleId = ControlItemAndCycle.ControlItemAndCycleId; + newControlItemAndCycle.ControlItemAndCycleCode = ControlItemAndCycle.ControlItemAndCycleCode; + newControlItemAndCycle.WorkPackageId = ControlItemAndCycle.WorkPackageId; + newControlItemAndCycle.WorkPackageIds = WorkPackageService.getWorkPageIdsByControlItemAndCycle(ControlItemAndCycle.WorkPackageId, ControlItemAndCycle.ControlItemAndCycleId); + newControlItemAndCycle.ProjectId = ControlItemAndCycle.ProjectId; + newControlItemAndCycle.ControlItemContent = ControlItemAndCycle.ControlItemContent; + newControlItemAndCycle.ControlPoint = ControlItemAndCycle.ControlPoint; + newControlItemAndCycle.ControlItemDef = ControlItemAndCycle.ControlItemDef; + newControlItemAndCycle.IsSelected = ControlItemAndCycle.IsSelected; + newControlItemAndCycle.IsApprove = ControlItemAndCycle.IsApprove; + newControlItemAndCycle.AttachUrl = ControlItemAndCycle.AttachUrl; + newControlItemAndCycle.Weights = ControlItemAndCycle.Weights; + newControlItemAndCycle.HGForms = ControlItemAndCycle.HGForms; + newControlItemAndCycle.SHForms = ControlItemAndCycle.SHForms; + newControlItemAndCycle.Standard = ControlItemAndCycle.Standard; + newControlItemAndCycle.ClauseNo = ControlItemAndCycle.ClauseNo; + newControlItemAndCycle.CheckNum = ControlItemAndCycle.CheckNum; + newControlItemAndCycle.InitControlItemCode = ControlItemAndCycle.InitControlItemCode; + newControlItemAndCycle.PlanCompleteDate = ControlItemAndCycle.PlanCompleteDate; + newControlItemAndCycle.Costs = ControlItemAndCycle.Costs; + newControlItemAndCycle.CheckAcceptType = ControlItemAndCycle.CheckAcceptType; - db.WBS_ControlItemAndCycle.InsertOnSubmit(newControlItemAndCycle); - db.SubmitChanges(); + db.WBS_ControlItemAndCycle.InsertOnSubmit(newControlItemAndCycle); + db.SubmitChanges(); + } } /// @@ -78,32 +80,34 @@ namespace BLL /// public static void UpdateControlItemAndCycle(Model.WBS_ControlItemAndCycle ControlItemAndCycle) { - Model.SGGLDB db = Funs.DB; - Model.WBS_ControlItemAndCycle newControlItemAndCycle = db.WBS_ControlItemAndCycle.First(e => e.ControlItemAndCycleId == ControlItemAndCycle.ControlItemAndCycleId); - newControlItemAndCycle.ControlItemAndCycleCode = ControlItemAndCycle.ControlItemAndCycleCode; - newControlItemAndCycle.WorkPackageId = ControlItemAndCycle.WorkPackageId; - newControlItemAndCycle.ControlItemContent = ControlItemAndCycle.ControlItemContent; - newControlItemAndCycle.ControlPoint = ControlItemAndCycle.ControlPoint; - newControlItemAndCycle.ControlItemDef = ControlItemAndCycle.ControlItemDef; - newControlItemAndCycle.ControlItemContent = ControlItemAndCycle.ControlItemContent; - newControlItemAndCycle.ControlPoint = ControlItemAndCycle.ControlPoint; - newControlItemAndCycle.ControlItemDef = ControlItemAndCycle.ControlItemDef; - newControlItemAndCycle.IsSelected = ControlItemAndCycle.IsSelected; - newControlItemAndCycle.IsApprove = ControlItemAndCycle.IsApprove; - newControlItemAndCycle.AttachUrl = ControlItemAndCycle.AttachUrl; - newControlItemAndCycle.Weights = ControlItemAndCycle.Weights; - newControlItemAndCycle.HGForms = ControlItemAndCycle.HGForms; - newControlItemAndCycle.SHForms = ControlItemAndCycle.SHForms; - newControlItemAndCycle.Standard = ControlItemAndCycle.Standard; - newControlItemAndCycle.ClauseNo = ControlItemAndCycle.ClauseNo; - newControlItemAndCycle.CheckNum = ControlItemAndCycle.CheckNum; - newControlItemAndCycle.PlanCompleteDate = ControlItemAndCycle.PlanCompleteDate; - newControlItemAndCycle.Costs = ControlItemAndCycle.Costs; - newControlItemAndCycle.CheckAcceptType = ControlItemAndCycle.CheckAcceptType; - newControlItemAndCycle.RealEndDate = ControlItemAndCycle.RealEndDate; - newControlItemAndCycle.PlanCost = ControlItemAndCycle.PlanCost; + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + Model.WBS_ControlItemAndCycle newControlItemAndCycle = db.WBS_ControlItemAndCycle.First(e => e.ControlItemAndCycleId == ControlItemAndCycle.ControlItemAndCycleId); + newControlItemAndCycle.ControlItemAndCycleCode = ControlItemAndCycle.ControlItemAndCycleCode; + newControlItemAndCycle.WorkPackageId = ControlItemAndCycle.WorkPackageId; + newControlItemAndCycle.ControlItemContent = ControlItemAndCycle.ControlItemContent; + newControlItemAndCycle.ControlPoint = ControlItemAndCycle.ControlPoint; + newControlItemAndCycle.ControlItemDef = ControlItemAndCycle.ControlItemDef; + newControlItemAndCycle.ControlItemContent = ControlItemAndCycle.ControlItemContent; + newControlItemAndCycle.ControlPoint = ControlItemAndCycle.ControlPoint; + newControlItemAndCycle.ControlItemDef = ControlItemAndCycle.ControlItemDef; + newControlItemAndCycle.IsSelected = ControlItemAndCycle.IsSelected; + newControlItemAndCycle.IsApprove = ControlItemAndCycle.IsApprove; + newControlItemAndCycle.AttachUrl = ControlItemAndCycle.AttachUrl; + newControlItemAndCycle.Weights = ControlItemAndCycle.Weights; + newControlItemAndCycle.HGForms = ControlItemAndCycle.HGForms; + newControlItemAndCycle.SHForms = ControlItemAndCycle.SHForms; + newControlItemAndCycle.Standard = ControlItemAndCycle.Standard; + newControlItemAndCycle.ClauseNo = ControlItemAndCycle.ClauseNo; + newControlItemAndCycle.CheckNum = ControlItemAndCycle.CheckNum; + newControlItemAndCycle.PlanCompleteDate = ControlItemAndCycle.PlanCompleteDate; + newControlItemAndCycle.Costs = ControlItemAndCycle.Costs; + newControlItemAndCycle.CheckAcceptType = ControlItemAndCycle.CheckAcceptType; + newControlItemAndCycle.RealEndDate = ControlItemAndCycle.RealEndDate; + newControlItemAndCycle.PlanCost = ControlItemAndCycle.PlanCost; - db.SubmitChanges(); + db.SubmitChanges(); + } } /// From 5823d7534ebf248a2e19ef1298ab785334f3c4ec Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Tue, 5 Mar 2024 11:14:41 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E8=AF=A6=E7=BB=86=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/API/APIPersonService.cs | 4 ++-- SGGL/BLL/BLL.csproj | 15 +++++---------- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 14 ++++---------- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/SGGL/BLL/API/APIPersonService.cs b/SGGL/BLL/API/APIPersonService.cs index d9bb1aca..2f4a5ae7 100644 --- a/SGGL/BLL/API/APIPersonService.cs +++ b/SGGL/BLL/API/APIPersonService.cs @@ -61,7 +61,7 @@ namespace BLL using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { Model.PersonItem person = new Model.PersonItem(); - var getProjectPerson = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == sitePersonId || (x.ProjectId == projectId && x.IdentityCard == idcard)); + var getProjectPerson = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == sitePersonId || (x.ProjectId == projectId && x.ProjectId.Length > 1 && x.IdentityCard == idcard)); if (getProjectPerson != null) { person.SitePersonId = getProjectPerson.SitePersonId; @@ -135,7 +135,7 @@ namespace BLL person.AttachUrl4 = getAttachUrl4(getProjectPerson.PersonId); person.AttachUrl5 = APIUpLoadFileService.getFileUrl(getProjectPerson.PersonId + "#5", null); } - var getPerson = db.Person_Persons.FirstOrDefault(x => x.IdentityCard == idcard); + var getPerson = db.Person_Persons.FirstOrDefault(x => x.IdentityCard == idcard && idcard.Length > 1); if (getPerson != null) { person.PersonId = getPerson.PersonId; diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index a8d0c7b1..e395ea9f 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -70,9 +70,13 @@ ..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll - ..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1000\lib\net20\Microsoft.Office.Interop.Excel.dll + ..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll True + + ..\packages\Microsoft.Office.Interop.Word.15.0.4797.1004\lib\net20\Microsoft.Office.Interop.Word.dll + False + False @@ -844,15 +848,6 @@ - - {00020905-0000-0000-C000-000000000046} - 8 - 4 - 0 - primary - False - False - {0002E157-0000-0000-C000-000000000046} 5 diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 9f1f55da..01a39c76 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -111,6 +111,10 @@ ..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll True + + ..\packages\Microsoft.Office.Interop.Word.15.0.4797.1004\lib\net20\Microsoft.Office.Interop.Word.dll + True + False @@ -14332,7 +14336,6 @@ SuperviseCheckRectifyEdit.aspx - ASPXCodeBehind SuperviseCheckRectifyEdit.aspx @@ -14397,15 +14400,6 @@ - - {00020905-0000-0000-C000-000000000046} - 8 - 4 - 0 - primary - False - True - {0002E157-0000-0000-C000-000000000046} 5 From d03c9a0e00888636fb3537972f4252e748048ff9 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Thu, 7 Mar 2024 16:12:32 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=80=BB=E9=83=A8=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E9=A2=84=E8=A7=88=E5=8A=9F=E8=83=BD=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 3 +- .../FineUIPro.Web/HSSE/Check/OfficeCheck.aspx | 59 +++-- .../HSSE/Check/OfficeCheck.aspx.cs | 40 ++++ .../HSSE/Check/OfficeCheck.aspx.designer.cs | 18 ++ .../HSSE/Check/RectifyNoticesView.aspx | 2 +- .../OfficeCheck/Check/CheckInfo.aspx.cs | 7 +- .../OfficeCheck/Check/RectifyEdit.aspx | 224 ++++++++++-------- .../OfficeCheck/Check/RectifyEdit.aspx.cs | 49 +++- .../Check/RectifyEdit.aspx.designer.cs | 126 +++++----- 9 files changed, 339 insertions(+), 189 deletions(-) diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 01a39c76..665361d4 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -14336,6 +14336,7 @@ SuperviseCheckRectifyEdit.aspx + ASPXCodeBehind SuperviseCheckRectifyEdit.aspx @@ -14420,7 +14421,7 @@ True 0 / - http://localhost:14290/ + http://localhost:8653/ False False diff --git a/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx b/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx index a7faddac..76a27117 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx @@ -5,8 +5,7 @@ - 总部检查 - + @@ -23,7 +22,7 @@ - @@ -36,9 +35,9 @@ SortField="RectifyItemId" FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Hidden="true"> - - + + @@ -53,11 +52,23 @@ + + + + + + + + + + @@ -70,26 +81,44 @@ Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px" Height="500px"> +
+ Alternate Text +
- - + - + function onGridDataLoad(event) { + this.mergeColumns(['RectifyCode'], { depends: true }); + } + + diff --git a/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx.cs index c4a06e2e..0c8883b1 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; +using System.Web; namespace FineUIPro.Web.HSSE.Check { @@ -127,5 +128,44 @@ namespace FineUIPro.Web.HSSE.Check ShowNotify("数据已提交成功!"); } } + + + /// + /// 获取整改前图片(放于Img中) + /// + /// + /// + protected string ConvertImageUrlByImage(object RectifyItemId) + { + string url = string.Empty; + if (RectifyItemId != null) + { + var RectifyNoticesItem = BLL.AttachFileService.GetAttachFileByToKeyId(RectifyItemId.ToString() + "#1"); + if (RectifyNoticesItem != null) + { + url = HttpUtility.HtmlDecode(BLL.UploadAttachmentService.ShowImage("../../", RectifyNoticesItem.AttachUrl)); + } + } + return url; + } + + /// + /// 获取整改后图片 + /// + /// + /// + protected string ConvertImageUrlByImage2(object RectifyItemId) + { + string url = string.Empty; + if (RectifyItemId != null) + { + var RectifyNoticesItem = BLL.AttachFileService.GetAttachFileByToKeyId(RectifyItemId.ToString() + "#2"); + if (RectifyNoticesItem != null) + { + url = BLL.UploadAttachmentService.ShowImage("../../", RectifyNoticesItem.AttachUrl); + } + } + return url; + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx.designer.cs index cdf4faec..ea964a99 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx.designer.cs @@ -68,6 +68,24 @@ namespace FineUIPro.Web.HSSE.Check /// protected global::FineUIPro.RadioButtonList rbStates; + /// + /// lbImageUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbImageUrl; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesView.aspx b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesView.aspx index 1df17a02..c9a5082f 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesView.aspx @@ -84,7 +84,7 @@ - %>'> + - 隐患整改 - - + +
@@ -48,6 +47,107 @@ --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -66,111 +166,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ Alternate Text +
+ diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.cs index 3de15077..c002679f 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; +using System.Web; namespace FineUIPro.Web.OfficeCheck.Check { @@ -49,7 +50,7 @@ namespace FineUIPro.Web.OfficeCheck.Check this.btnSave.Hidden = true; this.btnAdd.Hidden = true; this.btnSubmit.Hidden = true; - this.Grid1.Columns[9].Hidden = true; + this.Grid1.Columns[11].Hidden = true; } this.CheckNoticeId = Request.Params["CheckNoticeId"]; @@ -133,14 +134,16 @@ namespace FineUIPro.Web.OfficeCheck.Check List listStr = new List(); if (Funs.DB.ProjectSupervision_RectifyItem.FirstOrDefault(x => x.RectifyId == this.hdRectifyNoticesId.Text) != null) { - strSql = @"select RectifyItemId,WrongContent,Requirement,LimitTime,RectifyResults,IsRectify,HiddenHazardType,null as CheckReportItemId + strSql = @"select RectifyItemId,WrongContent,Requirement,LimitTime,RectifyResults,IsRectify,HiddenHazardType + ,null as CheckReportItemId, RectifyItemId AS FileUrlId from ProjectSupervision_RectifyItem where RectifyId = @RectifyId"; listStr.Add(new SqlParameter("@RectifyId", this.hdRectifyNoticesId.Text)); } else { - strSql = @"select newid() as RectifyItemId,UnConformItem as WrongContent,null as Requirement,null as LimitTime, null as RectifyResults,0 as IsRectify,'1' as HiddenHazardType,item.CheckReportItemId + strSql = @"select newid() as RectifyItemId,UnConformItem as WrongContent,null as Requirement,null as LimitTime, null as RectifyResults,0 as IsRectify + ,'1' as HiddenHazardType,item.CheckReportItemId,item.CheckReportItemId AS FileUrlId from ProjectSupervision_CheckReportItem as item left join ProjectSupervision_CheckReport as Report on item.CheckReportId=Report.CheckReportId where Report.CheckNoticeId = @CheckNoticeId"; @@ -264,7 +267,7 @@ namespace FineUIPro.Web.OfficeCheck.Check } else { - string checkReportItemId= Grid1.Rows[e.RowIndex].Values[10].ToString(); + string checkReportItemId= Grid1.Rows[e.RowIndex].Values[12].ToString(); PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Rectify&menuId={1}&type=0&strParam=1", checkReportItemId, BLL.Const.CheckInfoMenuId))); } } @@ -528,5 +531,43 @@ namespace FineUIPro.Web.OfficeCheck.Check PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } } + + /// + /// 获取整改前图片(放于Img中) + /// + /// + /// + protected string ConvertImageUrlByImage(object FileUrlId) + { + string url = string.Empty; + if (FileUrlId != null) + { + var RectifyNoticesItem = BLL.AttachFileService.GetAttachFileByToKeyId(FileUrlId.ToString() + "#1"); + if (RectifyNoticesItem != null) + { + url = HttpUtility.HtmlDecode(BLL.UploadAttachmentService.ShowImage("../../", RectifyNoticesItem.AttachUrl)); + } + } + return url; + } + + /// + /// 获取整改后图片 + /// + /// + /// + protected string ConvertImageUrlByImage2(object FileUrlId) + { + string url = string.Empty; + if (FileUrlId != null) + { + var RectifyNoticesItem = BLL.AttachFileService.GetAttachFileByToKeyId(FileUrlId.ToString() + "#2"); + if (RectifyNoticesItem != null) + { + url = BLL.UploadAttachmentService.ShowImage("../../", RectifyNoticesItem.AttachUrl); + } + } + return url; + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.designer.cs index 8fec0a02..cf728a41 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.designer.cs @@ -95,60 +95,6 @@ namespace FineUIPro.Web.OfficeCheck.Check /// protected global::FineUIPro.DatePicker txtCheckedDate; - /// - /// Toolbar1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar1; - - /// - /// hdRectifyNoticesId 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.HiddenField hdRectifyNoticesId; - - /// - /// btnSave 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSave; - - /// - /// btnSubmit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSubmit; - - /// - /// btnSure 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSure; - - /// - /// Form2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form Form2; - /// /// Grid1 控件。 /// @@ -221,6 +167,15 @@ namespace FineUIPro.Web.OfficeCheck.Check /// protected global::System.Web.UI.WebControls.TextBox txtLimitTimes; + /// + /// lbImageUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbImageUrl; + /// /// txtRectifyResults 控件。 /// @@ -230,6 +185,15 @@ namespace FineUIPro.Web.OfficeCheck.Check /// protected global::FineUIPro.TextBox txtRectifyResults; + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + /// /// drpIsRectify 控件。 /// @@ -257,15 +221,6 @@ namespace FineUIPro.Web.OfficeCheck.Check /// protected global::FineUIPro.LinkButtonField del; - /// - /// Form3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form Form3; - /// /// next 控件。 /// @@ -284,6 +239,51 @@ namespace FineUIPro.Web.OfficeCheck.Check /// protected global::FineUIPro.DropDownList drpSignPerson; + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// hdRectifyNoticesId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdRectifyNoticesId; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnSure 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSure; + /// /// WindowAtt 控件。 ///