/// <summary> /// 根据当前时间周期获取父周期的计划项列表 /// </summary> /// <param name="period"></param> /// <returns></returns> public List <Entity.PlanItem> GetParentPlanItem(string periodID) { PeriodManager pm = new PeriodManager(); var parentPeriod = pm.GetParentPeriod(periodID); if (parentPeriod == null) { return(null); } PlanDac dac = new PlanDac(); #warning 缺少判断父周期是否启用 List <Entity.PlanItem> planItemList = new List <Entity.PlanItem>(); PlanFilter planFilter = new PlanFilter(); planFilter.Periods = new List <string>() { parentPeriod.ID }; planFilter.Senders = new List <string>() { Utils.GetUserId() }; //获取当前用户父时间段内的计划信息 List <PlanInfo> planInfoList = PlanService.Current.Get(planFilter); if (planInfoList == null || planInfoList.Count <= 0) { return(null); } planInfoList.ForEach(item => { planItemList.AddRange(dac.GetPlanItems(item.ID)); }); return(planItemList); }
/// <summary> /// 获取父计划列表 /// </summary> /// <param name="periodID"></param> /// <returns></returns> public List <PlanInfo> GetParentPlan(string periodID) { PeriodManager pm = new PeriodManager(); var parentPeriod = pm.GetParentPeriod(periodID); if (parentPeriod == null) { return(null); } #warning 缺少判断父周期是否启用 PlanFilter planFilter = new PlanFilter(); planFilter.Periods = new List <string>() { parentPeriod.ID }; planFilter.Senders = new List <string>() { Utils.GetUserId() }; //获取当前用户父时间段内的计划信息 List <PlanInfo> planInfoList = PlanService.Current.Get(planFilter); return(planInfoList); }