补充公司级别树

This commit is contained in:
2025-04-09 19:14:54 +08:00
parent 8514fb0156
commit 023e3d33cf
86 changed files with 5694 additions and 3375 deletions
@@ -46,8 +46,15 @@ namespace FineUIPro.Web.HSSE.Check
{
this.ProjectId = Request.Params["projectId"];
}
////权限按钮方法
this.GetButtonPower();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
btnNew.OnClientClick = Window1.GetShowReference("PauseNoticeAdd.aspx") + "return false;";
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
@@ -56,11 +63,33 @@ namespace FineUIPro.Web.HSSE.Check
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT PauseNotice.PauseNoticeId,PauseNotice.ProjectId,CodeRecords.Code AS PauseNoticeCode,Unit.UnitName,UnitWork.UnitWorkName as ProjectPlace,PauseNotice.UnitId,PauseNotice.PauseTime,case PauseNotice.IsConfirm when 1 then '已确认' else '未确认' end as IsConfirmStr ,
(CASE WHEN PauseNotice.PauseStates = '0' OR PauseNotice.PauseStates IS NULL THEN '待['+CompileMan.UserName+']提交' WHEN PauseNotice.PauseStates = '1' THEN '待['+SignMan.UserName+']签发' WHEN PauseNotice.PauseStates = '2' THEN '待['+ApproveMan.UserName+']批准' WHEN PauseNotice.PauseStates = '3' THEN '待['+DutyPerson.UserName+']接收' WHEN PauseNotice.PauseStates = '4' THEN '审批完成' END) AS FlowOperateName
FROM Check_PauseNotice AS PauseNotice
@@ -81,7 +110,7 @@ namespace FineUIPro.Web.HSSE.Check
}
else
{
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
}
if (this.rbStates.SelectedValue != "-1")
{
@@ -107,7 +136,7 @@ namespace FineUIPro.Web.HSSE.Check
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
@@ -198,7 +227,7 @@ namespace FineUIPro.Web.HSSE.Check
return;
}
EditData(Grid1.SelectedRowID);
}
protected void btnMenuView_Click(object sender, EventArgs e)
{
@@ -234,7 +263,7 @@ namespace FineUIPro.Web.HSSE.Check
url = "PauseNoticeEdit.aspx?PauseNoticeId={0}";
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format(url, PauseNoticeId, "操作 - ")));
}
#endregion
@@ -253,11 +282,11 @@ namespace FineUIPro.Web.HSSE.Check
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
Model.Check_PunishNoticeFlowOperate Operate = (from x in Funs.DB.Check_PunishNoticeFlowOperate
where x.PunishNoticeId == rowID
select x).FirstOrDefault();
select x).FirstOrDefault();
var getV = BLL.Check_PauseNoticeService.GetPauseNoticeByPauseNoticeId(rowID);
if (getV != null)
{
BLL.LogService.AddSys_Log(this.CurrUser, getV.PauseNoticeCode, getV.PauseNoticeId, BLL.Const.ProjectPauseNoticeMenuId, BLL.Const.BtnDelete);
BLL.LogService.AddSys_Log(this.CurrUser, getV.PauseNoticeCode, getV.PauseNoticeId, BLL.Const.ProjectPauseNoticeMenuId, BLL.Const.BtnDelete);
BLL.Check_PauseNoticeService.DeletePauseNotice(rowID);
}
}
@@ -280,7 +309,7 @@ namespace FineUIPro.Web.HSSE.Check
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectPauseNoticeMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectPauseNoticeMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
@@ -386,35 +415,35 @@ namespace FineUIPro.Web.HSSE.Check
{
if (getPauseNotice.PauseTime.HasValue)
{
bookmarkDateTime.Text = getPauseNotice.PauseTime.Value.Year+"年"+ getPauseNotice.PauseTime.Value.Month+"月"+ getPauseNotice.PauseTime.Value.Day+"日";
bookmarkDateTime.Text = getPauseNotice.PauseTime.Value.Year + "年" + getPauseNotice.PauseTime.Value.Month + "月" + getPauseNotice.PauseTime.Value.Day + "日";
}
}
}
Bookmark bookmarkSignPerson = doc.Range.Bookmarks["SignPerson"];
if (bookmarkSignPerson != null)
Bookmark bookmarkSignPerson = doc.Range.Bookmarks["SignPerson"];
if (bookmarkSignPerson != null)
{
if (!string.IsNullOrEmpty(getPauseNotice.SignManId))
{
if (!string.IsNullOrEmpty(getPauseNotice.SignManId))
{
var getUser = UserService.GetUserByUserId(getPauseNotice.SignManId);
if (getUser != null)
var getUser = UserService.GetUserByUserId(getPauseNotice.SignManId);
if (getUser != null)
{
if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl))
{
if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl))
{
var file = rootPath + getUser.SignatureUrl;
DocumentBuilder builders = new DocumentBuilder(doc);
builders.MoveToBookmark("SignPerson");
builders.InsertImage(file, 80, 20);
}
else
{
bookmarkSignPerson.Text = getUser.UserName;
}
var file = rootPath + getUser.SignatureUrl;
DocumentBuilder builders = new DocumentBuilder(doc);
builders.MoveToBookmark("SignPerson");
builders.InsertImage(file, 80, 20);
}
else
{
bookmarkSignPerson.Text = getUser.UserName;
}
}
}
}
Bookmark bookmarkSignDate = doc.Range.Bookmarks["SignTime"];
@@ -425,25 +454,25 @@ namespace FineUIPro.Web.HSSE.Check
bookmarkSignDate.Text = string.Format("{0:yyyy-MM-dd}", getPauseNotice.SignDate);
}
}
Bookmark bookmarkDutyPerson = doc.Range.Bookmarks["DutyPerson"];
if (bookmarkDutyPerson != null)
Bookmark bookmarkDutyPerson = doc.Range.Bookmarks["DutyPerson"];
if (bookmarkDutyPerson != null)
{
var getUser = UserService.GetUserByUserId(getPauseNotice.DutyPersonId);
if (getUser != null)
{
var getUser = UserService.GetUserByUserId(getPauseNotice.DutyPersonId);
if (getUser != null)
if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl))
{
if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl))
{
var file = rootPath + getUser.SignatureUrl;
DocumentBuilder builders = new DocumentBuilder(doc);
builders.MoveToBookmark("DutyPerson");
builders.InsertImage(file, 80, 20);
}
else
{
bookmarkDutyPerson.Text = getUser.UserName;
}
var file = rootPath + getUser.SignatureUrl;
DocumentBuilder builders = new DocumentBuilder(doc);
builders.MoveToBookmark("DutyPerson");
builders.InsertImage(file, 80, 20);
}
else
{
bookmarkDutyPerson.Text = getUser.UserName;
}
}
}
Bookmark bookmarkDutyTime = doc.Range.Bookmarks["DutyTime"];
@@ -512,7 +541,7 @@ namespace FineUIPro.Web.HSSE.Check
bookmarkOwnerTime.Text = string.Format("{0:yyyy-MM-dd}", getPauseNotice.OwnerTime);
}
}
doc.Save(newUrl);
//生成PDF文件