环境报表

This commit is contained in:
夏菊 2024-12-30 17:51:50 +08:00
parent 270de44381
commit 251059799e
2 changed files with 55 additions and 0 deletions

View File

@ -65,6 +65,9 @@
<f:Button ID="btnUpdata" ToolTip="上报" Text ="上报" Icon="PageSave" runat="server"
OnClick="btnUpdata_Click">
</f:Button>
<f:Button ID="btnView" ToolTip="查看未报项目" Text="查看未报项目" Icon="MagifierZoomOut" runat="server"
OnClick="btnView_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>

View File

@ -667,5 +667,57 @@ namespace FineUIPro.Web.ZHGL.Environmental
}
#endregion
#endregion
#region
/// <summary>
/// 查看未上报的项目
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnView_Click(object sender, EventArgs e)
{
string info = string.Empty;
int year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
int Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue);
var projects = (from x in Funs.DB.Base_Project
where (x.ProjectState == BLL.Const.ProjectState_1 || x.ProjectState == null)
&& (x.IsDelete == null || x.IsDelete == false)
select x).ToList();
foreach (var item in projects)
{
var projectArchitectureReport = Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.Year == year && x.Quarters == Quarters);
if (projectArchitectureReport == null)
{
info += item.ProjectName + ",未填写报表;</br>";
}
else
{
if (projectArchitectureReport.UpState != BLL.Const.State_2)
{
info += item.ProjectName + "报表未报;";
var flows = (from x in Funs.DB.Sys_FlowOperate
join y in Funs.DB.Sys_User on x.OperaterId equals y.UserId
where x.DataId == projectArchitectureReport.ArchitectureReportId && x.IsClosed != false
select y).FirstOrDefault();
if (flows != null)
{
info += "待" + flows.UserName + "处理;";
}
info += "</br>";
}
}
}
if (!string.IsNullOrEmpty(info))
{
Alert.ShowInTop(info + "项目报表未上报。", MessageBoxIcon.Warning);
}
else
{
ShowNotify("项目报表已上报", MessageBoxIcon.Success);
}
}
#endregion
}
}