@@ -85,35 +85,52 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
} | |||
/// <summary> | |||
/// 生成学籍 | |||
/// 录取 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexStatus() | |||
public ActionResult IndexEnroll() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 录取 | |||
/// 生成二维码 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexEnroll() | |||
public ActionResult QRCode() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 生成二维码 | |||
/// 分班--选择班级 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult QRCode() | |||
public ActionResult ClassForm() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 生成学籍 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexGenerate() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 生成学籍--编辑 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormGenerate() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -200,6 +217,47 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
stuVolunteerIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 分班 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="ClassNo">班级</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveClassForm(string keyValue, string ClassNo) | |||
{ | |||
stuVolunteerIBLL.SaveClassForm(keyValue, ClassNo); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 分班-审核 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="ClassStatus">审核状态</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult CheckForm(string keyValue, int ClassStatus) | |||
{ | |||
stuVolunteerIBLL.CheckForm(keyValue, ClassStatus); | |||
return Success("审核成功!"); | |||
} | |||
/// <summary> | |||
/// 生成学籍 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult GenerateStu() | |||
{ | |||
stuVolunteerIBLL.GenerateStu(); | |||
return Success("生成成功!"); | |||
} | |||
#endregion | |||
@@ -270,7 +328,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult SubmitForm(string keyValue, string strEntity) | |||
{ | |||
StuVolunteerEntity entity = strEntity.ToObject<StuVolunteerEntity>(); | |||
stuVolunteerIBLL.SaveEntity(keyValue, entity); | |||
return Success("提交成功!"); | |||
} | |||
@@ -0,0 +1,11 @@ | |||
@{ | |||
ViewBag.Title = "分班"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteer/ClassForm.js") |
@@ -0,0 +1,52 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-12-16 10:14 | |||
* 描 述:长阳迎新 | |||
*/ | |||
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 () { | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/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 data = $('body').lrGetFormData(); | |||
var postData = { | |||
ClassNo: data.ClassNo | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/SaveClassForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,79 @@ | |||
@{ | |||
ViewBag.Title = "生成学籍--编辑"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">学生姓名<font face="宋体">*</font></div> | |||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">性别<font face="宋体">*</font></div> | |||
<div id="Sex" isvalid="yes" class="form-control" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">学号</div> | |||
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">学籍号</div> | |||
<input id="StuCode" type="text" class="form-control" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">县区名称<font face="宋体">*</font></div> | |||
<input id="Address" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">毕业学校<font face="宋体">*</font></div> | |||
<input id="BySchool" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">初中学号<font face="宋体">*</font></div> | |||
<input id="H_SchoolNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">报名号<font face="宋体">*</font></div> | |||
<input id="ApplyNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">中考总分<font face="宋体">*</font></div> | |||
<input id="StuScore" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">身份证号<font face="宋体">*</font></div> | |||
<input id="CardNo" type="text" class="form-control" isvalid="yes" checkexpession="IDCard" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">录取意向(本校)<font face="宋体">*</font></div> | |||
<div id="IsCYSchool" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">第一意向</div> | |||
<div id="MajorOne" isvalid="yes" class="form-control" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">第二意向</div> | |||
<div id="MajorTwo" class="form-control"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">第三意向</div> | |||
<div id="MajorThree" class="form-control"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">是否服从安排</div> | |||
<div id="IsPlan" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo" class="form-control"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo" class="form-control"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Demo" class="form-control" style="height: 100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteer/FormGenerate.js") |
@@ -0,0 +1,59 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-12-16 10:14 | |||
* 描 述:长阳迎新 | |||
*/ | |||
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 () { | |||
$('#IsCYSchool').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#IsPlan').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#Sex').lrDataItemSelect({ code: 'usersex' }); | |||
$('#MajorOne').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
$('#MajorThree').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
$('#MajorTwo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/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/StuVolunteer/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -2,7 +2,7 @@ | |||
ViewBag.Title = "长阳迎新"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
@@ -11,20 +11,24 @@ | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">县区名称</div> | |||
<input id="Address" type="text" class="form-control" /> | |||
<div class="lr-form-item-title">学生姓名</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">毕业学校</div> | |||
<input id="BySchool" type="text" class="form-control" /> | |||
<div class="lr-form-item-title">第一意向</div> | |||
<div id="MajorOne"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学生姓名</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">第二意向</div> | |||
<div id="MajorTwo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">第三意向</div> | |||
<div id="MajorThree"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Sex"></div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -35,9 +39,7 @@ | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_enroll" class="btn btn-default"><i class="fa fa-plus"></i> 录取</a> | |||
<a id="lr_cancel" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 取消录取</a> | |||
@*<a id="lr_cancel" class="btn btn-default"><i class="fa fa-plus"></i> 生成学籍</a>*@ | |||
<a id="lr_divide" class="btn btn-default"><i class="fa fa-plus"></i> 分班</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -17,57 +17,43 @@ var bootstrap = function ($, learun) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#Sex').lrDataItemSelect({ code: 'usersex' }); | |||
$('#MajorOne').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
$('#MajorTwo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
$('#MajorThree').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 录取 | |||
$('#lr_enroll').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认录取选中项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/EnrollForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 取消录取 | |||
$('#lr_cancel').on('click', function () { | |||
//分班--选择班级 | |||
$('#lr_divide').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认取消录取选中项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/CancelForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
//审核分班状态 | |||
var ClassStatus = $('#gridtable').jfGridValue('ClassStatus'); | |||
if (ClassStatus.indexOf('1') != -1) { | |||
learun.alert.warning("选中记录包含审核通过的数据!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'classform', | |||
title: '选择班级', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/ClassForm?keyValue=' + keyValue, | |||
width: 400, | |||
height: 300, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetPageList', | |||
headData: [ | |||
//{ | |||
// label: "是否录取", name: "IsEnroll", width: 80, align: "left", | |||
// formatter: function (cellvalue) { | |||
// return cellvalue == true ? "<span class=\"label label-success\">是</span>" : | |||
// "<span class=\"label label-danger\">否</span>"; | |||
// } | |||
//}, | |||
{ | |||
label: "录取意向(本校)", name: "IsCYSchool", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "<span class=\"label label-success\">是</span>" : | |||
"<span class=\"label label-danger\">否</span>"; | |||
} | |||
}, | |||
{ label: "中考总分", name: "StuScore", width: 100, align: "left" }, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "Sex", width: 80, align: "left", | |||
@@ -81,31 +67,79 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ label: "中考总分", name: "StuScore", width: 100, align: "left" }, | |||
{ label: "身份证号", name: "CardNo", width: 150, align: "left" }, | |||
{ label: "县区名称", name: "Address", width: 150, align: "left" }, | |||
{ label: "毕业学校", name: "BySchool", width: 150, align: "left" }, | |||
{ label: "初中学号", name: "H_SchoolNo", width: 150, align: "left" }, | |||
{ label: "报名号", name: "ApplyNo", width: 150, align: "left" }, | |||
{ label: "第一志愿", name: "FirstVolunteer", width: 120, align: "left" }, | |||
{ label: "第二志愿", name: "SecondVolunteer", width: 120, align: "left" }, | |||
{ label: "第三志愿", name: "ThirdVolunteer", width: 120, align: "left" }, | |||
{ label: "第四志愿", name: "FouthVolunteer", width: 120, align: "left" }, | |||
{ label: "第五志愿", name: "FifthVolunteer", width: 120, align: "left" }, | |||
{ label: "第六志愿", name: "SixthVolunteer", width: 120, align: "left" }, | |||
{ label: "第七志愿", name: "SeventhVolunteer", width: 120, align: "left" }, | |||
{ label: "第八志愿", name: "EighthVolunteer", width: 120, align: "left" }, | |||
{ label: "第九志愿", name: "NinthVolunteer", width: 120, align: "left" }, | |||
{ | |||
label: "第一意向", name: "MajorOne", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "第二意向", name: "MajorTwo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "第三意向", name: "MajorThree", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "ClassNo", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "审核状态", name: "ClassStatus", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<span class=\"label label-success\">审核通过</span>" : | |||
cellvalue == 0 ? "<span class=\"label label-danger\">待审核</span>" : ""; | |||
} | |||
}, | |||
{ label: "学号", name: "StuNo", width: 150, align: "left" }, | |||
{ label: "备注", name: "Demo", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
isMultiselect: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = " and IsEnroll=1 and EnrollStatus=1"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -0,0 +1,69 @@ | |||
@{ | |||
ViewBag.Title = "生成学籍"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学生姓名</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学号</div> | |||
<input id="StuNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学籍号</div> | |||
<input id="StuCode" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">分班审核</div> | |||
<select id="ClassStatus"> | |||
<option value="">==请选择==</option> | |||
<option value="1">审核通过</option> | |||
<option value="0">待审核</option> | |||
</select> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学籍状态</div> | |||
<select id="StuCodeStatus"> | |||
<option value="">==请选择==</option> | |||
<option value="1">已生成</option> | |||
<option value="0">未生成</option> | |||
</select> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 审核</a> | |||
<a id="lr_nocheck" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 去审核</a> | |||
<a id="lr_stuCode" class="btn btn-default"><i class="fa fa-plus"></i> 生成学籍</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteer/IndexGenerate.js") |
@@ -0,0 +1,182 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-12-16 10:14 | |||
* 描 述:长阳迎新 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 审核 | |||
$('#lr_check').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
//审核分班状态 | |||
var ClassStatus = $('#gridtable').jfGridValue('ClassStatus'); | |||
if (ClassStatus.indexOf('1') != -1) { | |||
learun.alert.warning("选中记录包含审核通过的数据!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认审核选中记录!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/CheckForm', { keyValue: keyValue, ClassStatus: 1 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 去审核 | |||
$('#lr_nocheck').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
//审核分班状态 | |||
var ClassStatus = $('#gridtable').jfGridValue('ClassStatus'); | |||
if (ClassStatus.indexOf('0') != -1) { | |||
learun.alert.warning("选中记录包含待审核的数据!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认去审选中记录!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/CheckForm', { keyValue: keyValue, ClassStatus: 0 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||
return; | |||
} | |||
var ClassStatus = $('#gridtable').jfGridValue('ClassStatus'); | |||
if (ClassStatus == '1') { | |||
learun.alert.warning("选中项已审核,不可编辑!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/FormGenerate?keyValue=' + keyValue, | |||
width: 820, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 生成学籍 | |||
$('#lr_stuCode').on('click', function () { | |||
learun.layerConfirm('是否确认生成学籍!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GenerateStu', { }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetPageList', | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 150, align: "left" }, | |||
{ label: "学籍号", name: "StuCode", width: 150, align: "left" }, | |||
{ | |||
label: "学籍状态", name: "StuCodeStatus", width: 80, align: "left", | |||
formatter: function (value) { | |||
return value == '1' ? "<span class=\"label label-success\">已生成</span>" : | |||
"<span class=\"label label-danger\">未生成</span>"; | |||
} | |||
}, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "Sex", width: 80, align: "left", | |||
formatter: function (value) { | |||
return value == '1' ? "男" : value == '0' ? "女" : ""; | |||
} | |||
}, | |||
{ label: "中考总分", name: "StuScore", width: 100, align: "left" }, | |||
{ label: "身份证号", name: "CardNo", width: 150, align: "left" }, | |||
{ | |||
label: "专业", name: "MajorNo", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "ClassNo", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "审核状态", name: "ClassStatus", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<span class=\"label label-success\">审核通过</span>" : | |||
cellvalue == 0 ? "<span class=\"label label-danger\">待审核</span>" : ""; | |||
} | |||
}, | |||
{ label: "备注", name: "Demo", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
isMultiselect: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = " and ClassNo is not null "; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -1,48 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "长阳迎新"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">县区名称</div> | |||
<input id="Address" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">毕业学校</div> | |||
<input id="BySchool" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学生姓名</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Sex"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_enroll" class="btn btn-default"><i class="fa fa-plus"></i> 录取学生</a> | |||
<a id="lr_cancel" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 取消录取</a> | |||
@*<a id="lr_cancel" class="btn btn-default"><i clakcsss="fa fa-plus"></i> 生成学籍</a>*@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteer/IndexStatus.js") |
@@ -1,116 +0,0 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-12-16 10:14 | |||
* 描 述:长阳迎新 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#Sex').lrDataItemSelect({ code: 'usersex' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 录取 | |||
$('#lr_enroll').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认录取选中项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/EnrollForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 取消录取 | |||
$('#lr_cancel').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认取消录取选中项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/CancelForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetPageList', | |||
headData: [ | |||
//{ | |||
// label: "是否录取", name: "IsEnroll", width: 80, align: "left", | |||
// formatter: function (cellvalue) { | |||
// return cellvalue == true ? "<span class=\"label label-success\">是</span>" : | |||
// "<span class=\"label label-danger\">否</span>"; | |||
// } | |||
//}, | |||
{ | |||
label: "录取意向(本校)", name: "IsCYSchool", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "<span class=\"label label-success\">是</span>" : | |||
"<span class=\"label label-danger\">否</span>"; | |||
} | |||
}, | |||
{ label: "中考总分", name: "StuScore", width: 100, align: "left" }, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "Sex", width: 80, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'usersex', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "身份证号", name: "CardNo", width: 150, align: "left" }, | |||
{ label: "县区名称", name: "Address", width: 150, align: "left" }, | |||
{ label: "毕业学校", name: "BySchool", width: 150, align: "left" }, | |||
{ label: "初中学号", name: "H_SchoolNo", width: 150, align: "left" }, | |||
{ label: "报名号", name: "ApplyNo", width: 150, align: "left" }, | |||
{ label: "第一志愿", name: "FirstVolunteer", width: 120, align: "left" }, | |||
{ label: "第二志愿", name: "SecondVolunteer", width: 120, align: "left" }, | |||
{ label: "第三志愿", name: "ThirdVolunteer", width: 120, align: "left" }, | |||
{ label: "第四志愿", name: "FouthVolunteer", width: 120, align: "left" }, | |||
{ label: "第五志愿", name: "FifthVolunteer", width: 120, align: "left" }, | |||
{ label: "第六志愿", name: "SixthVolunteer", width: 120, align: "left" }, | |||
{ label: "第七志愿", name: "SeventhVolunteer", width: 120, align: "left" }, | |||
{ label: "第八志愿", name: "EighthVolunteer", width: 120, align: "left" }, | |||
{ label: "第九志愿", name: "NinthVolunteer", width: 120, align: "left" }, | |||
{ label: "备注", name: "Demo", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
isMultiselect: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -1,4 +1,4 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||
<PropertyGroup> | |||
@@ -1092,14 +1092,16 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\ScoreQueryAllIndexTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\ScoreQueryAllIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteerPhone\server.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\FormGenerate.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\ClassForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\FormSchool.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexAccount.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexGenerate.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexDivide.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexEnroll.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexLabel.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexStatus.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Form.js" /> | |||
@@ -7502,7 +7504,6 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexDivide.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexEnroll.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexLabel.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexStatus.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteerPhone\FormApply.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteerPhone\Link.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteerPhone\QRCode.cshtml" /> | |||
@@ -7512,6 +7513,9 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Form.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\FormView.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\ClassForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexGenerate.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\FormGenerate.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -119,6 +119,70 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 分班 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="ClassNo"></param> | |||
public void SaveClassForm(string keyValue, string ClassNo) | |||
{ | |||
try | |||
{ | |||
stuVolunteerService.SaveClassForm(keyValue, ClassNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void CheckForm(string keyValue,int ClassStatus) | |||
{ | |||
try | |||
{ | |||
stuVolunteerService.CheckForm(keyValue, ClassStatus); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 生成学籍 | |||
/// </summary> | |||
public void GenerateStu() | |||
{ | |||
try | |||
{ | |||
stuVolunteerService.GenerateStu(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
@@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("STUCODE")] | |||
public string StuCode { get; set; } | |||
/// <summary> | |||
/// 学籍状态 | |||
/// </summary> | |||
[Column("STUCODESTATUS")] | |||
public int? StuCodeStatus { get; set; } | |||
/// <summary> | |||
/// 毕业学校 | |||
/// </summary> | |||
[Column("BYSCHOOL")] | |||
@@ -185,17 +190,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("STUNO")] | |||
public string StuNo { get; set; } | |||
/// <summary> | |||
/// 专业一 | |||
/// 第一意向 | |||
/// </summary> | |||
[Column("MAJORONE")] | |||
public string MajorOne { get; set; } | |||
/// <summary> | |||
/// 专业二 | |||
/// 第二意向 | |||
/// </summary> | |||
[Column("MAJORTWO")] | |||
public string MajorTwo { get; set; } | |||
/// <summary> | |||
/// 专业三 | |||
/// 第三意向 | |||
/// </summary> | |||
[Column("MAJORTHREE")] | |||
public string MajorThree { get; set; } | |||
@@ -204,6 +209,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[Column("CLASSNO")] | |||
public string ClassNo { get; set; } | |||
/// <summary> | |||
/// 班级--分班审核状态 | |||
/// </summary> | |||
[Column("CLASSSTATUS")] | |||
public int? ClassStatus { get; set; } | |||
///// <summary> | |||
///// 是否提交专业 | |||
///// </summary> | |||
@@ -42,6 +42,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, StuVolunteerEntity entity); | |||
/// <summary> | |||
/// 分班 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="ClassNo"></param> | |||
void SaveClassForm(string keyValue, string ClassNo); | |||
void CheckForm(string keyValue, int ClassStatus); | |||
void GenerateStu(); | |||
#endregion | |||
#region 扩展数据 | |||
@@ -32,7 +32,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" * "); | |||
strSql.Append(@" t.* "); | |||
strSql.Append(" FROM StuVolunteer t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
@@ -53,6 +53,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuName Like @StuName "); | |||
} | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuNo Like @StuNo "); | |||
} | |||
if (!queryParam["StuCode"].IsEmpty()) | |||
{ | |||
dp.Add("StuCode", "%" + queryParam["StuCode"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuCode Like @StuCode "); | |||
} | |||
if (!queryParam["Sex"].IsEmpty()) | |||
{ | |||
dp.Add("Sex", queryParam["Sex"].ToString(), DbType.String); | |||
@@ -63,6 +73,41 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("CardNo", queryParam["CardNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.CardNo = @CardNo "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ClassNo = @ClassNo "); | |||
} | |||
if (!queryParam["ClassStatus"].IsEmpty()) | |||
{ | |||
dp.Add("ClassStatus", queryParam["ClassStatus"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ClassStatus = @ClassStatus "); | |||
} | |||
if (!queryParam["StuCodeStatus"].IsEmpty()) | |||
{ | |||
dp.Add("StuCodeStatus", queryParam["StuCodeStatus"].ToString(), DbType.String); | |||
strSql.Append(" AND t.StuCodeStatus = @StuCodeStatus "); | |||
} | |||
if (!queryParam["MajorOne"].IsEmpty()) | |||
{ | |||
dp.Add("MajorOne", queryParam["MajorOne"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorOne = @MajorOne "); | |||
} | |||
if (!queryParam["MajorTwo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorTwo", queryParam["MajorTwo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorTwo = @MajorTwo "); | |||
} | |||
if (!queryParam["MajorThree"].IsEmpty()) | |||
{ | |||
dp.Add("MajorThree", queryParam["MajorThree"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorThree = @MajorThree "); | |||
} | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<StuVolunteerEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -171,6 +216,132 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 分班 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="ClassNo"></param> | |||
public void SaveClassForm(string keyValue, string ClassNo) | |||
{ | |||
try | |||
{ | |||
var classinfo = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == ClassNo); | |||
if (classinfo != null) | |||
{ | |||
var arr = keyValue.Split(',').ToList(); | |||
foreach (var id in arr) | |||
{ | |||
var stuNo = GetStuNo(); | |||
string sql = $"update StuVolunteer set StuNo='{stuNo}' ,ClassNo='{ClassNo}', DeptNo='{classinfo.DeptNo}',MajorNo='{classinfo.MajorNo}',ClassStatus=0 where ID='{id}' and (StuNo is null or len(StuNo)=0); update StuVolunteer set ClassNo='{ClassNo}', DeptNo='{classinfo.DeptNo}',MajorNo='{classinfo.MajorNo}',ClassStatus=0 where ID='{id}' and (StuNo is not null or len(StuNo)>0)"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 审核分班 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="ClassStatus">分班是否审核通过</param> | |||
public void CheckForm(string keyValue, int ClassStatus) | |||
{ | |||
try | |||
{ | |||
if (keyValue.Contains(",")) | |||
{ | |||
keyValue = string.Join("','", keyValue.Split(',')); | |||
} | |||
string sql = $"update StuVolunteer set ClassStatus={ClassStatus} where ID in ('{keyValue}')"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取学号 | |||
/// </summary> | |||
/// <returns></returns> | |||
private string GetStuNo() | |||
{ | |||
//当前学年 | |||
var year = Common.GetSemesterAndYear().AcademicYearShort.Substring(0, 2); | |||
var StuNo = year + "36442000004"; | |||
var maxSql = $"select Max(StuNo) as StuNo from StuVolunteer where StuNo like '{StuNo}%'"; | |||
var maxStuNo = this.BaseRepository("CollegeMIS").FindObject(maxSql); | |||
if (maxStuNo == null || string.IsNullOrEmpty(maxStuNo.ToString())) | |||
{ | |||
StuNo = StuNo + "00001"; | |||
} | |||
else | |||
{ | |||
int lastNum = int.Parse(maxStuNo.ToString().Substring(maxStuNo.ToString().Length - 5, 5)); | |||
lastNum++; | |||
StuNo = StuNo + lastNum.ToString("00000"); | |||
} | |||
return StuNo; | |||
} | |||
/// <summary> | |||
/// 生成学籍 | |||
/// </summary> | |||
public void GenerateStu() | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
//只生成分班审核通过 | |||
string updSql = $"update [dbo].[StuVolunteer] set StuCode='G'+CardNo, StuCodeStatus=1 where ClassStatus=1"; | |||
db.ExecuteBySql(updSql); | |||
string addSql = @"insert into StuInfoBasic ( | |||
Stuid,StuNo,StuCode,ClassNo,StuName,GenderNo,DeptNo,MajorNo,IdentityCardNo,ExamScore | |||
) | |||
select newid(),StuNo,'G'+CardNo,ClassNo,StuName,Sex,DeptNo,MajorNo,CardNo,StuScore | |||
from StuVolunteer t where t.ClassStatus=1 | |||
and t.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=t.StuNo) "; | |||
db.ExecuteBySql(updSql); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展代码 | |||
@@ -407,7 +578,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取StuVolunteer表实体数据 | |||