焊接管理,补充公司级树

This commit is contained in:
2025-04-14 15:31:57 +08:00
parent c8b553efc6
commit bb10b1f54e
111 changed files with 6980 additions and 4039 deletions
@@ -12,6 +12,22 @@ namespace FineUIPro.Web.HJGL.WeldingReport
{
public partial class DetectionAnalyze : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@@ -24,31 +40,67 @@ namespace FineUIPro.Web.HJGL.WeldingReport
{
Funs.DropDownPageSize(this.ddlPageSize);
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
//单位
//var unit = BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId);
if (CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
{
BLL.UnitService.InitSubUnitNameDownList(this.drpUnit, this.CurrUser.LoginProjectId, this.CurrUser.UnitId, true);
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
this.drpUnit.Enabled = false;
BLL.WorkAreaService.InitWorkAreaProjectUnitDropDownList(this.drpWorkArea, this.CurrUser.LoginProjectId, this.CurrUser.UnitId, true);
}
else
{
var supervisonUnit = BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId);
//if (supervisonUnit)
//{
// BLL.UnitService.InitSubUnitNameDownList(this.drpUnit, this.CurrUser.LoginProjectId, this.CurrUser.UnitId, true);
//}
//else
{
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
}
Funs.FineUIPleaseSelect(this.drpWorkArea);
}
}
}
private void InitDropDownList()
{
//单位
//var unit = BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId);
if (CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
{
BLL.UnitService.InitSubUnitNameDownList(this.drpUnit, this.ProjectId, this.CurrUser.UnitId, true);
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
this.drpUnit.Enabled = false;
BLL.WorkAreaService.InitWorkAreaProjectUnitDropDownList(this.drpWorkArea, this.ProjectId, this.CurrUser.UnitId, true);
}
else
{
var supervisonUnit = BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId);
//if (supervisonUnit)
//{
// BLL.UnitService.InitSubUnitNameDownList(this.drpUnit, this.ProjectId, this.CurrUser.UnitId, true);
//}
//else
{
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.ProjectId, BLL.Const.ProjectUnitType_2, true);
}
Funs.FineUIPleaseSelect(this.drpWorkArea);
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
//{
// btnNew.Hidden = true;
//}
//this.GetButtonPower();
this.BindGrid();
}
#endregion
#region BindGrid
@@ -62,9 +114,13 @@ namespace FineUIPro.Web.HJGL.WeldingReport
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@projectId", this.CurrUser.LoginProjectId)
new SqlParameter("@projectId", this.ProjectId)
};
if (this.drpUnit.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpUnit.SelectedValue))
{
@@ -90,7 +146,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
{
listStr.Add(new SqlParameter("@workAreaId", null));
}
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId))
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId))
{
listStr.Add(new SqlParameter("@supervisorUnitId", this.CurrUser.UnitId));
}
@@ -284,7 +340,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
this.drpWorkArea.Items.Clear();
if (this.drpUnit.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpUnit.SelectedValue))
{
BLL.WorkAreaService.InitWorkAreaProjectUnitDropDownList(this.drpWorkArea, this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, true);
BLL.WorkAreaService.InitWorkAreaProjectUnitDropDownList(this.drpWorkArea, this.ProjectId, this.drpUnit.SelectedValue, true);
this.drpWorkArea.SelectedIndex = 0;
}
}