fix:项目树

This commit is contained in:
geh
2025-04-21 17:44:59 +08:00
parent df2f29c5c4
commit 594c85b083
3 changed files with 161 additions and 54 deletions
@@ -9,6 +9,33 @@ namespace FineUIPro.Web.CQMS.Check
{
public partial class JointCheckChartStatistics : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.AnalyseData();
}
#region
/// <summary>
/// 加载页面
@@ -19,6 +46,17 @@ namespace FineUIPro.Web.CQMS.Check
{
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.txtStartRectificationTime.Text = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd");
this.txtEndRectificationTime.Text = DateTime.Now.ToString("yyyy-MM-dd");
}
@@ -48,6 +86,10 @@ namespace FineUIPro.Web.CQMS.Check
/// </summary>
private void AnalyseData()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (this.rblState.SelectedValue == "0")
{
@@ -68,7 +110,7 @@ namespace FineUIPro.Web.CQMS.Check
}
strSql += " group by UnitId,unitName ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -140,7 +182,7 @@ namespace FineUIPro.Web.CQMS.Check
}
strSql += " group by QuestionDef,QuestionTypeStr ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);