Ver código fonte

学籍管理增加同步系专业功能

新疆影视学院高职
liangkun 3 anos atrás
pai
commit
7edc0d1573
6 arquivos alterados com 121 adições e 0 exclusões
  1. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs
  2. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml
  3. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js
  4. +38
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs
  5. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs
  6. +52
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs

+ 15
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs Ver arquivo

@@ -522,6 +522,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
stuInfoBasicIBLL.SynPhoto();
return Success("同步成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult SyncDept()
{
stuInfoBasicIBLL.SyncDept();
return Success("同步成功");
}
[HttpPost]
[AjaxOnly]
public ActionResult SyncMajor()
{
stuInfoBasicIBLL.SyncMajor();
return Success("同步成功");
}
#endregion
}
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml Ver arquivo

@@ -53,6 +53,8 @@
<a id="lr_searchChange" class="btn btn-default"><i class="fa fa-search"></i>&nbsp;查看异动</a>
<a id="lr_photo" class="btn btn-default"><i class="fa fa-search"></i>&nbsp;拍照</a>
<a id="lr_printInfo" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;学生简历表</a>
<a id="lr_syn" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 同步系部</a>
<a id="lr_synmajor" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 同步专业</a>

</div>
</div>


+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js Ver arquivo

@@ -216,6 +216,18 @@ var bootstrap = function ($, learun) {
});
}
});
// 同步系部
$('#lr_syn').on('click', function () {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SyncDept', function () {
refreshGirdData();
});
});
// 同步专业
$('#lr_synmajor').on('click', function () {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SyncMajor', function () {
refreshGirdData();
});
});

},
// 初始化列表


+ 38
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs Ver arquivo

@@ -315,6 +315,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public void SyncDept()
{
try
{
stuInfoBasicService.SyncDept();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void SyncMajor()
{
try
{
stuInfoBasicService.SyncMajor();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void UpdateAccount()
{
try


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs Ver arquivo

@@ -76,5 +76,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
bool GetAny();
IEnumerable<StuInfoBasicEntity> GetAllList();
IEnumerable<StuInfoBasicEntity> GetStuInfoByClassNo(string classNo);
void SyncDept();
void SyncMajor();
}
}

+ 52
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs Ver arquivo

@@ -868,5 +868,57 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
public void SyncDept()
{
try
{
var data = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>().ToList();
var majorList = this.BaseRepository("CollegeMIS").FindList<CdMajorEntity>().ToList();
foreach (var item in data)
{
var deptNo = majorList.FirstOrDefault(a => a.MajorNo == item.MajorNo)?.DeptNo;
item.DeptNo = deptNo;
this.BaseRepository("CollegeMIS").Update(item);

}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
public void SyncMajor()
{
try
{
var data = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>().ToList();
var classList = this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>().ToList();
foreach (var item in data)
{
var majorNo = classList.FirstOrDefault(a => a.ClassNo == item.ClassNo)?.MajorNo;
item.MajorNo = majorNo;
this.BaseRepository("CollegeMIS").Update(item);

}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
}
}

Carregando…
Cancelar
Salvar