Commit 68870cf3 authored by 黄奎's avatar 黄奎

页面修改

parents e4357635 5e559969
......@@ -93,5 +93,16 @@ namespace Edu.Model.Entity.Course
/// 删除状态(0-正常,1-禁用)
/// </summary>
public DateStateEnum Status { get; set; }
/// <summary>
/// 课后总结
/// </summary>
public string Summary { get; set; }
/// <summary>
/// 教案图片
/// </summary>
public string ProjectPic { get; set; }
}
}
......@@ -49,5 +49,10 @@ namespace Edu.Model.Entity.Course
/// </summary>
public int School_Id { get; set; }
/// <summary>
/// 教案图片
/// </summary>
public string ProjectPic { get; set; }
}
}
......@@ -180,5 +180,9 @@ namespace Edu.Model.ViewModel.Course
return str;
}
}
/// <summary>
///上课时间ids
/// </summary>
public string ClassTimeIds { get; set; }
}
}
......@@ -16,5 +16,11 @@ namespace Edu.Model.ViewModel.Course
/// 结束时间
/// </summary>
public string DurationEndTime { get; set; }
/// <summary>
/// 教案图片
/// </summary>
public List<string> ProjectPicList { get; set; }
}
}
......@@ -26,5 +26,10 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public int Rest { get; set; }
/// <summary>
/// 总结图片
/// </summary>
public List<string> ProjectPicList { get; set; }
}
}
......@@ -98,6 +98,12 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public int LessonPlanNum { get; set; }
/// <summary>
/// 反馈情况》0已反馈
/// </summary>
public int LessonPlanSummaryNum { get; set; }
/// <summary>
/// 学生id
/// </summary>
......@@ -117,5 +123,10 @@ namespace Edu.Model.ViewModel.Course
/// 上课计划时间id
/// </summary>
public int ClassTimeId { get; set; }
/// <summary>
/// 第几次上课
/// </summary>
public object Ranks { get; set; }
}
}
......@@ -51,6 +51,9 @@ namespace Edu.Model.ViewModel.Course
public int ClassRoomId { get; set; }
/// <summary>
///班级学员
/// </summary>
public List<RB_Order_Guest_ViewModel> GuestList { get; set; }
/// 上课分钟数
/// </summary>
public int TimeMinute { get; set; }
......
This diff is collapsed.
......@@ -245,6 +245,10 @@ GROUP BY A.ClassId
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_Check_ViewModel.ClassTimeId), query.ClassTimeId);
}
if (!string.IsNullOrWhiteSpace(query.ClassTimeIds))
{
builder.AppendFormat(" AND A.{0} in ({1}) ", nameof(RB_Class_Check_ViewModel.ClassTimeId), query.ClassTimeIds);
}
}
return Get<RB_Class_Check_ViewModel>(builder.ToString()).ToList();
......
......@@ -369,15 +369,16 @@ WHERE p.`Status`=0 AND p.Group_Id={group_Id} AND p.ClassId ={classId}
public List<RB_Class_Plan_ViewModel> GetTeacherPlanListRepository(RB_Class_Plan_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*,class.ClassName,lp.LessonPlanNum,IFNULL(B.RoomName,'') AS RoomName,IFNULL(T.TeacherName,'') AS TeacherName,IFNULL(T.TeacherHead,'') AS UserIcon
FROM RB_Class_Plan AS A LEFT JOIN rb_class_room AS B ON A.ClassRoomId=B.RoomId
LEFT JOIN rb_class as class on a.ClassId=class.ClassId
LEFT JOIN rb_teacher AS T ON A.TeacherId=T.TId
LEFT JOIN (SELECT ClassPlanId,COUNT(*) as LessonPlanNum from rb_class_lessonplan where `Status`=0 GROUP BY ClassPlanId)as lp on a.ClassPlanId=lp.ClassPlanId
WHERE 1=1 and class.ClassStatus=2 and t.`Status`=0
");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_Plan_ViewModel.Status), (int)DateStateEnum.Normal);
//builder.AppendFormat(@"
// SELECT A.*,class.ClassName,lp.LessonPlanNum,lps.LessonPlanSummaryNum,IFNULL(B.RoomName,'') AS RoomName,IFNULL(T.TeacherName,'') AS TeacherName,IFNULL(T.TeacherHead,'') AS UserIcon
// FROM RB_Class_Plan AS A LEFT JOIN rb_class_room AS B ON A.ClassRoomId=B.RoomId
// LEFT JOIN rb_class as class on a.ClassId=class.ClassId
// LEFT JOIN rb_teacher AS T ON A.TeacherId=T.TId
// LEFT JOIN (SELECT ClassPlanId,COUNT(*) as LessonPlanNum from rb_class_lessonplan where `Status`=0 GROUP BY ClassPlanId)as lp on a.ClassPlanId=lp.ClassPlanId
//LEFT JOIN (SELECT ClassPlanId,COUNT(*) as LessonPlanSummaryNum from rb_class_lessonplan where `Status`=0 and ISNULL(Summary)=0 and LENGTH(trim(Summary))>0 GROUP BY ClassPlanId)as lps on a.ClassPlanId=lps.ClassPlanId
//WHERE 1=1 and class.ClassStatus=2 and t.`Status`=0
// ");
// builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_Plan_ViewModel.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.ClassId > 0)
......@@ -406,18 +407,42 @@ WHERE 1=1 and class.ClassStatus=2 and t.`Status`=0
}
if (!string.IsNullOrEmpty(query.QMonth))
{
builder.AppendFormat(" AND DATE_FORMAT(A.{0},'%y/%m')= DATE_FORMAT('{1}-01','%y/%m') ", nameof(RB_Class_Plan_ViewModel.ClassDate), query.QMonth);
builder.AppendFormat(" AND DATE_FORMAT(A.{0},''%y/%m'')= DATE_FORMAT(''{1}-01'',''%y/%m'') ", nameof(RB_Class_Plan_ViewModel.ClassDate), query.QMonth);
}
if (!string.IsNullOrEmpty(query.StartTime))
{
builder.AppendFormat(" AND DATE_FORMAT(A.{0},'%y-%m-%d')>=DATE_FORMAT('{1}','%y-%m-%d') ", nameof(RB_Class_Plan_ViewModel.ClassDate), query.StartTime);
builder.AppendFormat(" AND DATE_FORMAT(A.{0},''%y-%m-%d'')>=DATE_FORMAT(''{1}'',''%y-%m-%d'') ", nameof(RB_Class_Plan_ViewModel.ClassDate), query.StartTime);
}
if (!string.IsNullOrEmpty(query.EndTime))
{
builder.AppendFormat(" AND DATE_FORMAT(A.{0},'%y-%m-%d')<=DATE_FORMAT('{1}','%y-%m-%d') ", nameof(RB_Class_Plan_ViewModel.ClassDate), query.EndTime);
builder.AppendFormat(" AND DATE_FORMAT(A.{0},''%y-%m-%d'')<=DATE_FORMAT(''{1}'',''%y-%m-%d'') ", nameof(RB_Class_Plan_ViewModel.ClassDate), query.EndTime);
}
}
return Get<RB_Class_Plan_ViewModel>(builder.ToString()).ToList();
// return Get<RB_Class_Plan_ViewModel>(builder.ToString()).ToList();
//// string sql = $@"
////SELECT * from (SELECT IF
//// (
//// @class = a.ClassId,
//// IF
//// ( @score = a.ClassDate, @rank := @rank, @rank := @colum + 1 ),
//// @rank := 1
//// ) AS Ranks,
////IF
//// ( @class = a.ClassId, @colum := @colum + 1, @colum := 1 ) AS colums,
//// (@class := a.ClassId) as rr,
//// ( @score := a.ClassDate) as yy ,
////A.*,class.ClassName,lp.LessonPlanNum,IFNULL(B.RoomName,'') AS RoomName,IFNULL(T.TeacherName,'') AS TeacherName,IFNULL(T.TeacherHead,'') AS UserIcon
////FROM RB_Class_Plan AS A LEFT JOIN rb_class_room AS B ON A.ClassRoomId=B.RoomId
////LEFT JOIN rb_class as class on a.ClassId=class.ClassId
//// LEFT JOIN rb_teacher AS T ON A.TeacherId=T.TId
////LEFT JOIN (SELECT ClassPlanId,COUNT(*) as LessonPlanNum from rb_class_lessonplan where `Status`=0 GROUP BY ClassPlanId)as lp on a.ClassPlanId=lp.ClassPlanId,
////( SELECT @rank := 0, @class := 0, @score := '2020-01-01', @colum := 0 ) r
////WHERE 1=1 and class.ClassStatus=2 and t.`Status`=0 and a.`Status`=0 ORDER BY a.ClassId,a.ClassDate) as a where 1=1 {builder.ToString()} ";
string sql = $@"CALL proc_GetClassPlanRank('{builder.ToString()}')";
return Get<RB_Class_Plan_ViewModel>(sql).ToList();
}
......@@ -541,7 +566,7 @@ GROUP BY A.ClassPlanId,A.ClassId ,A.ClassDate,A.ClassRoomId,A.CompleteProgress
/// </summary>
/// <param name="planId"></param>
/// <returns></returns>
public double GetCurrentPlanStudyHoursRepository(int planId)
public double GetCurrentPlanStudyHoursRepository(int planId)
{
string sql = @"select
(select SUM(timestampdiff(MINUTE, Concat(SUBSTRING_INDEX(d.ClassDate, ' ', 1), ' ', c.StartTime), Concat(SUBSTRING_INDEX(d.ClassDate, ' ', 1), ' ', c.EndTime))) / 45
......@@ -550,9 +575,9 @@ GROUP BY A.ClassPlanId,A.ClassId ,A.ClassDate,A.ClassRoomId,A.CompleteProgress
join rb_class_plan d on c.ClassPlanId = d.ClassPlanId
where d.ClassDate < b.ClassDate and c.ClassId = b.ClassId)
from rb_class_plan b where b.ClassPlanId = "+planId+" and b.`Status`= 0";
from rb_class_plan b where b.ClassPlanId = " + planId + " and b.`Status`= 0";
object obj = ExecuteScalar(sql);
return Convert.IsDBNull(obj)?-1:Convert.ToDouble(obj);
return Convert.IsDBNull(obj) ? -1 : Convert.ToDouble(obj);
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment