Commit 485f9f44 authored by 黄奎's avatar 黄奎

页面修改

parent 8b11bd24
......@@ -45,5 +45,11 @@ namespace Edu.Common.Enum.User
/// </summary>
[EnumField("第三方平台")]
ThirdPartyPlatform = 6,
/// <summary>
/// 其他
/// </summary>
[EnumField("其他")]
Other = 7,
}
}
\ No newline at end of file
......@@ -19,5 +19,15 @@ namespace Edu.Model.ViewModel.Customer
/// 接待人姓名
/// </summary>
public string ReceptionPersionName { get; set; }
/// <summary>
/// 查询日期
/// </summary>
public string QueryDate { get; set; }
/// <summary>
/// 学员名称
/// </summary>
public string StuName { get; set; }
}
}
......@@ -197,5 +197,10 @@ namespace Edu.Model.ViewModel.User
/// 是否查询当天访客
/// </summary>
public int IsQCurrentDay { get; set; }
/// <summary>
/// 是否添加到访记录
/// </summary>
public int IsCreateVisit { get; set; }
}
}
\ No newline at end of file
......@@ -3657,26 +3657,7 @@ namespace Edu.Module.Course
//试听课列表
var reserveList = new List<RB_Reserve_Class_Extend>();
var reserveQuery = new RB_Reserve_Class_Extend()
{
StartClassDate = query.StartTime,
EndClassDate = query.EndTime,
TeacherId = query.TeacherId,
ClassRoomId = query.ClassRoomId
};
if (ClassType == 0)
{
list = class_PlanRepository.GetClassPlanStatisticalRepository(query);
reserveList = reserve_ClassRepository.GetReserveClassListRepository(reserveQuery);
}
else if (ClassType == 1)
{
list = class_PlanRepository.GetClassPlanStatisticalRepository(query);
}
else if (ClassType == 2)
{
reserveList = reserve_ClassRepository.GetReserveClassListRepository(reserveQuery);
}
GetClassPlanCommonModule(query, out list, out reserveList, ClassType);
if (list != null || reserveList != null)
{
......@@ -3793,6 +3774,39 @@ namespace Edu.Module.Course
return new { mondayList, tuesdayList, wednesdayList, thursdayList, fridayList, saturdayList, sundayList };
}
/// <summary>
/// 获取上课计划列表
/// </summary>
/// <param name="query"></param>
/// <param name="list"></param>
/// <param name="reserveList"></param>
/// <param name="ClassType"></param>
public void GetClassPlanCommonModule(RB_Class_Plan_ViewModel query, out List<RB_Class_Plan_ViewModel> list, out List<RB_Reserve_Class_Extend> reserveList, int ClassType = 0)
{
list = new List<RB_Class_Plan_ViewModel>();
reserveList = new List<RB_Reserve_Class_Extend>();
var reserveQuery = new RB_Reserve_Class_Extend()
{
StartClassDate = query.StartTime,
EndClassDate = query.EndTime,
TeacherId = query.TeacherId,
ClassRoomId = query.ClassRoomId
};
if (ClassType == 0)
{
list = class_PlanRepository.GetClassPlanStatisticalRepository(query);
reserveList = reserve_ClassRepository.GetReserveClassListRepository(reserveQuery);
}
else if (ClassType == 1)
{
list = class_PlanRepository.GetClassPlanStatisticalRepository(query);
}
else if (ClassType == 2)
{
reserveList = reserve_ClassRepository.GetReserveClassListRepository(reserveQuery);
}
}
/// <summary>
/// 获取教师课时统计
/// </summary>
......
......@@ -286,6 +286,17 @@ namespace Edu.Module.Customer
return list;
}
/// <summary>
/// 获取到访列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Student_Visit_Extend> GetStudentVisitListModule(RB_Student_Visit_Extend query)
{
var list = student_VisitRepository.GetStudentVisitListRepository(query);
return list;
}
/// <summary>
/// 新增修改学员到访
/// </summary>
......
......@@ -44,5 +44,39 @@ WHERE 1=1
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Student_Visit_Extend.Id));
return GetPage<RB_Student_Visit_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
}
/// <summary>
/// 获取到访列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Student_Visit_Extend> GetStudentVisitListRepository(RB_Student_Visit_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*,IFNULL(B.StuName,'') AS StuName
FROM RB_Student_Visit AS A INNER JOIN rb_student AS B ON A.StuId=B.StuId
WHERE 1=1
");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Visit_Extend.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Visit_Extend.Group_Id), query.Group_Id);
}
if (query.StuId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Visit_Extend.StuId), query.StuId);
}
if (!string.IsNullOrEmpty(query.QueryDate))
{
//今日到访
builder.AppendFormat(" AND DATE_FORMAT(A.{0},'%y/%m/%d')= DATE_FORMAT('{1}','%y/%m/%d') ", nameof(RB_Student_Visit_Extend.CreateTime), Common.ConvertHelper.FormatDate(query.QueryDate));
}
}
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Student_Visit_Extend.Id));
return Get<RB_Student_Visit_Extend>( builder.ToString()).ToList();
}
}
}
......@@ -3,6 +3,9 @@ using Edu.Common.API;
using Edu.Common.Enum.Duty;
using Edu.Common.Plugin;
using Edu.Model.ViewModel.Duty;
using Edu.Model.ViewModel.Grade;
using Edu.Module.Course;
using Edu.Module.Customer;
using Edu.Module.Duty;
using Edu.Module.User;
using Edu.WebApi.Filter;
......@@ -35,6 +38,16 @@ namespace Edu.WebApi.Controllers.Duty
/// </summary>
private readonly StudentModule studentModule = AOP.AOPHelper.CreateAOPObject<StudentModule>();
/// <summary>
/// 客户学员处理类对象
/// </summary>
private readonly CustomerStudentModule customerStudentModule = new CustomerStudentModule();
/// <summary>
/// 班级处理类对象
/// </summary>
private readonly ClassModule classModule = new ClassModule();
/// <summary>
/// 获取值班计划分页列表【管理端】
/// </summary>
......@@ -687,5 +700,53 @@ namespace Edu.WebApi.Controllers.Duty
bool flag = dutyPlanModule.UpdateVisitorModule(model);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 获取今日到访列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetDutyTodayVisit()
{
var Id = base.ParmJObj.GetInt("Id");
var planModel = dutyPlanModule.GetDutyPlanModule(Id);
string planDate = Common.ConvertHelper.FormatDate(planModel.Date);
var list = customerStudentModule.GetStudentVisitListModule(new Model.ViewModel.Customer.RB_Student_Visit_Extend()
{
Group_Id = planModel.Group_Id,
School_Id = planModel.School_Id,
QueryDate = planDate
});
return ApiResult.Success(data: list);
}
/// <summary>
/// 值班获取今日试听安排
/// </summary>
/// <returns></returns>
public ApiResult GetDutyTrialLesson()
{
var Id = base.ParmJObj.GetInt("Id");
var planModel = dutyPlanModule.GetDutyPlanModule(Id);
string planDate = Common.ConvertHelper.FormatDate(planModel.Date);
RB_Class_Plan_ViewModel query = new RB_Class_Plan_ViewModel()
{
StartTime = planDate,
EndTime = planDate,
Group_Id = base.UserInfo.Group_Id,
School_Id = -1,
};
//课程类型(0-全部,1-正常,2-试听课)
int ClassType = 2;
var list = new List<Model.ViewModel.Reserve.RB_Reserve_Class_Extend>();
classModule.GetClassPlanCommonModule(query, out _, out list, ClassType);
if (list != null && list.Count > 0)
{
}
}
}
}
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