@@ -0,0 +1,121 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Web.Mvc; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-06-18 11:19 | |||||
/// 描 述:MajorAndSubject | |||||
/// </summary> | |||||
public class MajorAndSubjectController : MvcControllerBase | |||||
{ | |||||
private MajorAndSubjectIBLL majorAndSubjectIBLL = new MajorAndSubjectBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetList( string queryJson ) | |||||
{ | |||||
var data = majorAndSubjectIBLL.GetList(queryJson); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取列表分页数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = majorAndSubjectIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var data = majorAndSubjectIBLL.GetEntity(keyValue); | |||||
return Success(data); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
majorAndSubjectIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue,MajorAndSubjectEntity entity) | |||||
{ | |||||
majorAndSubjectIBLL.SaveEntity(keyValue, entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -22,6 +22,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
private StuEnrollIBLL stuEnrollIBLL = new StuEnrollBLL(); | private StuEnrollIBLL stuEnrollIBLL = new StuEnrollBLL(); | ||||
private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | ||||
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | ||||
private StuEnrollScoreIBLL stuEnrollScoreIBLL = new StuEnrollScoreBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
@@ -34,6 +35,61 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 新生报名 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult EnrollForm() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 新生报名 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult EnrollFormView() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 新生报名 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult EnrollIndex() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 新生报名审核 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult EnrollSH() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 新生报名审核 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult EnrollLQ() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 招生统计 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult EnrollIndexTJ() | |||||
{ | |||||
return View(); | |||||
} | |||||
[HttpGet] | [HttpGet] | ||||
public ActionResult StudentStatus() | public ActionResult StudentStatus() | ||||
@@ -234,7 +290,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 招生统计 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetTJList( string queryJson) | |||||
{ | |||||
var data = stuEnrollIBLL.GetTJList(queryJson); | |||||
return Success(data); | |||||
} | |||||
[HttpGet] | [HttpGet] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetDormitorys(string pagination, string queryJson) | public ActionResult GetDormitorys(string pagination, string queryJson) | ||||
@@ -835,8 +902,53 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
return Success("同步成功"); | return Success("同步成功"); | ||||
} | } | ||||
/// <summary> | |||||
/// 审核页面 获取考试科目信息 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public ActionResult GetExamDataByStuId(string keyValue) | |||||
{ | |||||
var data= stuEnrollIBLL.GetExamDataByStuId(keyValue); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 报名审核 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public ActionResult UpdateEnrollStatus(string keyValue, string strEntity) | |||||
{ | |||||
//StuEnrollEntity entity = strEntity.ToObject<StuEnrollEntity>(); | |||||
//entity.EnrollStatus = 2; | |||||
stuEnrollIBLL.UpdateEnrollStatus(keyValue, 2); | |||||
return Success("保存成功"); | |||||
} | |||||
/// <summary> | |||||
/// 报名--去审核 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public ActionResult NoCheck(string keyValue) | |||||
{ | |||||
//StuEnrollEntity entity = new StuEnrollEntity(); | |||||
//entity.EnrollStatus = 0; | |||||
stuEnrollIBLL.UpdateEnrollStatus(keyValue, 0); | |||||
return Success("保存成功"); | |||||
} | |||||
/// <summary> | |||||
/// 录取 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public ActionResult Admission(string keyValue, int IsAdmission) | |||||
{ | |||||
var count= stuEnrollScoreIBLL.GetNoCheck(keyValue); | |||||
if (count > 0) | |||||
{ | |||||
return Fail("该学生有未审核的科目成绩"); | |||||
} | |||||
stuEnrollIBLL.Admission(keyValue, IsAdmission); | |||||
return Success("保存成功"); | |||||
} | |||||
#endregion | #endregion | ||||
@@ -0,0 +1,242 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.IO; | |||||
using System.Linq; | |||||
using System.Web.Mvc; | |||||
using Learun.Application.Base.SystemModule; | |||||
using Newtonsoft.Json; | |||||
using Hangfire; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
public class StuEnrollScoreController : MvcControllerBase | |||||
{ | |||||
private StuEnrollScoreIBLL stuEnrollScoreIBLL = new StuEnrollScoreBLL(); | |||||
#region 视图 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 新生录取管理 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult AdmissionIndex() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 新生录取管理 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult AdmissionForm() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetList(string queryJson) | |||||
{ | |||||
var data = stuEnrollScoreIBLL.GetList(queryJson); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取学生的成绩 | |||||
/// <summary> | |||||
/// <param name=""></param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetScoreListByStuId(string stuid) | |||||
{ | |||||
var data = stuEnrollScoreIBLL.GetScoreListByStuId(stuid); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取列表分页数据--新生录取管理 | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageListForAdmission(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = stuEnrollScoreIBLL.GetPageListForAdmission(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetEntityByJson(string queryJson) | |||||
{ | |||||
var data = stuEnrollScoreIBLL.GetEntityByJson(queryJson); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 学年 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetYearNoData() | |||||
{ | |||||
var data = stuEnrollScoreIBLL.GetYearNoData(); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 学科 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetSubjectData() | |||||
{ | |||||
var data = stuEnrollScoreIBLL.GetSubjectData(); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 专业 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetMajorData() | |||||
{ | |||||
var data = stuEnrollScoreIBLL.GetMajorData(); | |||||
return Success(data); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 开始录入:占用成绩 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult StartInputScore(string queryJson) | |||||
{ | |||||
var loginInfo = LoginUserInfo.Get(); | |||||
var name = loginInfo.account + "_" + loginInfo.realName + "_新生成绩录入"; | |||||
stuEnrollScoreIBLL.StartInputScore(queryJson); | |||||
////添加任务 | |||||
//var newDate = DateTime.Now.AddMinutes(30); | |||||
//RecurringJob.AddOrUpdate(name, | |||||
// () => SaveInputScoreStatus2(queryJson, name), | |||||
// string.Format("{0} {1} * * *", newDate.Minute, newDate.Hour), TimeZoneInfo.Local); | |||||
return Success("操作成功"); | |||||
} | |||||
/// <summary> | |||||
/// 提交成绩:取消占用【服务】 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public ActionResult SaveInputScoreStatus2(string queryJson, string name) | |||||
{ | |||||
stuEnrollScoreIBLL.SaveInputScoreStatus2(queryJson, name); | |||||
//删除任务 | |||||
//RecurringJob.RemoveIfExists(name); | |||||
return Success("操作成功"); | |||||
} | |||||
/// <summary> | |||||
/// 续时 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult AddMinutes(string queryJson, int minutes) | |||||
{ | |||||
var loginInfo = LoginUserInfo.Get(); | |||||
var name = loginInfo.account + "_" + loginInfo.realName + "_新生成绩录入"; | |||||
var newDate = DateTime.Now.AddMinutes(minutes); | |||||
RecurringJob.AddOrUpdate(name, | |||||
() => SaveInputScoreStatus2(queryJson, name), | |||||
string.Format("{0} {1} * * *", newDate.Minute, newDate.Hour), TimeZoneInfo.Local); | |||||
return Success("操作成功"); | |||||
} | |||||
/// <summary> | |||||
/// 提交成绩 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult SaveInputScore(string data) | |||||
{ | |||||
var list = JsonConvert.DeserializeObject<List<StuEnrollScoreEntity>>(data); | |||||
if (list.Any()) | |||||
{ | |||||
stuEnrollScoreIBLL.SaveInputScore(list); | |||||
} | |||||
return Success("操作成功"); | |||||
} | |||||
/// <summary> | |||||
/// 提交成绩:取消占用 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult SaveInputScoreStatus(string queryJson) | |||||
{ | |||||
var loginInfo = LoginUserInfo.Get(); | |||||
var name = loginInfo.account + "_" + loginInfo.realName + "_新生成绩录入"; | |||||
stuEnrollScoreIBLL.SaveInputScoreStatus(queryJson); | |||||
//删除任务 | |||||
//RecurringJob.RemoveIfExists(name); | |||||
return Success("操作成功"); | |||||
} | |||||
/// <summary> | |||||
/// 审核成绩 | |||||
/// </summary> | |||||
/// <param name="queryJson"></param> | |||||
/// <param name="Status">已审核:1;未审核:0;</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DoCheckScore(string queryJson, int Status) | |||||
{ | |||||
stuEnrollScoreIBLL.DoCheckScore(queryJson, Status); | |||||
return Success("操作成功"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,19 @@ | |||||
@{ | |||||
ViewBag.Title = "MajorAndSubject"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">Id<font face="宋体">*</font></div> | |||||
<input id="Id" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">MajorId<font face="宋体">*</font></div> | |||||
<input id="MajorId" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">SubId<font face="宋体">*</font></div> | |||||
<input id="SubId" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/MajorAndSubject/Form.js") |
@@ -0,0 +1,38 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-06-18 11:19 | |||||
* 描 述:MajorAndSubject | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var selectedRow = learun.frameTab.currentIframe().selectedRow; | |||||
var page = { | |||||
init: function () { | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
}, | |||||
initData: function () { | |||||
if (!!selectedRow) { | |||||
$('#form').lrSetFormData(selectedRow); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('#form').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = $('#form').lrGetFormData(); | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/MajorAndSubject/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,39 @@ | |||||
@{ | |||||
ViewBag.Title = "MajorAndSubject"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||||
<div class="lr-layout-left"> | |||||
<div class="lr-layout-wrap"> | |||||
<div class="lr-layout-title">树形目录</div> | |||||
<div id="tree" class="lr-layout-body"></div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap"> | |||||
<div class="lr-layout-title">标题</div> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" /> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||||
</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_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/MajorAndSubject/Index.js") |
@@ -0,0 +1,92 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-06-18 11:19 | |||||
* 描 述:MajorAndSubject | |||||
*/ | |||||
var selectedRow; | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 查询 | |||||
$('#btn_Search').on('click', function () { | |||||
var keyword = $('#txt_Keyword').val(); | |||||
page.search({ keyword: keyword }); | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
selectedRow = null; | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/MajorAndSubject/Form', | |||||
width: 700, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/MajorAndSubject/Form?keyValue=' + keyValue, | |||||
width: 700, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/MajorAndSubject/DeleteForm', { keyValue: keyValue}, function () { | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/MajorAndSubject/GetPageList', | |||||
headData: [ | |||||
{ label: 'Id', name: 'Id', width: 200, align: "left" }, | |||||
{ label: 'MajorId', name: 'MajorId', width: 200, align: "left" }, | |||||
{ label: 'SubId', name: 'SubId', width: 200, align: "left" }, | |||||
], | |||||
mainId:'Id', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,83 @@ | |||||
@{ | |||||
ViewBag.Title = "新生报名编辑"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<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="StuEnroll"> | |||||
<div class="lr-form-item-title">性别<font face="宋体">*</font></div> | |||||
<div id="Gender"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">民族<font face="宋体">*</font></div> | |||||
<div id="Nationals"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">身份证号<font face="宋体">*</font></div> | |||||
<input id="IDCard" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">住址<font face="宋体">*</font></div> | |||||
<input id="HomeAddress" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">手机号<font face="宋体">*</font></div> | |||||
<input id="StuMobile" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">中考总分<font face="宋体">*</font></div> | |||||
<input id="MidTermExam" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">毕业学校<font face="宋体">*</font></div> | |||||
<input id="FromSchool" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">特长</div> | |||||
<input id="Specialty" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">地市<font face="宋体">*</font></div> | |||||
<div id="City" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">县区<font face="宋体">*</font></div> | |||||
<div id="County" isvalid="yes" checkexpession="NotNull"></div> | |||||
@* <input id="County" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />*@ | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">身份证正面照片<font face="宋体">*</font></div> | |||||
<div id="IdCardPto1" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">身份证反面照片<font face="宋体">*</font></div> | |||||
<div id="IdCardPto2" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">初中毕业证照片<font face="宋体">*</font></div> | |||||
<div id="MidDiplomaPto" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">中考成绩截图<font face="宋体">*</font></div> | |||||
<div id="MidAchievementPto" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">推荐教师<font face="宋体">*</font></div> | |||||
<div id="EmpNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/EnrollForm.js") | |||||
@@ -0,0 +1,138 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-06-15 17:30 | |||||
* 描 述:新生报名 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var MajorNo; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#IdCardPto1').lrUploader(); | |||||
$('#IdCardPto2').lrUploader(); | |||||
$('#MidDiplomaPto').lrUploader(); | |||||
$('#MidAchievementPto').lrUploader(); | |||||
$('#Gender').lrDataItemSelect({ code: 'usersexbit' }); | |||||
$('#Nationals').lrDataItemSelect({ code: 'National' }); | |||||
//地市 | |||||
$('#City').lrselect({ | |||||
allowSearch: true, | |||||
//type: 'multiple', | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_CITY', | |||||
param: { strWhere: "1=1 and cparent='650000'" }, | |||||
value: "ccode", | |||||
text: "cname", | |||||
maxHeight: 200, | |||||
select: function (item) { | |||||
if (item) { | |||||
var code = $("#City").lrselectGet(); | |||||
//县区 | |||||
$('#County').lrselectRefresh({ | |||||
allowSearch: true, | |||||
//type: 'multiple', | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||||
param: { strWhere: "1=1 and charindex(aparent,('" + code + "'))>0 " }, | |||||
value: "acode", | |||||
text: "aname", | |||||
maxHeight: 200, | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
//县区 | |||||
$('#County').lrselect({ | |||||
allowSearch: true, | |||||
//type: 'multiple', | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||||
param: { strWhere: "1=1 " }, | |||||
value: "acode", | |||||
text: "aname", | |||||
maxHeight: 200, | |||||
select: function (item) { | |||||
if (item) { | |||||
var countyCode = $("#County").lrselectGet(); | |||||
//专业 | |||||
$('#MajorNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + | |||||
'/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { | |||||
strWhere: "1=1 and Area='" + countyCode + "'" | |||||
}, | |||||
value: "id", | |||||
text: "majorname", | |||||
maxHeight: 200, | |||||
}); | |||||
if (MajorNo) { | |||||
$('#MajorNo').lrselectSet(MajorNo); | |||||
MajorNo = ''; | |||||
} | |||||
} | |||||
} | |||||
}); | |||||
//专业 | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||||
//$('#MajorNo').lrselectRefresh({ | |||||
// url: top.$.rootUrl + | |||||
// '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// param: { | |||||
// strWhere: "1=1" | |||||
// }, | |||||
// value: "id", | |||||
// text: "majorname", | |||||
// maxHeight: 200, | |||||
//}); | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('#form').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
MajorNo = data.StuEnroll.MajorNo; | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollPhone/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
//console.log('MajorNo=', MajorNo); | |||||
//if (MajorNo) { | |||||
// console.log(333); | |||||
// $('#MajorNo').lrselectSet(MajorNo); | |||||
//} | |||||
} |
@@ -0,0 +1,93 @@ | |||||
@{ | |||||
ViewBag.Title = "新生报名管理"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<style> | |||||
.headImg { | |||||
position: absolute; | |||||
right: 80px; | |||||
top: 16px; | |||||
width: 107px; | |||||
height: 142px; | |||||
} | |||||
</style> | |||||
<div class="lr-form-wrap" id="form1"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<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="StuEnroll"> | |||||
<div class="lr-form-item-title">性别<font face="宋体">*</font></div> | |||||
<div id="Gender"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">民族<font face="宋体">*</font></div> | |||||
<div id="Nationals"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">身份证号<font face="宋体">*</font></div> | |||||
<input id="IDCard" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">住址<font face="宋体">*</font></div> | |||||
<input id="HomeAddress" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">手机号<font face="宋体">*</font></div> | |||||
<input id="StuMobile" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">中考总分<font face="宋体">*</font></div> | |||||
<input id="MidTermExam" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">毕业学校<font face="宋体">*</font></div> | |||||
<input id="FromSchool" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">特长</div> | |||||
<input id="Specialty" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">地市<font face="宋体">*</font></div> | |||||
<div id="City" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">县区<font face="宋体">*</font></div> | |||||
<div id="County" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||||
<div id="MajorNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">身份证正面照片<font face="宋体">*</font></div> | |||||
<div id="IdCardPto1" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">身份证反面照片<font face="宋体">*</font></div> | |||||
<div id="IdCardPto2" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">初中毕业证照片<font face="宋体">*</font></div> | |||||
<div id="MidDiplomaPto" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">中考成绩截图<font face="宋体">*</font></div> | |||||
<div id="MidAchievementPto" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">推荐教师<font face="宋体">*</font></div> | |||||
<div id="EmpNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">是否录取</div> | |||||
<div id="IsAdmission"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/EnrollFormView.js") | |||||
@@ -0,0 +1,121 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-07-17 11:20 | |||||
* 描 述:新生报名信息 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var MajorNo; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
$('#MajorNo').lrselectSet(MajorNo); | |||||
}, | |||||
bind: function () { | |||||
$('#form1').find('input').attr('readonly', 'readonly'); | |||||
$('#form1').find('div').attr('readonly', 'readonly'); | |||||
$('#IsAdmission').lrRadioCheckbox({ | |||||
type: 'radio', | |||||
code: 'YesOrNoBit', | |||||
}); | |||||
$('#IdCardPto1').lrUploader({ isUpload:false}); | |||||
$('#IdCardPto2').lrUploader({ isUpload: false }); | |||||
$('#MidDiplomaPto').lrUploader({ isUpload: false }); | |||||
$('#MidAchievementPto').lrUploader({ isUpload: false }); | |||||
$('#Gender').lrDataItemSelect({ code: 'usersexbit' }); | |||||
$('#Nationals').lrDataItemSelect({ code: 'National' }); | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||||
//地市 | |||||
$('#City').lrselect({ | |||||
allowSearch: true, | |||||
//type: 'multiple', | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_CITY', | |||||
param: { strWhere: "1=1 and cparent='650000'" }, | |||||
value: "ccode", | |||||
text: "cname", | |||||
maxHeight: 200, | |||||
//select: function (item) { | |||||
// if (item) { | |||||
// var code = $("#City").lrselectGet(); | |||||
// //县区 | |||||
// $('#County').lrselectRefresh({ | |||||
// allowSearch: true, | |||||
// //type: 'multiple', | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||||
// param: { strWhere: "1=1 and charindex(aparent,('" + code + "'))>0 " }, | |||||
// value: "acode", | |||||
// text: "aname", | |||||
// maxHeight: 200, | |||||
// select: function (item) { | |||||
// if (item) { | |||||
// var countyCode = $("#County").lrselectGet(); | |||||
// //专业 | |||||
// $('#MajorNo').lrselectRefresh({ | |||||
// url: top.$.rootUrl + | |||||
// '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// param: { | |||||
// strWhere: "1=1 and City='" + code + "' and Area='" + countyCode + "'" | |||||
// }, | |||||
// value: "id", | |||||
// text: "majorname", | |||||
// maxHeight: 200, | |||||
// }); | |||||
// } | |||||
// } | |||||
// }); | |||||
// } | |||||
//} | |||||
}); | |||||
//县区 | |||||
$('#County').lrselect({ | |||||
allowSearch: true, | |||||
//type: 'multiple', | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||||
param: { strWhere: "1=1 " }, | |||||
value: "acode", | |||||
text: "aname", | |||||
maxHeight: 200, | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetFormData?keyValue=' + keyValue, function (data) { | |||||
// $(".headImg").attr("src", data.StuEnroll.PhotoUrl); | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('#form1').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
MajorNo = data.StuEnroll.MajorNo; | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,82 @@ | |||||
@{ | |||||
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="IDCard" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">手机号</div> | |||||
<input id="StuMobile" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">推荐教师</div> | |||||
<div id="EmpNo"></div> | |||||
</div> | |||||
@*<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">系</div> | |||||
<div id="DeptNo"></div> | |||||
</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> | |||||
<div id="Year"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">是否报到</div> | |||||
<div id="IsReport"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">报名号</div> | |||||
<input id="RegistrationNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">录取方式</div> | |||||
<div id="Admissions" class="form-control"></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_add" class="btn btn-default"><i class="fa fa-plus"></i> 录入</a>*@ | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-edit"></i> 编辑</a> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
<a id="lr_yes" class="btn btn-default"><i class="fa fa-plus"></i> 审核</a> | |||||
<a id="lr_nocheck" class="btn btn-default"><i class="fa fa-plus"></i> 去审</a> | |||||
@*<a id="lr_lq" 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/StuEnroll/EnrollIndex.js") |
@@ -0,0 +1,288 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-07-17 11:20 | |||||
* 描 述:新生录取管理 | |||||
*/ | |||||
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); | |||||
$('#MajorNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
value: "id", | |||||
text: "majorname", | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
}); | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
//新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollForm', | |||||
width: 700, | |||||
height: 700, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var enrollStatus = $('#gridtable').jfGridValue('EnrollStatus'); | |||||
if (enrollStatus != '0') { | |||||
return learun.alert.warning('选中记录已审核不可编辑!'); | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollForm?keyValue=' + keyValue, | |||||
width: 700, | |||||
height: 700, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollFormView?keyValue=' + keyValue, | |||||
width: 800, | |||||
height: 700, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 审核 | |||||
$('#lr_yes').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var status = $('#gridtable').jfGridValue('EnrollStatus'); | |||||
if (status == '2') { | |||||
return learun.alert.warning('选中项目已审核!'); | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '审核', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollSH?keyValue=' + keyValue, | |||||
width: 700, | |||||
height: 700, | |||||
btn: ['确认审核', '取消'], | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
//var data = $('#gridtable').jfGridGet('rowdata'); | |||||
//if (data.length > 0) { | |||||
//} | |||||
}); | |||||
// 去审 | |||||
$('#lr_nocheck').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
var status = $('#gridtable').jfGridValue('EnrollStatus'); | |||||
if (status == '0') { | |||||
return learun.alert.warning('选中项目未审核!'); | |||||
} | |||||
//是否录取 | |||||
var IsAdmission = $('#gridtable').jfGridValue('IsAdmission'); | |||||
if (IsAdmission == 1) { | |||||
return learun.alert.warning('选中项目已录取!'); | |||||
} | |||||
learun.layerConfirm('是否确认去审选中项目!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/NoCheck', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
}); | |||||
// 录取 | |||||
$('#lr_lq').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var status = $('#gridtable').jfGridValue('EnrollStatus'); | |||||
if (status != 2) { | |||||
return learun.alert.warning('请选择审核通过的数据操作!'); | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '录取', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollLQ?keyValue=' + keyValue, | |||||
width: 500, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList', | |||||
headData: [ | |||||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||||
{ | |||||
label: "性别", name: "Gender", width: 100, align: "left", | |||||
formatter: function (value) { | |||||
if (value == '0') { | |||||
return '女'; | |||||
} else { | |||||
return '男'; | |||||
} | |||||
} | |||||
}, | |||||
{ | |||||
label: "民族", name: "Nationals", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'National', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "身份证号", name: "IDCard", width: 100, align: "left" }, | |||||
{ label: "住址", name: "HomeAddress", width: 100, align: "left" }, | |||||
{ label: "手机号", name: "StuMobile", width: 100, align: "left" }, | |||||
{ label: "中考总分", name: "MidTermExam", width: 100, align: "left" }, | |||||
{ label: "毕业学校", name: "FromSchool", width: 100, align: "left" }, | |||||
{ label: "特长", name: "Specialty", width: 100, align: "left" }, | |||||
{ | |||||
label: "地市", name: "City", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', | |||||
key: value, | |||||
keyId: 'ccode', | |||||
callback: function (_data) { | |||||
callback(_data['cname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "县区", name: "County", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA', | |||||
key: value, | |||||
keyId: 'acode', | |||||
callback: function (_data) { | |||||
callback(_data['aname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "专业", name: "MajorNo", 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: "EmpNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empno', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "状态", name: "EnrollStatus", width: 100, align: "left", | |||||
formatter: function (value) { | |||||
if (value == 2) { | |||||
return "<span class=\"label label-success\">审核通过</span>"; | |||||
} else if (value == 0) { | |||||
return "<span class=\"label label-warning\">待审核</span>"; | |||||
} | |||||
} | |||||
}, | |||||
{ | |||||
label: "是否录取", name: "IsAdmission", width: 100, align: "left", | |||||
formatter: function (value) { | |||||
if (value == 1) { | |||||
return "<span class=\"label label-success\">是</span>"; | |||||
} else { | |||||
return "<span class=\"label label-danger\">否</span>"; | |||||
} | |||||
} | |||||
}, | |||||
], | |||||
//isMultiselect: true, | |||||
mainId: 'StuId', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
//param.Grade = "20"; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,66 @@ | |||||
@{ | |||||
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> | |||||
<div id="City"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">县区</div> | |||||
<div id="County"></div> | |||||
</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="Year"></div> | |||||
</div> | |||||
<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="IDCard" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">手机号</div> | |||||
<input id="StuMobile" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">推荐教师</div> | |||||
<div id="EmpNo"></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_print" class="btn btn-default"><i class="fa fa-plus"></i> 打印</a> | |||||
@*<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||||
<a id="lr_yes" class="btn btn-default"><i class="fa fa-plus"></i> 审核</a> | |||||
<a id="lr_lq" 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/StuEnroll/EnrollIndexTJ.js") |
@@ -0,0 +1,153 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-07-17 11:20 | |||||
* 描 述:新生录取管理 | |||||
*/ | |||||
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); | |||||
}, 400, 400); | |||||
//地市 | |||||
$('#City').lrselect({ | |||||
allowSearch: true, | |||||
type: 'multiple', | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_CITY', | |||||
param: { strWhere: "1=1 and cparent='650000'" }, | |||||
value: "ccode", | |||||
text: "cname", | |||||
maxHeight: 200, | |||||
select: function (item) { | |||||
if (item) { | |||||
var code = $("#City").lrselectGet(); | |||||
//县区 | |||||
$('#County').lrselectRefresh({ | |||||
allowSearch: true, | |||||
type: 'multiple', | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||||
param: { strWhere: "1=1 and charindex(aparent,('" + code + "'))>0 " }, | |||||
value: "acode", | |||||
text: "aname", | |||||
maxHeight: 200, | |||||
//select: function(item) { | |||||
// if (item) { | |||||
// var countyCode = $("#County").lrselectGet(); | |||||
// //专业 | |||||
// $('#MajorNo').lrselectRefresh({ | |||||
// type: 'multiple', | |||||
// url: top.$.rootUrl + | |||||
// '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// param: { | |||||
// strWhere: "1=1 and City='" + code + "' and Area='" + countyCode + "'" | |||||
// }, | |||||
// value: "majorno", | |||||
// text: "majorname", | |||||
// maxHeight: 200, | |||||
// }); | |||||
// } | |||||
//} | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
//县区 | |||||
$('#County').lrselect({ | |||||
allowSearch: true, | |||||
type: 'multiple', | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||||
param: { strWhere: "1=1 " }, | |||||
value: "acode", | |||||
text: "aname", | |||||
maxHeight: 200, | |||||
}); | |||||
//专业 | |||||
$('#MajorNo').lrselect({ | |||||
allowSearch: true, | |||||
type: 'multiple', | |||||
url: top.$.rootUrl + | |||||
'/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { | |||||
strWhere: "1=1 " | |||||
}, | |||||
value: "id", | |||||
text: "majorname", | |||||
maxHeight: 200, | |||||
}); | |||||
//老师 | |||||
$('#EmpNo').lrselect({ | |||||
type: 'multiple', | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo', | |||||
param: { strWhere: "1=1 " }, | |||||
value: "empno", | |||||
text: "empname", | |||||
maxHeight: 200, | |||||
}); | |||||
//年度 | |||||
$('#Year').lrselect({ | |||||
type: 'multiple', | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorYear', | |||||
param: { strWhere: "1=1 " }, | |||||
value: "year", | |||||
text: "year", | |||||
maxHeight: 200, | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetTJList', | |||||
headData: [ | |||||
{ label: "教师编号", name: "empno", width: 100, align: "left" }, | |||||
{ | |||||
label: "教师姓名", name: "empno", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empno', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "人数", name: "num", width: 100, align: "left" }, | |||||
], | |||||
mainId: 'StuId', | |||||
isPage: false | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
//param.Grade = "20"; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,16 @@ | |||||
@{ | |||||
ViewBag.Title = "新生录取"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">考试成绩<font face="宋体">*</font></div> | |||||
<input id="ExamScore" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">是否录取</div> | |||||
<div id="IsAdmission"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/EnrollLQ.js") |
@@ -0,0 +1,56 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-06-15 17:30 | |||||
* 描 述:新生报名审核 | |||||
*/ | |||||
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 () { | |||||
$('#IsAdmission').lrRadioCheckbox({ | |||||
type: 'radio', | |||||
code: 'YesOrNoBit', | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
//$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/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/StuEnroll/Admission?keyValue=' + keyValue, | |||||
postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,93 @@ | |||||
@{ | |||||
ViewBag.Title = "新生报名审核"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<style> | |||||
.headImg { | |||||
position: absolute; | |||||
right: 80px; | |||||
top: 16px; | |||||
width: 107px; | |||||
height: 142px; | |||||
} | |||||
</style> | |||||
<div class="lr-form-wrap" id="form1"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<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="StuEnroll"> | |||||
<div class="lr-form-item-title">性别<font face="宋体">*</font></div> | |||||
<div id="Gender"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">民族<font face="宋体">*</font></div> | |||||
<div id="Nationals"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">身份证号<font face="宋体">*</font></div> | |||||
<input id="IDCard" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">住址<font face="宋体">*</font></div> | |||||
<input id="HomeAddress" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">手机号<font face="宋体">*</font></div> | |||||
<input id="StuMobile" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">中考总分<font face="宋体">*</font></div> | |||||
<input id="MidTermExam" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">毕业学校<font face="宋体">*</font></div> | |||||
<input id="FromSchool" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">特长</div> | |||||
<input id="Specialty" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">地市<font face="宋体">*</font></div> | |||||
<div id="City" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">县区<font face="宋体">*</font></div> | |||||
<div id="County" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||||
<div id="MajorNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">身份证正面照片<font face="宋体">*</font></div> | |||||
<div id="IdCardPto1" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">身份证反面照片<font face="宋体">*</font></div> | |||||
<div id="IdCardPto2" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">初中毕业证照片<font face="宋体">*</font></div> | |||||
<div id="MidDiplomaPto" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">中考成绩截图<font face="宋体">*</font></div> | |||||
<div id="MidAchievementPto" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">推荐教师<font face="宋体">*</font></div> | |||||
<div id="EmpNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnrollExam"> | |||||
<div class="lr-form-item-title">考试信息</div> | |||||
<div id="examDiv" readonly="readonly"> | |||||
</div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/EnrollSH.js") |
@@ -0,0 +1,141 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-06-15 17:30 | |||||
* 描 述:新生报名审核 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var MajorNo; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#form1').find('input').attr('readonly', 'readonly'); | |||||
$('#form1').find('div').attr('readonly', 'readonly'); | |||||
$('#IsAdmission').lrRadioCheckbox({ | |||||
type: 'radio', | |||||
code: 'YesOrNoBit', | |||||
}); | |||||
$('#IdCardPto1').lrUploader(); | |||||
$('#IdCardPto2').lrUploader(); | |||||
$('#MidDiplomaPto').lrUploader(); | |||||
$('#MidAchievementPto').lrUploader(); | |||||
$('#Gender').lrDataItemSelect({ code: 'usersexbit' }); | |||||
$('#Nationals').lrDataItemSelect({ code: 'National' }); | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||||
//地市 | |||||
$('#City').lrselect({ | |||||
allowSearch: true, | |||||
//type: 'multiple', | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_CITY', | |||||
param: { strWhere: "1=1 and cparent='650000'" }, | |||||
value: "ccode", | |||||
text: "cname", | |||||
maxHeight: 200, | |||||
//select: function (item) { | |||||
// if (item) { | |||||
// var code = $("#City").lrselectGet(); | |||||
// //县区 | |||||
// $('#County').lrselectRefresh({ | |||||
// allowSearch: true, | |||||
// //type: 'multiple', | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||||
// param: { strWhere: "1=1 and charindex(aparent,('" + code + "'))>0 " }, | |||||
// value: "acode", | |||||
// text: "aname", | |||||
// maxHeight: 200, | |||||
// select: function (item) { | |||||
// if (item) { | |||||
// var countyCode = $("#County").lrselectGet(); | |||||
// //专业 | |||||
// $('#MajorNo').lrselectRefresh({ | |||||
// url: top.$.rootUrl + | |||||
// '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// param: { | |||||
// strWhere: "1=1 and City='" + code + "' and Area='" + countyCode + "'" | |||||
// }, | |||||
// value: "id", | |||||
// text: "majorname", | |||||
// maxHeight: 200, | |||||
// }); | |||||
// } | |||||
// } | |||||
// }); | |||||
// } | |||||
//} | |||||
}); | |||||
//县区 | |||||
$('#County').lrselect({ | |||||
allowSearch: true, | |||||
//type: 'multiple', | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||||
param: { strWhere: "1=1 " }, | |||||
value: "acode", | |||||
text: "aname", | |||||
maxHeight: 200, | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetFormData?keyValue=' + keyValue, function (data) { | |||||
// $(".headImg").attr("src", data.StuEnroll.PhotoUrl); | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('#form1').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
MajorNo = data.StuEnroll.MajorNo; | |||||
}); | |||||
learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetExamDataByStuId?keyValue=' + keyValue, function (res) { | |||||
var html = ''; | |||||
if (res.code == 200) { | |||||
var data = res.data; | |||||
if (data) { | |||||
for (var i = 0; i < data.length; i++) { | |||||
var etime = data[i].BeginTime + '~' + data[i].EndTime; | |||||
html += '<div class="col-xs-12 lr-form-item" >'; | |||||
html += '<div class="lr-form-item-title">科目</div>'; | |||||
html += '<input type="text" class="form-control" value="' + data[i].SubjectName + '"/>'; | |||||
html += '</div>'; | |||||
html += '<div class="col-xs-12 lr-form-item" data-table="StuEnrollExam">'; | |||||
html += '<div class="lr-form-item-title">时间</div>'; | |||||
html += '<input type="text" class="form-control" value="' + etime + '"/>'; | |||||
html += '</div>'; | |||||
} | |||||
} | |||||
$('#examDiv').html(html); | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/UpdateEnrollStatus?keyValue=' + keyValue, | |||||
postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,22 @@ | |||||
@{ | |||||
ViewBag.Title = "新生录取"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<style> | |||||
.lr-form-item-lable { | |||||
height: 100%; | |||||
line-height: 30px; | |||||
text-align: right; | |||||
} | |||||
#form { | |||||
font-size: 14px; | |||||
} | |||||
</style> | |||||
<div class="lr-form-wrap" id="form"> | |||||
@*<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||||
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div> | |||||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly"/> | |||||
</div>*@ | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnrollScore/AdmissionForm.js") | |||||
@@ -0,0 +1,68 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-06-15 17:30 | |||||
* 描 述:新生录取 | |||||
*/ | |||||
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 () { | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetScoreListByStuId?stuid=' + keyValue, function (data) { | |||||
//learun.loading(false); | |||||
if (data.code == 200) { | |||||
var data = data.data; | |||||
var html = ''; | |||||
for (var i = 0; i < data.length; i++) { | |||||
html += '<div class="col-xs-6 lr-form-item" data-table="StuEnroll">'; | |||||
html += '<div class="lr-form-item-title">' + data[i].SubjectName + ':</div>'; | |||||
html += '<label class="lr-form-item-lable">' + data[i].Score + '</label>'; | |||||
html += '</div>'; | |||||
} | |||||
$('#form').html(html); | |||||
} | |||||
else { | |||||
learun.layerClose(window.name); | |||||
learun.alert.error('数据获取失败,请重新获取!'); | |||||
learun.httpErrorLog(data.info); | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
//var postData = { | |||||
// strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
//}; | |||||
learun.layerConfirm('是否确认录取当前学生!', function (res) { | |||||
if (res) { | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Admission?keyValue=' + keyValue, | |||||
{ IsAdmission: 1 }, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,52 @@ | |||||
@{ | |||||
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="IDCard" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">手机号</div> | |||||
<input id="StuMobile" type="text" class="form-control" /> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">年度</div> | |||||
<div id="Year" type="lrselect" class="lr-select"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">专业</div> | |||||
<div id="MajorNo" type="lrselect" class="lr-select"></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_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看成绩</a> | |||||
<a id="lr_lq" class="btn btn-default"><i class="fa fa-plus"></i> 录取</a> | |||||
<a id="lr_nolq" 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/StuEnrollScore/AdmissionIndex.js") |
@@ -0,0 +1,198 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-06-18 11:20 | |||||
* 描 述:新生录取管理 | |||||
*/ | |||||
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); | |||||
//专业 | |||||
$('#MajorNo').lrselect({ | |||||
placeholder: "请选择专业", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetMajorData', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//年度 | |||||
$('#Year').lrselect({ | |||||
placeholder: "请选择年度", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetYearNoData', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
//查看成绩 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '查看成绩', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/AdmissionForm?keyValue=' + keyValue, | |||||
width: 500, | |||||
height: 400, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 录取 | |||||
$('#lr_lq').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var IsAdmission = $('#gridtable').jfGridValue('IsAdmission'); | |||||
if (IsAdmission == 1) { | |||||
return learun.alert.warning('该学生已被录取!'); | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '录取', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/AdmissionForm?keyValue=' + keyValue, | |||||
width: 500, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 取消录取 | |||||
$('#lr_nolq').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var IsAdmission = $('#gridtable').jfGridValue('IsAdmission'); | |||||
if (IsAdmission == 0) { | |||||
return learun.alert.warning('该学生未被录取!'); | |||||
} | |||||
learun.layerConfirm('是否确认取消录取当前学生!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Admission?keyValue=' + keyValue, { IsAdmission: 0 }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetPageListForAdmission', | |||||
headData: [ | |||||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||||
{ | |||||
label: "性别", name: "Gender", width: 100, align: "left", | |||||
formatter: function (value) { | |||||
if (value == '0') { | |||||
return '女'; | |||||
} else { | |||||
return '男'; | |||||
} | |||||
} | |||||
}, | |||||
{ | |||||
label: "民族", name: "Nationals", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'National', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "身份证号", name: "IDCard", width: 100, align: "left" }, | |||||
{ label: "手机号", name: "StuMobile", width: 100, align: "left" }, | |||||
{ label: "中考总分", name: "MidTermExam", width: 100, align: "left" }, | |||||
{ label: "毕业学校", name: "FromSchool", width: 100, align: "left" }, | |||||
{ | |||||
label: "地市", name: "City", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', | |||||
key: value, | |||||
keyId: 'ccode', | |||||
callback: function (_data) { | |||||
callback(_data['cname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "县区", name: "County", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA', | |||||
key: value, | |||||
keyId: 'acode', | |||||
callback: function (_data) { | |||||
callback(_data['aname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "专业", name: "MajorNo", 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: "ExamScore", width: 100, align: "left" }, | |||||
{ | |||||
label: "是否录取", name: "IsAdmission", width: 100, align: "left", | |||||
formatter: function (value) { | |||||
if (value == 1) { | |||||
return "<span class=\"label label-success\">是</span>"; | |||||
} else { | |||||
return "<span class=\"label label-danger\">否</span>"; | |||||
} | |||||
} | |||||
}, | |||||
], | |||||
//isMultiselect: true, | |||||
mainId: 'StuId', | |||||
isPage: true, | |||||
sidx: 'ExamScore', | |||||
sord: 'ASC', | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
//param.Grade = "20"; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,103 @@ | |||||
@{ ViewBag.Title = "新生考试成绩录入"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<style> | |||||
.lr-select { | |||||
width: 150px; | |||||
} | |||||
#LessonNo { | |||||
width: 180px; | |||||
} | |||||
.lr-selectLittle { | |||||
width: 80px; | |||||
} | |||||
.lr-layout-tool { | |||||
height: 80px; | |||||
} | |||||
.lr-layout-center .lr-layout-wrap.lr-layout-wrap-notitle { | |||||
padding-top: 80px; | |||||
} | |||||
.divRow { | |||||
position: absolute; | |||||
width: 100%; | |||||
height: 55px; | |||||
top: 0; | |||||
left: 0; | |||||
} | |||||
.scaleRow { | |||||
top: 55px; | |||||
padding: 2px 10px; | |||||
height: 25px; | |||||
} | |||||
.scaleRow .timeBox { | |||||
float: right; | |||||
padding-right: 30px; | |||||
} | |||||
.scaleRow .tipBox { | |||||
display: inline-block; | |||||
color: #ff0000; | |||||
margin-left: 10px; | |||||
} | |||||
#addMinutesBtn { | |||||
display: inline-block; | |||||
cursor: pointer; | |||||
background-color: blue; | |||||
color: #fff; | |||||
padding: 1px 5px; | |||||
border-radius: 4px; | |||||
} | |||||
</style> | |||||
<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="selectRow divRow"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="Year" type="lrselect" class="lr-select lr-selectLittle"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="SubjectId" type="lrselect" class="lr-select"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||||
</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_add" class="btn btn-default"><i class="fa btn-default"> 成绩初始化</i></a>*@ | |||||
<a id="lr_input" class="btn btn-default"><i class="fa fa-edit"> 开始录入</i></a> | |||||
<a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit"> 提交成绩</i></a> | |||||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 审核</i></a> | |||||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审</i></a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="scaleRow divRow"> | |||||
<div class="tipBox">提示:录入完成后,请务必点击“保存成绩”按钮,避免成绩丢失!</div> | |||||
<div class="timeBox" style="display:none;"> | |||||
倒计时: | |||||
<span id="minutes" data-minutes="30"></span>分钟(<span id="seconds" data-seconds="60"></span>秒) | |||||
<div id="addMinutesBtn" data-minutes="30">续时</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnrollScore/Index.js") |
@@ -0,0 +1,416 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-06-18 11:02 | |||||
* 描 述:全院学生成绩录入(新) | |||||
*/ | |||||
var selectedRow; | |||||
var refreshGirdData; | |||||
var refreshGirdData2; | |||||
var judgeSelect; //判断下拉框是否选择 | |||||
var modifyDate; //成绩被占用,且是登录用户时,成绩表中的编辑时间; | |||||
var timer; //计时器 | |||||
var submitScoreTimer; //五分钟提交成绩计时器 | |||||
var headData; //常规列头 | |||||
var headDataEdit; //可编辑列头 | |||||
var headDataNoEdit; //不可编辑列头 | |||||
var headDataFinally; //最终列头 | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
headData = [ | |||||
{ | |||||
label: '状态', name: 'Status', width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||||
} | |||||
}, | |||||
{ label: '姓名', name: 'StuName', width: 100, align: "left" }, | |||||
{ label: '手机号', name: 'StuMobile', width: 100, align: "left" }, | |||||
{ label: '身份证号', name: 'IdCard', width: 100, align: "left" }, | |||||
{ | |||||
label: "性别", name: "Gender", width: 40, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == '1' ? "男" : "女"; | |||||
} | |||||
}, { label: '年度', name: 'YearNo', width: 100, align: "left" }, | |||||
{ | |||||
label: "专业", name: "MajorId", 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: "SubjectId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ExamSubject', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['subjectname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
]; | |||||
headDataEdit = [ | |||||
{ | |||||
label: '成绩', name: 'Score', width: 100, align: "left", | |||||
edit: { | |||||
type: 'input', | |||||
inputType: 'number', | |||||
change: function (row, rownum) { | |||||
//row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(0); | |||||
$('#gridtable').jfGridSet('updateRow', rownum); | |||||
}, | |||||
} | |||||
}, | |||||
{ | |||||
label: '备注', name: 'Remark', width: 100, align: "left", | |||||
edit: { | |||||
type: 'input', | |||||
} | |||||
}, | |||||
]; | |||||
headDataNoEdit = [ | |||||
{ label: '成绩', name: 'Score', width: 80, align: "left" }, | |||||
{ | |||||
label: '备注', name: 'Remark', width: 100, align: "left" | |||||
}, | |||||
]; | |||||
headDataFinally = headData.concat(headDataNoEdit); | |||||
page.initGird(); | |||||
page.bind(); | |||||
page.bindSelect(); | |||||
}, | |||||
bind: function () { | |||||
//多条件选择 | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 500); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
//查询 | |||||
$('#btn_Search').on('click', function () { | |||||
refreshGirdData2(); | |||||
}); | |||||
//// 成绩初始化 | |||||
//$('#lr_add').on('click', function () { | |||||
// //提示弹框 | |||||
// learun.layerConfirm('确认初始化成绩吗!', function (res) { | |||||
// if (res) { | |||||
// //审核成绩 | |||||
// learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollScoreAdd', { queryJson: JSON.stringify(query), checkMark: 1 }, function (res) { | |||||
// if (res.code == 200) { | |||||
// refreshGirdData2(); | |||||
// } else { | |||||
// learun.alert.warning("审核成绩失败!"); | |||||
// return false; | |||||
// } | |||||
// }); | |||||
// } | |||||
// }); | |||||
//}); | |||||
// 开始录入 | |||||
$('#lr_input').on('click', function () { | |||||
//提示弹框 | |||||
learun.layerConfirm('录入完成后,请务必点击“提交成绩”按钮,避免成绩丢失!', function (res) { | |||||
if (res) { | |||||
var query = judgeSelect(); | |||||
if (query) { | |||||
//判断是否已审核;判断是否被其他教师占用 | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||||
if (data != null) { | |||||
if (data.Status != 0) { | |||||
learun.alert.warning("学生成绩已审核!"); | |||||
return false; | |||||
} | |||||
if (data.IsEditable == 0) { | |||||
if (data.EditUserId == learun.clientdata.get(['userinfo']).account) { | |||||
modifyDate = data.ModifyDate; | |||||
} else { | |||||
learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!"); | |||||
return false; | |||||
} | |||||
} else { | |||||
//占用成绩 | |||||
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/StartInputScore', { queryJson: JSON.stringify(query) }, function (res) { }); | |||||
} | |||||
//显示可编辑列头 | |||||
headDataFinally = headData.concat(headDataEdit); | |||||
$("#gridtable")[0].dfop = undefined; | |||||
page.initGird(); | |||||
page.search(query); | |||||
//显示“提交成绩”按钮 | |||||
$('#lr_save').show(); | |||||
//隐藏“开始录入”按钮 | |||||
$('#lr_input').hide(); | |||||
//隐藏审核按钮 | |||||
page.displaySubmit(0); | |||||
////显示“倒计时” | |||||
//$('.timeBox').show(); | |||||
//$('#minutes').html($('#minutes').attr('data-minutes')); | |||||
////开始倒计时 | |||||
//page.countDown(); | |||||
//五分钟提交成绩 | |||||
page.submitScore(); | |||||
} else { | |||||
learun.alert.warning("学生成绩不存在!"); | |||||
return false; | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
}); | |||||
//提交成绩 | |||||
$('#lr_save').on('click', function () { | |||||
var query = judgeSelect(); | |||||
if (query) { | |||||
//成绩被占用,且是登录用户时,根据编辑时间判断是否是本人; | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||||
if (data != null) { | |||||
if (data.Status != 0) { | |||||
learun.alert.warning("学生成绩已审核!"); | |||||
return false; | |||||
} | |||||
if (data.IsEditable == 0) { | |||||
if (data.EditUserId == learun.clientdata.get(['userinfo']).account) { | |||||
if (modifyDate != null && modifyDate != data.ModifyDate) { | |||||
learun.alert.warning("当前科目成绩被修改,请重新获取!"); | |||||
return false; | |||||
} | |||||
} else { | |||||
learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!"); | |||||
return false; | |||||
} | |||||
} else if (data.IsEditable == 1) { | |||||
learun.alert.warning("学生成绩已提交!"); | |||||
return false; | |||||
} | |||||
//提交成绩 | |||||
var rowdatas = $('#gridtable').jfGridGet('rowdatas'); | |||||
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/SaveInputScore', { data: JSON.stringify(rowdatas) }, function (res) { | |||||
if (res.code == 200) { | |||||
//提交成绩:取消占用 | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/SaveInputScoreStatus', { queryJson: JSON.stringify(query) }, function (res) { | |||||
if (res.code == 200) { | |||||
refreshGirdData2(); | |||||
modifyDate = null; | |||||
//隐藏“提交成绩”按钮 | |||||
$('#lr_save').hide(); | |||||
//显示“开始录入”按钮 | |||||
$('#lr_input').show(); | |||||
//显示审核按钮 | |||||
page.displaySubmit(1); | |||||
//隐藏“倒计时” | |||||
//$('.timeBox').hide(); | |||||
////停止倒计时 | |||||
//clearInterval(timer); | |||||
//停止五分钟提交成绩 | |||||
clearInterval(submitScoreTimer); | |||||
} else { | |||||
learun.alert.warning("提交成绩:取消占用失败!"); | |||||
return false; | |||||
} | |||||
}); | |||||
} else { | |||||
learun.alert.warning("提交成绩失败!"); | |||||
return false; | |||||
} | |||||
}); | |||||
} else { | |||||
learun.alert.warning("学生成绩不存在!"); | |||||
return false; | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 审核 | |||||
$('#lr_check').on('click', function () { | |||||
var query = judgeSelect(); | |||||
if (query) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||||
if (data != null) { | |||||
if (data.Status != 0) { | |||||
learun.alert.warning("学生成绩已审核!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认审核当前科目的学生成绩!', function (res) { | |||||
if (res) { | |||||
//审核成绩 | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/DoCheckScore', { queryJson: JSON.stringify(query), Status: 1 }, function (res) { | |||||
if (res.code == 200) { | |||||
refreshGirdData2(); | |||||
} else { | |||||
learun.alert.warning("审核成绩失败!"); | |||||
return false; | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
} else { | |||||
learun.alert.warning("学生成绩不存在!"); | |||||
return false; | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 去审核 | |||||
$('#lr_uncheck').on('click', function () { | |||||
var query = judgeSelect(); | |||||
if (query) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { | |||||
if (data != null) { | |||||
if (data.Status != 1) { | |||||
learun.alert.warning("学生成绩未审核!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认去审核科目的学生成绩!', function (res) { | |||||
if (res) { | |||||
//去审核成绩 | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/DoCheckScore', { queryJson: JSON.stringify(query), Status: 0 }, function (res) { | |||||
if (res.code == 200) { | |||||
refreshGirdData2(); | |||||
} else { | |||||
learun.alert.warning("去审核成绩失败!"); | |||||
return false; | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
} else { | |||||
learun.alert.warning("学生成绩不存在!"); | |||||
return false; | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
bindSelect: function () { | |||||
//年度 | |||||
$('#Year').lrselect({ | |||||
placeholder: "请选择年度", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetYearNoData', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//科目 | |||||
$('#SubjectId').lrselect({ | |||||
placeholder: "请选择科目", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetSubjectData', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
}, | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/GetList', | |||||
headData: headDataFinally, | |||||
mainId: 'Id', | |||||
isPage: false, | |||||
}); | |||||
//page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
}, | |||||
countDown: function () { | |||||
//var minutes = $('#minutes').html(); | |||||
//var minutesTemp = minutes; | |||||
//var seconds = $('#seconds').attr('data-seconds'); | |||||
//$('#seconds').html(seconds); | |||||
//var secondsTemp = seconds; | |||||
//timer = setInterval(function () { | |||||
// secondsTemp--; | |||||
// $('#seconds').html(secondsTemp); | |||||
// if (secondsTemp == 0) { | |||||
// secondsTemp = seconds; | |||||
// minutesTemp--; | |||||
// $('#minutes').html(minutesTemp); | |||||
// if (minutesTemp == 0) { | |||||
// //停止倒计时 | |||||
// clearInterval(timer); | |||||
// //自动提交成绩 | |||||
// $('#lr_save').trigger("click"); | |||||
// } | |||||
// } | |||||
//}, 1000); | |||||
}, | |||||
//提交成绩 | |||||
submitScore: function () { | |||||
submitScoreTimer = setInterval(function () { | |||||
var rowdatas = $('#gridtable').jfGridGet('rowdatas'); | |||||
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuEnrollScore/SaveInputScore', { data: JSON.stringify(rowdatas) }, function (res) { | |||||
}); | |||||
}, 300000); | |||||
}, | |||||
displaySubmit: function (type) { | |||||
//显示隐藏审核按钮 | |||||
if (type == 1) { | |||||
//显示 | |||||
$('#lr_check').show(); | |||||
$('#lr_uncheck').show(); | |||||
} else { | |||||
//隐藏 | |||||
$('#lr_check').hide(); | |||||
$('#lr_uncheck').hide(); | |||||
} | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
refreshGirdData2 = function () { | |||||
var query = judgeSelect(); | |||||
if (query) { | |||||
//显示不可编辑列头 | |||||
headDataFinally = headData.concat(headDataNoEdit); | |||||
$("#gridtable")[0].dfop = undefined; | |||||
page.initGird(); | |||||
page.search(query); | |||||
//page.searchScale(query); | |||||
} | |||||
}; | |||||
judgeSelect = function () { | |||||
var $content = $('body').find('.lr-layout-tool-left'); | |||||
var query = $content.lrGetFormData(); | |||||
if (query.Year == null || query.Year == "") { | |||||
learun.alert.warning("请选择年度!"); | |||||
return false; | |||||
} | |||||
if (query.SubjectId == null || query.SubjectId == "") { | |||||
learun.alert.warning("请选择科目!"); | |||||
return false; | |||||
} | |||||
return query; | |||||
}; | |||||
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"> | <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')" /> | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
@@ -331,11 +331,13 @@ | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\FillinFromController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\FillinFromController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\HomeStatisticsController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\HomeStatisticsController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\LeaveSchoolAController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\LeaveSchoolAController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\MajorAndSubjectController.cs" /> | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\PracticeBaseController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\PracticeBaseController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\R_EnterBuildingController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\R_EnterBuildingController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\R_EnterSchoolController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\R_EnterSchoolController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\ScoreStatisticsController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\ScoreStatisticsController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\StuAttendanceController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\StuAttendanceController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\StuEnrollScoreController.cs" /> | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\StuGrantController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\StuGrantController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\StuInfoBasicChangeController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\StuInfoBasicChangeController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\StuScoreNotPassController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\StuScoreNotPassController.cs" /> | ||||
@@ -1026,6 +1028,8 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\LessonInfo\IndexNoMajor.js" /> | <Content Include="Areas\EducationalAdministration\Views\LessonInfo\IndexNoMajor.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\LoginUserBind\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\BindAccountIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\LoginUserBind\BindAccountIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Form.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\PracticeBase\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\PracticeBase\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\PracticeBase\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\PracticeBase\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\R_EnterBuilding\ClassReport.js" /> | <Content Include="Areas\EducationalAdministration\Views\R_EnterBuilding\ClassReport.js" /> | ||||
@@ -1050,7 +1054,16 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForStudent.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForStudent.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForTeacher.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForTeacher.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\FormView.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\FormView.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\AdmissionForm.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\AdmissionIndex.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\AmountForm.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuEnroll\AmountForm.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollForm.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollFormView.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollIndex.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollIndexTJ.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollLQ.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollSH.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuGrant\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuGrant\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuGrant\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuGrant\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasicChange\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoBasicChange\Form.js" /> | ||||
@@ -7675,6 +7688,17 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoomTeacher.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoomTeacher.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormTeacher.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormTeacher.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\EmpInfo\QRCode.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\EmpInfo\QRCode.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollForm.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollFormView.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollIndex.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollIndexTJ.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollLQ.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollSH.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\AdmissionForm.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\AdmissionIndex.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Index.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -209,6 +209,7 @@ | |||||
<Compile Include="Modules\ListenClassRecordApi.cs" /> | <Compile Include="Modules\ListenClassRecordApi.cs" /> | ||||
<Compile Include="Modules\MpManagementApi.cs" /> | <Compile Include="Modules\MpManagementApi.cs" /> | ||||
<Compile Include="Modules\PersonnelManagement\EpidemicSituationCopyApi.cs" /> | <Compile Include="Modules\PersonnelManagement\EpidemicSituationCopyApi.cs" /> | ||||
<Compile Include="Modules\StuEnrollApi.cs" /> | |||||
<Compile Include="Modules\StuScoreApi.cs" /> | <Compile Include="Modules\StuScoreApi.cs" /> | ||||
<Compile Include="Modules\StuInfoBasicApi.cs" /> | <Compile Include="Modules\StuInfoBasicApi.cs" /> | ||||
<Compile Include="Modules\StatisticsApi.cs" /> | <Compile Include="Modules\StatisticsApi.cs" /> | ||||
@@ -0,0 +1,116 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Web; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using Learun.Util; | |||||
using Nancy; | |||||
namespace Learun.Application.WebApi.Modules | |||||
{ | |||||
public class StuEnrollApi : BaseApi | |||||
{ | |||||
public StuEnrollApi() | |||||
: base("/learun/adms/StuEnroll") | |||||
{ | |||||
Get["/pagelist"] = GetPageList; | |||||
Get["/list"] = GetList; | |||||
Get["/form"] = GetForm; | |||||
Post["/delete"] = DeleteForm; | |||||
Post["/save"] = SaveForm; | |||||
} | |||||
private StuEnrollIBLL stuEnrollIBLL = new StuEnrollBLL(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表分页数据 | |||||
/// <summary> | |||||
/// <param name="_"></param> | |||||
/// <returns></returns> | |||||
public Response GetPageList(dynamic _) | |||||
{ | |||||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | |||||
var data = stuEnrollIBLL.GetPageList(parameter.pagination, parameter.queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = parameter.pagination.total, | |||||
page = parameter.pagination.page, | |||||
records = parameter.pagination.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="_"></param> | |||||
/// <returns></returns> | |||||
public Response GetList(dynamic _) | |||||
{ | |||||
string queryJson = this.GetReqData(); | |||||
var data = stuEnrollIBLL.GetList(queryJson); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// <summary> | |||||
/// <param name="_"></param> | |||||
/// <returns></returns> | |||||
public Response GetForm(dynamic _) | |||||
{ | |||||
string keyValue = this.GetReqData(); | |||||
var StuEnrollData = stuEnrollIBLL.GetStuEnrollEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
StuEnroll = StuEnrollData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="_"></param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Response DeleteForm(dynamic _) | |||||
{ | |||||
string keyValue = this.GetReqData(); | |||||
stuEnrollIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="_"></param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Response SaveForm(dynamic _) | |||||
{ | |||||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||||
StuEnrollEntity entity = parameter.strEntity.ToObject<StuEnrollEntity>(); | |||||
stuEnrollIBLL.SaveEntity( parameter.keyValue,entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
#region 私有类 | |||||
/// <summary> | |||||
/// 表单实体类 | |||||
/// <summary> | |||||
private class ReqFormEntity | |||||
{ | |||||
public string keyValue { get; set; } | |||||
public string strEntity { get; set; } | |||||
public string EmpNo { get; set; } | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-07-17 11:20 | |||||
/// 描 述:新生录取管理 | |||||
/// </summary> | |||||
public class StuEnrollScoreMap : EntityTypeConfiguration<StuEnrollScoreEntity> | |||||
{ | |||||
public StuEnrollScoreMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("StuEnrollScore"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -92,6 +92,7 @@ | |||||
<Compile Include="EducationalAdministration\ScoreStatisticsMap.cs" /> | <Compile Include="EducationalAdministration\ScoreStatisticsMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StuCancelLeaveManagementMap.cs" /> | <Compile Include="EducationalAdministration\StuCancelLeaveManagementMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StuDisciplineManagementMap.cs" /> | <Compile Include="EducationalAdministration\StuDisciplineManagementMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StuEnrollScoreMap.cs" /> | |||||
<Compile Include="EducationalAdministration\StuGrantMap.cs" /> | <Compile Include="EducationalAdministration\StuGrantMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StuInfoBasicChangeMap.cs" /> | <Compile Include="EducationalAdministration\StuInfoBasicChangeMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StuInfoFreshMap.cs" /> | <Compile Include="EducationalAdministration\StuInfoFreshMap.cs" /> | ||||
@@ -0,0 +1,172 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-06-18 11:19 | |||||
/// 描 述:MajorAndSubject | |||||
/// </summary> | |||||
public class MajorAndSubjectBLL : MajorAndSubjectIBLL | |||||
{ | |||||
private MajorAndSubjectService majorAndSubjectService = new MajorAndSubjectService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<MajorAndSubjectEntity> GetList( string queryJson ) | |||||
{ | |||||
try | |||||
{ | |||||
return majorAndSubjectService.GetList(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取列表分页数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<MajorAndSubjectEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return majorAndSubjectService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public MajorAndSubjectEntity GetEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return majorAndSubjectService.GetEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
majorAndSubjectService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, MajorAndSubjectEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
majorAndSubjectService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 删除关联 | |||||
/// <summary> | |||||
/// 删除关联 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntityById(string ID) | |||||
{ | |||||
try | |||||
{ | |||||
majorAndSubjectService.DeleteEntityById(ID); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,56 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-06-18 11:19 | |||||
/// 描 述:MajorAndSubject | |||||
/// </summary> | |||||
public class MajorAndSubjectEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// MajorId | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("MAJORID")] | |||||
public string MajorId { get; set; } | |||||
/// <summary> | |||||
/// SubId | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("SUBID")] | |||||
public string SubId { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,60 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-06-18 11:19 | |||||
/// 描 述:MajorAndSubject | |||||
/// </summary> | |||||
public interface MajorAndSubjectIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<MajorAndSubjectEntity> GetList( string queryJson ); | |||||
/// <summary> | |||||
/// 获取列表分页数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<MajorAndSubjectEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
MajorAndSubjectEntity GetEntity(string keyValue); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, MajorAndSubjectEntity entity); | |||||
#endregion | |||||
#region 删除关联 | |||||
void DeleteEntityById(string Id); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,211 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-06-18 11:19 | |||||
/// 描 述:MajorAndSubject | |||||
/// </summary> | |||||
public class MajorAndSubjectService : RepositoryFactory | |||||
{ | |||||
#region 构造函数和属性 | |||||
private string fieldSql; | |||||
/// <summary> | |||||
/// 构造方法 | |||||
/// </summary> | |||||
public MajorAndSubjectService() | |||||
{ | |||||
fieldSql=@" | |||||
t.Id, | |||||
t.MajorId, | |||||
t.SubId | |||||
"; | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">条件参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<MajorAndSubjectEntity> GetList( string queryJson ) | |||||
{ | |||||
try | |||||
{ | |||||
//参考写法 | |||||
//var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
//var dp = new DynamicParameters(new { }); | |||||
//dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(fieldSql); | |||||
strSql.Append(" FROM MajorAndSubject t "); | |||||
return this.BaseRepository("CollegeMIS").FindList<MajorAndSubjectEntity>(strSql.ToString()); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取列表分页数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">条件参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<MajorAndSubjectEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(fieldSql); | |||||
strSql.Append(" FROM MajorAndSubject t "); | |||||
return this.BaseRepository("CollegeMIS").FindList<MajorAndSubjectEntity>(strSql.ToString(), pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public MajorAndSubjectEntity GetEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<MajorAndSubjectEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").Delete<MajorAndSubjectEntity>(t=>t.Id == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// </summary> | |||||
public void SaveEntity(string keyValue, MajorAndSubjectEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region MyRegion | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="ID">主键</param> | |||||
public void DeleteEntityById(string ID) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").Delete<MajorAndSubjectEntity>(t => t.MajorId == ID); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -42,6 +42,56 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 招生统计 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public DataTable GetTJList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuEnrollService.GetTJList(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuEnrollEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuEnrollService.GetList(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<StuEnrollEntity> AllStudent() | public IEnumerable<StuEnrollEntity> AllStudent() | ||||
{ | { | ||||
try | try | ||||
@@ -130,6 +180,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取StuEnroll表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public StuEnrollEntity GetEntityByPersonalData(string IDCard, string StuMobile) | |||||
{ | |||||
try | |||||
{ | |||||
return stuEnrollService.GetEntityByPersonalData(IDCard, StuMobile); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public object GetStuInfo(string stuId) | public object GetStuInfo(string stuId) | ||||
@@ -375,6 +448,52 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveEnroll(string keyValue, StuEnrollEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
stuEnrollService.SaveEnroll(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// 查询 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public StuEnrollEntity SearchForm(int type, StuEnrollEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
return stuEnrollService.SearchForm(type, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void AllocationClass(string classNo, string dataJson) | public void AllocationClass(string classNo, string dataJson) | ||||
{ | { | ||||
@@ -899,6 +1018,63 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
public void UpdateEnrollStatus(string keyValue, int EnrollStatus) | |||||
{ | |||||
try | |||||
{ | |||||
stuEnrollService.UpdateEnrollStatus(keyValue, EnrollStatus); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void Admission(string keyValue, int IsAdmission) | |||||
{ | |||||
try | |||||
{ | |||||
stuEnrollService.Admission(keyValue, IsAdmission); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<ExamSubjectEntity> GetExamDataByStuId(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return stuEnrollService.GetExamDataByStuId(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
@@ -20,11 +20,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("STUID")] | [Column("STUID")] | ||||
public string StuId { get; set; } | public string StuId { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 学生报名号 | |||||
/// </summary> | |||||
[Column("REGISTRATIONNO")] | |||||
public string RegistrationNo { get; set; } | |||||
/// <summary> | |||||
/// 姓名 | /// 姓名 | ||||
/// </summary> | /// </summary> | ||||
[Column("STUNAME")] | [Column("STUNAME")] | ||||
@@ -34,34 +29,132 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("GENDER")] | [Column("GENDER")] | ||||
public bool? Gender { get; set; } | public bool? Gender { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 出生年月 | |||||
/// 民族 | |||||
/// </summary> | /// </summary> | ||||
[Column("BIRTHDAY")] | |||||
public DateTime? Birthday { get; set; } | |||||
[Column("NATIONALS")] | |||||
public string Nationals { get; set; } | |||||
/// <summary> | |||||
/// 家庭住址 | |||||
/// </summary> | |||||
[Column("HOMEADDRESS")] | |||||
public string HomeAddress { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// 身份证 | /// 身份证 | ||||
/// </summary> | /// </summary> | ||||
[Column("IDCARD")] | [Column("IDCARD")] | ||||
public string IDCard { get; set; } | public string IDCard { get; set; } | ||||
/// <summary> | |||||
/// 手机号 | |||||
/// </summary> | |||||
[Column("STUMOBILE")] | |||||
public string StuMobile { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// 学籍所在学校 | |||||
/// 毕业学校 | |||||
/// </summary> | /// </summary> | ||||
[Column("FROMSCHOOL")] | [Column("FROMSCHOOL")] | ||||
public string FromSchool { get; set; } | public string FromSchool { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 中考总分 | |||||
/// </summary> | |||||
[Column("MIDTERMEXAM")] | |||||
public string MidTermExam { get; set; } | |||||
/// <summary> | |||||
/// 特长 | |||||
/// </summary> | |||||
[Column("SPECIALTY")] | |||||
public string Specialty { get; set; } | |||||
/// <summary> | |||||
/// 地市 | |||||
/// </summary> | |||||
[Column("CITY")] | |||||
public string City { get; set; } | |||||
/// <summary> | |||||
/// 县区 | |||||
/// </summary> | |||||
[Column("COUNTY")] | |||||
public string County { get; set; } | |||||
/// <summary> | |||||
/// 录取专业代码 | |||||
/// </summary> | |||||
[Column("MAJORNO")] | |||||
public string MajorNo { get; set; } | |||||
/// <summary> | |||||
/// 录取专业名称 | |||||
/// </summary> | |||||
[Column("MAJORNAME")] | |||||
public string MajorName { get; set; } | |||||
/// <summary> | |||||
/// 身份证正面照片 | |||||
/// </summary> | |||||
[Column("IDCARDPTO1")] | |||||
public string IdCardPto1 { get; set; } | |||||
/// <summary> | |||||
/// 身份证反面照片 | |||||
/// </summary> | |||||
[Column("IDCARDPTO2")] | |||||
public string IdCardPto2 { get; set; } | |||||
/// <summary> | |||||
/// 初中毕业证 | |||||
/// </summary> | |||||
[Column("MIDDIPLOMAPTO")] | |||||
public string MidDiplomaPto { get; set; } | |||||
/// <summary> | |||||
/// 中考成绩截图 | |||||
/// </summary> | |||||
[Column("MIDACHIEVEMENTPTO")] | |||||
public string MidAchievementPto { get; set; } | |||||
/// <summary> | |||||
/// 备注 | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// 关联教师 | |||||
/// </summary> | |||||
[Column("EMPNO")] | |||||
public string EmpNo { get; set; } | |||||
/// <summary> | |||||
/// 年度(专业的年度) | |||||
/// </summary> | |||||
[Column("YEAR")] | |||||
public string Year { get; set; } | |||||
/// <summary> | |||||
/// 报名审核状态 | |||||
/// </summary> | |||||
[Column("ENROLLSTATUS")] | |||||
public int? EnrollStatus { get; set; } | |||||
/// <summary> | |||||
/// 考试成绩 | |||||
/// </summary> | |||||
[Column("EXAMSCORE")] | |||||
public decimal? ExamScore { get; set; } | |||||
/// <summary> | |||||
/// 是否录取 | |||||
/// </summary> | |||||
[Column("ISADMISSION")] | |||||
public bool? IsAdmission { get; set; } | |||||
/// <summary> | |||||
/// 学生报名号 | |||||
/// </summary> | |||||
[Column("REGISTRATIONNO")] | |||||
public string RegistrationNo { get; set; } | |||||
/// <summary> | |||||
/// 出生年月 | |||||
/// </summary> | |||||
[Column("BIRTHDAY")] | |||||
public DateTime? Birthday { get; set; } | |||||
/// <summary> | |||||
/// 政治面貌 | /// 政治面貌 | ||||
/// </summary> | /// </summary> | ||||
[Column("POLITICAL")] | [Column("POLITICAL")] | ||||
public string Political { get; set; } | public string Political { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 民族 | |||||
/// </summary> | |||||
[Column("NATIONALS")] | |||||
public string Nationals { get; set; } | |||||
/// <summary> | |||||
/// 届别 | /// 届别 | ||||
/// </summary> | /// </summary> | ||||
[Column("FRESHTYPE")] | [Column("FRESHTYPE")] | ||||
@@ -90,11 +183,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("NONNATIVE")] | [Column("NONNATIVE")] | ||||
public string NonNative { get; set; } | public string NonNative { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 家庭住址 | |||||
/// </summary> | |||||
[Column("HOMEADDRESS")] | |||||
public string HomeAddress { get; set; } | |||||
/// <summary> | |||||
/// 第一监护人姓名 | /// 第一监护人姓名 | ||||
/// </summary> | /// </summary> | ||||
[Column("FIRSTGUARDIAN")] | [Column("FIRSTGUARDIAN")] | ||||
@@ -160,11 +248,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("ADDITIONALCARE")] | [Column("ADDITIONALCARE")] | ||||
public string AdditionalCare { get; set; } | public string AdditionalCare { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 中考成绩 | |||||
/// </summary> | |||||
[Column("MIDTERMEXAM")] | |||||
public string MidTermExam { get; set; } | |||||
/// <summary> | |||||
/// 语文 | /// 语文 | ||||
/// </summary> | /// </summary> | ||||
[Column("LANGUAGE")] | [Column("LANGUAGE")] | ||||
@@ -230,16 +313,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("ADMISSIONNAME")] | [Column("ADMISSIONNAME")] | ||||
public string AdmissionName { get; set; } | public string AdmissionName { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 录取专业代码 | |||||
/// </summary> | |||||
[Column("MAJORNO")] | |||||
public string MajorNo { get; set; } | |||||
/// <summary> | |||||
/// 录取专业名称 | |||||
/// </summary> | |||||
[Column("MAJORNAME")] | |||||
public string MajorName { get; set; } | |||||
/// <summary> | |||||
/// 录取方式 | /// 录取方式 | ||||
/// </summary> | /// </summary> | ||||
[Column("ADMISSIONS")] | [Column("ADMISSIONS")] | ||||
@@ -255,11 +328,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("EXAMREGISTRATION")] | [Column("EXAMREGISTRATION")] | ||||
public string ExamRegistration { get; set; } | public string ExamRegistration { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 备注 | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// 班级 | /// 班级 | ||||
/// </summary> | /// </summary> | ||||
[Column("CLASSNO")] | [Column("CLASSNO")] | ||||
@@ -22,6 +22,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="queryJson">查询参数</param> | /// <param name="queryJson">查询参数</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<StuEnrollEntity> GetPageList(Pagination pagination, string queryJson); | IEnumerable<StuEnrollEntity> GetPageList(Pagination pagination, string queryJson); | ||||
DataTable GetTJList(string queryJson); | |||||
IEnumerable<StuEnrollEntity> GetList(string queryJson); | |||||
IEnumerable<StuEnrollEntity> AllStudent(); | IEnumerable<StuEnrollEntity> AllStudent(); | ||||
IEnumerable<Acc_DormitoryBuildEntity> GetDormitorys(Pagination pagination, string queryJson); | IEnumerable<Acc_DormitoryBuildEntity> GetDormitorys(Pagination pagination, string queryJson); | ||||
@@ -32,6 +34,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
StuEnrollEntity GetStuEnrollEntity(string keyValue); | StuEnrollEntity GetStuEnrollEntity(string keyValue); | ||||
StuEnrollEntity GetEntityByPersonalData(string IDCard, string StuMobile); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -48,6 +51,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
void SaveEntity(string keyValue, StuEnrollEntity entity); | void SaveEntity(string keyValue, StuEnrollEntity entity); | ||||
void SaveEnroll(string keyValue, StuEnrollEntity entity); | |||||
StuEnrollEntity SearchForm(int type, StuEnrollEntity strEntity); | |||||
void EditEnrollType(string stuIds, string enrollType); | void EditEnrollType(string stuIds, string enrollType); | ||||
void AllocationClass(string classNo, string dataJson); | void AllocationClass(string classNo, string dataJson); | ||||
void NewAllocationDormitory(string classNo, string dataJson); | void NewAllocationDormitory(string classNo, string dataJson); | ||||
@@ -85,6 +90,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
void GetMoney(); | void GetMoney(); | ||||
void RelationPhoto(); | void RelationPhoto(); | ||||
void Synchronization(); | void Synchronization(); | ||||
void UpdateEnrollStatus(string keyValue, int EnrollStatus); | |||||
void Admission(string keyValue, int IsAdmission); | |||||
IEnumerable<ExamSubjectEntity> GetExamDataByStuId(string keyValue); | |||||
List<string> GetStuIdCards(); | List<string> GetStuIdCards(); | ||||
List<TreeModel> GetTree(); | List<TreeModel> GetTree(); | ||||
@@ -98,7 +98,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
t.DeptNo, | t.DeptNo, | ||||
t.Grade, | t.Grade, | ||||
t.THROUGHPROJECT, | t.THROUGHPROJECT, | ||||
t.Status | |||||
t.Status,t.StuMobile,t.Specialty,t.City,t.County,t.EmpNo,t.IsAdmission,t.EnrollStatus,t.MidTermExam | |||||
"); | "); | ||||
strSql.Append(" FROM StuEnroll t "); | strSql.Append(" FROM StuEnroll t "); | ||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
@@ -128,7 +128,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
if (!queryParam["Admissions"].IsEmpty()) | if (!queryParam["Admissions"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("Admissions", queryParam["Admissions"].ToString() , DbType.String); | |||||
dp.Add("Admissions", queryParam["Admissions"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Admissions = @Admissions "); | strSql.Append(" AND t.Admissions = @Admissions "); | ||||
} | } | ||||
if (!queryParam["DeptNo"].IsEmpty()) | if (!queryParam["DeptNo"].IsEmpty()) | ||||
@@ -181,6 +181,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
strSql.Append(" AND t.StuName Like @StuName "); | strSql.Append(" AND t.StuName Like @StuName "); | ||||
} | } | ||||
if (!queryParam["StuMobile"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuMobile", "%" + queryParam["StuMobile"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuMobile Like @StuMobile "); | |||||
} | |||||
if (!queryParam["EmpNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.EmpNo = @EmpNo "); | |||||
} | |||||
if (!queryParam["Status"].IsEmpty()) | if (!queryParam["Status"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("Status", queryParam["Status"].ToString(), DbType.String); | dp.Add("Status", queryParam["Status"].ToString(), DbType.String); | ||||
@@ -341,8 +352,129 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 招生统计 | |||||
/// </summary> | |||||
/// <param name="queryJson"></param> | |||||
/// <returns></returns> | |||||
public DataTable GetTJList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("select empno,count(1) as num from stuenroll t where IsAdmission=1"); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["StuName"].IsEmpty()) | |||||
{ | |||||
strSql.Append($" AND t.StuName Like '%{queryParam["StuName"]}%' "); | |||||
} | |||||
if (!queryParam["IDCard"].IsEmpty()) | |||||
{ | |||||
strSql.Append($" AND t.IDCard Like '%{queryParam["IDCard"]}%' "); | |||||
} | |||||
if (!queryParam["StuMobile"].IsEmpty()) | |||||
{ | |||||
strSql.Append($" AND t.StuMobile Like '%{queryParam["StuMobile"]}%' "); | |||||
} | |||||
if (!queryParam["Year"].IsEmpty()) | |||||
{ | |||||
strSql.Append($" AND charindex(t.Year,('{queryParam["Year"]}'))>0 "); | |||||
} | |||||
if (!queryParam["City"].IsEmpty()) | |||||
{ | |||||
strSql.Append($" AND charindex(t.City,('{queryParam["City"]}'))>0 "); | |||||
} | |||||
if (!queryParam["County"].IsEmpty()) | |||||
{ | |||||
strSql.Append($" AND charindex(t.County,('{queryParam["County"]}'))>0 "); | |||||
} | |||||
if (!queryParam["MajorNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append($" AND charindex(t.MajorNo,('{queryParam["MajorNo"]}'))>0 "); | |||||
} | |||||
if (!queryParam["EmpNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append($" AND charindex(t.EmpNo,('{queryParam["EmpNo"]}'))>0 "); | |||||
} | |||||
//sql条件 | |||||
if (!queryParam["SqlParameter"].IsEmpty()) | |||||
{ | |||||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||||
} | |||||
strSql.Append(" group by empno"); | |||||
return this.BaseRepository("CollegeMIS").FindTable(strSql.ToString()); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuEnrollEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.StuId, | |||||
t.StuName, | |||||
t.Gender, | |||||
t.Nationals, | |||||
t.HomeAddress, | |||||
t.IDCard, | |||||
t.StuMobile, | |||||
t.FromSchool, | |||||
t.MidTermExam, | |||||
t.Specialty, | |||||
t.City, | |||||
t.County, | |||||
t.MajorNo, | |||||
t.IdCardPto1, | |||||
t.IdCardPto2, | |||||
t.MidDiplomaPto, | |||||
t.MidAchievementPto, | |||||
t.Remark | |||||
"); | |||||
strSql.Append(" FROM StuEnroll t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["StuName"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuName Like @StuName "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<StuEnrollEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<StuEnrollEntity> AllStudent() | public IEnumerable<StuEnrollEntity> AllStudent() | ||||
{ | { | ||||
@@ -1945,6 +2077,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取StuEnroll表实体数据 | |||||
/// <param name=""></param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public StuEnrollEntity GetEntityByPersonalData(string IDCard, string StuMobile) | |||||
{ | |||||
try | |||||
{ | |||||
var year = DateTime.Now.Year; | |||||
return this.BaseRepository("CollegeMIS").FindEntity<StuEnrollEntity>(x => (x.IDCard == IDCard || x.StuMobile == StuMobile) && x.AddTime.Value.Year == year); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion 获取数据 | #endregion 获取数据 | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -2011,6 +2167,71 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 新生报名 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveEnroll(string keyValue, StuEnrollEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
entity.EnrollStatus = 0; | |||||
var sql = $" select top 1 [year] as year,Majorname from CdMajor where ID='{entity.MajorNo}'"; | |||||
var majorData = this.BaseRepository("CollegeMIS").FindTable(sql); | |||||
entity.MajorName = majorData.Rows[0]["Majorname"].ToString(); | |||||
entity.Year = majorData.Rows[0]["year"].ToString(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 学生查询考试地点或录取结果 | |||||
/// <param name=""></param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public StuEnrollEntity SearchForm(int type, StuEnrollEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<StuEnrollEntity>(x => x.EnrollStatus == 2 && | |||||
x.StuName == entity.StuName && x.StuMobile == entity.StuMobile && x.IDCard == entity.IDCard); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void EditEnrollType(string stuIds, string enrollType) | public void EditEnrollType(string stuIds, string enrollType) | ||||
{ | { | ||||
try | try | ||||
@@ -2197,6 +2418,150 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 报名审核 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void UpdateEnrollStatus(string keyValue, int EnrollStatus) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
//新生报名表审核通过的数据 | |||||
//var enrollList = new List<StuEnrollEntity>(); | |||||
//if (keyValue.Contains(",")) | |||||
//{ | |||||
// keyValue = string.Join("','", keyValue.Split(',')); | |||||
// enrollList = db.FindList<StuEnrollEntity>(x => keyValue.Contains(x.StuId)).ToList(); | |||||
//} | |||||
//else | |||||
//{ | |||||
// enrollList = db.FindList<StuEnrollEntity>(x => x.StuId == keyValue).ToList(); | |||||
//} | |||||
var enrollList = db.FindList<StuEnrollEntity>(x => x.StuId == keyValue).ToList(); | |||||
string sql = $"update StuEnroll set EnrollStatus='{EnrollStatus}' where stuid in ('{keyValue}')"; | |||||
db.ExecuteBySql(sql); | |||||
//审核通过 添加新生成绩表 | |||||
if (EnrollStatus == 2) | |||||
{ | |||||
//新生成绩表 | |||||
var list = db.FindList<StuEnrollScoreEntity>(); | |||||
foreach (var enrollData in enrollList) | |||||
{ | |||||
if (list.Where(x => x.YearNo == enrollData.Year && x.StuId == enrollData.StuId).Count() <= 0) | |||||
{ | |||||
//新生成绩表不存在当前新生 添加 | |||||
//循环报名的专业所关联的学科 | |||||
//专业学科关联表 | |||||
var MajorAndSubjectList = db.FindList<MajorAndSubjectEntity>(x => x.MajorId == enrollData.MajorNo); | |||||
foreach (var sub in MajorAndSubjectList) | |||||
{ | |||||
StuEnrollScoreEntity model = new StuEnrollScoreEntity(); | |||||
model.Create(); | |||||
model.YearNo = enrollData.Year; | |||||
model.MajorId = enrollData.MajorNo; | |||||
model.StuId = enrollData.StuId; | |||||
model.SubjectId = sub.SubId; | |||||
model.Score = 0; | |||||
db.Insert(model); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
//删除新生成绩表 | |||||
foreach (var enrollData in enrollList) | |||||
{ | |||||
var scoreList = db.FindList<StuEnrollScoreEntity>(x => x.StuId == enrollData.StuId); | |||||
foreach (var item in scoreList) | |||||
{ | |||||
db.Delete(item); | |||||
} | |||||
} | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 录取 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void Admission(string keyValue, int IsAdmission) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = $"update StuEnroll set IsAdmission='{IsAdmission}' where stuid='{keyValue}'"; | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取学生考试信息 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ExamSubjectEntity> GetExamDataByStuId(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = $"select majorno from stuenroll where stuid='{keyValue}'"; | |||||
var majorId = ""; | |||||
var majorDt = this.BaseRepository("CollegeMIS").FindTable(sql); | |||||
if (majorDt != null) | |||||
{ | |||||
majorId = majorDt.Rows[0]["majorno"].ToString(); | |||||
} | |||||
string subSql = | |||||
$"select s.* from [dbo].[MajorAndSubject] m join ExamSubject s on m.SubId=s.Id where m.Majorid='31e1f414-892d-49e7-8559-631ebf22b15d' and s.IsFlag=1 "; | |||||
return this.BaseRepository("CollegeMIS").FindList<ExamSubjectEntity>(subSql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion 提交数据 | #endregion 提交数据 | ||||
} | } | ||||
} | } |
@@ -0,0 +1,454 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
using static Learun.Application.TwoDevelopment.EducationalAdministration.StuEnrollScoreService; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-06-14 11:02 | |||||
/// 描 述:考试成绩同步 | |||||
/// </summary> | |||||
public class StuEnrollScoreBLL : StuEnrollScoreIBLL | |||||
{ | |||||
private StuEnrollScoreService stuScoreService = new StuEnrollScoreService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuEnrollScoreEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreService.GetList(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取学生成绩列表数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuEnrollScoreEntity> GetScoreListByStuId(string stuid) | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreService.GetScoreListByStuId(stuid); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuEnrollEntity> GetPageListForAdmission(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreService.GetPageListForAdmission(pagination,queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public StuEnrollScoreEntity GetEntityByJson(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreService.GetEntityByJson(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取学年 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<WebHelper.YearGrade> GetYearNoData() | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreService.GetYearNoData(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取学科 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<WebHelper.YearGrade> GetSubjectData() | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreService.GetSubjectData(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取学科 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<WebHelper.YearGrade> GetMajorData() | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreService.GetMajorData(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取列表分页数据 | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuEnrollScoreEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public StuEnrollScoreEntity GetEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreService.GetEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取实体数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public int GetNoCheck(string StuId) | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreService.GetNoCheck(StuId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
stuScoreService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, StuEnrollScoreEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
stuScoreService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 判断是否有未审核的成绩 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public int IsExistNoCheck(string YearNo, string MajorId) | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreService.IsExistNoCheck(YearNo, MajorId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 开始录入:占用成绩 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void StartInputScore(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
stuScoreService.StartInputScore(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 开始录入:占用成绩 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveInputScore(List<StuEnrollScoreEntity> list) | |||||
{ | |||||
try | |||||
{ | |||||
stuScoreService.SaveInputScore(list); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 提交成绩:取消占用【服务】 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveInputScoreStatus2(string queryJson, string name) | |||||
{ | |||||
try | |||||
{ | |||||
stuScoreService.SaveInputScoreStatus2(queryJson, name); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 提交成绩:取消占用 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveInputScoreStatus(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
stuScoreService.SaveInputScoreStatus(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 提交成绩:取消占用 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void DoCheckScore(string queryJson, int Status) | |||||
{ | |||||
try | |||||
{ | |||||
stuScoreService.DoCheckScore(queryJson, Status); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,131 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-06-17 11:02 | |||||
/// 描 述:新生考试成绩 | |||||
/// </summary> | |||||
public class StuEnrollScoreEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// 主键 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 学年 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("YEARNO")] | |||||
public string YearNo { get; set; } | |||||
/// <summary> | |||||
/// 专业 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("MAJORID")] | |||||
public string MajorId { get; set; } | |||||
/// <summary> | |||||
/// 新生 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("STUID")] | |||||
public string StuId { get; set; } | |||||
/// <summary> | |||||
/// 学科 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("SUBJECTID")] | |||||
public string SubjectId { get; set; } | |||||
/// <summary> | |||||
/// 成绩 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("SCORE")] | |||||
public decimal? Score { get; set; } | |||||
/// <summary> | |||||
/// 状态 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("STATUS")] | |||||
public int? Status { get; set; } | |||||
/// <summary> | |||||
/// 审核人 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("STATUSUSERID")] | |||||
public string StatusUserId { get; set; } | |||||
/// <summary> | |||||
/// 审核人 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("STATUSTIME")] | |||||
public DateTime? StatusTime { get; set; } | |||||
/// <summary> | |||||
/// 创建时间 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
/// <summary> | |||||
/// 创建人 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("CREATEUSERID")] | |||||
public string CreateUserId { get; set; } | |||||
/// <summary> | |||||
///备注 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
this.CreateTime=DateTime.Now; | |||||
this.CreateUserId = LoginUserInfo.Get().userId; | |||||
this.Status = 0; | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[NotMapped] | |||||
public string StuName { get; set; } | |||||
[NotMapped] | |||||
public string StuMobile { get; set; } | |||||
[NotMapped] | |||||
public string IdCard { get; set; } | |||||
[NotMapped] | |||||
public string Gender { get; set; } | |||||
[NotMapped] | |||||
public string SubjectName { get; set; } | |||||
} | |||||
} | |||||
@@ -0,0 +1,99 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
using static Learun.Application.TwoDevelopment.EducationalAdministration.StuEnrollScoreService; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-06-14 11:02 | |||||
/// 描 述:考试成绩同步 | |||||
/// </summary> | |||||
public interface StuEnrollScoreIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
IEnumerable<StuEnrollScoreEntity> GetList(string queryJson); | |||||
IEnumerable<StuEnrollScoreEntity> GetScoreListByStuId(string stuid); | |||||
IEnumerable<StuEnrollEntity> GetPageListForAdmission(Pagination pagination, string queryJson); | |||||
StuEnrollScoreEntity GetEntityByJson(string queryJson); | |||||
IEnumerable<WebHelper.YearGrade> GetYearNoData(); | |||||
IEnumerable<WebHelper.YearGrade> GetSubjectData(); | |||||
IEnumerable<WebHelper.YearGrade> GetMajorData(); | |||||
/// <summary> | |||||
/// 获取列表分页数据 | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
IEnumerable<StuEnrollScoreEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
StuEnrollScoreEntity GetEntity(string keyValue); | |||||
int GetNoCheck(string StuId); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
void SaveEntity(string keyValue, StuEnrollScoreEntity entity); | |||||
/// <summary> | |||||
/// 判断是否有未审核的成绩 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
int IsExistNoCheck(string YearNo, string MajorId); | |||||
/// <summary> | |||||
/// 开始录入:占用成绩 | |||||
/// </summary> | |||||
/// <param name="queryJson"></param> | |||||
void StartInputScore(string queryJson); | |||||
/// <summary> | |||||
/// 保存成绩 | |||||
/// </summary> | |||||
/// <param name="list"></param> | |||||
void SaveInputScore(List<StuEnrollScoreEntity> list); | |||||
/// <summary> | |||||
/// 保存成绩 取消录入 | |||||
/// </summary> | |||||
/// <param name="queryJson"></param> | |||||
/// <param name="name"></param> | |||||
void SaveInputScoreStatus2(string queryJson, string name); | |||||
/// <summary> | |||||
/// 提交成绩 取消占用 | |||||
/// </summary> | |||||
/// <param name="queryJson"></param> | |||||
void SaveInputScoreStatus(string queryJson); | |||||
/// <summary> | |||||
/// 审核 | |||||
/// </summary> | |||||
/// <param name="queryJson"></param> | |||||
/// <param name="Status"></param> | |||||
void DoCheckScore(string queryJson, int Status); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,643 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Linq; | |||||
using System.Net.Http; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
using Newtonsoft.Json; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-06-14 11:02 | |||||
/// 描 述:考试成绩同步 | |||||
/// </summary> | |||||
public class StuEnrollScoreService : RepositoryFactory | |||||
{ | |||||
#region 构造函数和属性 | |||||
private string fieldSql; | |||||
public StuEnrollScoreService() | |||||
{ | |||||
fieldSql = @" | |||||
t.* | |||||
"; | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuEnrollScoreEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append(@"SELECT t.*,a.StuName,a.StuMobile,a.IdCard,a.Gender FROM StuEnrollScore t | |||||
join stuenroll a on t.stuid=a.stuid where 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["YearNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.YearNo=@YearNo "); | |||||
dp.Add("YearNo", queryParam["YearNo"].ToString(), DbType.String); | |||||
} | |||||
if (!queryParam["MajorId"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.MajorId=@MajorId "); | |||||
dp.Add("MajorId", queryParam["MajorId"].ToString(), DbType.String); | |||||
} | |||||
if (!queryParam["SubjectId"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.SubjectId=@SubjectId "); | |||||
dp.Add("SubjectId", queryParam["SubjectId"].ToString(), DbType.String); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<StuEnrollScoreEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuEnrollScoreEntity> GetScoreListByStuId(string stuid) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = $"select a.Score,b.SubjectName from StuEnrollScore a left join ExamSubject b on a.subjectId=b.Id where a.stuid='{stuid}' "; | |||||
return this.BaseRepository("CollegeMIS").FindList<StuEnrollScoreEntity>(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取新生录取管理列表 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuEnrollEntity> GetPageListForAdmission(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append(@"select t.* from StuEnroll t where t.EnrollStatus=2 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["Year"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.Year=@Year "); | |||||
dp.Add("Year", queryParam["Year"].ToString(), DbType.String); | |||||
} | |||||
if (!queryParam["MajorId"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.MajorId=@MajorId "); | |||||
dp.Add("MajorId", queryParam["MajorId"].ToString(), DbType.String); | |||||
} | |||||
if (!queryParam["SubjectId"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.SubjectId=@SubjectId "); | |||||
dp.Add("SubjectId", queryParam["SubjectId"].ToString(), DbType.String); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<StuEnrollEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public StuEnrollScoreEntity GetEntityByJson(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append(@"SELECT t.* FROM StuEnrollScore t where 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["YearNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.YearNo=@YearNo "); | |||||
dp.Add("YearNo", queryParam["YearNo"].ToString(), DbType.String); | |||||
} | |||||
if (!queryParam["MajorId"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.MajorId=@MajorId "); | |||||
dp.Add("MajorId", queryParam["MajorId"].ToString(), DbType.String); | |||||
} | |||||
if (!queryParam["SubjectId"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.SubjectId=@SubjectId "); | |||||
dp.Add("SubjectId", queryParam["SubjectId"].ToString(), DbType.String); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindEntity<StuEnrollScoreEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取列表分页数据 | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuEnrollScoreEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(fieldSql); | |||||
strSql.Append(" FROM StuEnrollScore t where 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["keyword"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and (stuno like @keyword or stuname like @keyword )"); | |||||
dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<StuEnrollScoreEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public StuEnrollScoreEntity GetEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<StuEnrollScoreEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 学年下拉框信息 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<WebHelper.YearGrade> GetYearNoData() | |||||
{ | |||||
try | |||||
{ | |||||
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>("select distinct s.yearno as value,s.yearno as text from StuEnrollScore s "); | |||||
data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); | |||||
return data; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 学科 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<WebHelper.YearGrade> GetSubjectData() | |||||
{ | |||||
try | |||||
{ | |||||
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>("select distinct s.subjectId as value,a.SubjectName as text from StuEnrollScore s left join ExamSubject a on s.subjectId=a.id"); | |||||
data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); | |||||
return data; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 专业 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<WebHelper.YearGrade> GetMajorData() | |||||
{ | |||||
try | |||||
{ | |||||
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>("select distinct s.MajorNo as value,a.MajorName as text from StuEnroll s left join CdMajor a on s.MajorNo=a.ID "); | |||||
data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); | |||||
return data; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 判断学生成绩是否都已审核 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public int GetNoCheck(string StuId) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = $"select count(1) from StuEnrollScore where StuId='{StuId}' and [Status]=0"; | |||||
var obj = this.BaseRepository("CollegeMIS").FindTable(sql); | |||||
if (obj == null) | |||||
{ | |||||
return 0; | |||||
} | |||||
else | |||||
{ | |||||
return Convert.ToInt32(obj.Rows[0][0]); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").Delete<StuEnrollScoreEntity>(t => t.Id == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, StuEnrollScoreEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取未审核的成绩的数量 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public int IsExistNoCheck(string YearNo, string MajorId) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = | |||||
$"select count(1) as count from StuEnrollScore where [Status]=0 and YearNo='{YearNo}' and MajorId='{MajorId}' "; | |||||
DataTable dt = this.BaseRepository("CollegeMIS").FindTable(sql); | |||||
return Convert.ToInt32(dt.Rows[0]["count"]); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 开始录入:占用成绩 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void StartInputScore(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var queryParam = queryJson.ToJObject(); | |||||
//学年 | |||||
var Year = queryParam["Year"].ToString(); | |||||
//考试科目 | |||||
var SubjectId = queryParam["SubjectId"].ToString(); | |||||
var now = DateTime.Now; | |||||
var loginUserInfo = LoginUserInfo.Get(); | |||||
var sql = $"update StuEnrollScore set IsEditable='0',EditUserId='" + loginUserInfo.account + | |||||
"',BeginModifyDate='" + now + "' where YearNo='" + Year + "' and SubjectId='" + SubjectId + "'"; | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 提交成绩 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveInputScore(List<StuEnrollScoreEntity> list) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var now = DateTime.Now; | |||||
var loginUserInfo = LoginUserInfo.Get(); | |||||
foreach (var item in list) | |||||
{ | |||||
item.Score = item.Score.HasValue ? item.Score.Value : 0; | |||||
db.ExecuteBySql($"update StuEnrollScore set Score={item.Score},Remark='{item.Remark}' where Id='{item.Id}' "); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 提交成绩:取消占用【服务】 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveInputScoreStatus2(string queryJson, string name) | |||||
{ | |||||
try | |||||
{ | |||||
var queryParam = queryJson.ToJObject(); | |||||
//学年 | |||||
var Year = queryParam["Year"].ToString(); | |||||
//考试科目 | |||||
var SubjectId = queryParam["SubjectId"].ToString(); | |||||
var now = DateTime.Now; | |||||
//var loginUserInfo = LoginUserInfo.Get(); | |||||
var loginUserInfo = new | |||||
{ | |||||
account = name.Split('_')[0], | |||||
realName = name.Split('_')[1] | |||||
}; | |||||
var sql = | |||||
$"update StuEnrollScore set IsEditable='1',EditUserId=null,BeginModifyDate=null,ModifyDate='{now}',ModifyUserId='{loginUserInfo.account}',ModifyUserName='{loginUserInfo.realName}' where YearNo='{Year}' and SubjectId='{SubjectId}'"; | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 提交成绩:取消占用 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveInputScoreStatus(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var queryParam = queryJson.ToJObject(); | |||||
//学年 | |||||
var Year = queryParam["Year"].ToString(); | |||||
//考试科目 | |||||
var SubjectId = queryParam["SubjectId"].ToString(); | |||||
var now = DateTime.Now; | |||||
var loginUserInfo = LoginUserInfo.Get(); | |||||
var sql = $"update StuEnrollScore set IsEditable='1',EditUserId=null,BeginModifyDate=null,ModifyDate='{now}',ModifyUserId='{loginUserInfo.account}',ModifyUserName='{loginUserInfo.realName}' where YearNo='{Year}' and SubjectId='{SubjectId}'"; | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 审核成绩 | |||||
/// </summary> | |||||
/// <param name="queryJson"></param> | |||||
/// <param name="Status">已审核:1;未审核:0;</param> | |||||
public void DoCheckScore(string queryJson, int Status) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var queryParam = queryJson.ToJObject(); | |||||
//学年 | |||||
var Year = queryParam["Year"].ToString(); | |||||
//考试科目 | |||||
var SubjectId = queryParam["SubjectId"].ToString(); | |||||
db.ExecuteBySql($"update StuEnrollScore set Status='{Status}' where YearNo='{Year}' and SubjectId='{SubjectId}' "); | |||||
//已审核 记录学生总分 | |||||
if (Status == 1) | |||||
{ | |||||
var list = db.FindList<StuEnrollScoreEntity>(x => x.YearNo == Year && x.SubjectId == SubjectId).Select(x => x.StuId); | |||||
foreach (var item in list) | |||||
{ | |||||
var stuEnrollEntity = db.FindEntity<StuEnrollEntity>(x => x.StuId == item); | |||||
stuEnrollEntity.ExamScore = | |||||
db.FindList<StuEnrollScoreEntity>(x => x.YearNo == Year && x.StuId == item) | |||||
.Sum(x => x.Score); | |||||
db.Update(stuEnrollEntity); | |||||
} | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -174,6 +174,10 @@ | |||||
<Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolAIBLL.cs" /> | <Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolAIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolAService.cs" /> | <Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolAService.cs" /> | ||||
<Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolEntity.cs" /> | <Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\MajorAndSubject\MajorAndSubjectBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\MajorAndSubject\MajorAndSubjectEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\MajorAndSubject\MajorAndSubjectIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\MajorAndSubject\MajorAndSubjectService.cs" /> | |||||
<Compile Include="EducationalAdministration\MobileTest\MobileTestBLL.cs" /> | <Compile Include="EducationalAdministration\MobileTest\MobileTestBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\MobileTest\MobileTestEntity.cs" /> | <Compile Include="EducationalAdministration\MobileTest\MobileTestEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\MobileTest\MobileTestIBLL.cs" /> | <Compile Include="EducationalAdministration\MobileTest\MobileTestIBLL.cs" /> | ||||
@@ -214,6 +218,10 @@ | |||||
<Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordEntity.cs" /> | <Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordIBLL.cs" /> | <Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordService.cs" /> | <Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordService.cs" /> | ||||
<Compile Include="EducationalAdministration\StuEnrollScore\StuEnrollScoreBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\StuEnrollScore\StuEnrollScoreEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\StuEnrollScore\StuEnrollScoreIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\StuEnrollScore\StuEnrollScoreService.cs" /> | |||||
<Compile Include="EducationalAdministration\StuGrant\StuGrantBLL.cs" /> | <Compile Include="EducationalAdministration\StuGrant\StuGrantBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\StuGrant\StuGrantEntity.cs" /> | <Compile Include="EducationalAdministration\StuGrant\StuGrantEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\StuGrant\StuGrantIBLL.cs" /> | <Compile Include="EducationalAdministration\StuGrant\StuGrantIBLL.cs" /> | ||||