This commit is contained in:
2025-09-22 20:39:23 +08:00
parent 32549f64a1
commit 1b0eb339b1
8 changed files with 370 additions and 41 deletions
@@ -112,12 +112,13 @@ namespace FineUIPro.Web.PZHGL.GJSX
protected void SaveData()
{
var progressStatus = this.ddlProgressStatus.SelectedValue;
var progress_detail = this.txtProgress_detail.Text.Trim();
Model.SGGLDB db = Funs.DB;
var model = new Model.GJSX_detail
{
GJSXID = this.GJSXID,
//Cuid = this.GJSXDetailId,
Progress_detail = this.txtProgress_detail.Text.Trim(),
Progress_detail = progress_detail,
ProgressStatus = progressStatus,
Progress_user = this.CurrUser.UserId,
Date = DateTime.Now,
@@ -150,6 +151,11 @@ namespace FineUIPro.Web.PZHGL.GJSX
}
db.SubmitChanges();
if (progressStatus == "申请关闭")
{
//申请关闭邮件提醒:提出人和跟踪人
GJSXMonitorService.GJSXApplyCloseNoticeSendEmail(this.GJSXID, progress_detail);
}
//ShowNotify("保存成功", MessageBoxIcon.Success);
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
@@ -11,6 +11,7 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using static System.Runtime.CompilerServices.RuntimeHelpers;
using System.Xml.Linq;
using RestSharp.Extensions;
namespace FineUIPro.Web.PZHGL.GJSX
{
@@ -745,22 +746,60 @@ namespace FineUIPro.Web.PZHGL.GJSX
return;
}
//跟踪人
var DropUser_ReceiveID = this.DropUser_ReceiveID.SelectedValue;
string rNotice = this.rblNotice.SelectedValue;
//勾选邮件即时通知责任人,先判断责任人是否已维护邮箱
if (rNotice == "1")
{
if (!BLL.UserService.IsUserHaveEmail(DropUser_AcceptanceId))
//if (!BLL.UserService.IsUserHaveEmail(this.CurrUser.UserId))
//{
// Alert.ShowInParent("请先给提出人维护邮箱!", MessageBoxIcon.Warning);
// return;
//}
//if (!BLL.UserService.IsUserHaveEmail(DropUser_AcceptanceId))
//{
// Alert.ShowInParent("请先给责任人维护邮箱!", MessageBoxIcon.Warning);
// return;
//}
//if (!BLL.UserService.IsUserHaveEmail(DropUser_ReceiveID))
//{
// Alert.ShowInParent("请先给跟踪人维护邮箱!", MessageBoxIcon.Warning);
// return;
//}
List<string> verifyUser = new List<string>();
verifyUser.Add(this.CurrUser.UserId);
verifyUser.Add(DropUser_AcceptanceId);
verifyUser.Add(DropUser_ReceiveID);
if (!string.IsNullOrEmpty(drpCsUsers.Value))
{
Alert.ShowInParent("请先给责任人维护邮箱!", MessageBoxIcon.Warning);
//抄送人
var sendUserIds = string.Join(",", drpCsUsers.Values);
var sendUserId = sendUserIds.Split(',');
verifyUser.AddRange(sendUserId);
}
string verifyMsg = string.Empty;
foreach (var verify in verifyUser)
{
string verUserName = string.Empty;
if (!BLL.UserService.IsUserHaveEmail(verify, out verUserName))
{
verifyMsg = !string.IsNullOrWhiteSpace(verifyMsg) ? $"{verifyMsg}、{verUserName}" : verUserName;
}
}
if (!string.IsNullOrWhiteSpace(verifyMsg))
{
Alert.ShowInParent($"请先给{verifyMsg}维护邮箱!", MessageBoxIcon.Warning);
return;
}
}
#endregion
List<string> userIds = new List<string>();
userIds.Add(DropUser_AcceptanceId);
userIds.AddRange(drpCsUsers.Values);
//List<string> userIds = new List<string>();
//userIds.Add(DropUser_AcceptanceId);
//userIds.AddRange(drpCsUsers.Values);
string EditType = Request.Params["EditType"];
string ID = Request.Params["ID"];
if (string.IsNullOrEmpty(ID))
@@ -769,7 +808,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
//勾选邮件即时通知责任人,邮箱通知提醒关键事项
if (rNotice == "1")
{
GJSXMonitorService.GJSXNoticeSendEmail(userIds, this.txtGJSXID.Text.Trim());
GJSXMonitorService.GJSXNoticeSendEmail(this.txtGJSXID.Text.Trim());
//if (BLL.UserService.IsUserHaveEmail(DropUser_AcceptanceId))
//{
// GJSXMonitorService.GJSXNoticeSendEmail(DropUser_AcceptanceId, this.txtGJSXID.Text.Trim());
@@ -786,7 +825,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
//勾选邮件即时通知责任人,邮箱通知提醒关键事项
if (rNotice == "1")
{
GJSXMonitorService.GJSXNoticeSendEmail(userIds, this.txtGJSXID.Text.Trim());
GJSXMonitorService.GJSXNoticeSendEmail(this.txtGJSXID.Text.Trim());
//if (BLL.UserService.IsUserHaveEmail(DropUser_AcceptanceId))
//{
// GJSXMonitorService.GJSXNoticeSendEmail(DropUser_AcceptanceId, this.txtGJSXID.Text.Trim());
@@ -838,6 +877,12 @@ namespace FineUIPro.Web.PZHGL.GJSX
ProgressStatus = $"{(progressResult == "0" ? "" : "")}申请",
};
GJSXItemService.AddGJSXMX(detail);
//事项申请关闭被驳回,邮箱提醒
if (progressResult == "1")
{
GJSXMonitorService.GJSXRejectApplyCloseNoticeSendEmail(detail.GJSXID, progressReason);
}
}
}
}
@@ -1001,22 +1046,22 @@ namespace FineUIPro.Web.PZHGL.GJSX
string sortField = Grid4.SortField;
string sortDirection = Grid4.SortDirection;
/* var userList = (from x in Funs.DB.Sys_User
join y in Funs.DB.Project_ProjectUnit
on x.UnitId equals y.UnitId
join p in Funs.DB.Project_ProjectUser
on x.UserId equals p.UserId
where p.ProjectId == CurrUser.LoginProjectId &&
y.ProjectId == CurrUser.LoginProjectId
orderby x.UserCode
select x);*/
/* var userList = (from x in Funs.DB.Sys_User
join y in Funs.DB.Project_ProjectUnit
on x.UnitId equals y.UnitId
join p in Funs.DB.Project_ProjectUser
on x.UserId equals p.UserId
where p.ProjectId == CurrUser.LoginProjectId &&
y.ProjectId == CurrUser.LoginProjectId
orderby x.UserCode
select x);*/
var userList = (from x in Funs.DB.Project_ProjectUser
join y in Funs.DB.Sys_User on x.UserId equals y.UserId
where x.ProjectId == CurrUser.LoginProjectId
orderby y.UserCode
select y);
join y in Funs.DB.Sys_User on x.UserId equals y.UserId
where x.ProjectId == CurrUser.LoginProjectId
orderby y.UserCode
select y);
DataTable table2 = LINQToDataTable(userList);
if (table2 == null|| table2.Rows.Count==0) return table2;
if (table2 == null || table2.Rows.Count == 0) return table2;
DataView view2 = table2.DefaultView;
view2.Sort = String.Format("{0} {1}", sortField, sortDirection);