安全管理,作业票等,补充公司级树

This commit is contained in:
2025-04-10 10:20:23 +08:00
parent 3db3510a9d
commit 6e6f78e900
44 changed files with 2305 additions and 1281 deletions
@@ -41,17 +41,10 @@ namespace FineUIPro.Web.HSSE.Meeting
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
this.btnNew.OnClientClick = Window1.GetShowReference("AttendMeetingEdit.aspx") + "return false;";
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
{
@@ -74,14 +67,29 @@ namespace FineUIPro.Web.HSSE.Meeting
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
this.BindGrid();
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.ProjectId))
{
string strSql = "SELECT AttendMeeting.AttendMeetingId,AttendMeeting.ProjectId,CodeRecords.Code AS AttendMeetingCode,Unit.UnitId,Unit.UnitName,AttendMeeting.AttendMeetingName,AttendMeeting.AttendMeetingDate,AttendMeeting.CompileMan,AttendMeeting.AttendMeetingContents,AttendMeeting.CompileDate,AttendMeeting.States "
@@ -97,7 +105,7 @@ namespace FineUIPro.Web.HSSE.Meeting
strSql += " AND AttendMeeting.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND Unit.UnitId = @UnitId";
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
@@ -35,21 +35,15 @@ namespace FineUIPro.Web.HSSE.Meeting
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
this.ProjectId = this.CurrUser.LoginProjectId;
this.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
this.btnNew.OnClientClick = Window1.GetShowReference("ClassMeetingEdit.aspx") + "return false;";
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
{
@@ -67,10 +61,20 @@ namespace FineUIPro.Web.HSSE.Meeting
}
}
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
}
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
this.BindGrid();
}
@@ -79,6 +83,10 @@ namespace FineUIPro.Web.HSSE.Meeting
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.ProjectId))
{
string strSql = "SELECT ClassMeeting.ClassMeetingId,ClassMeeting.ProjectId,CodeRecords.Code AS ClassMeetingCode,Unit.UnitId,Unit.UnitName,TeamGroup.TeamGroupName,ClassMeeting.ClassMeetingName,ClassMeeting.ClassMeetingDate,ClassMeeting.CompileMan,ClassMeeting.ClassMeetingContents,ClassMeeting.CompileDate,ClassMeeting.States "
@@ -96,7 +104,7 @@ namespace FineUIPro.Web.HSSE.Meeting
strSql += " AND ClassMeeting.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND Unit.UnitId = @UnitId";
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
@@ -287,7 +295,7 @@ namespace FineUIPro.Web.HSSE.Meeting
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectClassMeetingMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectClassMeetingMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
@@ -39,7 +39,7 @@ namespace FineUIPro.Web.HSSE.Meeting
{
Funs.DropDownPageSize(this.ddlPageSize);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
//BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
this.Panel1.Title = "安全会议(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + "";
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
@@ -42,15 +42,9 @@ namespace FineUIPro.Web.HSSE.Meeting
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
this.btnNew.OnClientClick = Window1.GetShowReference("MonthMeetingEdit.aspx") + "return false;";
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
{
@@ -72,14 +66,30 @@ namespace FineUIPro.Web.HSSE.Meeting
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
this.BindGrid();
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.ProjectId))
{
string strSql = @"SELECT MonthMeeting.MonthMeetingId,MonthMeeting.ProjectId,CodeRecords.Code AS MonthMeetingCode,Unit.UnitId,Unit.UnitName,MonthMeeting.MonthMeetingName,MonthMeeting.MonthMeetingDate,MonthMeeting.CompileMan,MonthMeeting.MonthMeetingContents,MonthMeeting.CompileDate,MonthMeeting.States,MonthMeeting.MeetingHours,MonthMeeting.MeetingHostMan,MonthMeeting.AttentPersonNum,MonthMeeting.AttentPerson "
@@ -95,7 +105,7 @@ namespace FineUIPro.Web.HSSE.Meeting
strSql += " AND MonthMeeting.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND Unit.UnitId = @UnitId";
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
@@ -218,7 +228,7 @@ namespace FineUIPro.Web.HSSE.Meeting
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MonthMeetingEdit.aspx?MonthMeetingId={0}", id, "编辑 - ")));
}
}
}
}
#endregion
@@ -241,7 +251,7 @@ namespace FineUIPro.Web.HSSE.Meeting
BLL.LogService.AddSys_Log(this.CurrUser, meet.MonthMeetingCode, meet.MonthMeetingId, BLL.Const.ProjectMonthMeetingMenuId, BLL.Const.BtnDelete);
BLL.MonthMeetingService.DeleteMonthMeetingById(rowID);
}
}
// Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.SafetyMeeting);
@@ -315,11 +325,11 @@ namespace FineUIPro.Web.HSSE.Meeting
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("安全月例会" + filename, System.Text.Encoding.UTF8) + ".xls");
Response.ContentType = "application/excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
this.Grid1.PageSize = this.Grid1.RecordCount;
this.Grid1.PageSize = this.Grid1.RecordCount;
this.BindGrid();
Response.Write(GetGridTableHtml(Grid1));
Response.End();
}
}
#endregion
protected void btnView_Click(object sender, EventArgs e)
@@ -42,37 +42,41 @@ namespace FineUIPro.Web.HSSE.Meeting
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
this.btnNew.OnClientClick = Window1.GetShowReference("SafetyLeaderGroupMeetingEdit.aspx") + "return false;";
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
{
Grid1.PageSize = this.CurrUser.PageSize.Value;
}
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
this.BindGrid();
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
// this.Grid1.Columns[0].Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
// 绑定表格
this.BindGrid();
}
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
}
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
this.BindGrid();
}
@@ -81,6 +85,10 @@ namespace FineUIPro.Web.HSSE.Meeting
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.ProjectId))
{
string strSql = @"SELECT SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId,SafetyLeaderGroupMeeting.ProjectId,CodeRecords.Code AS SafetyLeaderGroupMeetingCode,Unit.UnitId,Unit.UnitName,SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName,SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate,SafetyLeaderGroupMeeting.CompileMan,SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents,SafetyLeaderGroupMeeting.CompileDate,SafetyLeaderGroupMeeting.States,SafetyLeaderGroupMeeting.MeetingHours,SafetyLeaderGroupMeeting.MeetingHostMan,SafetyLeaderGroupMeeting.AttentPersonNum,SafetyLeaderGroupMeeting.AttentPerson "
@@ -96,7 +104,7 @@ namespace FineUIPro.Web.HSSE.Meeting
strSql += " AND SafetyLeaderGroupMeeting.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND Unit.UnitId = @UnitId";
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
@@ -242,7 +250,7 @@ namespace FineUIPro.Web.HSSE.Meeting
BLL.LogService.AddSys_Log(this.CurrUser, meet.SafetyLeaderGroupMeetingCode, meet.SafetyLeaderGroupMeetingId, BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId, BLL.Const.BtnDelete);
BLL.SafetyLeaderGroupMeetingService.DeleteSafetyLeaderGroupMeetingById(rowID);
}
}
//Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.SafetyMeeting);
@@ -42,16 +42,10 @@ namespace FineUIPro.Web.HSSE.Meeting
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
this.btnNew.OnClientClick = Window1.GetShowReference("SpecialMeetingEdit.aspx") + "return false;";
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
{
@@ -73,14 +67,29 @@ namespace FineUIPro.Web.HSSE.Meeting
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
this.BindGrid();
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.ProjectId))
{
string strSql = "SELECT SpecialMeeting.SpecialMeetingId,SpecialMeeting.ProjectId,CodeRecords.Code AS SpecialMeetingCode,Unit.UnitId,Unit.UnitName,SpecialMeeting.SpecialMeetingName,SpecialMeeting.SpecialMeetingDate,SpecialMeeting.CompileMan,SpecialMeeting.SpecialMeetingContents,SpecialMeeting.CompileDate,SpecialMeeting.States,SpecialMeeting.MeetingHours,SpecialMeeting.MeetingHostMan,SpecialMeeting.AttentPersonNum,SpecialMeeting.AttentPerson"
@@ -96,7 +105,7 @@ namespace FineUIPro.Web.HSSE.Meeting
strSql += " AND SpecialMeeting.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND Unit.UnitId = @UnitId";
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
@@ -219,7 +228,7 @@ namespace FineUIPro.Web.HSSE.Meeting
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SpecialMeetingEdit.aspx?SpecialMeetingId={0}", id, "编辑 - ")));
}
}
}
}
#endregion
@@ -44,17 +44,10 @@ namespace FineUIPro.Web.HSSE.Meeting
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
this.btnNew.OnClientClick = Window1.GetShowReference("WeekMeetingEdit.aspx") + "return false;";
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
{
@@ -75,14 +68,28 @@ namespace FineUIPro.Web.HSSE.Meeting
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
this.BindGrid();
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
}
/// <summary>
/// 绑定数据
/// </summary>
protected void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.ProjectId))
{
string strSql = @"SELECT WeekMeeting.WeekMeetingId,WeekMeeting.ProjectId,CodeRecords.Code AS WeekMeetingCode,Unit.UnitId,Unit.UnitName,WeekMeeting.WeekMeetingName,WeekMeeting.WeekMeetingDate,WeekMeeting.CompileMan,Users.UserName AS CompileManName
@@ -98,7 +105,7 @@ namespace FineUIPro.Web.HSSE.Meeting
strSql += " AND WeekMeeting.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND Unit.UnitId = @UnitId";
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));