浏览代码

Merge branch '塔里木分支' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 塔里木分支

新疆影视学院高职
dyy 2 年前
父节点
当前提交
4f8de4272f
共有 7 个文件被更改,包括 114 次插入7 次删除
  1. +0
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs
  2. +23
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs
  3. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js
  4. +20
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs
  5. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs
  6. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs
  7. +49
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs

+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs 查看文件

@@ -179,7 +179,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
TeachEntity.TotalStudyHour = 2;
TeachEntity.IsInEffect = "1";
TeachEntity.IsPitchOn = "1";
TeachEntity.IsPitchOn = "1";
TeachEntity.F_SchoolId = entityList[i].F_SchoolId;
TeachEntity.CheckMark = "1";
TeachEntity.InsertTime = DateTime.Now;
@@ -259,7 +258,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
TeachEntity.TotalStudyHour = 2;
TeachEntity.IsInEffect = "1";
TeachEntity.IsPitchOn = "1";
TeachEntity.IsPitchOn = "1";
TeachEntity.F_SchoolId = entityList[i].F_SchoolId;
TeachEntity.InsertTime = DateTime.Now;
TeachList.Add(TeachEntity);


+ 23
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs 查看文件

@@ -269,11 +269,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success("操作成功!");
}
/// <summary>
/// 一键安排班级
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
/// 一键安排班级
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult PlanClassByEPId(string keyValue)
{
@@ -286,6 +286,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
exam_ExamPlanClassIBLL.PlanClassByEPId(keyValue);
return Success("操作成功!");
}
/// <summary>
/// 自动生成考试课程排考时间
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult PlanLessonTimeByEPId(string keyValue)
{
var count = exam_ExamPlanLessonIBLL.GetListByEPId(keyValue).Count();
if (count <= 0)
{
return Fail("请先安排课程!");
}
exam_ExamPlanLessonIBLL.PlanLessonTimeByEPId(keyValue);
return Success("操作成功!");
}
#endregion

}


+ 15
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js 查看文件

@@ -190,6 +190,21 @@ var bootstrap = function ($, learun) {
});
}
});
//自动生成排考时间
$('#lr_examlessontime').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认生成排考时间!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanLessonTimeByEPId', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {


+ 20
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs 查看文件

@@ -263,6 +263,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

public (bool flag, string msg) PlanLessonTimeByEPId(string EPId)
{
try
{
return exam_ExamPlanLessonService.PlanLessonTimeByEPId(EPId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs 查看文件

@@ -108,6 +108,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
public string AcademicYearNo { get; set; }
[NotMapped]
public string Semester { get; set; }
/// <summary>
/// 考试时长
/// </summary>
[NotMapped]
public int? ExamLength { get; set; }

#endregion
}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs 查看文件

@@ -52,6 +52,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, Exam_ExamPlanLessonEntity entity);

(bool flag, string msg) PlanLessonTimeByEPId(string keyValue);

(bool flag, string lessonname) IsExamTimeClash(Exam_ExamPlanLessonEntity entity);
#endregion



+ 49
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs 查看文件

@@ -411,6 +411,55 @@ and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan
}
}
}

/// <summary>
/// 自动生成考试课程排考时间
/// </summary>
/// <param name="EPId"></param>
/// <returns></returns>
public (bool flag, string msg) PlanLessonTimeByEPId(string EPId)
{
try
{
/*
* 1.查询考试记录是否已安排时间
* 2.查询考试课程的考试时长是否大于0
* 3.同一时间段内只能一个专业安排一门课程
*/

//安排时间数据
var EPTimeList = this.BaseRepository("CollegeMIS")
.FindList<Exam_ExamPlanTimeEntity>(x => x.EPId == EPId);
if (EPTimeList.Count() <= 0)
{
return (false, "请先安排考试记录时间!");
}
//考试课程数据
var EPLessonList = this.BaseRepository("CollegeMIS")
.FindList<Exam_ExamPlanLessonEntity>($@"select elesson.ExamTime as ExamLength,t.* from Exam_ExamPlanLesson t
join Exam_ExamLesson elesson on t.LessonNo=elesson.LessonNo
where t.EPId='{EPId}'");
if (EPLessonList.ToList().Exists(x => x.ExamLength == null || x.ExamLength == 0))
{
return (false, "请先设置考试课程时长!");
}
return (true, "");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}


正在加载...
取消
保存