Commit 580f37a2 authored by 黄奎's avatar 黄奎

页面修改

parent 135d4ad5
...@@ -10,6 +10,9 @@ namespace Edu.Model.ViewModel.Course ...@@ -10,6 +10,9 @@ namespace Edu.Model.ViewModel.Course
/// </summary> /// </summary>
public class RB_Course_Words_Extend : RB_Course_Words public class RB_Course_Words_Extend : RB_Course_Words
{ {
/// <summary>
/// 课程编号
/// </summary>
public string QCourseIds { get; set; }
} }
} }
...@@ -145,6 +145,11 @@ namespace Edu.Module.Course ...@@ -145,6 +145,11 @@ namespace Edu.Module.Course
/// </summary> /// </summary>
private readonly Repository.Mall.RB_Goods_SpecificationPriceRepository goods_SpecificationPriceRepository = new Repository.Mall.RB_Goods_SpecificationPriceRepository(); private readonly Repository.Mall.RB_Goods_SpecificationPriceRepository goods_SpecificationPriceRepository = new Repository.Mall.RB_Goods_SpecificationPriceRepository();
/// <summary>
/// 课程单词仓储层对象
/// </summary>
private readonly RB_Course_WordsRepository course_WordsRepository = new RB_Course_WordsRepository();
#region 课程管理 #region 课程管理
public List<RB_Course_ViewModel> GetAllCourseChapterCountModule(int groupId, int courseId) public List<RB_Course_ViewModel> GetAllCourseChapterCountModule(int groupId, int courseId)
...@@ -481,6 +486,11 @@ namespace Edu.Module.Course ...@@ -481,6 +486,11 @@ namespace Edu.Module.Course
return chapterRepository.GetChapterListRepository(query); return chapterRepository.GetChapterListRepository(query);
} }
/// <summary>
/// 导入课程章节到新课程
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<ChapterTree_ViewModel> SetImportChapterModule(RB_Course_Chapter_ViewModel query) public List<ChapterTree_ViewModel> SetImportChapterModule(RB_Course_Chapter_ViewModel query)
{ {
var result = GetChapterTreeListModule(query); var result = GetChapterTreeListModule(query);
...@@ -652,6 +662,11 @@ namespace Edu.Module.Course ...@@ -652,6 +662,11 @@ namespace Edu.Module.Course
return resultList; return resultList;
} }
/// <summary>
/// 批量导入课程章节信息
/// </summary>
/// <param name="courseId"></param>
/// <returns></returns>
public bool SetBatchAllChapterCurrentHoursModule(int courseId) public bool SetBatchAllChapterCurrentHoursModule(int courseId)
{ {
RB_Course_Chapter_ViewModel query = new RB_Course_Chapter_ViewModel() RB_Course_Chapter_ViewModel query = new RB_Course_Chapter_ViewModel()
...@@ -712,8 +727,6 @@ namespace Edu.Module.Course ...@@ -712,8 +727,6 @@ namespace Edu.Module.Course
} }
} }
}); });
return chapterRepository.SetBatchCurrentHoursRepository(list); return chapterRepository.SetBatchCurrentHoursRepository(list);
} }
...@@ -807,7 +820,6 @@ namespace Edu.Module.Course ...@@ -807,7 +820,6 @@ namespace Edu.Module.Course
} }
} }
/// <summary> /// <summary>
/// 获取章节实体类 /// 获取章节实体类
/// </summary> /// </summary>
...@@ -841,7 +853,6 @@ namespace Edu.Module.Course ...@@ -841,7 +853,6 @@ namespace Edu.Module.Course
public bool BatchRemoveChapterModule(RB_Course_Chapter_ViewModel model) public bool BatchRemoveChapterModule(RB_Course_Chapter_ViewModel model)
{ {
var flag = chapterRepository.DeleteBatchChpterRepository(model); var flag = chapterRepository.DeleteBatchChpterRepository(model);
SetBatchAllChapterCurrentHoursModule(model.CourseId); SetBatchAllChapterCurrentHoursModule(model.CourseId);
return flag; return flag;
} }
...@@ -896,8 +907,6 @@ namespace Edu.Module.Course ...@@ -896,8 +907,6 @@ namespace Edu.Module.Course
public bool SetBatchChapterNoModule(List<RB_Course_Chapter_ViewModel> chapters) public bool SetBatchChapterNoModule(List<RB_Course_Chapter_ViewModel> chapters)
{ {
var flag = chapterRepository.SetBatchUpdateChapterNoRepository(chapters); var flag = chapterRepository.SetBatchUpdateChapterNoRepository(chapters);
//SetBatchAllChapterCurrentHoursModule(chapters[0].CourseId);
return flag; return flag;
} }
...@@ -1611,7 +1620,6 @@ namespace Edu.Module.Course ...@@ -1611,7 +1620,6 @@ namespace Edu.Module.Course
public List<RB_Class_Time_UnKnowUser_ViewModel> GetUnKnowUserByClassTimeModule(int classId) public List<RB_Class_Time_UnKnowUser_ViewModel> GetUnKnowUserByClassTimeModule(int classId)
{ {
var list = unKnowRepository.GetUnKnowUsersByClassIdRepository(classId); var list = unKnowRepository.GetUnKnowUsersByClassIdRepository(classId);
return list; return list;
} }
...@@ -1714,6 +1722,7 @@ namespace Edu.Module.Course ...@@ -1714,6 +1722,7 @@ namespace Edu.Module.Course
demodel.GoodsPageType ??= GoodsPageTypeEnum.All; demodel.GoodsPageType ??= GoodsPageTypeEnum.All;
demodel.TenantId = Convert.ToInt32(Config.JHTenantId); demodel.TenantId = Convert.ToInt32(Config.JHTenantId);
demodel.MallBaseId = Convert.ToInt32(Config.JHMallBaseId); demodel.MallBaseId = Convert.ToInt32(Config.JHMallBaseId);
#region 商品规格信息 #region 商品规格信息
demodel.SpecificationList = new List<RB_Goods_Specification_Extend>(); demodel.SpecificationList = new List<RB_Goods_Specification_Extend>();
demodel.SpecificationPriceList = new List<RB_Goods_SpecificationPrice_Extend>(); demodel.SpecificationPriceList = new List<RB_Goods_SpecificationPrice_Extend>();
...@@ -1762,7 +1771,6 @@ namespace Edu.Module.Course ...@@ -1762,7 +1771,6 @@ namespace Edu.Module.Course
demodel.SpecificationList.Add(modelSpecification); demodel.SpecificationList.Add(modelSpecification);
#endregion #endregion
if (demodel.Id == 0)//已存在,更新 if (demodel.Id == 0)//已存在,更新
{ {
demodel.Status = 0; demodel.Status = 0;
...@@ -1772,7 +1780,6 @@ namespace Edu.Module.Course ...@@ -1772,7 +1780,6 @@ namespace Edu.Module.Course
if (goodsId > 0) if (goodsId > 0)
{ {
//插入分类 //插入分类
foreach (var item in model.CategoryList) foreach (var item in model.CategoryList)
{ {
...@@ -1793,7 +1800,8 @@ namespace Edu.Module.Course ...@@ -1793,7 +1800,8 @@ namespace Edu.Module.Course
else else
{ {
//修改 //修改
Dictionary<string, object> keyValues = new Dictionary<string, object>() { Dictionary<string, object> keyValues = new Dictionary<string, object>()
{
{ nameof(RB_Goods.Name),demodel.Name}, { nameof(RB_Goods.Name),demodel.Name},
{ nameof(RB_Goods.CarouselImage),demodel.CarouselImage}, { nameof(RB_Goods.CarouselImage),demodel.CarouselImage},
{ nameof(RB_Goods.VideoAddress),demodel.VideoAddress}, { nameof(RB_Goods.VideoAddress),demodel.VideoAddress},
...@@ -1861,18 +1869,22 @@ namespace Edu.Module.Course ...@@ -1861,18 +1869,22 @@ namespace Edu.Module.Course
{ nameof(RB_Goods.GoodsUrl),demodel.GoodsUrl }, { nameof(RB_Goods.GoodsUrl),demodel.GoodsUrl },
{ nameof(RB_Goods.goodsLogo),demodel.goodsLogo }, { nameof(RB_Goods.goodsLogo),demodel.goodsLogo },
}; };
List<WhereHelper> wheres = new List<WhereHelper>() { List<WhereHelper> wheres = new List<WhereHelper>()
new WhereHelper(){ {
new WhereHelper()
{
FiledName=nameof(RB_Goods.Id), FiledName=nameof(RB_Goods.Id),
FiledValue=demodel.Id, FiledValue=demodel.Id,
OperatorEnum=OperatorEnum.Equal OperatorEnum=OperatorEnum.Equal
}, },
new WhereHelper(){ new WhereHelper()
{
FiledName=nameof(RB_Goods.TenantId), FiledName=nameof(RB_Goods.TenantId),
FiledValue=demodel.TenantId, FiledValue=demodel.TenantId,
OperatorEnum=OperatorEnum.Equal OperatorEnum=OperatorEnum.Equal
}, },
new WhereHelper(){ new WhereHelper()
{
FiledName=nameof(RB_Goods.MallBaseId), FiledName=nameof(RB_Goods.MallBaseId),
FiledValue=demodel.MallBaseId, FiledValue=demodel.MallBaseId,
OperatorEnum=OperatorEnum.Equal OperatorEnum=OperatorEnum.Equal
...@@ -1900,7 +1912,6 @@ namespace Edu.Module.Course ...@@ -1900,7 +1912,6 @@ namespace Edu.Module.Course
} }
#endregion #endregion
#region 修改分类 #region 修改分类
var clist = MallGoodsCategoryRepository.GetList(new RB_Goods_Category_Extend() { GoodsId = demodel.Id, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }); var clist = MallGoodsCategoryRepository.GetList(new RB_Goods_Category_Extend() { GoodsId = demodel.Id, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
var insertList = model.CategoryList.Where(x => !clist.Select(y => y.CategoryId).Contains(x.CategoryId)).ToList(); var insertList = model.CategoryList.Where(x => !clist.Select(y => y.CategoryId).Contains(x.CategoryId)).ToList();
...@@ -2062,7 +2073,6 @@ namespace Edu.Module.Course ...@@ -2062,7 +2073,6 @@ namespace Edu.Module.Course
} }
#endregion #endregion
return goodsId; return goodsId;
} }
...@@ -2075,7 +2085,6 @@ namespace Edu.Module.Course ...@@ -2075,7 +2085,6 @@ namespace Edu.Module.Course
public bool UpdateMallGoodsPrice(RB_Course_ViewModel courseModel, List<RB_Course_Preferential_Extend> list) public bool UpdateMallGoodsPrice(RB_Course_ViewModel courseModel, List<RB_Course_Preferential_Extend> list)
{ {
bool flag = false; bool flag = false;
if (courseModel.MallGoodsId > 0) if (courseModel.MallGoodsId > 0)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
...@@ -2165,7 +2174,6 @@ namespace Edu.Module.Course ...@@ -2165,7 +2174,6 @@ namespace Edu.Module.Course
} }
} }
} }
return flag; return flag;
} }
......
...@@ -37,6 +37,10 @@ WHERE 1=1 ...@@ -37,6 +37,10 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_Words_Extend.CourseId), query.CourseId); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_Words_Extend.CourseId), query.CourseId);
} }
if (!string.IsNullOrEmpty(query.QCourseIds))
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Course_Words_Extend.CourseId), query.QCourseIds);
}
} }
return Get<RB_Course_Words_Extend>(builder.ToString()).ToList(); return Get<RB_Course_Words_Extend>(builder.ToString()).ToList();
} }
......
...@@ -582,10 +582,19 @@ namespace Edu.WebApi.Controllers.Course ...@@ -582,10 +582,19 @@ namespace Edu.WebApi.Controllers.Course
#region 课程章节管理 #region 课程章节管理
/// <summary>
/// 导入课程章节到新课程
/// </summary>
/// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult SetImportCourseChapter() public ApiResult SetImportCourseChapter()
{ {
var query = Common.Plugin.JsonHelper.DeserializeObject<RB_Course_Chapter_ViewModel>(RequestParm.Msg.ToString()); var query = new RB_Course_Chapter_ViewModel()
{
CourseIds = base.ParmJObj.GetStringValue("CourseIds"),
NewCourseId = base.ParmJObj.GetInt("NewCourseId"),
MaxLength = base.ParmJObj.GetInt("MaxLength")
};
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
query.School_Id = base.UserInfo.School_Id; query.School_Id = base.UserInfo.School_Id;
query.CreateBy = base.UserInfo.Id; query.CreateBy = base.UserInfo.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