Преглед изворни кода

Merge branch '西昌分支' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 西昌分支

西昌缴费二期
ndbs пре 2 година
родитељ
комит
731a6194d3
4 измењених фајлова са 69 додато и 0 уклоњено
  1. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs
  2. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanBLL.cs
  3. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanIBLL.cs
  4. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs Прегледај датотеку

@@ -121,6 +121,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[AjaxOnly]
public ActionResult Generate(string keyValue)
{
if (!exam_ExamPlanIBLL.IsGenerate(keyValue))
{
return Fail("请先安排考试!");
}

exam_ExamPlanIBLL.Generate(keyValue);
return Success("生成成功!");
}


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanBLL.cs Прегледај датотеку

@@ -131,6 +131,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public bool IsGenerate(string keyValue)
{
try
{
return exam_ExamPlanService.IsGenerate(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanIBLL.cs Прегледај датотеку

@@ -39,6 +39,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

void ClearGenerate(string keyValue, int type);
void Generate(string keyValue);
bool IsGenerate(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs Прегледај датотеку

@@ -206,7 +206,50 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
}
}
}
/// <summary>
/// 是否可以生成排考名单
/// </summary>
/// <param name="keyValue">排考记录主表Id</param>
public bool IsGenerate(string keyValue)
{
var db = this.BaseRepository("CollegeMIS");
try
{
db.BeginTrans();
//排考记录表
var examPlan = db.FindEntity<Exam_ExamPlanEntity>(keyValue);
//排考安排课程已审核的数据
var planLessonData = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == keyValue && x.ELCheckMark == true);
if (planLessonData.Count() <= 0)
{
return false;
}

foreach (var planLesson in planLessonData)
{
var planClassData = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanClassEntity>(x => x.EPLId == planLesson.EPLId);
var planRoomData = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == planLesson.EPLId);
if (planClassData.Count() <= 0 || planRoomData.Count() <= 0)
{
return false;
}
}

return true;
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 生成排考名单
/// </summary>
@@ -337,6 +380,7 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
}
}
}

/// <summary>
/// 生成随机数组
/// </summary>


Loading…
Откажи
Сачувај