/// <summary> /// 年审机构 /// </summary> /// <param name="id"></param> /// <param name="startTime"></param> /// <param name="endTime"></param> /// <returns></returns> public List <OrgEntity> GetAudit(string id, string startTime, string endTime) { List <OrgEntity> list = new List <OrgEntity>(); AuditOrganizationEntity para = new AuditOrganizationEntity(); if (id != "") { para.OrganizationId = id; } para.Status = (int)QX360.Model.Enums.UseStatus.启用; var auditList = AuditOrganizationBLL.Instance.GetList(para); if (auditList.Count > 0) { auditList.ForEach((o) => { var item = new OrgEntity(); item.Type = 3; item.Id = o.OrganizationId; item.Name = o.Name; item.KpiList = new List <KpiEntity>(); //年审订单 item.KpiList.Add(new KpiEntity() { Name = "年审订单", Count = AuditOrderBLL.Instance.GetList(new AuditOrderEntity() { StartTime = startTime, EndTime = endTime, OrganizationId = o.OrganizationId, }).Where(p => p.Status != (int)QX360.Model.Enums.PaySatus.已取消).Count().ToString() }); //代审订单 item.KpiList.Add(new KpiEntity() { Name = "代审订单", Count = TakeAuditOrderBLL.Instance.GetList(new TakeAuditOrderEntity() { StartTime = startTime, EndTime = endTime, OrganizationId = o.OrganizationId, }).Where(p => p.Status != (int)QX360.Model.Enums.PaySatus.已取消).Count().ToString() }); //代审订单 item.KpiList.Add(new KpiEntity() { Name = "集团年审订单", Count = GroupAuditOrderBLL.Instance.GetList(new GroupAuditOrderEntity() { StartTime = startTime, EndTime = endTime, OrganizationId = o.OrganizationId, }).Where(p => p.Status != (int)QX360.Model.Enums.PaySatus.已取消).Count().ToString() }); list.Add(item); }); } return(list); }
/// <summary> /// 考场 /// </summary> /// <param name="id"></param> /// <param name="startTime"></param> /// <param name="endTime"></param> /// <returns></returns> public List <OrgEntity> GetExamPalce(string id, string startTime, string endTime) { List <OrgEntity> list = new List <OrgEntity>(); SchoolEntity para = new SchoolEntity(); if (id != "") { para.SchoolId = id; } para.Status = (int)QX360.Model.Enums.UseStatus.启用; para.IsTraining = 1; var schoolList = SchoolBLL.Instance.GetList(para); if (schoolList.Count > 0) { schoolList.ForEach((o) => { var item = new OrgEntity(); item.Type = 2; item.Id = o.SchoolId; item.Name = o.Name; item.KpiList = new List <KpiEntity>(); //车辆 item.KpiList.Add(new KpiEntity() { Name = "实训车辆数", Count = TrainingCarBLL.Instance.GetList(new TrainingCarEntity() { SchoolId = o.SchoolId, Status = (int)QX360.Model.Enums.UseStatus.启用 }).Count().ToString(), }); //实训订单 item.KpiList.Add(new KpiEntity() { Name = "实训订单", Count = TrainingOrderBLL.Instance.GetList(new TrainingOrderEntity() { StartTime = startTime, EndTime = endTime, SchoolId = o.SchoolId }).Where(p => p.Status != (int)QX360.Model.Enums.TrainingStatus.已取消).Count().ToString() }); list.Add(item); }); } return(list); }
/// <summary> /// 驾校 /// </summary> /// <param name="id"></param> /// <param name="startTime"></param> /// <param name="endTime"></param> /// <returns></returns> public List <OrgEntity> GetSchool(string id, string startTime, string endTime) { List <OrgEntity> list = new List <OrgEntity>(); SchoolEntity para = new SchoolEntity(); if (id != "") { para.SchoolId = id; } para.Status = (int)QX360.Model.Enums.UseStatus.启用; para.IsTraining = 0; var schoolList = SchoolBLL.Instance.GetList(para); if (schoolList.Count > 0) { schoolList.ForEach((o) => { var item = new OrgEntity(); item.Type = 1; item.Id = o.SchoolId; item.Name = o.Name; item.KpiList = new List <KpiEntity>(); //学员数 item.KpiList.Add(new KpiEntity() { Name = "学员总数", Count = MemberBLL.Instance.GetList(new MemberEntity() { SchoolId = o.SchoolId, Status = (int)QX360.Model.Enums.UseStatus.启用 }).Count().ToString(), }); //教练数 item.KpiList.Add(new KpiEntity() { Name = "教练总数", Count = TeacherBLL.Instance.GetList(new TeacherEntity() { SchoolId = o.SchoolId, Status = (int)QX360.Model.Enums.UseStatus.启用 }).Count().ToString(), }); //报名订单数 item.KpiList.Add(new KpiEntity() { Name = "报名订单", Count = ApplyOrderBLL.Instance.GetList(new ApplyOrderEntity() { StartTime = startTime, EndTime = endTime, SchoolId = o.SchoolId }).Where(p => p.Status != (int)QX360.Model.Enums.ApplyStatus.已取消).Count().ToString() }); //学车订单 item.KpiList.Add(new KpiEntity() { Name = "学车订单", Count = StudyOrderBLL.Instance.GetList(new StudyOrderEntity() { StartTime = startTime, EndTime = endTime, SchoolId = o.SchoolId }).Where(p => p.Status != (int)QX360.Model.Enums.StudySubscribeStatus.取消).Count().ToString() }); list.Add(item); }); } return(list); }