Commit fd2f34e8 authored by 黄奎's avatar 黄奎

页面修改

parent 83f5beaa
using Edu.Common.Enum;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.User
{
/// <summary>
/// 学生订单旅客关联实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Student_OrderGuest
{
/// <summary>
/// 主键编号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 账号表(rb_account)编号
/// </summary>
public int Account_Id { get; set; }
/// <summary>
/// 学生表(rb_student)编号
/// </summary>
public int Student_Id { get; set; }
/// <summary>
/// 班级编号
/// </summary>
public int ClassId { get; set; }
/// <summary>
/// 订单编号
/// </summary>
public int OrderId { get; set; }
/// <summary>
/// 游客编号
/// </summary>
public int GuestId { get; set; }
/// <summary>
/// 状态
/// </summary>
public DateStateEnum Status { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
}
}
......@@ -33,6 +33,11 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public string TeacherName { get; set; }
/// <summary>
/// 老师头像
/// </summary>
public string UserIcon { get; set; }
/// <summary>
/// 周几
/// </summary>
......
using Edu.Model.Entity.User;
using System;
using System.Collections.Generic;
using System.Text;
namespace Edu.Model.ViewModel.User
{
/// <summary>
/// 学生订单旅客关联视图实体类
/// </summary>
public class RB_Student_OrderGuest_ViewModel: RB_Student_OrderGuest
{
}
}
......@@ -498,6 +498,7 @@ namespace Edu.Module.Course
item.RoomName,
item.TeacherId,
item.TeacherName,
item.UserIcon,
TimeList = item?.PlanTimeList?.Select(qitem => new { qitem.ClassTimeId, qitem.StartTime, qitem.EndTime })?.OrderBy(qitem => qitem.StartTime)
});
}
......
......@@ -22,7 +22,7 @@ namespace Edu.Repository.Course
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*,IFNULL(B.RoomName,'') AS RoomName,IFNULL(T.TeacherName,'') AS TeacherName
SELECT A.*,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_teacher AS T ON A.TeacherId=T.TId
WHERE 1=1
......
using Edu.Common.Enum;
using Edu.Model.Entity.User;
using Edu.Model.ViewModel.User;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Edu.Repository.User
{
/// <summary>
/// 学生订单旅客关联仓储层
/// </summary>
public class RB_Student_OrderGuestRepository : BaseRepository<RB_Student_OrderGuest>
{
/// <summary>
/// 获取员工订单旅客关联列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Student_OrderGuest_ViewModel> GetStrOrderGuestListRepository(RB_Student_OrderGuest_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Student_OrderGuest
WHERE 1=1
");
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Student_OrderGuest_ViewModel.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.ClassId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Student_OrderGuest_ViewModel.ClassId), query.ClassId);
}
if (query.OrderId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Student_OrderGuest_ViewModel.OrderId), query.OrderId);
}
if (query.GuestId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Student_OrderGuest_ViewModel.GuestId), query.GuestId);
}
if (query.Student_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Student_OrderGuest_ViewModel.Student_Id), query.Student_Id);
}
if (query.Account_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Student_OrderGuest_ViewModel.Account_Id), query.Account_Id);
}
}
return Get<RB_Student_OrderGuest_ViewModel>(builder.ToString()).ToList();
}
}
}
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