督查检查

This commit is contained in:
2025-12-15 14:35:30 +08:00
parent d56957e41e
commit 31385b8dd1
8 changed files with 273 additions and 29 deletions
@@ -18,6 +18,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
{
if (!IsPostBack)
{
getCheck();
proType = Request.Params["proType"] ?? string.Empty;
this.GetButtonPower();
//btnNew.OnClientClick = Window1.GetShowReference("CheckRectifyEdit.aspx") + "return false;";
@@ -36,11 +37,12 @@ namespace FineUIPro.Web.DCGL.ServerCheck
sb.Append($@"SELECT S.CheckRectifyId,S.CheckRectifyCode,S.ProjectId,S.ProjectName,S.UnitId,U.UnitName,S.CheckDate,CASE S.HandleState WHEN '{BLL.Const.State_1}' THEN '未签发' WHEN '{BLL.Const.State_2}' THEN '未上报' ELSE '已上报' END AS HandleState,
S.IssueMan,S.IssueDate,ISNULL(TotalCount.TotalCount,0) AS TotalCount ,ISNULL(CompleteCount.CompleteCount,0) AS CompleteCount,(ISNULL(TotalCount.TotalCount,0) -ISNULL(CompleteCount.CompleteCount,0)) AS UnCompleteCount ");
sb.Append("FROM dbo.DCGL_Check_CheckRectify AS S LEFT JOIN dbo.Base_Unit AS U ON U.UnitId = S.UnitId ");
sb.Append(" LEFT JOIN (SELECT COUNT(1) AS TotalCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem GROUP BY CheckRectifyId) AS TotalCount ON S.CheckRectifyId=TotalCount.CheckRectifyId ");
sb.Append(" LEFT JOIN (SELECT COUNT(1) AS CompleteCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem WHERE RealEndDate IS NOT NULL GROUP BY CheckRectifyId) AS CompleteCount ON S.CheckRectifyId=CompleteCount.CheckRectifyId ");
if (!string.IsNullOrWhiteSpace(proType) && proType == "1")
sb.Append(" LEFT JOIN (SELECT COUNT(*) AS TotalCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem GROUP BY CheckRectifyId) AS TotalCount ON S.CheckRectifyId=TotalCount.CheckRectifyId ");
sb.Append(" LEFT JOIN (SELECT COUNT(*) AS CompleteCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem WHERE RealEndDate IS NOT NULL GROUP BY CheckRectifyId) AS CompleteCount ON S.CheckRectifyId=CompleteCount.CheckRectifyId ");
sb.Append("WHERE 1=1 ");
if (!string.IsNullOrWhiteSpace(this.CurrUser.LoginProjectId) && !string.IsNullOrWhiteSpace(proType) && proType == "1")
{//只查询本项目检查数据
sb.Append($"WHERE S.ProjectId='{this.CurrUser.LoginProjectId}' ");
sb.Append($"And S.ProjectId='{this.CurrUser.LoginProjectId}' ");
}
sb.Append("ORDER BY HandleState");
SqlParameter[] parameter = new SqlParameter[] { };
@@ -135,7 +137,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
return;
}
string CheckRectifyId = Grid1.SelectedRowID;
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckRectifyEdit.aspx?CheckRectifyId={0}", CheckRectifyId, "编辑 - ")));
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckRectifyEdit.aspx?CheckRectifyId={0}&proType={1}", CheckRectifyId, proType, "编辑 - ")));
}
#endregion
@@ -378,6 +380,14 @@ namespace FineUIPro.Web.DCGL.ServerCheck
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnGet_Click(object sender, EventArgs e)
{
getCheck();
}
/// <summary>
/// 从集团获取整改单
/// </summary>
protected void getCheck()
{
var returnValue = getCheck_CheckRectifyListToSUB();
if (returnValue.code == 1)
@@ -391,7 +401,6 @@ namespace FineUIPro.Web.DCGL.ServerCheck
}
}
#region
/// <summary>