修改项目安全实施计划

This commit is contained in:
2023-06-01 17:14:29 +08:00
parent 5470404048
commit 75b2d905c9
28 changed files with 5430 additions and 190 deletions
@@ -58,10 +58,8 @@ namespace FineUIPro.Web.HSSE.ActionPlan
{
if (!string.IsNullOrEmpty(this.ProjectId))
{
string strSql = "SELECT ActionPlanList.ActionPlanListId,ActionPlanList.ProjectId,CodeRecords.Code AS ActionPlanListCode,ActionPlanList.ActionPlanListName,ActionPlanList.VersionNo,(CASE ProjectType WHEN '1' THEN '系统内项目' WHEN '2' THEN '系统外项目' WHEN '3' THEN '海外项目' END ) AS ProjectType,ActionPlanList.ActionPlanListContents,ActionPlanList.CompileMan,Users.PersonName AS CompileManName, ActionPlanList.CompileDate,ActionPlanList.States"
+ @" ,(CASE WHEN ActionPlanList.States = " + BLL.Const.State_0 + " OR ActionPlanList.States IS NULL THEN '待['+OperateUser.PersonName+']提交' WHEN ActionPlanList.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.PersonName+']办理' END) AS FlowOperateName"
string strSql = "SELECT ActionPlanList.ActionPlanListId,ActionPlanList.ProjectId,ActionPlanListCode,ActionPlanList.ActionPlanListName,ActionPlanList.VersionNo,(CASE ProjectType WHEN '1' THEN '系统内项目' WHEN '2' THEN '系统外项目' WHEN '3' THEN '海外项目' END ) AS ProjectType,ActionPlanList.ActionPlanListContents,ActionPlanList.CompileMan,Users.PersonName AS CompileManName, ActionPlanList.CompileDate,ActionPlanList.States"
+ @" FROM ActionPlan_ActionPlanList AS ActionPlanList "
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON ActionPlanList.ActionPlanListId=CodeRecords.DataId "
+ @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON ActionPlanList.ActionPlanListId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
+ @" LEFT JOIN Person_Persons AS OperateUser ON FlowOperate.OperaterId=OperateUser.PersonId "
+ @" LEFT JOIN Person_Persons AS Users ON Users.PersonId = ActionPlanList.CompileMan "
@@ -184,23 +182,65 @@ namespace FineUIPro.Web.HSSE.ActionPlan
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string id = Grid1.SelectedRowID;
var actionPlanList = BLL.ActionPlanListService.GetActionPlanListById(id);
if (actionPlanList != null)
string id = Grid1.SelectedRowID.Split(',')[0];
Model.ActionPlan_ActionPlanList actionPlanList = ActionPlanListService.GetActionPlanListById(id);
if (actionPlanList.States == Const.ActionPlanList_Complete)
{
if (this.btnMenuEdit.Hidden || actionPlanList.States == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
Alert.ShowInTop("该文件已经审批完成,无法操作,请右键查看!", MessageBoxIcon.Warning);
return;
}
else if (actionPlanList.States == Const.ActionPlanList_Compile)
{
if (actionPlanList.CompileMan == CurrUser.PersonId || CurrUser.PersonId == Const.sysglyId)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ActionPlanListView.aspx?ActionPlanListId={0}", id, "查看 - ")));
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ActionPlanListEdit.aspx?actionPlanListId={0}", id)));
}
else
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ActionPlanListEdit.aspx?ActionPlanListId={0}", id, "编辑 - ")));
Alert.ShowInTop("您不是编制人,无法操作!请右键查看", MessageBoxIcon.Warning);
return;
}
}
else if (actionPlanList.States == Const.ActionPlanList_Audit || actionPlanList.States == Const.ActionPlanList_ReCompile || actionPlanList.States == Const.ActionPlanList_Review)
{
Model.ActionPlan_ActionPlanListApprove approve = ActionPlanListApproveService.GetActionPlanListApproveByApproveMan(id, CurrUser.PersonId);
if (approve != null || CurrUser.PersonId == Const.sysglyId)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ActionPlanListEdit.aspx?actionPlanListId={0}", id)));
return;
//Response.Redirect("ActionPlanListAudit.aspx?actionPlanListId=" + id);
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckListView.aspx?CheckControlCode={0}", id, "查看 - ")));
}
else
{
if (actionPlanList.CompileMan.Equals(CurrUser.PersonId))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ActionPlanListEdit.aspx?actionPlanListId={0}", id)));
}
else
{
Alert.ShowInTop("您不是办理用户,无法操作!请右键查看", MessageBoxIcon.Warning);
return;
}
}
}
}
#endregion
protected void btnMenuView_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string id = Grid1.SelectedRowID.Split(',')[0];
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ActionPlanListView.aspx?ActionPlanListId={0}", id)));
}
#region
/// <summary>
/// 右键删除事件
@@ -306,6 +346,30 @@ namespace FineUIPro.Web.HSSE.ActionPlan
Response.Write(GetGridTableHtml(Grid1));
Response.End();
}
#endregion
#endregion
/// <summary>
/// 把办理人转换代号为文字形式
/// </summary>
/// <param name="ActionPlanListId"></param>
/// <returns></returns>
///
public static string ConvertApproveMan(object ActionPlanListId)
{
string name = string.Empty;
if (ActionPlanListId != null)
{
var approves = BLL.ActionPlanListApproveService.GetActionPlanListApprovesNotHandleList(ActionPlanListId.ToString());
foreach (var item in approves)
{
name += BLL.Person_PersonsService.GetPersonsNameById(item.ApproveMan) + ",";
}
if (!string.IsNullOrEmpty(name))
{
name = name.Substring(0, name.Length - 1);
}
}
return name;
}
}
}