diff --git a/SGGL/BLL/WebService/CNCECHSSEWebService.cs b/SGGL/BLL/WebService/CNCECHSSEWebService.cs index 1f381a93..369f431a 100644 --- a/SGGL/BLL/WebService/CNCECHSSEWebService.cs +++ b/SGGL/BLL/WebService/CNCECHSSEWebService.cs @@ -1,5 +1,6 @@ namespace BLL { + using Model; using Newtonsoft.Json; using Newtonsoft.Json.Linq; //using System.Net.Http.Headers; @@ -2052,6 +2053,44 @@ } #endregion + #region 集团督查检查驳回整改 + + /// + /// 集团督查检查驳回整改 + /// + /// + /// + public static ResponeData RejectRectify(DCGLCheckRectifyReject data) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var respone = new ResponeData(); + var rectifItem = db.DCGL_Check_CheckRectifyItem.FirstOrDefault(x => x.CheckRectifyItemId == data.CheckRectifyItemId); + rectifItem.RealEndDate = null; + rectifItem.Verification = data.Reason; + db.SubmitChanges(); + var rectify = db.DCGL_Check_CheckRectify.FirstOrDefault(x => x.CheckRectifyId == rectifItem.CheckRectifyId); + if (rectify != null) + { + var getNoUpdateItem = db.DCGL_Check_CheckRectifyItem.FirstOrDefault(x => x.CheckRectifyId == rectifItem.CheckRectifyId && !x.RealEndDate.HasValue); + if (getNoUpdateItem == null) + { + rectify.HandleState = "3"; + } + else + { + rectify.HandleState = "2"; + } + db.SubmitChanges(); + } + return respone; + } + } + + + #endregion + + #region 督查大队:重点工程项目质量专项整治行动开展情况台账上报 /// diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx index d4ac1623..67cfba11 100644 --- a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx @@ -125,7 +125,7 @@ - + + + diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.cs b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.cs index 92c0d33f..47baf85c 100644 --- a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.cs @@ -164,7 +164,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck { newCheckRectifyItem.RealEndDate = item.RealEndDate; newCheckRectifyItem.OrderEndPerson = item.OrderEndPerson; - //newCheckRectifyItem.Verification = item.Verification; + newCheckRectifyItem.Verification = null; BLL.DCGLCheckRectifyItemService.UpdateCheckRectifyItem(newCheckRectifyItem); } } @@ -319,7 +319,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck } if (column.ColumnID == "tfImageUrl2") { - html = (row.FindControl("tfImageUrl2") as AspNet.Label).Text; + html = (row.FindControl("lbImageUrl2") as AspNet.Label).Text; } sb.AppendFormat("{0}", html); } diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.designer.cs index ef71075f..22b3618f 100644 --- a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.designer.cs @@ -159,13 +159,13 @@ namespace FineUIPro.Web.DCGL.ServerCheck protected global::System.Web.UI.WebControls.Label lbImageUrl1; /// - /// tfImageUrl2 控件。 + /// lbImageUrl2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label tfImageUrl2; + protected global::System.Web.UI.WebControls.Label lbImageUrl2; /// /// txtOrderEndPerson 控件。 diff --git a/SGGL/Model/APIItem/HSSE/DCGLCheckRectifyReject.cs b/SGGL/Model/APIItem/HSSE/DCGLCheckRectifyReject.cs new file mode 100644 index 00000000..16b3ee30 --- /dev/null +++ b/SGGL/Model/APIItem/HSSE/DCGLCheckRectifyReject.cs @@ -0,0 +1,24 @@ +using Model; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace Model +{ + /// + /// 督查检查驳回整改 + /// + public class DCGLCheckRectifyReject + { + public string UnitId { get; set; } + public string ProjectId { get; set; } + public string CheckRectifyId { get; set; } + public string CheckRectifyItemId { get; set; } + public string NoticeItemId { get; set; } + /// + /// 驳回描述 + /// + public string Reason { get; set; } + + } +} diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index b9af368b..59ed38c4 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -115,6 +115,7 @@ + diff --git a/SGGL/WebAPI/Controllers/HSSE/DCGLCheckRectifyController.cs b/SGGL/WebAPI/Controllers/HSSE/DCGLCheckRectifyController.cs new file mode 100644 index 00000000..3218926e --- /dev/null +++ b/SGGL/WebAPI/Controllers/HSSE/DCGLCheckRectifyController.cs @@ -0,0 +1,39 @@ +using BLL; +using Model; +using Mvc.Controllers; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; + +namespace WebAPI.Controllers +{ + /// + /// 督查检查整改 + /// + public class DCGLCheckRectifyController : ApiController + { + /// + /// 集团驳回督查检查整改 + /// + /// + /// + [HttpPost] + public Model.ResponeData RejectRectify([FromBody] DCGLCheckRectifyReject data) + { + var responeData = new Model.ResponeData(); + try + { + responeData = CNCECHSSEWebService.RejectRectify(data); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + } +} diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj index 9bef5ab5..f74dbd39 100644 --- a/SGGL/WebAPI/WebAPI.csproj +++ b/SGGL/WebAPI/WebAPI.csproj @@ -196,6 +196,7 @@ +