建投企业安全数据统计月报用重机的模式
This commit is contained in:
@@ -16,10 +16,11 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
if (!IsPostBack)
|
||||
{
|
||||
string loginform = ConfigurationManager.AppSettings["LoginForm"];
|
||||
if (!string.IsNullOrWhiteSpace(loginform) &&loginform == "Login_ZJ.aspx")
|
||||
{//判断是否是重机客户,如果是重定向页面
|
||||
Response.Redirect("MillionsMonthlyReportZJ.aspx");
|
||||
}
|
||||
//if (!string.IsNullOrWhiteSpace(loginform) &&loginform == "Login_ZJ.aspx")
|
||||
//{//判断是否是重机客户,如果是重定向页面
|
||||
//2026.04.30 xiaj 建投企业安全数据统计月报用重机的模式
|
||||
Response.Redirect("MillionsMonthlyReportZJ.aspx");
|
||||
//}
|
||||
|
||||
BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false);
|
||||
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
|
||||
|
||||
@@ -80,6 +80,9 @@
|
||||
<f:Button ID="btnPrint" ToolTip="打印" Text="打印" Icon="Printer" Hidden="true" runat="server"
|
||||
OnClick="btnPrint_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnViewUnit" ToolTip="查看未报公司" Text="查看未报公司" Icon="MagifierZoomOut" runat="server"
|
||||
OnClick="btnViewUnit_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
+9
@@ -221,6 +221,15 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPrint;
|
||||
|
||||
/// <summary>
|
||||
/// btnViewUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnViewUnit;
|
||||
|
||||
/// <summary>
|
||||
/// lbUnitName 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user