焊接管理,补充公司级树

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,20 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 管线
/// </summary>
public string ISO_ID
@@ -52,10 +66,40 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.txtReportDate.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
this.InitTreeMenu();
}
}
/// <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.InitTreeMenu();
}
#endregion
#region --
@@ -64,6 +108,10 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.txtReportDate.Text.Trim()))
{
DateTime? startTime = Funs.GetNewDateTime(this.txtReportDate.Text.Trim());
@@ -80,16 +128,16 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
var unit = BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId);
if (unit == null || unit.UnitTypeId == BLL.Const.ProjectUnitType_1 || unit.UnitTypeId == BLL.Const.ProjectUnitType_3)
{
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId))
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId))
{
units = (from x in Funs.DB.Base_Unit
join y in Funs.DB.ProjectData_WorkArea on x.UnitId equals y.UnitId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.CurrUser.LoginProjectId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.ProjectId
select x).Distinct().ToList();
}
else
{
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, "2");
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, "2");
}
}
else
@@ -100,7 +148,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
if (!this.txtReportDate.Hidden)
{
testPackageLists = (from x in Funs.DB.TP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId && x.PTP_TableDate >= startTime && x.PTP_TableDate < endTime
where x.ProjectId == this.ProjectId && x.PTP_TableDate >= startTime && x.PTP_TableDate < endTime
select x).ToList();
}
if (units != null)
@@ -213,7 +261,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
join y in Funs.DB.TP_TestPackage on x.PTP_ID equals y.PTP_ID
join z in Funs.DB.PW_IsoInfo on x.ISO_ID equals z.ISO_ID
where x.PTP_ID == node.NodeID
&& z.ProjectId == this.CurrUser.LoginProjectId
&& z.ProjectId == this.ProjectId
orderby z.ISO_IsoNo
select z;
foreach (var item in isoInfov)
@@ -419,7 +467,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_BItemEndCheckMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_BItemEndCheckMenuId, button);
}
#endregion