From 98c1cad9877addd8641ed6537c0ebb93bd1aae60 Mon Sep 17 00:00:00 2001 From: 10191 <506754232@qq.com> Date: Fri, 10 May 2024 14:45:54 +0800 Subject: [PATCH] 0510 --- SGGL/BLL/API/APICommonService.cs | 48 +++- .../Controls/FlowOperateControl.ascx.cs | 6 +- SGGL/FineUIPro.Web/ErrLog.txt | 120 ++++++++++ .../HSSE/ActionPlan/ActionPlanListEdit.aspx | 3 +- .../HSSE/Solution/LargerHazardEdit.aspx | 21 +- .../HSSE/Solution/LargerHazardEdit.aspx.cs | 51 +++- .../LargerHazardEdit.aspx.designer.cs | 88 +++++-- .../HSSE/Solution/LargerHazardList.aspx | 13 +- .../HSSE/Solution/LargerHazardList.aspx.cs | 17 ++ .../LargerHazardList.aspx.designer.cs | 9 + SGGL/Model/Model.cs | 219 +++++++++++++++++- SGGL/WebAPI/Controllers/ToDoItemController.cs | 30 ++- 12 files changed, 581 insertions(+), 44 deletions(-) diff --git a/SGGL/BLL/API/APICommonService.cs b/SGGL/BLL/API/APICommonService.cs index 14d08ec6..748c205e 100644 --- a/SGGL/BLL/API/APICommonService.cs +++ b/SGGL/BLL/API/APICommonService.cs @@ -88,7 +88,7 @@ namespace BLL var tempData = new { access_token, - touser = getUser.OpenId, + touser = getUser.OpenId, template_id = Const.WX_TemplateID, page = "pages/index/index", data = new @@ -102,11 +102,53 @@ namespace BLL lang = "zh_CN", }; string joson = JsonConvert.SerializeObject(tempData); - string messages= APIGetHttpService.Http(url, "POST", contenttype, null, joson); + string messages = APIGetHttpService.Http(url, "POST", contenttype, null, joson); //// 记录 - SaveSysHttpLog(getUser.UserName, url+ "$joson$" + joson , messages); + SaveSysHttpLog(getUser.UserName, url + "$joson$" + joson, messages); return messages; } + else if (getUser == null) + { + var person = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.PersonId == userId); + if (person != null) + { + var user = Funs.DB.Sys_User.FirstOrDefault(x => x.IdentityCard == person.IdentityCard); + if (user != null && !string.IsNullOrEmpty(user.OpenId)) + { + string miniprogram_state = ConfigurationManager.AppSettings["miniprogram_state"]; + if (string.IsNullOrEmpty(miniprogram_state)) + { + miniprogram_state = "formal"; + } + //miniprogram_state = "developer"; + string contenttype = "application/json;charset=utf-8"; + string url = $"https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token={access_token}"; + var tempData = new + { + access_token, + touser = user.OpenId, + template_id = Const.WX_TemplateID, + page = "pages/index/index", + data = new + { + thing2 = new { value = thing2 }, + name1 = new { value = name1 }, + date3 = new { value = date3 }//, + //date6 = new { value = thing6 } + }, + miniprogram_state, + lang = "zh_CN", + }; + string joson = JsonConvert.SerializeObject(tempData); + string messages = APIGetHttpService.Http(url, "POST", contenttype, null, joson); + //// 记录 + SaveSysHttpLog(user.UserName, url + "$joson$" + joson, messages); + return messages; + } + + } + return "openId is null"; + } else { return "openId is null"; diff --git a/SGGL/FineUIPro.Web/Controls/FlowOperateControl.ascx.cs b/SGGL/FineUIPro.Web/Controls/FlowOperateControl.ascx.cs index 28ee217b..2d3315fa 100644 --- a/SGGL/FineUIPro.Web/Controls/FlowOperateControl.ascx.cs +++ b/SGGL/FineUIPro.Web/Controls/FlowOperateControl.ascx.cs @@ -438,9 +438,9 @@ namespace FineUIPro.Web.Controls { foreach (var itemClosed in updateNoClosedFlowOperate) { - itemClosed.IsClosed = true; - Funs.DB.SubmitChanges(); - } + itemClosed.IsClosed = true; + } + Funs.DB.SubmitChanges(); } if (newFlowOperate.State != BLL.Const.State_2) ///未审核完成的时 增加下一步办理 diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index d5876606..f1f3cbf4 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -2008,3 +2008,123 @@ IP地址:::1 出错时间:05/07/2024 14:24:40 + +错误信息开始=====> +错误类型:ChangeConflictException +错误信息:找不到行或行已更改。 +错误堆栈: + 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges() + 在 FineUIPro.Web.Controls.FlowOperateControl.btnSaveData(String projectId, String menuId, String dataId, Boolean isClosed, String content, String url) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\Controls\FlowOperateControl.ascx.cs:行号 429 + 在 FineUIPro.Web.HSSE.Solution.LargerHazardEdit.SaveData(String type) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Solution\LargerHazardEdit.aspx.cs:行号 201 + 在 FineUIPro.Web.HSSE.Solution.LargerHazardEdit.btnSubmit_Click(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Solution\LargerHazardEdit.aspx.cs:行号 157 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:05/09/2024 18:26:40 +出错文件:http://localhost:1295/HSSE/Solution/LargerHazardEdit.aspx +IP地址:::1 +操作人员:JT + +出错时间:05/09/2024 18:26:40 + + +错误信息开始=====> +错误类型:ChangeConflictException +错误信息:找不到行或行已更改。 +错误堆栈: + 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges() + 在 FineUIPro.Web.Controls.FlowOperateControl.btnSaveData(String projectId, String menuId, String dataId, Boolean isClosed, String content, String url) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\Controls\FlowOperateControl.ascx.cs:行号 429 + 在 FineUIPro.Web.HSSE.Solution.LargerHazardEdit.SaveData(String type) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Solution\LargerHazardEdit.aspx.cs:行号 201 + 在 FineUIPro.Web.HSSE.Solution.LargerHazardEdit.btnSubmit_Click(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Solution\LargerHazardEdit.aspx.cs:行号 157 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:05/09/2024 18:29:51 +出错文件:http://localhost:1295/HSSE/Solution/LargerHazardEdit.aspx +IP地址:::1 +操作人员:JT + +出错时间:05/09/2024 18:29:51 + + +错误信息开始=====> +错误类型:ChangeConflictException +错误信息:找不到行或行已更改。 +错误堆栈: + 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges() + 在 FineUIPro.Web.Controls.FlowOperateControl.btnSaveData(String projectId, String menuId, String dataId, Boolean isClosed, String content, String url) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\Controls\FlowOperateControl.ascx.cs:行号 429 + 在 FineUIPro.Web.HSSE.Solution.LargerHazardEdit.SaveData(String type) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Solution\LargerHazardEdit.aspx.cs:行号 201 + 在 FineUIPro.Web.HSSE.Solution.LargerHazardEdit.btnSubmit_Click(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Solution\LargerHazardEdit.aspx.cs:行号 157 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:05/09/2024 18:43:50 +出错文件:http://localhost:1295/HSSE/Solution/LargerHazardEdit.aspx +IP地址:::1 +操作人员:安玉春 + +出错时间:05/09/2024 18:43:50 + + +错误信息开始=====> +错误类型:ChangeConflictException +错误信息:找不到行或行已更改。 +错误堆栈: + 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges() + 在 FineUIPro.Web.Controls.FlowOperateControl.btnSaveData(String projectId, String menuId, String dataId, Boolean isClosed, String content, String url) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\Controls\FlowOperateControl.ascx.cs:行号 429 + 在 FineUIPro.Web.HSSE.Solution.LargerHazardEdit.SaveData(String type) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Solution\LargerHazardEdit.aspx.cs:行号 201 + 在 FineUIPro.Web.HSSE.Solution.LargerHazardEdit.btnSubmit_Click(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Solution\LargerHazardEdit.aspx.cs:行号 157 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:05/09/2024 18:43:54 +出错文件:http://localhost:1295/HSSE/Solution/LargerHazardEdit.aspx +IP地址:::1 +操作人员:安玉春 + +出错时间:05/09/2024 18:43:54 + + +错误信息开始=====> +错误类型:ChangeConflictException +错误信息:找不到行或行已更改。 +错误堆栈: + 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges() + 在 FineUIPro.Web.Controls.FlowOperateControl.btnSaveData(String projectId, String menuId, String dataId, Boolean isClosed, String content, String url) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\Controls\FlowOperateControl.ascx.cs:行号 429 + 在 FineUIPro.Web.HSSE.Solution.LargerHazardEdit.SaveData(String type) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Solution\LargerHazardEdit.aspx.cs:行号 201 + 在 FineUIPro.Web.HSSE.Solution.LargerHazardEdit.btnSubmit_Click(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Solution\LargerHazardEdit.aspx.cs:行号 157 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:05/09/2024 18:44:01 +出错文件:http://localhost:1295/HSSE/Solution/LargerHazardEdit.aspx +IP地址:::1 +操作人员:安玉春 + +出错时间:05/09/2024 18:44:01 + diff --git a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListEdit.aspx b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListEdit.aspx index 3b3eb8ff..d6819f2f 100644 --- a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListEdit.aspx +++ b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListEdit.aspx @@ -1,8 +1,7 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActionPlanListEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.ActionPlan.ActionPlanListEdit" ValidateRequest="false" %> -<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" - TagPrefix="uc1" %> +<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %> diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx index f871fbf8..3a62b207 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx @@ -1,6 +1,6 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LargerHazardEdit.aspx.cs" ValidateRequest="false" Inherits="FineUIPro.Web.HSSE.Solution.LargerHazardEdit" %> - +<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %> 编辑危险性较大的工程清单 @@ -23,7 +23,7 @@ - + @@ -41,8 +41,8 @@ <%-- --%> - - <%-- --%> + + <%----%> @@ -59,6 +59,16 @@ + + + @@ -72,6 +82,9 @@ + + diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs index 44c25725..56dd3e58 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using FineUIPro.Web.HSSE.ActionPlan; using System; using System.Linq; using System.Web; @@ -78,6 +79,7 @@ namespace FineUIPro.Web.HSSE.Solution if (largerHazard.IsArgument == true) { this.rblIsArgument.SelectedValue = "True"; + AuditFlow.Hidden = false; } else { @@ -107,6 +109,14 @@ namespace FineUIPro.Web.HSSE.Solution this.txtRemark.Text = HttpUtility.HtmlDecode("描述"); this.txtRecordTime.Text = string.Format("{0:yyyy-MM-dd}",DateTime.Now); } + + ///初始化审核菜单 + this.ctlAuditFlow.MenuId = BLL.Const.ProjectLargerHazardListMenuId; + this.ctlAuditFlow.DataId = this.HazardId; + this.ctlAuditFlow.ProjectId = this.ProjectId; + this.ctlAuditFlow.UnitId = this.CurrUser.UnitId; + this.ctlAuditFlow.drpPersonUser = Funs.DB.Sys_User.Where(x => x.UnitId == Const.UnitId_CD && x.IsExpertArgumentationIsAuditor==true).ToList(); + } } #endregion @@ -128,7 +138,26 @@ namespace FineUIPro.Web.HSSE.Solution PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } #endregion - + /// + /// 提交按钮 + /// + /// + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (this.drpHazardType.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择类型!", MessageBoxIcon.Warning); + return; + } + if (this.rblIsArgument.SelectedValue == "True" && this.ctlAuditFlow.NextStep == BLL.Const.State_1 && this.ctlAuditFlow.NextPerson == BLL.Const._Null) + { + Alert.ShowInTop("请选择下一步办理人!", MessageBoxIcon.Warning); + return; + } + this.SaveData(BLL.Const.BtnSubmit); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } /// /// 保存数据 /// @@ -164,8 +193,15 @@ namespace FineUIPro.Web.HSSE.Solution BLL.LargerHazardService.AddLargerHazard(largerHazard); BLL.LogService.AddSys_Log(this.CurrUser, largerHazard.HazardCode, largerHazard.HazardId, BLL.Const.ProjectLargerHazardListMenuId, BLL.Const.BtnAdd); } + ////保存流程审核数据 + if (this.rblIsArgument.SelectedValue == "True") + { + this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.ProjectActionPlanListMenuId, this.HazardId, (type == BLL.Const.BtnSubmit ? true : false), largerHazard.HazardCode, "../ActionPlan/ActionPlanListView.aspx?ActionPlanListId={0}"); + } Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.ProjectInformation); Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.DangerousProject); + + } #region 附件上传 @@ -204,5 +240,18 @@ namespace FineUIPro.Web.HSSE.Solution BLL.LargerHazardService.AddLargerHazard(largerHazard); BLL.LogService.AddSys_Log(this.CurrUser, largerHazard.HazardCode, largerHazard.HazardId,BLL.Const.ProjectLargerHazardListMenuId,BLL.Const.BtnAdd); } + + protected void rblIsArgument_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.rblIsArgument.SelectedValue == "True") + { + AuditFlow.Hidden = false; + } + else + { + AuditFlow.Hidden = true; + } + + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.designer.cs index 0188caad..f868daa7 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.Solution { - - - public partial class LargerHazardEdit { - +namespace FineUIPro.Web.HSSE.Solution +{ + + + public partial class LargerHazardEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtLargerHazardCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtLargerHazardCode; - + /// /// drpHazardType 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpHazardType; - + /// /// txtExpectedTime 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtExpectedTime; - + /// /// rblIsArgument 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rblIsArgument; - + /// /// txtRecordTime 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtRecordTime; - + /// /// txtAddress 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtAddress; - + /// /// rblIsSuperLargerHazard 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rblIsSuperLargerHazard; - + /// /// txtTrainPersonNum 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtTrainPersonNum; - + /// /// drpStates 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpStates; - + /// /// txtDescriptions 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtDescriptions; - + /// /// txtRemark 控件。 /// @@ -137,7 +139,34 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HtmlEditor txtRemark; - + + /// + /// AuditFlow 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow AuditFlow; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// ctlAuditFlow 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Web.Controls.FlowOperateControl ctlAuditFlow; + /// /// Toolbar1 控件。 /// @@ -146,7 +175,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// lbTemp 控件。 /// @@ -155,7 +184,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbTemp; - + /// /// btnAttachUrl 控件。 /// @@ -164,7 +193,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttachUrl; - + /// /// ToolbarFill1 控件。 /// @@ -173,7 +202,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnSave 控件。 /// @@ -182,7 +211,16 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// btnClose 控件。 /// @@ -191,7 +229,7 @@ namespace FineUIPro.Web.HSSE.Solution { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx index 05ea3eba..ab7c681d 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx @@ -97,9 +97,18 @@ FieldType="String" HeaderText="专家论证" TextAlign="Center" HeaderTextAlign="Center"> + SortField="StatesStr" FieldType="String" HeaderText="状态" HeaderTextAlign="Center" + TextAlign="Center"> + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx.cs index c90f845b..f0efb779 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx.cs @@ -312,5 +312,22 @@ namespace FineUIPro.Web.HSSE.Solution string id = Grid1.SelectedRowID; PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("LargerHazardView.aspx?HazardId={0}", id, "查看 - "))); } + protected string ConvertState(object state) + { + if (state != null) + { + + var s = Funs.DB.Sys_FlowOperate.FirstOrDefault(x => x.DataId == state.ToString() && x.IsClosed == false); + if (s != null) + { + var user = Funs.DB.Sys_User.FirstOrDefault(x => x.UserId == s.OperaterId); + if (user != null) + { + return "待[" + user.UserName + "]审核"; + } + } + } + return ""; + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx.designer.cs index 8b0e8225..03bb9bbd 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx.designer.cs @@ -176,6 +176,15 @@ namespace FineUIPro.Web.HSSE.Solution /// protected global::System.Web.UI.WebControls.Label lblNumber; + /// + /// labStatesName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labStatesName; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 6a5ef312..a0ad3b23 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -22,7 +22,7 @@ namespace Model using System; - public partial class SGGLDB : System.Data.Linq.DataContext + public partial class SGGLDB: System.Data.Linq.DataContext { private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); @@ -1115,6 +1115,9 @@ namespace Model partial void InsertHSSE_MonthReportItem(HSSE_MonthReportItem instance); partial void UpdateHSSE_MonthReportItem(HSSE_MonthReportItem instance); partial void DeleteHSSE_MonthReportItem(HSSE_MonthReportItem instance); + partial void InsertHSSE_PerfomanceContent(HSSE_PerfomanceContent instance); + partial void UpdateHSSE_PerfomanceContent(HSSE_PerfomanceContent instance); + partial void DeleteHSSE_PerfomanceContent(HSSE_PerfomanceContent instance); partial void InsertHSSE_Weather(HSSE_Weather instance); partial void UpdateHSSE_Weather(HSSE_Weather instance); partial void DeleteHSSE_Weather(HSSE_Weather instance); @@ -5366,6 +5369,14 @@ namespace Model } } + public System.Data.Linq.Table HSSE_PerfomanceContent + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table HSSE_Weather { get @@ -176981,6 +176992,212 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HSSE_PerfomanceContent")] + public partial class HSSE_PerfomanceContent : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _PerfomanceId; + + private string _PerfomanceContent; + + private string _PerfomanceValue; + + private System.Nullable _PerfomanceType; + + private string _ProjectId; + + private System.Nullable _ShowIndex; + + private string _ReMark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnPerfomanceIdChanging(string value); + partial void OnPerfomanceIdChanged(); + partial void OnPerfomanceContentChanging(string value); + partial void OnPerfomanceContentChanged(); + partial void OnPerfomanceValueChanging(string value); + partial void OnPerfomanceValueChanged(); + partial void OnPerfomanceTypeChanging(System.Nullable value); + partial void OnPerfomanceTypeChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnShowIndexChanging(System.Nullable value); + partial void OnShowIndexChanged(); + partial void OnReMarkChanging(string value); + partial void OnReMarkChanged(); + #endregion + + public HSSE_PerfomanceContent() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PerfomanceId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string PerfomanceId + { + get + { + return this._PerfomanceId; + } + set + { + if ((this._PerfomanceId != value)) + { + this.OnPerfomanceIdChanging(value); + this.SendPropertyChanging(); + this._PerfomanceId = value; + this.SendPropertyChanged("PerfomanceId"); + this.OnPerfomanceIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PerfomanceContent", DbType="NVarChar(50)")] + public string PerfomanceContent + { + get + { + return this._PerfomanceContent; + } + set + { + if ((this._PerfomanceContent != value)) + { + this.OnPerfomanceContentChanging(value); + this.SendPropertyChanging(); + this._PerfomanceContent = value; + this.SendPropertyChanged("PerfomanceContent"); + this.OnPerfomanceContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PerfomanceValue", DbType="NVarChar(50)")] + public string PerfomanceValue + { + get + { + return this._PerfomanceValue; + } + set + { + if ((this._PerfomanceValue != value)) + { + this.OnPerfomanceValueChanging(value); + this.SendPropertyChanging(); + this._PerfomanceValue = value; + this.SendPropertyChanged("PerfomanceValue"); + this.OnPerfomanceValueChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PerfomanceType", DbType="Int")] + public System.Nullable PerfomanceType + { + get + { + return this._PerfomanceType; + } + set + { + if ((this._PerfomanceType != value)) + { + this.OnPerfomanceTypeChanging(value); + this.SendPropertyChanging(); + this._PerfomanceType = value; + this.SendPropertyChanged("PerfomanceType"); + this.OnPerfomanceTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShowIndex", DbType="Int")] + public System.Nullable ShowIndex + { + get + { + return this._ShowIndex; + } + set + { + if ((this._ShowIndex != value)) + { + this.OnShowIndexChanging(value); + this.SendPropertyChanging(); + this._ShowIndex = value; + this.SendPropertyChanged("ShowIndex"); + this.OnShowIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReMark", DbType="NVarChar(500)")] + public string ReMark + { + get + { + return this._ReMark; + } + set + { + if ((this._ReMark != value)) + { + this.OnReMarkChanging(value); + this.SendPropertyChanging(); + this._ReMark = value; + this.SendPropertyChanged("ReMark"); + this.OnReMarkChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HSSE_Weather")] public partial class HSSE_Weather : INotifyPropertyChanging, INotifyPropertyChanged { diff --git a/SGGL/WebAPI/Controllers/ToDoItemController.cs b/SGGL/WebAPI/Controllers/ToDoItemController.cs index 4619d32d..c351ed20 100644 --- a/SGGL/WebAPI/Controllers/ToDoItemController.cs +++ b/SGGL/WebAPI/Controllers/ToDoItemController.cs @@ -1,5 +1,8 @@ -using BLL; +using Aspose.Words.Lists; +using BLL; +using Model; using System; +using System.Collections.Generic; using System.Linq; using System.Web.Http; @@ -21,8 +24,29 @@ namespace WebAPI.Controllers var responeData = new Model.ResponeData(); try { - var getDataList = Funs.DB.Sp_APP_GetToDoItems(projectId, userId).ToList(); - responeData.data = new { getDataList.Count, getDataList }; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var user = db.Sys_User.FirstOrDefault(x => x.UserId == userId); + var person = db.SitePerson_Person.FirstOrDefault(x => x.ProjectId == projectId && x.IdentityCard == user.IdentityCard); + var getDataList1 = db.Sp_APP_GetToDoItems(projectId, userId).ToList(); + var getDataList2 = db.Sp_APP_GetToDoItems(projectId, person.PersonId).ToList(); + List getDataList = new List(); + HashSet ids = new HashSet(); + foreach (var item in getDataList1) + { + getDataList.Add(item); + ids.Add(item.DataId); + } + + foreach (var item in getDataList2) + { + if (!ids.Contains(item.DataId)) + { + getDataList.Add(item); + } + } + responeData.data = new { getDataList.Count, getDataList }; + } } catch (Exception ex) {