Commit 1efee8e1 authored by liudong1993's avatar liudong1993

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents 695ce17c 735b6966
......@@ -110,5 +110,11 @@ namespace Edu.Common.Enum.Finance
/// </summary>
[EnumField("教育留学")]
EducationStudy = 18,
/// <summary>
/// 试听班级
/// </summary>
[EnumField("试听班级")]
ReserveClass =19,
}
}
......@@ -71,6 +71,16 @@ namespace Edu.Model.ViewModel.Reserve
/// </summary>
public string StuTel { get; set; }
/// <summary>
/// QQ号码
/// </summary>
public string QQ { get; set; }
/// <summary>
/// 微信号
/// </summary>
public string WeChatNo { get; set; }
/// <summary>
/// 教师名称
/// </summary>
......
......@@ -131,8 +131,8 @@ namespace Edu.Module.Duty
}
if (visitor_ReserveRepository.ExistsVisitorReserveRepository(model))
{
message = string.Format("已存在此访客的预约试听课信息,请重新选择!");
return false;
//message = string.Format("已存在此访客的预约试听课信息,请重新选择!");
//return false;
}
if (model.Id > 0)
{
......@@ -541,7 +541,7 @@ namespace Edu.Module.Duty
/// <returns></returns>
public RB_Reserve_Class_Extend GetReserveClassModule(int ReserveClassId)
{
var extModel = reserve_ClassRepository.GetEntity<RB_Reserve_Class_Extend>(ReserveClassId);
var extModel = reserve_ClassRepository.GetReserveClassListRepository(new RB_Reserve_Class_Extend() { ReserveClassId = ReserveClassId })?.FirstOrDefault();
return extModel;
}
......
......@@ -111,6 +111,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Reserve_Class_Extend.School_Id), query.School_Id);
}
if (query.ReserveClassId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Reserve_Class_Extend.ReserveClassId), query.ReserveClassId);
}
}
return Get<RB_Reserve_Class_Extend>(builder.ToString(),parameters).ToList();
}
......
......@@ -29,14 +29,13 @@ namespace Edu.Repository.Reserve
StringBuilder builder = new StringBuilder();
var parameters = new DynamicParameters();
builder.Append(@"
SELECT A.*,IFNULL(B.`Name`,'') AS VisitorName,C.ClassDate,C.ClassTime,C.EndTime,C.ClassContent,IFNULL(D.TeacherName,'') AS TeacherName
,IFNULL(E.RoomName,'') AS RoomName,F.Id AS AccountId,IFNULL(G.LessonName,'') AS LessonName
FROM RB_Visitor_Reserve AS A LEFT JOIN rb_visitor AS B ON A.Visitor_Id=B.Id
SELECT A.*,IFNULL(B.StuName,'') AS VisitorName,C.ClassDate,C.ClassTime,C.EndTime,C.ClassContent,IFNULL(D.TeacherName,'') AS TeacherName,IFNULL(E.RoomName,'') AS RoomName
,IFNULL(B.StuTel,'') AS StuTel,IFNULL(F.LessonName,'') AS LessonName,IFNULL(B.QQ,'') AS QQ,IFNULL(B.WeChatNo,'') AS WeChatNo
FROM RB_Visitor_Reserve AS A LEFT JOIN rb_student AS B ON A.Visitor_Id=B.StuId
LEFT JOIN rb_reserve_class AS C ON A.ReserveClassId=C.ReserveClassId
LEFT JOIN rb_teacher AS D ON C.TeacherId=D.TId
LEFT JOIN rb_account AS F On C.TeacherId=F.AccountId AND F.AccountType=2
LEFT JOIN rb_class_room AS E ON C.ClassRoomId=E.RoomId
LEFT JOIN rb_triallesson AS G ON C.TrialLessonId=G.Id
LEFT JOIN rb_triallesson AS F ON C.TrialLessonId=F.Id
WHERE 1=1
");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Visitor_Reserve_Extend.Status), (int)DateStateEnum.Normal);
......@@ -84,6 +83,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Visitor_Reserve_Extend.Visitor_Id), query.Visitor_Id);
}
if (query.ReserveClassId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Visitor_Reserve_Extend.ReserveClassId), query.ReserveClassId);
}
}
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Visitor_Reserve_Extend.Id));
return GetPage<RB_Visitor_Reserve_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
......
......@@ -49,6 +49,7 @@ namespace Edu.WebApi.Controllers.Duty
Id=base.ParmJObj.GetInt("Id"),
IsQueryAll=base.ParmJObj.GetInt("IsQueryAll"),
Visitor_Id=base.ParmJObj.GetInt("Visitor_Id"),
ReserveClassId=base.ParmJObj.GetInt("ReserveClassId"),
};
if (query.IsQueryAll != 1)
{
......
......@@ -1335,7 +1335,7 @@ namespace Edu.WebApi.Controllers.User
EndLeaveTime = base.ParmJObj.GetStringValue("EndLeaveTime"),
LeaveStatus = (LeaveStatusEnum)base.ParmJObj.GetInt("LeaveStatus"),
Post_Id = base.ParmJObj.GetInt("Post_Id"),
School_Id = base.ParmJObj.GetInt("School_Id"),
School_Id = -1,
StartBirthDate = base.ParmJObj.GetStringValue("StartBirthDate"),
StartEntryTime = base.ParmJObj.GetStringValue("StartEntryTime"),
StartLeaveTime = base.ParmJObj.GetStringValue("StartLeaveTime"),
......@@ -2184,7 +2184,7 @@ namespace Edu.WebApi.Controllers.User
{
var query = new Employee_ViewModel()
{
School_Id = base.ParmJObj.GetInt("School_Id"),
School_Id = -1,
Account = base.ParmJObj.GetStringValue("Account"),
AccountType = (AccountTypeEnum)base.ParmJObj.GetInt("AccountType"),
Id = base.ParmJObj.GetInt("Id"),
......
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