Commit baa931a3 authored by 黄奎's avatar 黄奎

页面修改

parent 70711ef0
...@@ -73,5 +73,15 @@ namespace Edu.Model.ViewModel.Course ...@@ -73,5 +73,15 @@ namespace Edu.Model.ViewModel.Course
/// 班级上课计划列表 /// 班级上课计划列表
/// </summary> /// </summary>
public List<RB_Class_Plan_ViewModel> ClassPlanList { get; set; } public List<RB_Class_Plan_ViewModel> ClassPlanList { get; set; }
/// <summary>
/// 选中的周几/或日期数组
/// </summary>
public List<string> WeekDayList { get; set; }
/// <summary>
/// 默认上课时间
/// </summary>
public List<RB_Class_Time_ViewModel> DefaultPlanTimeList { get; set; }
} }
} }
\ No newline at end of file
This diff is collapsed.
...@@ -3,6 +3,7 @@ using Edu.Model.ViewModel.Course; ...@@ -3,6 +3,7 @@ using Edu.Model.ViewModel.Course;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using VT.FW.DB;
namespace Edu.Repository.Course namespace Edu.Repository.Course
{ {
...@@ -38,6 +39,21 @@ WHERE 1=1 ...@@ -38,6 +39,21 @@ WHERE 1=1
return Get<RB_Class_Plan_ViewModel>(builder.ToString()).ToList(); return Get<RB_Class_Plan_ViewModel>(builder.ToString()).ToList();
} }
/// <summary>
/// 判断是否存在
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public bool CheckExistsRepository(RB_Class_Plan_ViewModel model)
{
List<WhereHelper> list = new List<WhereHelper>()
{
new WhereHelper (nameof(RB_Class_Plan_ViewModel.ClassId),model.ClassId),
new WhereHelper (nameof(RB_Class_Plan_ViewModel.ClassDate),model.ClassDate),
};
return base.Exists(list);
}
/// <summary> /// <summary>
/// 根据班级编号删除班级上课计划 /// 根据班级编号删除班级上课计划
/// </summary> /// </summary>
......
...@@ -97,6 +97,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -97,6 +97,7 @@ namespace Edu.WebApi.Controllers.Course
{ {
var extModel = new RB_Class_ViewModel() var extModel = new RB_Class_ViewModel()
{ {
ClassId=base.ParmJObj.GetInt("ClassId"),
CreateBy = UserInfo.Id, CreateBy = UserInfo.Id,
CreateTime = DateTime.Now, CreateTime = DateTime.Now,
UpdateBy = UserInfo.Id, UpdateBy = UserInfo.Id,
...@@ -124,6 +125,42 @@ namespace Edu.WebApi.Controllers.Course ...@@ -124,6 +125,42 @@ namespace Edu.WebApi.Controllers.Course
CompleteProgress=base.ParmJObj.GetInt("CompleteProgress"), CompleteProgress=base.ParmJObj.GetInt("CompleteProgress"),
School_Id=base.ParmJObj.GetInt("School_Id"), School_Id=base.ParmJObj.GetInt("School_Id"),
}; };
try
{
string ClassStepPriceListStr=base.ParmJObj.GetStringValue("ClassStepPriceList");
if (!string.IsNullOrEmpty(ClassStepPriceListStr))
{
extModel.ClassStepPriceList = Common.Plugin.JsonHelper.DeserializeObject<List<RB_Class_StepPrice_ViewModel>>(ClassStepPriceListStr);
}
}
catch(Exception ex)
{
Common.Plugin.LogHelper.Write(ex, "SetClass_ClassStepPriceList");
}
try
{
string WeekDayListStr = base.ParmJObj.GetStringValue("WeekDayList");
if (!string.IsNullOrEmpty(WeekDayListStr))
{
extModel.WeekDayList = Common.Plugin.JsonHelper.DeserializeObject<List<string>>(WeekDayListStr);
}
}
catch (Exception ex)
{
Common.Plugin.LogHelper.Write(ex, "SetClass_WeekDayList");
}
try
{
string DefaultPlanTimeListStr = base.ParmJObj.GetStringValue("DefaultPlanTimeList");
if (!string.IsNullOrEmpty(DefaultPlanTimeListStr))
{
extModel.DefaultPlanTimeList = Common.Plugin.JsonHelper.DeserializeObject<List<RB_Class_Time_ViewModel>>(DefaultPlanTimeListStr);
}
}
catch (Exception ex)
{
Common.Plugin.LogHelper.Write(ex, "SetClass_DefaultPlanTimeList");
}
bool flag = classModule.SetClassModule(extModel); bool flag = classModule.SetClassModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
......
...@@ -39,6 +39,7 @@ namespace Edu.WebApi ...@@ -39,6 +39,7 @@ namespace Edu.WebApi
"http://localhost:8400", "http://localhost:8400",
"http://localhost:8081", "http://localhost:8081",
"http://localhost:8080", "http://localhost:8080",
"http://localhost:8181",
"http://localhost:8082", "http://localhost:8082",
"http://127.0.0.1:50512", "http://127.0.0.1:50512",
"http://127.0.0.1:20224", "http://127.0.0.1:20224",
......
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