Explorar el Código

Merge branch '长阳分支中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 长阳分支中职

长阳分支推送专用
ndbs hace 2 años
padre
commit
5470f7daf0
Se han modificado 6 ficheros con 117 adiciones y 14 borrados
  1. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/CreateGraduateNo.cshtml
  3. +24
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/CreateGraduateNo.js
  4. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs
  5. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs
  6. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs

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

@@ -593,6 +593,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
stuInfoBasicIBLL.CreateGraduateNoByMajor(CityCode, SchoolCode, MajorList);
return Success("生成成功");
}
/// <summary>
/// 按学号生成毕业证号
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DoCreateGraduateNo()
{
stuInfoBasicIBLL.DoCreateGraduateNo();
return Success("生成成功");
}

/// <summary>
/// 审核


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/CreateGraduateNo.cshtml Ver fichero

@@ -47,7 +47,7 @@
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm">
<a id="lr_create" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;生成毕业证</a>
<a id="lr_create" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;生成毕业证</a>
</div>
</div>
</div>


+ 24
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/CreateGraduateNo.js Ver fichero

@@ -39,7 +39,7 @@ var bootstrap = function ($, learun) {
});
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
$('#FinishSchoolMark').lrselect({
data: [{ text: "准许毕业", value: "1" }, { text: "待准许", value: "0" }],
data: [{ text: "已毕业", value: "2" }, { text: "准许毕业", value: "1" }, { text: "待准许", value: "0" }],
text: "text",
value: "value"
})
@@ -47,26 +47,37 @@ var bootstrap = function ($, learun) {
$('#lr_refresh').on('click', function () {
location.reload();
});
//生成毕业证【按专业进行排序】
//$('#lr_create').on('click', function () {
// learun.layerForm({
// id: 'form',
// title: '生成毕业证',
// url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/CreateGraduateNoForm',
// width: 800,
// height: 600,
// callBack: function (id) {
// return top[id].acceptClick(refreshGirdData);
// }
// });
//})
//生成毕业证【按学号排序】
$('#lr_create').on('click', function () {
learun.layerForm({
id: 'form',
title: '生成毕业证',
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/CreateGraduateNoForm',
width: 800,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
learun.layerConfirm('1.毕业证号的生成规则:年份两位(22)+学校编码十位(3642000004)+顺序号四位(0001)组成; <br> 2.此次操作仅对毕业状态为“准许毕业”和“已毕业”的学生进行操作; <br> 3.生成毕业证号后不可撤消,请谨慎操作!<br>', function (res) {
if (res) {
learun.httpAsync('post', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/DoCreateGraduateNo', {}, function () {
refreshGirdData();
});
}
});
})

},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
headData: [
{ label: "学号", name: "StuNo", width: 100, align: "left" },
{ label: "学号", name: "StuNo", width: 150, align: "left" },
{ label: "姓名", name: "StuName", width: 100, align: "left" },
{
label: "性别", name: "GenderNo", width: 80, align: "left",
@@ -139,12 +150,12 @@ var bootstrap = function ($, learun) {
}
}
},
{ label: "毕业证", name: "DiplomaNo", width: 100, align: "left" },
{ label: "毕业时间", name: "FinishSchoolDate", width: 100, align: "left" },
{ label: "毕业证号", name: "DiplomaNo", width: 100, align: "left" },
],
mainId: 'StuId',
isPage: true,
isMultiselect: true,
isMultiselect: false,
});
page.search();


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

@@ -109,6 +109,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

/// <summary>
/// 获取StuInfoBasic表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DoCreateGraduateNo()
{
try
{
stuInfoBasicService.DoCreateGraduateNo();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取StuInfoBasic表实体数据
/// <param name="keyValue">主键</param>


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

@@ -29,6 +29,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
StuInfoBasicEntity GetStuInfoBasicEntity(string keyValue);
List<CdMajorEntity> GetMajorInfoWithGraduation();
void CreateGraduateNoByMajor(string CityCode,string SchoolCode,string MajorList);

/// <summary>
/// 获取StuInfoBasic表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void DoCreateGraduateNo();
StuInfoBasicEntity GetStuNoByAccount(string keyValue);

List<string> GetSaveClassStudents(string account);


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

@@ -389,6 +389,56 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

/// <summary>
/// 获取StuInfoBasic表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DoCreateGraduateNo()
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
//年份
var year = DateTime.Now.Year.ToString().Substring(2, 2);
//学校编码十位
var schoolCode = "3642000004";
//顺序号四位
var numberCode = 1;

//获取最大的序号
var DiplomaNoList = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(x => x.DiplomaNo.Contains(year + schoolCode)).Select(x => x.DiplomaNo).ToList();
if (DiplomaNoList.Any())
{
numberCode = DiplomaNoList.Max(x => x).Substring(12,4).ToInt()+1;
}

//获取所有要毕业的学生按年级查询出来,再按学号进行由小到大排序,
var stuList = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(x => (x.FinishSchoolMark == "1" || x.FinishSchoolMark == "2") && (x.DiplomaNo == null || x.DiplomaNo == "")).OrderBy(x=>x.Grade).ThenBy(x=>x.StuNo);
foreach (var item in stuList)
{
item.DiplomaNo = year + schoolCode + numberCode.ToString().PadLeft(4, '0');
db.Update(item);

numberCode++;
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取StuInfoBasic表实体数据
/// <param name="keyValue">主键</param>


Cargando…
Cancelar
Guardar