@@ -18,6 +18,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); | |||
private ArrangeLessonSyncIBLL arrangeLessonSyncIBLL = new ArrangeLessonSyncBLL(); | |||
private StuEnrollScoreIBLL stuEnrollScoreIBLL = new StuEnrollScoreBLL(); | |||
private ExamSubjectIBLL examSubjectIBLL = new ExamSubjectBLL(); | |||
private MajorAndSubjectIBLL majorAndSubjectIBLL = new MajorAndSubjectBLL(); | |||
#region 视图功能 | |||
@@ -51,7 +54,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 返回前五年+后五年的年份yyyy | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult GenerateNearByYear() | |||
{ | |||
return Success(WebHelper.GenerateNearByYear()); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
@@ -128,9 +138,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
var keyValueArr = keyValue.Split(','); | |||
foreach (var item in keyValueArr) | |||
{ | |||
var model = cdMajorIBLL.GetCdMajorEntity(item); | |||
int AuditCout = stuEnrollScoreIBLL.IsExistNoCheck(model.Year, keyValue); | |||
if (AuditCout > 0) | |||
{ | |||
return Fail("不能删除关联学科"); | |||
} | |||
} | |||
cdMajorIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
@@ -144,6 +166,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
CdMajorEntity entity = strEntity.ToObject<CdMajorEntity>(); | |||
entity.SyncFlag = false; | |||
var model = cdMajorIBLL.GetCdMajorEntityByMajorNo(entity.MajorNo); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
if (model != null) | |||
@@ -168,10 +191,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
entity.SyncFlag = false; | |||
} | |||
//删除所关联的科目 | |||
majorAndSubjectIBLL.DeleteEntityById(keyValue); | |||
} | |||
int AuditCout = stuEnrollScoreIBLL.IsExistNoCheck(entity.Year, keyValue); | |||
if (AuditCout > 0) | |||
{ | |||
return Fail("不能修改关联学科"); | |||
} | |||
cdMajorIBLL.SaveEntity(keyValue, entity); | |||
#region 给关联表添加科目 | |||
MajorAndSubjectEntity majorAndSubjectEntity = new MajorAndSubjectEntity(); | |||
string[] SubNo = entity.SubjectNo.Split(','); | |||
for (int i = 0; i < SubNo.Length; i++) | |||
{ | |||
majorAndSubjectEntity.MajorId = entity.ID;//关联专业主键 | |||
majorAndSubjectEntity.SubId = SubNo[i];//考试科目的主键 | |||
majorAndSubjectIBLL.SaveEntity("", majorAndSubjectEntity); | |||
} | |||
#endregion | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
@@ -101,6 +101,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页【教师二维码】 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult QRCode() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 打印 | |||
/// <summary> | |||
/// <returns></returns> | |||
@@ -0,0 +1,130 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-06-21 10:33 | |||
/// 描 述:考试科目基础信息 | |||
/// </summary> | |||
public class ExamSubjectController : MvcControllerBase | |||
{ | |||
private ExamSubjectIBLL examSubjectIBLL = new ExamSubjectBLL(); | |||
#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="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = examSubjectIBLL.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 ExamSubjectData = examSubjectIBLL.GetExamSubjectEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
ExamSubject = ExamSubjectData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
examSubjectIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
ExamSubjectEntity entity = strEntity.ToObject<ExamSubjectEntity>(); | |||
var model = examSubjectIBLL.GetExamSubjectBySubjectNo(entity.SubjectNo); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
if (model != null) | |||
{ | |||
return Fail("科目编码已存在,请重命名"); | |||
} | |||
} | |||
else | |||
{ | |||
if (model != null && model.Id != keyValue) | |||
{ | |||
return Fail("科目编码已存在,请重命名!"); | |||
} | |||
} | |||
examSubjectIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -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 AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | |||
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | |||
private StuEnrollScoreIBLL stuEnrollScoreIBLL = new StuEnrollScoreBLL(); | |||
#region 视图功能 | |||
@@ -35,6 +36,61 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
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] | |||
public ActionResult StudentStatus() | |||
{ | |||
@@ -214,6 +270,46 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataForEnroll(string keyValue) | |||
{ | |||
var StuEnrollData = stuEnrollIBLL.GetStuEnrollEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
StuEnroll = new | |||
{ | |||
StuId = StuEnrollData.StuId, | |||
Gender = StuEnrollData.Gender, | |||
StuName = StuEnrollData.StuName, | |||
IDCard = StuEnrollData.IDCard, | |||
IdCardPto1 = StuEnrollData.IdCardPto1, | |||
//StuId= StuEnrollData.StuId, | |||
//StuId= StuEnrollData.StuId, | |||
//StuId= StuEnrollData.StuId, | |||
//StuId= StuEnrollData.StuId, | |||
//StuId= StuEnrollData.StuId, | |||
}, | |||
}; | |||
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); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
@@ -837,6 +933,50 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <summary> | |||
/// 报名审核 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult UpdateEnrollStatus(string keyValue, string strEntity) | |||
{ | |||
stuEnrollIBLL.UpdateEnrollStatus(keyValue, 2); | |||
return Success("保存成功"); | |||
} | |||
/// <summary> | |||
/// 报名--去审核 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult NoCheck(string keyValue) | |||
{ | |||
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("保存成功"); | |||
} | |||
/// <summary> | |||
/// 新生成绩初始化 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult EnrollScoreAdd() | |||
{ | |||
stuEnrollIBLL.EnrollScoreAdd(); | |||
return Success("保存成功"); | |||
} | |||
#endregion | |||
@@ -0,0 +1,108 @@ | |||
using Learun.Application.Base.SystemModule; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Web; | |||
using System.Web.Mvc; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
public class StuEnrollPhoneController : Controller | |||
{ | |||
private StuEnrollIBLL stuEnrollIBLL = new StuEnrollBLL(); | |||
public ActionResult Link() | |||
{ | |||
return View(); | |||
} | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
public ActionResult Search() | |||
{ | |||
return View(); | |||
} | |||
public ActionResult SearchResult() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 报名 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="EmpNo">招生老师</param> | |||
/// <param name="strEntity"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string EmpNo, string strEntity) | |||
{ | |||
StuEnrollEntity entity = strEntity.ToObject<StuEnrollEntity>(); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var model = stuEnrollIBLL.GetEntityByPersonalData(entity.IDCard, entity.StuMobile); | |||
if (model != null) | |||
{ | |||
return Fail("您已报名,请耐心等待结果!"); | |||
} | |||
} | |||
entity.EmpNo = EmpNo; | |||
stuEnrollIBLL.SaveEnroll(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="type">1 查询考试地点及时间;2 查询录取结果</param> | |||
/// <param name="strEntity"></param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult SearchForm(int type, StuEnrollEntity entity) | |||
{ | |||
var data = stuEnrollIBLL.SearchForm(type, entity); | |||
var jsonData = new object(); | |||
if (data != null) | |||
{ | |||
jsonData = new | |||
{ | |||
StuEnroll = data, | |||
examData = stuEnrollIBLL.GetExamDataByStuId(data.StuId) | |||
}; | |||
} | |||
else | |||
{ | |||
jsonData = new | |||
{ | |||
StuEnroll = data, | |||
examData = new List<ExamSubjectEntity>() | |||
}; | |||
} | |||
return Success(jsonData); | |||
} | |||
protected virtual ActionResult Success(string info) | |||
{ | |||
return Content(new ResParameter { code = ResponseCode.success, info = info, data = new object { } }.ToJson()); | |||
} | |||
protected virtual ActionResult Success(object data) | |||
{ | |||
return Content(new ResParameter { code = ResponseCode.success, info = "响应成功", data = data }.ToJson()); | |||
} | |||
protected virtual ActionResult Fail(object data) | |||
{ | |||
return Content(new ResParameter { code = ResponseCode.fail, info = "响应失败", data = data }.ToJson()); | |||
} | |||
protected virtual ActionResult JsonResult(object data) | |||
{ | |||
return Content(new ResParameter { code = ResponseCode.success, info = "响应成功", data = data }.ToJson()); | |||
} | |||
} | |||
} |
@@ -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 | |||
} | |||
} |
@@ -23,6 +23,23 @@ | |||
<div class="lr-form-item-title">校区<font face="宋体">*</font></div> | |||
<div id="F_SchoolId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdMajor"> | |||
<div class="lr-form-item-title">考试科目<font face="宋体">*</font></div> | |||
<div id="SubjectNo" isvalid="yes" checkexpession="NotNull"></div> | |||
<input id="SubjectName" type="hidden" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdMajor"> | |||
<div class="lr-form-item-title">年度<font face="宋体">*</font></div> | |||
<div id="Year" isvalid="yes" checkexpession="Num"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdMajor"> | |||
<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="CdMajor"> | |||
<div class="lr-form-item-title">县区<font face="宋体">*</font></div> | |||
<div id="Area" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdMajor"> | |||
<div class="lr-form-item-title">系别</div> | |||
<div id="DeptNo"></div> | |||
@@ -15,6 +15,46 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#Year').lrselect({ | |||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GenerateNearByYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#SubjectNo').lrselect({ | |||
type: 'multiple', | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ExamSubject', | |||
value: 'id', | |||
text: 'subjectname', | |||
maxHeight: 200 | |||
}); | |||
$('#City').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', | |||
param: { strWhere: " cparent= 650000 " }, | |||
value: 'ccode', | |||
text: 'cname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var Citys = $("#City").lrselectGet(); | |||
if (Citys != null && Citys != "" && Citys != undefined) { | |||
$('#Area').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||
param: { strWhere: " 1=1 and aparent in (" + Citys + ")" }, | |||
value: "acode", | |||
text: "aname", | |||
maxHeight: 200 | |||
}); | |||
} else { | |||
$('#Area').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||
param: { strWhere: " 1=1 and aparent ='' " }, | |||
value: "acode", | |||
text: "aname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}) | |||
$("#Area").lrselect(); | |||
$('#SubjectSpeciesNo').lrDataItemSelect({ code: 'SubjectSpecies' }); | |||
$('#F_SchoolId').lrDataSourceSelect({ | |||
code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { | |||
@@ -54,6 +94,7 @@ var bootstrap = function ($, learun) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
$("#SubjectName").val($("#SubjectNo").find(".lr-select-placeholder").text()); | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
@@ -17,6 +17,8 @@ var bootstrap = function ($, learun) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#Area').lrDataSourceSelect({ code: 'DIC_AREA', value: 'acode', text: 'aname' }); | |||
$('#City').lrDataSourceSelect({ code: 'DIC_CITY', value: 'ccode', text: 'cname' }); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
@@ -207,6 +209,48 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
} | |||
}, | |||
//{ | |||
// label: "考试科目", name: "SubjectNo", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getsAsync('custmerData', | |||
// { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ExamSubject', | |||
// key: value, | |||
// keyId: 'subjectno', | |||
// textId: 'subjectname', | |||
// callback: function (text) { | |||
// callback(text); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ label: "年度", name: "Year", 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: "Area", 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']); | |||
} | |||
}); | |||
} | |||
} | |||
], | |||
mainId: 'ID', | |||
@@ -82,14 +82,16 @@ | |||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | |||
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 去审核</a> | |||
<a id="checkall" class="btn btn-default"><i class="fa fa-print"></i> 审核全部</a> | |||
<li id="lr_resume"><a><i class="fa fa-id-badge"></i> 简历管理</a></li> | |||
<a id="lr_qrcode" class="btn btn-default"><i class="fa fa-linode"></i> 生成二维码</a> | |||
<a id="lr_more" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | |||
<i class="fa fa-reorder"></i> <span class="lrlt">更多</span><span class="caret"></span> | |||
</a> | |||
<ul class="dropdown-menu pull-right"> | |||
@*<li id="lr_resume"><a><i class="fa fa-id-badge"></i> 简历管理</a></li> | |||
<li id="lr_generate"><a><i class="fa fa-linode"></i> 生成帐号</a></li> | |||
<li id="lr_update"><a><i class="fa fa-braille"></i> 更新帐号</a></li> | |||
<li id="lr_switch"><a><i class="fa fa-braille"></i> 注册开关</a></li>*@ | |||
<li id="lr_generate"><a><i class="fa fa-linode"></i> 生成帐号</a></li> | |||
<li id="lr_update"><a><i class="fa fa-braille"></i> 更新帐号</a></li> | |||
<li id="lr_switch"><a><i class="fa fa-braille"></i> 注册开关</a></li>*@ | |||
<li id="lr_editDept"><a><i class="fa fa-pencil-square-o"></i> 修改部门、系部</a></li> | |||
<li id="lr_print"><a><i class="fa fa-print"></i> 打印</a></li> | |||
</ul> | |||
@@ -289,6 +289,33 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
}); | |||
//生成二维码 | |||
$("#lr_qrcode").on('click', | |||
function() { | |||
var keyValue = $('#gridtable').jfGridValue('EmpNo'); | |||
var EmpName = $('#gridtable').jfGridValue('EmpName'); | |||
//console.log(keyValue, EmpName); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录生成!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'formcard', | |||
title: '生成二维码', | |||
url: top.$.rootUrl + | |||
'/EducationalAdministration/EmpInfo/QRCode?keyValue=' + | |||
keyValue + | |||
'&EmpName=' + | |||
escape(EmpName), | |||
width: 700, | |||
height: 300, | |||
btn: null, | |||
end: function() { refreshGirdData(); } | |||
}); | |||
} | |||
}); | |||
//简历 | |||
$('#lr_resume').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EmpId'); | |||
@@ -0,0 +1,63 @@ | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<meta name="viewport" content="width=device-width" /> | |||
<title>CardPrint</title> | |||
@Html.AppendJsFile("/Content/jquery/jquery-1.10.2.min.js", "/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js") | |||
<script src="/Content/js/qrcode.min.js"></script> | |||
<script src="~/PhonePage/server.js"></script> | |||
<link href="~/Content/cardprint/CardPrint.css" rel="stylesheet" /> | |||
<script> | |||
function request(d) { | |||
for (var c = location.search.slice(1).split("&"), a = 0; a < c.length; a++) { | |||
var b = c[a].split("="); | |||
if (b[0] == d) | |||
if ("undefined" == unescape(b[1])) break; | |||
else return unescape(b[1]) | |||
} | |||
return "" | |||
}; | |||
</script> | |||
</head> | |||
<body style=""> | |||
<div id="qrcodeBox" style="text-align:center;margin-top:20px;"> | |||
<div class="qrcodeBox" style="display:inline-block"> | |||
<div id="qrcode" style="margin:0 auto 5px;"></div> | |||
<div class="qrcodeTxt" style="font-size:12px;"></div> | |||
</div> | |||
</div> | |||
<!--<div id="btnprint" type="button" class="btns" value="打印">打印</div>--> | |||
<script> | |||
//标签打印 | |||
var qrcode = new QRCode(document.getElementById("qrcode"), { | |||
width: 80, | |||
height: 80 | |||
}); | |||
var keyValue = request('keyValue');//二维码 | |||
var EmpName = request('EmpName'); | |||
$('.qrcodeTxt').html(unescape(EmpName)); | |||
$(function () { | |||
var url = currentUrl + '/EducationalAdministration/StuEnrollPhone/Link?EmpNo=' + keyValue; | |||
qrcode.makeCode(url); | |||
//$("#btnprint").on("click", function () { | |||
// AddPrintContent3() | |||
//}); | |||
}); | |||
// 打印表单 | |||
function AddPrintContent3() { | |||
$('#btnprint').css('display', 'none') | |||
window.print(); | |||
$('#btnprint').css('display', 'block') | |||
} | |||
</script> | |||
</body> | |||
</html> |
@@ -0,0 +1,31 @@ | |||
@{ | |||
ViewBag.Title = "考试科目基础信息"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="ExamSubject"> | |||
<div class="lr-form-item-title">科目编码<font face="宋体">*</font></div> | |||
<input id="SubjectNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ExamSubject"> | |||
<div class="lr-form-item-title">科目名称<font face="宋体">*</font></div> | |||
<input id="SubjectName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ExamSubject"> | |||
<div class="lr-form-item-title">考试地点<font face="宋体">*</font></div> | |||
<input id="Address" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ExamSubject"> | |||
<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div> | |||
<input id="BeginTime" type="text" class="form-control lr-input-wdatepicker" autocomplete="off" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm', onpicked: function() { $('#BeginTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ExamSubject"> | |||
<div class="lr-form-item-title">结束日期<font face="宋体">*</font></div> | |||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" autocomplete="off" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm', onpicked: function() { $('#EndTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ExamSubject"> | |||
<div class="lr-form-item-title">是否启用</div> | |||
<div id="IsFlag"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ExamSubject/Form.js") |
@@ -0,0 +1,54 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-06-21 10:33 | |||
* 描 述:考试科目基础信息 | |||
*/ | |||
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 () { | |||
$('#IsFlag').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ExamSubject/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]); | |||
} | |||
$('#BeginTime').val(data[id].BeginTime); | |||
$('#EndTime').val(data[id].EndTime); | |||
} | |||
}); | |||
} | |||
$('#IsFlag').val('true'); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ExamSubject/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,44 @@ | |||
@{ | |||
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="SubjectNo" type="text" class="form-control" /> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">科目名称</div> | |||
<input id="SubjectName" type="text" class="form-control" /> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">是否启用</div> | |||
<input id="IsFlag" type="text" class="form-control" /> | |||
</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-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/ExamSubject/Index.js") |
@@ -0,0 +1,102 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-06-21 10:33 | |||
* 描 述:考试科目基础信息 | |||
*/ | |||
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); | |||
}, 100, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/ExamSubject/Form', | |||
width: 400, | |||
height: 420, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/ExamSubject/Form?keyValue=' + keyValue, | |||
width: 400, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var IsFlag = $('#gridtable').jfGridValue('IsFlag'); | |||
if (IsFlag == true) { | |||
learun.alert.warning("已启用项不能删除!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ExamSubject/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ExamSubject/GetPageList', | |||
headData: [ | |||
{ label: "科目编码", name: "SubjectNo", width: 300, align: "center" }, | |||
{ label: "科目名称", name: "SubjectName", width: 300, align: "center" }, | |||
{ label: "考试地点", name: "Address", width: 300, align: "center" }, | |||
{ label: "开始时间", name: "BeginTime", width: 300, align: "center" }, | |||
{ label: "结束日期", name: "EndTime", width: 300, align: "center" }, | |||
{ | |||
label: "是否启用", name: "IsFlag", width: 300, align: "center", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
], | |||
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,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,572 @@ | |||
@{ | |||
ViewBag.Title = "数字化校园-新生报名"; | |||
Layout = null; | |||
} | |||
<html> | |||
<head> | |||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |||
<meta name="renderer" content="webkit"> | |||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | |||
<meta name="format-detection" content="telephone=no" /> | |||
<link rel="shortcut icon" href="" /> | |||
<title></title> | |||
<meta name="keywords" content="" /> | |||
<meta name="description" content="数字化校园-新生报名" /> | |||
<link href="~/Content/css/font-awesome.css" rel="stylesheet" /> | |||
<link href="~/Content/css/common.css" rel="stylesheet" /> | |||
<link href="~/Content/layui/css/layui.css" rel="stylesheet" media="all" /> | |||
<link href="~/Content/layui/layui-v2.6.8/layui/css/layui.css" rel="stylesheet" /> | |||
<link href="~/Content/css/fromAdd.css" rel="stylesheet" /> | |||
<style> | |||
#IdCardPtoUpload1 { | |||
width: 107px; | |||
height: 107px; | |||
border: 1px solid #E9E9E9; | |||
overflow: hidden; | |||
margin: 0; | |||
cursor: pointer; | |||
text-align: center; | |||
} | |||
#IdCardPtoUpload1 img { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
#IdCardPtoUpload1 .layui-upload-img { | |||
width: 50%; | |||
height: auto; | |||
margin-top: 8px; | |||
} | |||
#IdCardPtoUpload1 div { | |||
font-size: 14px; | |||
color: #DCDBDB; | |||
} | |||
#IdCardPtoUpload2 { | |||
width: 107px; | |||
height: 107px; | |||
border: 1px solid #E9E9E9; | |||
overflow: hidden; | |||
margin: 0; | |||
cursor: pointer; | |||
text-align: center; | |||
} | |||
#IdCardPtoUpload2 img { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
#IdCardPtoUpload2 .layui-upload-img { | |||
width: 50%; | |||
height: auto; | |||
margin-top: 8px; | |||
} | |||
#IdCardPtoUpload2 div { | |||
font-size: 14px; | |||
color: #DCDBDB; | |||
} | |||
#MidAchievementUpload { | |||
width: 107px; | |||
height: 107px; | |||
border: 1px solid #E9E9E9; | |||
overflow: hidden; | |||
margin: 0; | |||
cursor: pointer; | |||
text-align: center; | |||
} | |||
#MidAchievementUpload img { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
#MidAchievementUpload .layui-upload-img { | |||
width: 50%; | |||
height: auto; | |||
margin-top: 8px; | |||
} | |||
#MidAchievementUpload div { | |||
font-size: 14px; | |||
color: #DCDBDB; | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
@*<div class="header"> | |||
<div class="fromSec"> | |||
<a href="#">数字化智慧校园</a> <span class="headerLine">|</span> <span>教职工信息注册</span> | |||
</div> | |||
</div>*@ | |||
<div class="warpper" id="app"> | |||
<!-- / index_sec5 --> | |||
<div class="chickForm_sec"> | |||
<div class="fromSec"> | |||
<div class="chickT">报名</div> | |||
<form class="layui-form" action=""> | |||
<!-- / chickForm_sec1 --> | |||
<div class="chickForm_sec1"> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 姓名</span> | |||
<input type="text" id="StuName" name="StuName" lay-verify="required" placeholder="请输入姓名" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 性别</span> | |||
<div class="chickInputBox chickInputBoxs"> | |||
<select id="Gender" name="Gender" lay-verify=""> | |||
<option value="">请选择</option> | |||
<option value="true">男</option> | |||
<option value="false">女</option> | |||
</select> | |||
</div> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable">民族</span> | |||
<div class="chickInputBox"> | |||
<select id="Nationals" name="Nationals" lay-verify=""> | |||
<option value="">请选择</option> | |||
</select> | |||
</div> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 住址</span> | |||
<input type="text" id="HomeAddress" name="HomeAddress" lay-verify="required" placeholder="请输入住址" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 身份证号</span> | |||
<input type="text" id="IDCard" name="IDCard" lay-verify="required" placeholder="请输入身份证号" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 手机号</span> | |||
<input type="text" id="StuMobile" name="StuMobile" lay-verify="required" placeholder="请输入手机号" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 毕业学校</span> | |||
<input type="text" id="FromSchool" name="FromSchool" lay-verify="required" placeholder="请输入毕业学校" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 中考总分</span> | |||
<input type="number" id="MidTermExam" name="MidTermExam" lay-verify="required" placeholder="请输入中考总分" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"> 特长</span> | |||
<input type="text" id="Specialty" name="Specialty" placeholder="请输入特长" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 地市</span> | |||
<div class="chickInputBox chickInputBoxs"> | |||
<select id="City" name="City" lay-verify="required" lay-filter="City"> | |||
<option value="">请选择</option> | |||
</select> | |||
</div> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 县区</span> | |||
<div class="chickInputBox chickInputBoxs"> | |||
<select id="County" name="County" lay-verify="required" lay-filter="County"> | |||
<option value="">请选择</option> | |||
</select> | |||
</div> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 专业</span> | |||
<div class="chickInputBox chickInputBoxs"> | |||
<select id="MajorNo" name="MajorNo" lay-verify="required"> | |||
<option value="">请选择</option> | |||
</select> | |||
</div> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable">身份证正面照片</span> | |||
<div class="chickInputBox"> | |||
<div class="layui-upload-list UploadFile" id="IdCardPtoUpload1"> | |||
<img src="~/Content/images/chick1.png" class="layui-upload-img" /> | |||
<div>选择</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="chickInput" hidden> | |||
<span class="chickInputLable" hidden><span>*</span> 身份证正面照片</span> | |||
<input type="text" id="IdCardPto1" name="IdCardPto1" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable">身份证反面照片</span> | |||
<div class="chickInputBox"> | |||
<div class="layui-upload-list UploadFile" id="IdCardPtoUpload2"> | |||
<img src="~/Content/images/chick1.png" class="layui-upload-img" /> | |||
<div>选择</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="chickInput" hidden> | |||
<span class="chickInputLable" hidden><span>*</span> 身份证反面照片</span> | |||
<input type="text" id="IdCardPto2" name="IdCardPto2" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable">初中毕业证</span> | |||
<div class="chickInputBox"> | |||
<div class="layui-upload-list" id="chickUpload"> | |||
<img src="~/Content/images/chick1.png" class="layui-upload-img" /> | |||
<div>选择</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="chickInput" hidden> | |||
<span class="chickInputLable" hidden><span>*</span> 初中毕业证照片</span> | |||
<input type="text" id="MidDiplomaPto" name="MidDiplomaPto" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable">中考成绩截图</span> | |||
<div class="chickInputBox"> | |||
<div class="layui-upload-list UploadFile" id="MidAchievementUpload"> | |||
<img src="~/Content/images/chick1.png" class="layui-upload-img" /> | |||
<div>选择</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="chickInput" hidden> | |||
<span class="chickInputLable" hidden><span>*</span> 中考成绩照片</span> | |||
<input type="text" id="MidAchievementPto" name="MidAchievementPto" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"> 备注</span> | |||
<input type="text" id="Remark" name="Remark" class="layui-input"> | |||
</div> | |||
</div> | |||
<!-- / chickForm_sec1 --> | |||
<div class="chickBtn" lay-submit lay-filter="*">提交</div> | |||
</form> | |||
</div> | |||
</div> | |||
</div> | |||
<img id="fromBg" src="~/Content/images/from1.png" /> | |||
<div class="footer"> Copyright © 2019 数字化智慧校园 版权所有</div> | |||
<script src="~/Content/js/jquery.min.js"></script> | |||
<script src="~/Content/layui/layui-v2.6.8/layui/layui.js"></script> | |||
@*<script src="~/Content/layui/layui.all.js"></script>*@ | |||
<script src="~/Content/vue/vue.js"></script> | |||
<script src="~/PhonePage/server.js"></script> | |||
<script> | |||
var today = formatDateTimesM(); | |||
var EmpNo = request('EmpNo'); //'XCMY1002'; | |||
layui.use(['form', 'laydate', 'upload'], function () { | |||
var form = layui.form; | |||
//登录按钮点击 | |||
form.on('submit(*)', function (data) { | |||
if (!$('#IdCardPto1').val() || !$('#IdCardPto2').val()) { | |||
alert('请上传身份证照片!'); | |||
return; | |||
} | |||
if (!$('#MidDiplomaPto').val()) { | |||
alert('请上传初中毕业证照片!'); | |||
return; | |||
} | |||
if (!$('#MidAchievementPto').val()) { | |||
alert('请上传中考成绩截图!'); | |||
return; | |||
} | |||
var strEntity = JSON.stringify(data.field); | |||
//strEntity.EmpNo = EmpNo; | |||
$.ajax({ | |||
url: '/EducationalAdministration/StuEnrollPhone/SaveForm?keyValue=&EmpNo=' + EmpNo, | |||
data: { strEntity: strEntity }, | |||
type: "POST", | |||
dataType: "json", | |||
async: true, | |||
cache: false, | |||
success: function (data) { | |||
if (data.code == 200) { | |||
alert('报名成功,请等待考试通知'); | |||
location.href = '/EducationalAdministration/StuEnrollPhone/Link?EmpNo=' + EmpNo; | |||
} else { | |||
return alert(data.data); | |||
} | |||
}, | |||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
}, | |||
beforeSend: function () { | |||
}, | |||
complete: function () { | |||
} | |||
}); | |||
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 | |||
}); | |||
var laydate = layui.laydate; | |||
//时间选择 | |||
laydate.render({ | |||
elem: '#Birthday', | |||
min: today.y + '-' + today.m + '-' + today.d | |||
}); | |||
var upload = layui.upload; | |||
//初中毕业证 | |||
var uploadInst = upload.render({ | |||
elem: '#chickUpload', | |||
url: '/EducationalAdministration/EmpInfoEnternal/UploadImg', | |||
exts: 'jpg|png|gif|', | |||
multiple: false, | |||
before: function (obj) { | |||
//预读本地文件示例,不支持ie8 | |||
obj.preview(function (index, file, result) { | |||
$('#chickUpload').html('<img src="' + result + '" alt="">') //图片链接(base64) | |||
}); | |||
}, | |||
done: function (res) { | |||
//如果上传失败 | |||
if (res.code != 200) { | |||
return layer.msg('上传失败'); | |||
} else { | |||
$("#MidDiplomaPto").val(res.data.folderId) | |||
} | |||
//上传成功 | |||
}, | |||
error: function () { | |||
//演示失败状态,并实现重传 | |||
var demoText = $('#demoText'); | |||
demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>'); | |||
demoText.find('.demo-reload').on('click', function () { | |||
uploadInst.upload(); | |||
}); | |||
} | |||
}); | |||
//身份证正面照片 | |||
var uploadIdCard = upload.render({ | |||
elem: '#IdCardPtoUpload1', | |||
url: '/EducationalAdministration/EmpInfoEnternal/UploadImg', | |||
exts: 'jpg|png|gif|', | |||
multiple: true, | |||
before: function (obj) { | |||
//预读本地文件示例,不支持ie8 | |||
obj.preview(function (index, file, result) { | |||
$('#IdCardPtoUpload1').html('<img src="' + result + '" alt="">') //图片链接(base64) | |||
}); | |||
}, | |||
done: function (res) { | |||
//如果上传失败 | |||
if (res.code != 200) { | |||
return layer.msg('上传失败'); | |||
} else { | |||
$("#IdCardPto1").val(res.data.folderId) | |||
} | |||
//上传成功 | |||
}, | |||
error: function () { | |||
//演示失败状态,并实现重传 | |||
var demoText = $('#demoText'); | |||
demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>'); | |||
demoText.find('.demo-reload').on('click', function () { | |||
uploadIdCard.upload(); | |||
}); | |||
} | |||
}); | |||
//身份证反面照片 | |||
var uploadIdCard = upload.render({ | |||
elem: '#IdCardPtoUpload2', | |||
url: '/EducationalAdministration/EmpInfoEnternal/UploadImg', | |||
exts: 'jpg|png|gif|', | |||
multiple: true, | |||
before: function (obj) { | |||
//预读本地文件示例,不支持ie8 | |||
obj.preview(function (index, file, result) { | |||
$('#IdCardPtoUpload2').html('<img src="' + result + '" alt="">') //图片链接(base64) | |||
}); | |||
}, | |||
done: function (res) { | |||
//如果上传失败 | |||
if (res.code != 200) { | |||
return layer.msg('上传失败'); | |||
} else { | |||
$("#IdCardPto2").val(res.data.folderId) | |||
} | |||
//上传成功 | |||
}, | |||
error: function () { | |||
//演示失败状态,并实现重传 | |||
var demoText = $('#demoText'); | |||
demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>'); | |||
demoText.find('.demo-reload').on('click', function () { | |||
uploadIdCard.upload(); | |||
}); | |||
} | |||
}); | |||
//中考成绩截图 | |||
var uploadMidAchieve = upload.render({ | |||
elem: '#MidAchievementUpload', | |||
url: '/EducationalAdministration/EmpInfoEnternal/UploadImg', | |||
before: function (obj) { | |||
//预读本地文件示例,不支持ie8 | |||
obj.preview(function (index, file, result) { | |||
$('#MidAchievementUpload').html('<img src="' + result + '" alt="">') //图片链接(base64) | |||
}); | |||
}, | |||
done: function (res) { | |||
//如果上传失败 | |||
if (res.code != 200) { | |||
return layer.msg('上传失败'); | |||
} else { | |||
$("#MidAchievementPto").val(res.data.folderId); | |||
} | |||
//上传成功 | |||
}, | |||
error: function () { | |||
//演示失败状态,并实现重传 | |||
var demoText = $('#demoText'); | |||
demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>'); | |||
demoText.find('.demo-reload').on('click', function () { | |||
uploadMidAchieve.upload(); | |||
}); | |||
} | |||
}); | |||
//监听地市 | |||
form.on('select(City)', function (data) { | |||
//绑定县区 | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "DIC_AREA" + "&where=" + "aparent='" + data.value + "'", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, | |||
function (i, item) { | |||
str += '<option value="' + item.acode + '">' + item.aname + '</option>'; | |||
}); | |||
$("#County").html(str); | |||
}, | |||
}); | |||
//绑定专业 | |||
form.render(); | |||
}); | |||
//监听县区 | |||
form.on('select(County)', function (data) { | |||
//绑定专业 | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo" + "&where=" + "Area='" + data.value + "'", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, | |||
function (i, item) { | |||
str += '<option value="' + item.id + '">' + item.majorname + '</option>' | |||
}) | |||
$("#MajorNo").html(str); | |||
}, | |||
}); | |||
form.render(); | |||
}); | |||
}); | |||
$(window).load(function () { | |||
//$('.chickInputBoxs input').attr('lay-verify', 'required'); | |||
//专业 | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, | |||
function (i, item) { | |||
str += '<option value="' + item.id + '">' + item.majorname + '</option>' | |||
}) | |||
$("#MajorNo").html(str); | |||
}, | |||
}); | |||
//民族 | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "BCdNationality", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, | |||
function (i, item) { | |||
str += '<option value="' + item.nationalityno + '">' + item.nationality + '</option>' | |||
}) | |||
$("#Nationals").html(str); | |||
}, | |||
}); | |||
//地市 | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "DIC_CITY" + "&where=" + "cparent='650000'", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, | |||
function (i, item) { | |||
str += '<option value="' + item.ccode + '">' + item.cname + '</option>' | |||
}) | |||
$("#City").html(str); | |||
}, | |||
}); | |||
//县区 | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "DIC_AREA", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, | |||
function (i, item) { | |||
str += '<option value="' + item.acode + '">' + item.aname + '</option>'; | |||
}); | |||
$("#County").html(str); | |||
}, | |||
}); | |||
renderForm(); | |||
}); | |||
//重新渲染表单 | |||
function renderForm() { | |||
layui.use('form', function () { | |||
var form = layui.form//高版本建议把括号去掉,有的低版本,需要加() | |||
form.render(); | |||
}); | |||
} | |||
function formatDateTimesM() { | |||
var date = new Date(1960, 0, 0); | |||
var y = date.getFullYear(); | |||
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1; | |||
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); | |||
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(); | |||
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); | |||
return { | |||
y: y, | |||
m: m, | |||
d: d, | |||
h: h, | |||
min: min | |||
} | |||
}; | |||
</script> | |||
</body> | |||
</html> |
@@ -0,0 +1,52 @@ | |||
| |||
@{ | |||
Layout = null; | |||
} | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<meta name="viewport" content="width=device-width" /> | |||
<title>数字化校园-查询报名</title> | |||
<style> | |||
.box{ | |||
width: 70%; | |||
height: 36px; | |||
text-align: center; | |||
line-height: 36px; | |||
background-color: #3298DC; | |||
border-radius: 4px; | |||
margin: 20px auto; | |||
} | |||
.box a{ | |||
color: #fff; | |||
font-size: 14px; | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
<div> | |||
<div class="box"> | |||
<a href="" id="stuenroll">报名</a> | |||
</div> | |||
<div class="box"><a href="" id="loc">查询考试地点及时间</a></div> | |||
<div class="box"><a href="" id="res">查询录取结果</a></div> | |||
</div> | |||
<script src="/Content/jquery/jquery-1.10.2.min.js"></script> | |||
<script src="~/PhonePage/server.js"></script> | |||
<script> | |||
$(function() { | |||
var EmpNo = request('EmpNo'); | |||
//报名 | |||
$('#stuenroll').attr('href', '/EducationalAdministration/StuEnrollPhone/Form?EmpNo=' + EmpNo); | |||
//查询考试地点及时间 | |||
$('#loc').attr('href', '/EducationalAdministration/StuEnrollPhone/Search?type=1'); | |||
//查询录取结果 | |||
$('#res').attr('href', '/EducationalAdministration/StuEnrollPhone/Search?type=2'); | |||
}) | |||
</script> | |||
</body> | |||
</html> |
@@ -0,0 +1,133 @@ | |||
@{ | |||
ViewBag.Title = "数字化校园-查询"; | |||
Layout = null; | |||
} | |||
<html> | |||
<head> | |||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |||
<meta name="renderer" content="webkit"> | |||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | |||
<meta name="format-detection" content="telephone=no" /> | |||
<link rel="shortcut icon" href="" /> | |||
<title></title> | |||
<meta name="keywords" content="" /> | |||
<meta name="description" content="数字化校园-新生报名" /> | |||
<link href="~/Content/css/font-awesome.css" rel="stylesheet" /> | |||
<link href="~/Content/css/common.css" rel="stylesheet" /> | |||
<link href="~/Content/layui/css/layui.css" rel="stylesheet" media="all" /> | |||
<link href="~/Content/css/fromAdd.css" rel="stylesheet" /> | |||
</head> | |||
<body> | |||
<div class="warpper" id="app"> | |||
<!-- / index_sec5 --> | |||
<div class="chickForm_sec"> | |||
<div class="fromSec"> | |||
<div class="chickT">查询</div> | |||
<form class="layui-form" action=""> | |||
<!-- / chickForm_sec1 --> | |||
<div class="chickForm_sec1"> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 姓名</span> | |||
<input type="text" id="StuName" name="StuName" lay-verify="required" placeholder="请输入姓名" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 身份证号</span> | |||
<input type="text" id="IDCard" name="IDCard" lay-verify="required" placeholder="请输入身份证号" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 手机号</span> | |||
<input type="text" id="StuMobile" name="StuMobile" lay-verify="required" placeholder="请输入手机号" class="layui-input"> | |||
</div> | |||
</div> | |||
<!-- / chickForm_sec1 --> | |||
<div class="chickBtn" lay-submit lay-filter="*">提交</div> | |||
</form> | |||
</div> | |||
</div> | |||
</div> | |||
<img id="fromBg" src="~/Content/images/from1.png" /> | |||
<div class="footer"> Copyright © 2019 数字化智慧校园 版权所有</div> | |||
<script src="~/Content/js/jquery.min.js"></script> | |||
<script src="~/Content/layui/layui.all.js"></script> | |||
<script src="~/Content/vue/vue.js"></script> | |||
<script src="~/PhonePage/server.js"></script> | |||
<script> | |||
//var today = formatDateTimesM(); | |||
var type = request('type'); //'XCMY1002'; | |||
layui.use(['form', 'laydate', 'upload'], function () { | |||
var form = layui.form; | |||
//按钮点击 | |||
form.on('submit(*)', function (data) { | |||
//var strEntity = JSON.stringify(data.field); | |||
location.href = '/EducationalAdministration/StuEnrollPhone/SearchResult?type=' + type + '&StuName=' + encodeURI(encodeURI($('#StuName').val())) + '&IDCard=' + $('#IDCard').val() + '&StuMobile=' + $('#StuMobile').val(); | |||
//$.ajax({ | |||
// url: '/EducationalAdministration/StuEnrollPhone/SearchForm?type=' + type, | |||
// data: { strEntity: strEntity }, | |||
// type: "GET", | |||
// dataType: "json", | |||
// async: true, | |||
// cache: false, | |||
// success: function (data) { | |||
// if (data.code == 200) { | |||
// alert("报名成功,请等待考试通知!"); | |||
// } else { | |||
// alert(data.info); | |||
// } | |||
// }, | |||
// error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
// }, | |||
// beforeSend: function () { | |||
// }, | |||
// complete: function () { | |||
// } | |||
//}); | |||
//return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 | |||
}); | |||
//var laydate = layui.laydate; | |||
//时间选择 | |||
//laydate.render({ | |||
// elem: '#Birthday', | |||
// min: today.y + '-' + today.m + '-' + today.d | |||
//}); | |||
}); | |||
$(window).load(function () { | |||
renderForm() | |||
}) | |||
//重新渲染表单 | |||
function renderForm() { | |||
layui.use('form', function () { | |||
var form = layui.form//高版本建议把括号去掉,有的低版本,需要加() | |||
form.render(); | |||
}); | |||
} | |||
function formatDateTimesM() { | |||
var date = new Date(1960, 0, 0); | |||
var y = date.getFullYear(); | |||
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1; | |||
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); | |||
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(); | |||
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); | |||
return { | |||
y: y, | |||
m: m, | |||
d: d, | |||
h: h, | |||
min: min | |||
} | |||
}; | |||
</script> | |||
</body> | |||
</html> |
@@ -0,0 +1,226 @@ | |||
@{ | |||
ViewBag.Title = "数字化校园-查询结果"; | |||
Layout = null; | |||
} | |||
<html> | |||
<head> | |||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |||
<meta name="renderer" content="webkit"> | |||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | |||
<meta name="format-detection" content="telephone=no" /> | |||
<link rel="shortcut icon" href="" /> | |||
<title></title> | |||
<meta name="keywords" content="" /> | |||
<meta name="description" content="数字化校园-新生报名" /> | |||
<link href="~/Content/css/font-awesome.css" rel="stylesheet" /> | |||
<link href="~/Content/css/common.css" rel="stylesheet" /> | |||
<link href="~/Content/layui/css/layui.css" rel="stylesheet" media="all" /> | |||
<link href="~/Content/css/fromAdd.css" rel="stylesheet" /> | |||
</head> | |||
<body> | |||
<div class="warpper" id="app"> | |||
<!-- / index_sec5 --> | |||
<div class="chickForm_sec"> | |||
<div class="fromSec"> | |||
<div class="chickT">查询</div> | |||
<form class="layui-form" action=""> | |||
<!-- / chickForm_sec1 --> | |||
<div class="chickForm_sec1"> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 姓名</span> | |||
<input type="text" id="StuName" name="StuName" class="layui-input" readonly="readonly"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 身份证号</span> | |||
<input type="text" id="IDCard" name="IDCard" class="layui-input" readonly="readonly"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 手机号</span> | |||
<input type="text" id="StuMobile" name="StuMobile" class="layui-input" readonly="readonly"> | |||
</div> | |||
<div class="chickInput" id="locdiv"> | |||
<span class="chickInputLable"><span>*</span> 考试信息</span> | |||
<div id="examDiv" readonly="readonly" style="font-size: 12px;"> | |||
</div> | |||
</div> | |||
<div class="chickInput" id="admdiv"> | |||
<span class="chickInputLable"><span>*</span> 是否录取</span> | |||
<input type="text" id="IsAdmission" name="IsAdmission" readonly="readonly"> | |||
</div> | |||
</div> | |||
<!-- / chickForm_sec1 --> | |||
@*<div class="chickBtn" lay-submit lay-filter="*">提交</div>*@ | |||
</form> | |||
</div> | |||
</div> | |||
</div> | |||
<div id="contentdiv"> | |||
<img id="fromBg" src="~/Content/images/from1.png" /> | |||
<div class="footer"> Copyright © 2019 数字化智慧校园 版权所有</div> | |||
</div> | |||
<script src="~/Content/js/jquery.min.js"></script> | |||
<script src="~/Content/layui/layui.all.js"></script> | |||
<script src="~/Content/vue/vue.js"></script> | |||
<script src="~/PhonePage/server.js"></script> | |||
<script> | |||
var type = request('type'); | |||
var StuName = request('StuName'); | |||
var IDCard = request('IDCard'); | |||
var StuMobile = request('StuMobile'); | |||
layui.use(['form', 'laydate', 'upload'], function () { | |||
var form = layui.form; | |||
//按钮点击 | |||
//form.on('submit(*)', function (data) { | |||
// var strEntity = JSON.stringify(data.field); | |||
// $.ajax({ | |||
// url: '/EducationalAdministration/StuEnrollPhone/SearchForm?type=' + type, | |||
// data: { strEntity: strEntity }, | |||
// type: "GET", | |||
// dataType: "json", | |||
// async: true, | |||
// cache: false, | |||
// success: function (data) { | |||
// if (data.code == 200) { | |||
// alert("报名成功,请等待考试通知!"); | |||
// } else { | |||
// alert(data.info); | |||
// } | |||
// }, | |||
// error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
// }, | |||
// beforeSend: function () { | |||
// }, | |||
// complete: function () { | |||
// } | |||
// }); | |||
// return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 | |||
//}); | |||
//var laydate = layui.laydate; | |||
//时间选择 | |||
//laydate.render({ | |||
// elem: '#Birthday', | |||
// min: today.y + '-' + today.m + '-' + today.d | |||
//}); | |||
}); | |||
$(window).load(function () { | |||
if (type == '1') { | |||
//查询考试地点及时间 | |||
$('#locdiv').show(); | |||
//$('#timediv').show(); | |||
$('#admdiv').hide();; | |||
} else { | |||
$('#admdiv').show(); | |||
$('#locdiv').hide(); | |||
//$('#timediv').hide(); | |||
} | |||
//查询 | |||
$.ajax({ | |||
url: '/EducationalAdministration/StuEnrollPhone/SearchForm?type=' + type, | |||
data: { StuName: decodeURI(StuName), IDCard: IDCard, StuMobile: StuMobile }, | |||
type: "GET", | |||
dataType: "json", | |||
async: true, | |||
cache: false, | |||
success: function (data) { | |||
if (data.code == 200) { | |||
var data = data.data; | |||
if (data.StuEnroll) { | |||
$('#StuName').val(decodeURI(StuName)); | |||
$('#IDCard').val(IDCard); | |||
$('#StuMobile').val(StuMobile); | |||
//$('#ExamLocation').val(data.StuEnroll.ExamLocation); | |||
//if (data.StuEnroll.ExamStartTime) { | |||
// $('#ExamStartTime').val(data.StuEnroll.ExamStartTime + '~' + data.StuEnroll.ExamEndTime); | |||
//} | |||
if (data.StuEnroll.IsAdmission && data.StuEnroll.IsAdmission == 1) { | |||
$('#IsAdmission').val('是'); | |||
} else { | |||
$('#IsAdmission').val('否'); | |||
} | |||
} else { | |||
$('#app').html('<img src="/Content/images/jfgrid/nodata.jpg" style="width: 100%;height: 40%;" />'); | |||
} | |||
if (data.examData) { | |||
var examData = data.examData; | |||
var html = ''; | |||
if (data) { | |||
for (var i = 0; i < examData.length; i++) { | |||
var etime = examData[i].BeginTime + '~' + examData[i].EndTime; | |||
html += '<div class="chickInput">'; | |||
html += '<span class="chickInputLable" style="font-size: 12px;"> 科目</span>'; | |||
html += '<input type="text" class="layui-input" readonly="readonly" value="' + examData[i].SubjectName + '" style="margin: -39px 0 0 40px; width: 85%;font-size: 12px;">'; | |||
html += '</div>'; | |||
html += '<div class="chickInput">'; | |||
html += '<span class="chickInputLable" style="font-size: 12px;"> 时间</span>'; | |||
html += '<input type="text" class="layui-input" readonly="readonly" value="' + etime + '" style="margin: -39px 0 0 40px; width: 85%;font-size: 12px;">'; | |||
html += '</div>'; | |||
html += '<br/>'; | |||
} | |||
} | |||
$('#examDiv').html(html); | |||
} | |||
} else { | |||
alert(data.info); | |||
location.href = '/EducationalAdministration/StuEnrollPhone/Search?type=' + type; | |||
} | |||
}, | |||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
}, | |||
beforeSend: function () { | |||
}, | |||
complete: function () { | |||
} | |||
}); | |||
renderForm() | |||
}) | |||
//重新渲染表单 | |||
function renderForm() { | |||
layui.use('form', function () { | |||
var form = layui.form//高版本建议把括号去掉,有的低版本,需要加() | |||
form.render(); | |||
}); | |||
} | |||
function formatDateTimesM() { | |||
var date = new Date(1960, 0, 0); | |||
var y = date.getFullYear(); | |||
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1; | |||
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); | |||
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(); | |||
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); | |||
return { | |||
y: y, | |||
m: m, | |||
d: d, | |||
h: h, | |||
min: min | |||
} | |||
}; | |||
</script> | |||
</body> | |||
</html> |
@@ -326,6 +326,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\EvaDormitoryInteriorController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\EvaHygieveController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\EvaViolationOfDisciplineController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ExamSubjectController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ArrangeExamTermItemNewController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ArrangeExamTermNewController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamLessonController.cs" /> | |||
@@ -336,11 +337,14 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\FillinFromController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\HomeStatisticsController.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\R_EnterBuildingController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\R_EnterSchoolController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ScoreStatisticsController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuAttendanceController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuEnrollPhoneController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuEnrollScoreController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuGrantController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuInfoBasicChangeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuScoreNotPassController.cs" /> | |||
@@ -993,6 +997,8 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ExamSubject\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ExamSubject\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermItemNew\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermItemNew\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\Form.js" /> | |||
@@ -1038,6 +1044,8 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfo\IndexNoMajor.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\Form.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\OpenLessonPlanOfElective\FormElective.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\IndexElective.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\FormOfElective.js" /> | |||
@@ -1066,6 +1074,12 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\FormView.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\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasicChange\Form.js" /> | |||
@@ -7866,6 +7880,21 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\FormOfElective.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\HealthPunchStu\Statistics.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\HealthPunchStu\StatisticsTeach.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ExamSubject\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ExamSubject\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\EmpInfo\QRCode.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollPhone\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollPhone\Link.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollPhone\Search.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollPhone\SearchResult.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\EnrollLQ.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollSH.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\EnrollIndexTJ.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -0,0 +1,14 @@ | |||
//api地址 | |||
var serverurl = "http://localhost:31173"; | |||
//当前项目地址 | |||
var currentUrl = "http://192.168.50.3:8082"; | |||
//地址栏传参 | |||
function request(d) { | |||
for (var c = location.search.slice(1).split("&"), a = 0; a < c.length; a++) { | |||
var b = c[a].split("="); | |||
if (b[0] == d) | |||
if ("undefined" == unescape(b[1])) break; | |||
else return unescape(b[1]) | |||
} | |||
return "" | |||
}; |
@@ -202,6 +202,7 @@ | |||
<Compile Include="Modules\EducationalAdministration\ArrangeExamTermApi.cs" /> | |||
<Compile Include="Modules\EducationalAdministration\ArrangeExamTermNewApi.cs" /> | |||
<Compile Include="Modules\EducationalAdministration\LoginUserBindApi.cs" /> | |||
<Compile Include="Modules\StuEnrollApi.cs" /> | |||
<Compile Include="Modules\TransferApi.cs" /> | |||
<Compile Include="Modules\PushMessageApi.cs" /> | |||
<Compile Include="Modules\EvalApi.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 V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-06-21 10:33 | |||
/// 描 述:考试科目基础信息 | |||
/// </summary> | |||
public class ExamSubjectMap : EntityTypeConfiguration<ExamSubjectEntity> | |||
{ | |||
public ExamSubjectMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("EXAMSUBJECT"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-06-18 11:19 | |||
/// 描 述:MajorAndSubject | |||
/// </summary> | |||
public class MajorAndSubjectMap : EntityTypeConfiguration<MajorAndSubjectEntity> | |||
{ | |||
public MajorAndSubjectMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("MAJORANDSUBJECT"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#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 | |||
} | |||
} | |||
} | |||
@@ -81,6 +81,7 @@ | |||
<Compile Include="EducationalAdministration\DispatchAuditMap.cs" /> | |||
<Compile Include="EducationalAdministration\DispatchMap.cs" /> | |||
<Compile Include="EducationalAdministration\EADateArrangeMap.cs" /> | |||
<Compile Include="EducationalAdministration\ExamSubjectMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermItemNewMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermNewMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamLessonMap.cs" /> | |||
@@ -92,10 +93,12 @@ | |||
<Compile Include="EducationalAdministration\Exam_ExamStudent.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_InvigilateTeacherMap.cs" /> | |||
<Compile Include="EducationalAdministration\LeaveSchoolMap.cs" /> | |||
<Compile Include="EducationalAdministration\MajorAndSubjectMap.cs" /> | |||
<Compile Include="EducationalAdministration\PracticeBaseMap.cs" /> | |||
<Compile Include="EducationalAdministration\R_EnterBuildingMap.cs" /> | |||
<Compile Include="EducationalAdministration\R_EnterSchoolMap.cs" /> | |||
<Compile Include="EducationalAdministration\ScoreStatisticsMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuEnrollScoreMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuGrantMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuInfoBasicChangeMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuInfoFreshMap.cs" /> | |||
@@ -127,6 +127,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[Column("PHOTO")] | |||
public string Photo { get; set; } | |||
/// <summary> | |||
/// 考试科目编码 | |||
/// </summary> | |||
[Column("SUBJECTNO")] | |||
public string SubjectNo { get; set; } | |||
/// <summary> | |||
/// 年度 | |||
/// </summary> | |||
[Column("YEAR")] | |||
public string Year { get; set; } | |||
/// <summary> | |||
/// 地市 | |||
/// </summary> | |||
[Column("CITY")] | |||
public string City { get; set; } | |||
/// <summary> | |||
/// 区县 | |||
/// </summary> | |||
[Column("AREA")] | |||
public string Area { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
@@ -45,7 +45,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
t.GovMajorName, | |||
t.GraduateNo, | |||
t.MajorDirector, | |||
t.CheckMark | |||
t.CheckMark, | |||
t.SubjectNo, | |||
t.Year, | |||
t.City, | |||
t.Area | |||
"); | |||
strSql.Append(" FROM CdMajor t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
@@ -203,7 +207,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<CdMajorEntity>(keyValue); | |||
var List = this.BaseRepository("CollegeMIS").FindEntity<CdMajorEntity>(keyValue); | |||
if (List != null) | |||
{ | |||
List.SubjectNo = string.Join(",", BaseRepository("CollegeMIS").FindList<MajorAndSubjectEntity>(o => o.MajorId == List.ID).Select(o => o.SubId)); | |||
} | |||
return List; | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -0,0 +1,148 @@ | |||
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-21 10:33 | |||
/// 描 述:考试科目基础信息 | |||
/// </summary> | |||
public class ExamSubjectBLL : ExamSubjectIBLL | |||
{ | |||
private ExamSubjectService examSubjectService = new ExamSubjectService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<ExamSubjectEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return examSubjectService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取ExamSubject表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public ExamSubjectEntity GetExamSubjectEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return examSubjectService.GetExamSubjectEntity(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 | |||
{ | |||
examSubjectService.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> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, ExamSubjectEntity entity) | |||
{ | |||
try | |||
{ | |||
examSubjectService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
public ExamSubjectEntity GetExamSubjectBySubjectNo(string SubjectNo) | |||
{ | |||
try | |||
{ | |||
return examSubjectService.GetExamSubjectBySubjectNo(SubjectNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,75 @@ | |||
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-21 10:33 | |||
/// 描 述:考试科目基础信息 | |||
/// </summary> | |||
public class ExamSubjectEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// SubjectNo | |||
/// </summary> | |||
[Column("SUBJECTNO")] | |||
public string SubjectNo { get; set; } | |||
/// <summary> | |||
/// SubjectName | |||
/// </summary> | |||
[Column("SUBJECTNAME")] | |||
public string SubjectName { get; set; } | |||
/// <summary> | |||
/// 考试地点 | |||
/// </summary> | |||
[Column("ADDRESS")] | |||
public string Address { get; set; } | |||
/// <summary> | |||
/// 开始时间 | |||
/// </summary> | |||
[Column("BEGINTIME")] | |||
public DateTime? BeginTime { get; set; } | |||
/// <summary> | |||
/// 结束时间 | |||
/// </summary> | |||
[Column("ENDTIME")] | |||
public DateTime? EndTime { get; set; } | |||
/// <summary> | |||
/// IsFlag | |||
/// </summary> | |||
[Column("ISFLAG")] | |||
public bool? IsFlag { 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 | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,57 @@ | |||
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-21 10:33 | |||
/// 描 述:考试科目基础信息 | |||
/// </summary> | |||
public interface ExamSubjectIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<ExamSubjectEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取ExamSubject表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
ExamSubjectEntity GetExamSubjectEntity(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, ExamSubjectEntity entity); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 判断重复 | |||
/// </summary> | |||
/// <param name="SubjectNo"></param> | |||
/// <returns></returns> | |||
ExamSubjectEntity GetExamSubjectBySubjectNo(string SubjectNo); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,177 @@ | |||
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-21 10:33 | |||
/// 描 述:考试科目基础信息 | |||
/// </summary> | |||
public class ExamSubjectService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<ExamSubjectEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.SubjectNo, | |||
t.SubjectName, | |||
t.Address, | |||
t.BeginTime, | |||
t.EndTime, | |||
t.IsFlag | |||
"); | |||
strSql.Append(" FROM ExamSubject t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
return this.BaseRepository("CollegeMIS").FindList<ExamSubjectEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取ExamSubject表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public ExamSubjectEntity GetExamSubjectEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<ExamSubjectEntity>(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<ExamSubjectEntity>(t => t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, ExamSubjectEntity 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> | |||
/// 获取表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public ExamSubjectEntity GetExamSubjectBySubjectNo(string SubjectNo) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<ExamSubjectEntity>(x => x.SubjectNo == SubjectNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -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 | |||
} | |||
} |
@@ -81,6 +81,29 @@ 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> | |||
/// 获取页面显示列表数据 | |||
@@ -131,6 +154,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) | |||
{ | |||
@@ -208,7 +254,47 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
/// 查询 | |||
/// <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 IEnumerable<ExamSubjectEntity> GetExamDataByStuId(string keyValue) | |||
{ | |||
try | |||
{ | |||
return stuEnrollService.GetExamDataByStuId(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public List<TreeModel> GetTree() | |||
{ | |||
try | |||
@@ -351,6 +437,28 @@ 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); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
@@ -899,7 +1007,43 @@ 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); | |||
} | |||
} | |||
} | |||
#endregion | |||
@@ -430,7 +430,74 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
public string ThroughProject { get; set; } | |||
[NotMapped] | |||
public string PhotoUrl { 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("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("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("STUMOBILE")] | |||
public string StuMobile { get; set; } | |||
/// <summary> | |||
/// 关联教师 | |||
/// </summary> | |||
[Column("EMPNO")] | |||
public string EmpNo { get; set; } | |||
/// <summary> | |||
/// 年度(专业的年度) | |||
/// </summary> | |||
[Column("YEAR")] | |||
public string Year { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
@@ -22,6 +22,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<StuEnrollEntity> GetPageList(Pagination pagination, string queryJson); | |||
DataTable GetTJList(string queryJson); | |||
IEnumerable<StuEnrollEntity> AllStudent(); | |||
IEnumerable<Acc_DormitoryBuildEntity> GetDormitorys(Pagination pagination, string queryJson); | |||
@@ -32,6 +33,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <summary> | |||
/// <returns></returns> | |||
StuEnrollEntity GetStuEnrollEntity(string keyValue); | |||
StuEnrollEntity GetEntityByPersonalData(string IDCard, string StuMobile); | |||
StuEnrollEntity SearchForm(int type, StuEnrollEntity strEntity); | |||
IEnumerable<ExamSubjectEntity> GetExamDataByStuId(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
@@ -48,6 +52,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <summary> | |||
/// <returns></returns> | |||
void SaveEntity(string keyValue, StuEnrollEntity entity); | |||
void SaveEnroll(string keyValue, StuEnrollEntity entity); | |||
void EditEnrollType(string stuIds, string enrollType); | |||
void AllocationClass(string classNo, string dataJson); | |||
void NewAllocationDormitory(string classNo, string dataJson); | |||
@@ -90,6 +95,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
List<TreeModel> GetTree(); | |||
List<TreeModel> GetBedTree(string classNo, string gender); | |||
void UpdateEnrollStatus(string keyValue, int EnrollStatus); | |||
void Admission(string keyValue, int IsAdmission); | |||
} | |||
} |
@@ -98,7 +98,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
t.DeptNo, | |||
t.Grade, | |||
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(" WHERE 1=1 "); | |||
@@ -128,7 +128,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
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 "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
@@ -1945,6 +1945,88 @@ 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); | |||
} | |||
} | |||
} | |||
/// <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); | |||
} | |||
} | |||
} | |||
/// <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='{majorId}' 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 获取数据 | |||
#region 提交数据 | |||
@@ -2011,6 +2093,46 @@ 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); | |||
} | |||
} | |||
} | |||
public void EditEnrollType(string stuIds, string enrollType) | |||
{ | |||
try | |||
@@ -2048,6 +2170,73 @@ 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); | |||
} | |||
} | |||
} | |||
@@ -2149,6 +2338,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 报到 | |||
/// </summary> | |||
@@ -2197,6 +2387,104 @@ 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 = 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); | |||
} | |||
} | |||
} | |||
#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 | |||
} | |||
} |
@@ -155,6 +155,10 @@ | |||
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeEntity.cs" /> | |||
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeService.cs" /> | |||
<Compile Include="EducationalAdministration\ExamSubject\ExamSubjectBLL.cs" /> | |||
<Compile Include="EducationalAdministration\ExamSubject\ExamSubjectEntity.cs" /> | |||
<Compile Include="EducationalAdministration\ExamSubject\ExamSubjectIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\ExamSubject\ExamSubjectService.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermItemNew\Exam_ArrangeExamTermItemNewBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermItemNew\Exam_ArrangeExamTermItemNewEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermItemNew\Exam_ArrangeExamTermItemNewIBLL.cs" /> | |||
@@ -204,6 +208,10 @@ | |||
<Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolAIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolAService.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\MobileTestEntity.cs" /> | |||
<Compile Include="EducationalAdministration\MobileTest\MobileTestIBLL.cs" /> | |||
@@ -244,6 +252,10 @@ | |||
<Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordEntity.cs" /> | |||
<Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordIBLL.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\StuGrantEntity.cs" /> | |||
<Compile Include="EducationalAdministration\StuGrant\StuGrantIBLL.cs" /> | |||