public ActionResult NoClassStudent() { DtoSchoolNoClassStudentSearch search = new DtoSchoolNoClassStudentSearch(); search.SchoolId = CurrentUser.Teacher.Yoh_SchoolId; return(View(search)); }
public ActionResult GetNoClassList(DtoSchoolNoClassStudentSearch search) { var list = studentStudyBll.GetNoClassStudent(search); list.ForEach(s => { if (s.Bst_Phone.HasValue() && s.Bst_Phone.Length == 11) { var tmp = s.Bst_Phone.Substring(0, 4) + "****" + s.Bst_Phone.Substring(7, 4); s.Bst_Phone = tmp; } }); var table = AbhsTableFactory.Create(list, search.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); }
public List <DtoSchoolNoClassStudent> GetNoClassStudent(DtoSchoolNoClassStudentSearch search) { if (search == null) { return(null); } var strWhere = new StringBuilder(); var fields = "scp.Yps_Id,scp.Yps_StudentId,scp.Yps_OrderId,scp.Yps_CourseId,s.Bst_No,s.Bst_Name,s.Bst_Grade,s.Bst_Phone,c.Ycs_Name,c.Ycs_CourseType,so.Yod_OrderNo,so.Yod_OrderTime "; var orderBy = "scp.Yps_Id "; var parameters = new DynamicParameters(); //todo Yw_StudentOrder表 现在测试用LEFT 正式用 JOIN strWhere.Append($@"dbo.Yw_StudentCourseProgress scp JOIN dbo.Bas_Student s ON scp.Yps_StudentId = s.Bst_Id JOIN dbo.Yw_StudentOrder so ON scp.Yps_OrderId=so.Yod_Id JOIN dbo.Yw_Course c ON scp.Yps_CourseId=c.Ycs_Id WHERE 1=1 AND scp.Yps_ClassId=0"); if (search.Grade > 0) { strWhere.Append(" AND s.Bst_Grade=@Bst_Grade "); parameters.Add("Bst_Grade", search.Grade); } if (search.SchoolId > 0) { strWhere.Append(" AND scp.Yps_SchoolId=@Yps_SchoolId "); parameters.Add("Yps_SchoolId", search.SchoolId); } if (search.CourseType > 0) { strWhere.Append(" AND c.Ycs_CourseType=@CourseType "); parameters.Add("CourseType", search.CourseType); } if (search.StudentNo.HasValue()) { strWhere.Append(" AND s.Bst_No=@Bst_No "); parameters.Add("Bst_No", search.StudentNo); } if (search.SearchStr.HasValue()) { strWhere.Append(" AND (s.Bst_Name LIKE @Bst_Name OR s.Bst_Phone LIKE @Bst_Phone) "); parameters.Add("Bst_Name", $"%{search.SearchStr}%"); parameters.Add("Bst_Phone", $"%{search.SearchStr}%"); } return(base.QueryPaging <DtoSchoolNoClassStudent>(fields, strWhere._ToString(), orderBy, search.Pagination, parameters).ToList()); }
/// <summary> /// 获取未分班学生列表 /// </summary> /// <param name="search"></param> /// <returns></returns> public List <DtoSchoolNoClassStudent> GetNoClassStudent(DtoSchoolNoClassStudentSearch search) { return(ScpRepository.GetNoClassStudent(search)); }