Sfoglia il codice sorgente

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

西昌缴费二期
dyy 2 anni fa
parent
commit
da0d761dae
11 ha cambiato i file con 299 aggiunte e 83 eliminazioni
  1. +36
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js
  3. +0
    -71
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.js
  4. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.cshtml
  5. +83
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js
  6. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml
  7. +22
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js
  8. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  9. +57
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonBLL.cs
  10. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonIBLL.cs
  11. +90
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs

+ 36
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs Vedi File

@@ -38,11 +38,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return View();
}
/// <summary>
/// 导入
/// 导入/清空数据
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormImport()
public ActionResult FormYearSemester()
{
return View();
}
@@ -104,6 +104,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
exam_ExamLessonIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}

/// <summary>
/// 导入开课计划
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Import(string AcademicYearNo, string Semester)
{
int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester);
return Success("导入" + res + "条数据!");
}
/// <summary>
/// 按条件清空数据
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteWhere(string AcademicYearNo, string Semester)
{
int res = exam_ExamLessonIBLL.DeleteWhere(AcademicYearNo, Semester);
return Success("清空" + res + "条数据!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
@@ -116,6 +139,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
Exam_ExamLessonEntity entity = strEntity.ToObject<Exam_ExamLessonEntity>();
//判断课程编号有无重复
var model = exam_ExamLessonIBLL.GetEntityByLessonNo(entity.LessonNo,entity.AcademicYearNo,entity.Semester);
if (model != null && string.IsNullOrEmpty(keyValue))
{
return Fail("课程编号重复!");
}
else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ELId)
{
return Fail("课程编号重复!");
}

exam_ExamLessonIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js Vedi File

@@ -30,7 +30,7 @@ var bootstrap = function ($, learun) {
value: 'value',
text: 'text'
});
$('#ELEnabled').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoBit',
@@ -41,7 +41,7 @@ var bootstrap = function ($, learun) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);


+ 0
- 71
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.js Vedi File

@@ -1,71 +0,0 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text',
maxHeight: 200,
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#ELEnabled').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoBit',
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.cshtml → Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.cshtml Vedi File

@@ -12,4 +12,4 @@
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.js")
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js")

+ 83
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js Vedi File

@@ -0,0 +1,83 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
var acceptClick;
var type = request('type');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
//page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text',
maxHeight: 200,
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});

},
initData: function () {
//if (!!keyValue) {
// $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) {
// for (var id in data) {
// if (!!data[id].length && data[id].length > 0) {
// $('#' + id ).jfGridSet('refreshdata', data[id]);
// }
// else {
// $('[data-table="' + id + '"]').lrSetFormData(data[id]);
// }
// }
// });
//}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
AcademicYearNo: $('#AcademicYearNo').lrselectGet(),
Semester: $('#Semester').lrselectGet()
};
//从开课计划导入
if (type == 1) {
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Import', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
} else if (type == 2) {
//按条件清空数据
learun.layerConfirm('是否确认清空!', function (res) {
if (res) {
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/DeleteWhere', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
}
});
}
};
page.init();
}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml Vedi File

@@ -45,6 +45,7 @@
</div>
<div class=" btn-group btn-group-sm">
<a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;从开课计划导入</a>
<a id="lr_emptyWhere" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;按条件清空数据</a>
</div>
</div>
</div>


+ 22
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js Vedi File

@@ -50,6 +50,10 @@ var bootstrap = function ($, learun) {
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ELId');
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return false;
}
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
@@ -69,7 +73,7 @@ var bootstrap = function ($, learun) {
learun.layerForm({
id: 'form_import',
title: '导入',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormImport',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormYearSemester?type=1',
width: 500,
height: 300,
btn: ['一键导入', '关闭'],
@@ -78,6 +82,21 @@ var bootstrap = function ($, learun) {
}
});
});
// 按条件清空数据
$('#lr_emptyWhere').on('click', function () {
learun.layerForm({
id: 'form_empty',
title: '清空数据',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormYearSemester?type=2',
width: 500,
height: 300,
btn: ['清空', '关闭'],
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ELId');
@@ -140,7 +159,7 @@ var bootstrap = function ($, learun) {
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{ label: "课程编号", name: "LessonNo", width: 100, align: "left" },
{ label: "课程名称", name: "LessonName", width: 100, align: "left" },
{ label: "课程名称", name: "LessonName", width: 200, align: "left" },
//{ label: "排序号", name: "ELOrder", width: 100, align: "left" },
{
label: "是否启用", name: "ELEnabled", width: 100, align: "left",
@@ -152,8 +171,7 @@ var bootstrap = function ($, learun) {
mainId: 'ELId',
isMultiselect: true,
isPage: true,
sidx: 'ELOrder',
sord: 'ASC'
sidx: 'AcademicYearNo desc,Semester desc,ELOrder asc'
});
page.search();
},


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Vedi File

@@ -991,7 +991,7 @@
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormImport.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.js" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormPeople.js" />
@@ -7613,7 +7613,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwo.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScore\AllStuScoreQueryIndex.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\TimeTable\ClassIndexInEducation.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormImport.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 57
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonBLL.cs Vedi File

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

public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo, string AcademicYearNo, int? Semester)
{
try
{
return exam_ExamLessonService.GetEntityByLessonNo(lessonNo, AcademicYearNo, Semester);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据
@@ -143,6 +162,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public int Import(string AcademicYearNo, string Semester)
{
try
{
return exam_ExamLessonService.Import(AcademicYearNo, Semester);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


public int DeleteWhere(string AcademicYearNo, string Semester)
{
try
{
return exam_ExamLessonService.DeleteWhere(AcademicYearNo, Semester);
}
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_ExamLesson/Exam_ExamLessonIBLL.cs Vedi File

@@ -27,6 +27,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <returns></returns>
Exam_ExamLessonEntity GetExam_ExamLessonEntity(string keyValue);
Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo,string AcademicYearNo, int? Semester);
#endregion

#region 提交数据
@@ -48,6 +49,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, Exam_ExamLessonEntity entity);

int Import(string AcademicYearNo, string Semester);
int DeleteWhere(string AcademicYearNo, string Semester);

#endregion

}


+ 90
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs Vedi File

@@ -104,6 +104,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取Exam_ExamLesson表实体数据
/// </summary>
/// <param name="lessonNo"></param>
/// <returns></returns>
public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo, string AcademicYearNo, int? Semester)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamLessonEntity>(x => x.LessonNo == lessonNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据
@@ -116,7 +139,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
this.BaseRepository("CollegeMIS").Delete<Exam_ExamLessonEntity>(t => t.ELId == keyValue);
if (keyValue.Contains(","))
{
keyValue = string.Join("','", keyValue.Split(','));
}

string sql = $"delete Exam_ExamLesson where ELId in ('{keyValue}')";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
@@ -194,6 +223,66 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 导入
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <returns></returns>
public int Import(string AcademicYearNo, string Semester)
{
try
{
string sql = $@"insert into Exam_ExamLesson([ELId]
,[AcademicYearNo]
,[Semester]
,[LessonName]
,[LessonNo]
,[ELOrder]
,[ELEnabled])
select NEWID(),AcademicYearNo,Semester,LessonName,[LessonNo],0,1 from OpenLessonPlan where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}'
and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' )
";
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 清空数据
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <returns></returns>
public int DeleteWhere(string AcademicYearNo, string Semester)
{
try
{
string sql = $"delete Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}'";
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}


Caricamento…
Annulla
Salva