diff --git a/SGGL/FineUIPro.Web/DataShow/JD.aspx b/SGGL/FineUIPro.Web/DataShow/JD.aspx index 5c6718d2..0d89ccf9 100644 --- a/SGGL/FineUIPro.Web/DataShow/JD.aspx +++ b/SGGL/FineUIPro.Web/DataShow/JD.aspx @@ -94,6 +94,9 @@ + + @@ -165,6 +168,9 @@ + + diff --git a/SGGL/FineUIPro.Web/DataShow/JD.aspx.cs b/SGGL/FineUIPro.Web/DataShow/JD.aspx.cs index 7af14e89..3d9c3d05 100644 --- a/SGGL/FineUIPro.Web/DataShow/JD.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/JD.aspx.cs @@ -21,7 +21,9 @@ namespace FineUIPro.Web.DataShow ddlPageSize3.SelectedValue = Grid3.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); BLL.ProjectService.InitProjectDropDownList(this.drpProject2, true); + BLL.UserService.InitSGBUser(this.drpDutyPerson2, true); BLL.ProjectService.InitProjectDropDownList(this.drpProject3, true); + BLL.UserService.InitSGBUser(this.drpDutyPerson3, true); BindGrid1(); } } @@ -106,9 +108,19 @@ left join ( { double planNum = allMonthPlans.Where(x => x.ProjectId == item.ProjectId).Count(); double completedNum = allMonthPlans.Where(x => x.ProjectId == item.ProjectId && x.RealDate != null).Count(); + if (this.drpDutyPerson2.SelectedValue != BLL.Const._Null) + { + planNum = allMonthPlans.Where(x => x.ProjectId == item.ProjectId && x.DutyPerson.Contains(this.drpDutyPerson2.SelectedValue)).Count(); + completedNum = allMonthPlans.Where(x => x.ProjectId == item.ProjectId && x.DutyPerson.Contains(this.drpDutyPerson2.SelectedValue) && x.RealDate != null).Count(); + } double rate = planNum > 0 ? Math.Round((completedNum / planNum) * 100, 2) : 0; double totalPlanNum = allPlans.Where(x => x.ProjectId == item.ProjectId).Count(); double totalCompletedNum = allPlans.Where(x => x.ProjectId == item.ProjectId && x.RealDate != null).Count(); + if (this.drpDutyPerson2.SelectedValue != BLL.Const._Null) + { + totalPlanNum = allPlans.Where(x => x.ProjectId == item.ProjectId && x.DutyPerson.Contains(this.drpDutyPerson2.SelectedValue)).Count(); + totalCompletedNum = allPlans.Where(x => x.ProjectId == item.ProjectId && x.DutyPerson.Contains(this.drpDutyPerson2.SelectedValue) && x.RealDate != null).Count(); + } double totalRate = totalPlanNum > 0 ? Math.Round((totalCompletedNum / totalPlanNum) * 100, 2) : 0; DataRow row; row = tb.NewRow(); @@ -168,10 +180,20 @@ left join ( { planNum = allWeekPlans.Where(x => x.ProjectId == item.ProjectId && x.WeekNo == lastWeek.WeekNo).Count(); completedNum = allWeekPlans.Where(x => x.ProjectId == item.ProjectId && x.WeekNo == lastWeek.WeekNo && x.IsOK == true).Count(); + if (this.drpDutyPerson3.SelectedValue != BLL.Const._Null) + { + planNum = allWeekPlans.Where(x => x.ProjectId == item.ProjectId && x.DutyPerson.Contains(this.drpDutyPerson3.SelectedValue) && x.WeekNo == lastWeek.WeekNo).Count(); + completedNum = allWeekPlans.Where(x => x.ProjectId == item.ProjectId && x.DutyPerson.Contains(this.drpDutyPerson3.SelectedValue) && x.WeekNo == lastWeek.WeekNo && x.IsOK == true).Count(); + } rate = planNum > 0 ? Math.Round((completedNum / planNum) * 100, 2) : 0; } double totalPlanNum = allWeekPlans.Where(x => x.ProjectId == item.ProjectId).Count(); double totalCompletedNum = allWeekPlans.Where(x => x.ProjectId == item.ProjectId && x.IsOK == true).Count(); + if (this.drpDutyPerson3.SelectedValue != BLL.Const._Null) + { + totalPlanNum = allWeekPlans.Where(x => x.ProjectId == item.ProjectId && x.DutyPerson.Contains(this.drpDutyPerson3.SelectedValue)).Count(); + totalCompletedNum = allWeekPlans.Where(x => x.ProjectId == item.ProjectId && x.DutyPerson.Contains(this.drpDutyPerson3.SelectedValue) && x.IsOK == true).Count(); + } double totalRate = totalPlanNum > 0 ? Math.Round((totalCompletedNum / totalPlanNum) * 100, 2) : 0; DataRow row; row = tb.NewRow(); diff --git a/SGGL/FineUIPro.Web/DataShow/JD.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/JD.aspx.designer.cs index a9b134ba..ea82c346 100644 --- a/SGGL/FineUIPro.Web/DataShow/JD.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/DataShow/JD.aspx.designer.cs @@ -165,6 +165,15 @@ namespace FineUIPro.Web.DataShow { /// protected global::FineUIPro.DropDownList drpProject2; + /// + /// drpDutyPerson2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpDutyPerson2; + /// /// Button1 控件。 /// @@ -246,6 +255,15 @@ namespace FineUIPro.Web.DataShow { /// protected global::FineUIPro.DropDownList drpProject3; + /// + /// drpDutyPerson3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpDutyPerson3; + /// /// Button2 控件。 ///