建投企业安全数据统计月报用重机的模式
This commit is contained in:
@@ -797,5 +797,78 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region 查看未上报的公司
|
||||
/// <summary>
|
||||
/// 查看未上报的项目
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnViewUnit_Click(object sender, EventArgs e)
|
||||
{
|
||||
string info = string.Empty;
|
||||
DateTime date = Convert.ToDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue + "-01").AddDays(-1).AddMonths(1);
|
||||
//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)
|
||||
// && x.StartDate <= date
|
||||
// select x).ToList();
|
||||
|
||||
List<Model.Base_Project> projects = new List<Model.Base_Project>();
|
||||
if (this.CurrUser.Base_Unit == null || (bool)this.CurrUser.Base_Unit.IsThisUnit)
|
||||
{
|
||||
projects = (from x in Funs.DB.Base_Project
|
||||
where (x.ProjectState == BLL.Const.ProjectState_1 || x.ProjectState == null)
|
||||
&& (x.IsDelete == null || x.IsDelete == false)
|
||||
&& x.StartDate <= date
|
||||
orderby x.UnitId
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
projects = (from x in Funs.DB.Base_Project
|
||||
where (x.ProjectState == BLL.Const.ProjectState_1 || x.ProjectState == null)
|
||||
&& (x.IsDelete == null || x.IsDelete == false) && x.UnitId == this.CurrUser.UnitId
|
||||
&& x.StartDate <= date
|
||||
select x).ToList();
|
||||
}
|
||||
Dictionary<string, string> infoMap = new Dictionary<string, string>();
|
||||
foreach (var item in projects)
|
||||
{
|
||||
var unitName = Funs.DB.Base_Unit.Where(x => x.UnitId == item.UnitId).Select(x=>x.UnitName).FirstOrDefault();
|
||||
|
||||
var millionsMonthlyReport = Funs.DB.InformationProject_MillionsMonthlyReport.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.Year == date.Year && x.Month == date.Month);
|
||||
if (millionsMonthlyReport == null)
|
||||
{
|
||||
info += unitName + ":" + item.ProjectName + ",未填写报表;</br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (millionsMonthlyReport.States != BLL.Const.State_2)
|
||||
{
|
||||
info += unitName + ":" + 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 == millionsMonthlyReport.MillionsMonthlyReportId && 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user