安全检查,补充公司级树

This commit is contained in:
2025-04-10 17:34:21 +08:00
parent 6e6f78e900
commit d9a4bb09ac
98 changed files with 6493 additions and 3750 deletions
@@ -57,7 +57,7 @@ namespace FineUIPro.Web.HSSE.Check
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
@@ -67,12 +67,6 @@ namespace FineUIPro.Web.HSSE.Check
// this.Grid1.Columns[0].Hidden = true;
}
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
{
Grid1.PageSize = this.CurrUser.PageSize.Value;
@@ -82,10 +76,19 @@ namespace FineUIPro.Web.HSSE.Check
this.BindGrid();
}
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
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();
//新增UnitId
//this.UnitId = this.ucTree.UnitId;
//判断 当有projectId的时候单位id为空
@@ -101,6 +104,10 @@ namespace FineUIPro.Web.HSSE.Check
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.ProjectId))
{
@@ -121,7 +128,7 @@ namespace FineUIPro.Web.HSSE.Check
// listStr.Add(new SqlParameter("@UnitId1", UnitId));
//}
/// 施工分包 只看到自己已完成的处罚单
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
@@ -129,7 +136,7 @@ namespace FineUIPro.Web.HSSE.Check
strSql += " AND P.UnitId = @UnitId"; ///处罚单位
listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId));
}
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND P.UnitId = @UnitId";
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));