@@ -18,7 +18,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | |||
private ArrangeLessonSyncIBLL arrangeLessonSyncIBLL = new ArrangeLessonSyncBLL(); | |||
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
@@ -68,6 +69,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = classInfoIBLL.GetPageList(paginationobj, queryJson); | |||
var studata = stuInfoBasicIBLL.GetAllList(); | |||
foreach (var item in data) | |||
{ | |||
item.StuNum = studata.Where(o => | |||
o.DeptNo == item.DeptNo && o.MajorNo == item.MajorNo | |||
&& o.ClassNo == item.ClassNo && o.Grade == item.Grade | |||
).Count(); | |||
} | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
@@ -122,7 +122,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
stuInfoBasicChangeIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -148,6 +148,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
stuInfoBasicChangeIBLL.DoUnCheck(keyValue); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
@@ -91,6 +91,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 异动转入 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult FormTran() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 学生列表【班级信息管理】 | |||
/// <summary> | |||
@@ -0,0 +1,166 @@ | |||
using System; | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using NPOI.SS.Util; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-01-24 12:19 | |||
/// 描 述:教材信息管理 | |||
/// </summary> | |||
public class TextBookInfoController : MvcControllerBase | |||
{ | |||
private TextBookInfoIBLL textBookInfoIBLL = new TextBookInfoBLL(); | |||
#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 = textBookInfoIBLL.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 TextBookInfoData = textBookInfoIBLL.GetTextBookInfoEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
TextBookInfo = TextBookInfoData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
textBookInfoIBLL.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) | |||
{ | |||
TextBookInfoEntity entity = strEntity.ToObject<TextBookInfoEntity>(); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.IsValid = true; | |||
entity.IsDel = 0; | |||
} | |||
else | |||
{ | |||
entity.UpdateUserID = LoginUserInfo.Get().userId; | |||
entity.Updatetime = DateTime.Now; | |||
} | |||
var RepetitionList = textBookInfoIBLL.GetRepetitions(keyValue, entity.TextBookNo, entity.TextBookName, entity.PublishNo, entity.DeptNo, entity.Publisher, entity.TextBookNature, entity.TextBookType, entity.Edition, entity.Impression); | |||
if (RepetitionList != null) | |||
{ | |||
return Fail("保存失败请检查数据有重复项!"); | |||
} | |||
else | |||
{ | |||
textBookInfoIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 启用 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult EnableEntity(string keyValue, string IsValid) | |||
{ | |||
textBookInfoIBLL.EnabOrDisabEntity(keyValue, IsValid); | |||
return Success("启用成功!"); | |||
} | |||
/// <summary> | |||
/// 禁用 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DisableEntity(string keyValue, string IsValid) | |||
{ | |||
textBookInfoIBLL.EnabOrDisabEntity(keyValue, IsValid); | |||
return Success("禁用成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -29,7 +29,7 @@ | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="ClassInfo"> | |||
<div class="lr-form-item-title">学生人数<font face="宋体">*</font></div> | |||
<input id="StuNum" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
<input id="StuNum" type="text" class="form-control" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="ClassInfo"> | |||
<div class="lr-form-item-title">班主任</div> | |||
@@ -38,7 +38,7 @@ var bootstrap = function ($, learun) { | |||
$('#ClassDiredctorNo').lrDataSourceSelect({ code: 'teacheruserdata',value: 'f_encode',text: 'f_realname' }); | |||
$('#ClassTutorNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); | |||
$('#IsSeparate').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#ClassType').lrDataItemSelect({ code: 'ClassType' }); | |||
$('#ClassType').lrDataItemSelect({ code: 'ClassType' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
@@ -53,6 +53,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
} | |||
$('#StuNum').val('0'); | |||
} | |||
}; | |||
// 保存数据 | |||
@@ -34,13 +34,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#LessonNo').lrselect({ | |||
placeholder: "请选择课程", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | |||
$('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
}, | |||
initData: function () { | |||
@@ -36,14 +36,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | |||
$("#MajorNo").lrselect(); | |||
$('#LessonNo').lrselect({ | |||
placeholder: "请选择课程", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||
value: 'value', | |||
text: 'text', | |||
maxHeight: 200 | |||
}); | |||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -36,14 +36,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | |||
$("#MajorNo").lrselect(); | |||
$('#LessonNo').lrselect({ | |||
placeholder: "请选择课程", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||
value: 'value', | |||
text: 'text', | |||
maxHeight: 200 | |||
}); | |||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -23,6 +23,10 @@ | |||
<div class="lr-form-item-title">通知书号<font face="宋体">*</font></div> | |||
<input id="NoticeNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">省编学号</div> | |||
<input id="ProvinceCode" type="text" class="form-control"/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">身份证号<font face="宋体">*</font></div> | |||
<input id="IdentityCardNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
@@ -0,0 +1,204 @@ | |||
@{ | |||
ViewBag.Title = "学生学籍"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<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="StuInfoBasic"> | |||
<div class="lr-form-item-title">学号<font face="宋体">*</font></div> | |||
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">学籍号</div> | |||
<input id="StuCode" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">考生号<font face="宋体">*</font></div> | |||
<input id="ksh" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">通知书号<font face="宋体">*</font></div> | |||
<input id="NoticeNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">省编学号</div> | |||
<input id="ProvinceCode" type="text" class="form-control"/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">身份证号<font face="宋体">*</font></div> | |||
<input id="IdentityCardNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<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="StuInfoBasic"> | |||
<div class="lr-form-item-title">民族<font face="宋体">*</font></div> | |||
<div id="NationalityNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">性别<font face="宋体">*</font></div> | |||
<div id="GenderNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">疫情状态</div> | |||
<div id="HealthStatus" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">政治面貌</div> | |||
<div id="PartyFaceNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">出生日期<font face="宋体">*</font></div> | |||
<input id="Birthday" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#Birthday').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">健康状况</div> | |||
<div id="HealthStatusNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">户口分类</div> | |||
<div id="ResidenceNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">籍贯</div> | |||
<div class="col-xs-12 lr-form-area"> | |||
<div id="F_ProvinceId" placeholder="省" class="col-xs-4"></div> | |||
<div id="F_CityId" placeholder="市" class="col-xs-4"></div> | |||
<div id="F_CountyId" placeholder="县/区" class="col-xs-4"></div> | |||
</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">照片</div> | |||
<div id="Photo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">联系电话<font face="宋体">*</font></div> | |||
<input id="mobile" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">E-mail</div> | |||
<input id="EMail" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">通信地址<font face="宋体">*</font></div> | |||
<input id="MailAddress" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">邮政编码<font face="宋体">*</font></div> | |||
<input id="PostalCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">户口所在地</div> | |||
<input id="FatherUnit" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">档案所在地</div> | |||
<input id="MatherUnit" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">父亲姓名<font face="宋体">*</font></div> | |||
<input id="FatherName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">父亲电话<font face="宋体">*</font></div> | |||
<input id="FatherPhone" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">母亲姓名<font face="宋体">*</font></div> | |||
<input id="MatherName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">母亲电话<font face="宋体">*</font></div> | |||
<input id="MatherPhone" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">家庭出身</div> | |||
<div id="FamilyOriginNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">港澳台侨</div> | |||
<div id="OverseasChineseNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">年级<font face="宋体">*</font></div> | |||
<div id="Grade" type="text" class="form-control" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">本专科</div> | |||
<div id="GraduateNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">学制</div> | |||
<div id="EduSystem"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">报到日期<font face="宋体">*</font></div> | |||
<input id="RegisterDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#RegisterDate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">学习形式</div> | |||
<div id="StudyModality"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">毕业证号</div> | |||
<input id="DiplomaNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">毕业日期</div> | |||
<input id="GraduateYear" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#GraduateYear').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">系所<font face="宋体">*</font></div> | |||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">入学年月<font face="宋体">*</font></div> | |||
<input id="EntranceDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#EntranceDate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">入党时间</div> | |||
<input id="JoinPartyDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#JoinPartyDate').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">入团时间</div> | |||
<input id="JoinLeagueDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#JoinLeagueDate').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">校内地址</div> | |||
<input id="InSchoolAddress" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">校内电话</div> | |||
<input id="InSchoolTelephone" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">QQ</div> | |||
<input id="QQ" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">特长</div> | |||
<input id="GoodAt" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height: 100px;"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">毕业证书备注</div> | |||
<input id="DiplomaRemark" type="text" class="form-control" /> | |||
<input id="IsTran" hidden="hidden" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js") |
@@ -0,0 +1,205 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-02-21 16:53 | |||
* 描 述:学生学籍 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var isStudent = request('isStudent'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
page.hide(); | |||
}, | |||
hide: function () { | |||
if (isStudent == "1") { | |||
$("#StuName").parent().hide(); | |||
$("#IdentityCardNo").parent().hide(); | |||
$("#StuNo").parent().hide(); | |||
$("#ClassNo").parent().hide(); | |||
$("#MajorNo").parent().hide(); | |||
$("#EduSystem").parent().hide(); | |||
$("#F_SchoolId").parent().hide(); | |||
$("#StuCode").parent().hide(); | |||
$("#ksh").parent().hide(); | |||
$("#NoticeNo").parent().hide(); | |||
$("#HealthStatusNo").parent().hide(); | |||
$("#ResidenceNo").parent().hide(); | |||
$("#F_ProvinceId").parent().parent().hide(); | |||
$("#Photo").parent().hide(); | |||
$("#DeptNo").parent().hide(); | |||
$("#FamilyOriginNo").parent().hide(); | |||
$("#OverseasChineseNo").parent().hide(); | |||
$("#Grade").parent().hide(); | |||
$("#GraduateNo").parent().hide(); | |||
$("#EduSystem").parent().hide(); | |||
$("#RegisterDate").parent().hide(); | |||
$("#StudyModality").parent().hide(); | |||
$("#GraduateYear").parent().hide(); | |||
$("#EntranceDate").parent().hide(); | |||
$("#JoinPartyDate").parent().hide(); | |||
$("#JoinLeagueDate").parent().hide(); | |||
$("#InSchoolAddress").parent().hide(); | |||
$("#InSchoolTelephone").parent().hide(); | |||
$("#Remark").parent().hide(); | |||
$("#DiplomaRemark").parent().hide(); | |||
$("#GoodAt").parent().hide(); | |||
$("#InSchoolAddress").parent().hide(); | |||
$("#InSchoolTelephone").parent().hide(); | |||
$("#JoinLeagueDate").parent().hide(); | |||
} | |||
}, | |||
bind: function () { | |||
$('#F_ProvinceId').lrDataSourceSelect({ | |||
code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', | |||
select: function (item) { | |||
if (item) { | |||
$('#F_CityId').lrselectRefresh({ | |||
url: top.$.rootUrl + "/DIC_CITY/GetListByProvinceCode", | |||
param: { ProvinceCode: item.pcode }, | |||
value: 'CCODE', | |||
text: 'CNAME' | |||
}); | |||
} else { | |||
$('#F_CityId').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
$('#F_CountyId').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
}); | |||
$('#F_CityId').lrselect({ | |||
value: 'ccode', text: 'cname', | |||
select: function (item) { | |||
if (item) { | |||
$('#F_CountyId').lrselectRefresh({ | |||
url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", | |||
param: { cityCode: item.CCODE }, | |||
value: 'ACODE', | |||
text: 'ANAME' | |||
}); | |||
} | |||
} | |||
}); | |||
$('#F_CountyId').lrselect({ | |||
value: 'ACODE', text: 'ANAME' | |||
}); | |||
$('#ClassNo').lrselect({ | |||
value: "classno", | |||
text: "classname" | |||
}); | |||
$('#Grade').lrselect({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' }); | |||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); | |||
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); | |||
$('#PartyFaceNo').lrDataSourceSelect({ code: 'BCdPartyFace', value: 'partyfaceno', text: 'partyface' }); | |||
$('#HealthStatusNo').lrDataSourceSelect({ code: 'BCdHealthStatus', value: 'healthstatusno', text: 'healthstatus' }); | |||
$('#Photo').lrUploader(); | |||
$('#FamilyOriginNo').lrDataSourceSelect({ code: 'BCdFamilyOrigin', value: 'familyoriginno', text: 'familyorigin' }); | |||
$('#OverseasChineseNo').lrDataSourceSelect({ code: 'BCdOverseasChinese', value: 'overseaschineseno', text: 'overseaschinesename' }); | |||
$('#GraduateNo').lrDataItemSelect({ code: 'CollegeType' }); | |||
$('#EduSystem').lrDataItemSelect({ code: 'EduSystem' }); | |||
$('#StudyModality').lrDataItemSelect({ code: 'StudyModality' }); | |||
$('#ResidenceNo').lrDataItemSelect({ code: 'ResidenceNo' }); | |||
$('#DeptNo').lrselect({ | |||
value: "deptno", | |||
text: "deptname", | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||
select: function (item) { | |||
if (item) { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } | |||
}); | |||
} | |||
else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
$('#ClassNo').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
}); | |||
$('#MajorNo').lrselect({ | |||
value: "majorno", | |||
text: "majorname", | |||
select: function (item) { | |||
if (item) { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#MajorNo').on("click", | |||
function () { | |||
var data = $('#DeptNo').lrselectGet(); | |||
if (!data) { | |||
learun.alert.error('请先选择系'); | |||
} | |||
}); | |||
$('#ClassNo').on("click", | |||
function () { | |||
var data1 = $('#DeptNo').lrselectGet(); | |||
var data2 = $('#MajorNo').lrselectGet(); | |||
if (!data1 || !data2) { | |||
learun.alert.error('请先选择系和专业'); | |||
} | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/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]); | |||
} | |||
} | |||
}); | |||
} | |||
$('#IsTran').val('0'); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -10,14 +10,6 @@ | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学号</div> | |||
<input id="StuNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">姓名</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo"></div> | |||
@@ -30,6 +22,26 @@ | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">年级</div> | |||
<div id="Grade"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">姓名</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="GenderNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">民族</div> | |||
<div id="NationalityNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">身份证号</div> | |||
<input id="IdentityCardNo" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -40,6 +52,7 @@ | |||
</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="lt_transaction" 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> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
@@ -10,10 +10,65 @@ var bootstrap = function ($, learun) { | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
}, 300, 400); | |||
$('#DeptNo').lrselect({ | |||
allowSearch: true, | |||
value: "deptno", | |||
text: "deptname", | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||
select: function (item) { | |||
if (item) { | |||
$('#MajorNo').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } | |||
}); | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "1=1 AND CheckMark=1" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#MajorNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
value: "majorno", | |||
text: "majorname", | |||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||
select: function (item) { | |||
if (item) { | |||
$('#ClassNo').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } | |||
}); | |||
} else { | |||
$('#ClassNo').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "1=1 AND CheckMark=1" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#ClassNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||
value: "classno", | |||
text: "classname" | |||
}); | |||
$('#Grade').lrselect({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass', | |||
value: "year", | |||
text: "year", | |||
}); | |||
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); | |||
$('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -37,6 +92,19 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
}); | |||
// 异动转入 | |||
$('#lt_transaction').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '异动转入', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/FormTran', | |||
width: 800, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||
@@ -225,6 +293,7 @@ var bootstrap = function ($, learun) { | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "学籍号", name: "StuCode", width: 100, align: "left" }, | |||
{ label: "省编学号", name: "ProvinceCode", width: 100, align: "left" }, | |||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "GenderNo", width: 80, align: "left", | |||
@@ -345,12 +414,12 @@ var bootstrap = function ($, learun) { | |||
{ label: "联系电话", name: "mobile", width: 100, align: "left" }, | |||
{ label: "户口所在地", name: "FatherUnit", width: 100, align: "left" }, | |||
{ label: "档案所在地", name: "MatherUnit", width: 100, align: "left" }, | |||
{ | |||
label: "异动状态", name: "AbmormityMoveMark", width: 80, align: "center", | |||
formatter: function (cellvalue) { | |||
return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
//{ | |||
// label: "异动状态", name: "AbmormityMoveMark", width: 80, align: "center", | |||
// formatter: function (cellvalue) { | |||
// return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
// } | |||
//}, | |||
{ | |||
label: "审核状态", name: "CheckMark", width: 80, align: "center", | |||
formatter: function (cellvalue) { | |||
@@ -26,7 +26,7 @@ | |||
<div id="StuChangeReason" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 text-center">学籍原安排</div> | |||
<div class="col-xs-12 text-center">学籍异动前信息</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | |||
<div class="lr-form-item-title">系部<font face="宋体">*</font></div> | |||
<div id="DeptNo" readonly="readonly"></div> | |||
@@ -39,8 +39,14 @@ | |||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||
<div id="ClassNo" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-12 text-center">学籍新安排</div> | |||
<div class="col-xs-12 text-center">转出学校</div> | |||
<div class="NewSchool" style="display:none;"> | |||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasicChange"> | |||
<div class="lr-form-item-title" data-title="转出学校">转出学校</div> | |||
<input id="OutSchool" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
<div class="col-xs-12 text-center">学籍异动后信息</div> | |||
<div class="NewContainer" style="display:none;"> | |||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | |||
<div class="lr-form-item-title" data-title="新系部">新系部</div> | |||
@@ -32,15 +32,27 @@ var bootstrap = function ($, learun) { | |||
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | |||
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | |||
$(".NewContainer").show(); | |||
if (item.id === "01" || item.id === "02") { //降级、转班 | |||
$(".NewSchool").hide(); | |||
if (item.id === "01") { //留级 | |||
$(".NewSchool").hide(); | |||
$(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); | |||
$("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet()); | |||
$("#NewMajorNo").lrselectSet($("#MajorNo").lrselectGet()); | |||
} | |||
else if (item.id === "03") { //转专业 | |||
$('#OutSchool').val(''); | |||
} else if (item.id === "02") {//转校 | |||
$(".NewSchool").show(); | |||
$(".NewContainer").find('.contentDiv').removeAttr("isvalid"); | |||
$(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); | |||
$(".NewContainer").find('.contentDiv').removeAttr('readonly'); | |||
} | |||
else { //退学、休学、转校 | |||
$(".NewSchool").find('.OutSchool').attr("isvalid",'yes'); | |||
$(".NewSchool").find('.OutSchool').attr("checkexpession"); | |||
$(".NewSchool").find('.OutSchool').attr('readonly'); | |||
} else if (item.id === "03") { //复学 | |||
$(".NewSchool").hide(); | |||
$(".NewContainer").find('.contentDiv').removeAttr('readonly'); | |||
$(".NewSchool").find('.OutSchool').attr("isvalid", "Null"); | |||
$('#OutSchool').val(''); | |||
} else { //退学、休学、转校 | |||
$(".NewContainer").find('.contentDiv').removeAttr("isvalid"); | |||
$(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); | |||
$(".NewContainer").find('.contentDiv').removeAttr('readonly'); | |||
@@ -48,6 +60,8 @@ var bootstrap = function ($, learun) { | |||
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); | |||
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); | |||
$(".NewContainer").hide(); | |||
$(".NewSchool").hide(); | |||
$('#OutSchool').val(''); | |||
} | |||
} | |||
@@ -147,11 +161,24 @@ var bootstrap = function ($, learun) { | |||
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | |||
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | |||
$(".NewContainer").show(); | |||
if (data[id].StuChangeType == "01" || data[id].StuChangeType == "02") { //降级、转班 | |||
if (data[id].StuChangeType == "01") { //降级、转班 | |||
$(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); | |||
$(".NewSchool").hide(); | |||
$('#OutSchool').val(''); | |||
} | |||
else if (data[id].StuChangeType == "03") { //转专业 | |||
else if (data[id].StuChangeType == "02") {//转校 | |||
$(".NewSchool").show(); | |||
$(".NewContainer").find('.contentDiv').removeAttr("isvalid"); | |||
$(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); | |||
$(".NewContainer").find('.contentDiv').removeAttr('readonly'); | |||
$(".NewSchool").find('.OutSchool').attr("isvalid"); | |||
$(".NewSchool").find('.OutSchool').attr("checkexpession"); | |||
$(".NewSchool").find('.OutSchool').attr('readonly'); | |||
$('#OutSchool').val(''); | |||
} else if (data[id].StuChangeType == "03") { //转专业 | |||
$(".NewContainer").find('.contentDiv').removeAttr('readonly'); | |||
$(".NewSchool").hide(); | |||
$('#OutSchool').val(''); | |||
} | |||
else { //退学、休学、转校 | |||
$(".NewContainer").find('.contentDiv').removeAttr("isvalid"); | |||
@@ -161,6 +188,8 @@ var bootstrap = function ($, learun) { | |||
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); | |||
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); | |||
$(".NewContainer").hide(); | |||
$(".NewSchool").hide(); | |||
$('#OutSchool').val(''); | |||
} | |||
} | |||
} | |||
@@ -222,6 +222,8 @@ var bootstrap = function ($, learun) { | |||
{ label: "创建用户", name: "CreateUserId", width: 100, align: "left" }, | |||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||
{ label: "审核用户", name: "CheckUserId", width: 100, align: "left" }, | |||
{ label: "转出学校", name: "OutSchool", width: 200, align: "left" }, | |||
{ label: "备注", name: "StuChangeRemark", width: 200, align: "left" }, | |||
{ | |||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
@@ -101,15 +101,29 @@ var bootstrap = function ($, learun) { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_ChangeLog/GetPageList', | |||
headData: [ | |||
{ label: "修改属性", name: "FieldName", width: 200, align: "left" }, | |||
{ label: "修改前", name: "BeforeChange", width: 200, align: "left" }, | |||
{ label: "修改后", name: "AfterChange", width: 200, align: "left" }, | |||
{ | |||
label: "修改人", name: "UpdateBy", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||
key: value, | |||
keyId: 'f_account', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "修改时间", name: "UpdateTime", width: 200, align: "left" }, | |||
{ label: "数据主键", name: "StuID", width: 250, align: "left" }, | |||
{ label: "字段", name: "FieldName", width: 100, align: "left" }, | |||
{ label: "修改前", name: "BeforeChange", width: 100, align: "left" }, | |||
{ label: "修改后", name: "AfterChange", width: 100, align: "left" }, | |||
{ label: "修改人", name: "UpdateBy", width: 100, align: "left" }, | |||
{ label: "修改时间", name: "UpdateTime", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true | |||
isPage: true, | |||
sidx: 'UpdateTime desc', | |||
}); | |||
page.search(); | |||
}, | |||
@@ -19,15 +19,19 @@ | |||
<div class="lr-form-item-title">报名号<font face="宋体">*</font></div> | |||
<input id="ApplyNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuVolunteer"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">省编学号</div> | |||
<input id="ProvinceCode" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">学生姓名<font face="宋体">*</font></div> | |||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="Chinese" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuVolunteer"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">性别<font face="宋体">*</font></div> | |||
<div id="Sex" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuVolunteer"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">中考总分<font face="宋体">*</font></div> | |||
<input id="StuScore" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||
</div> | |||
@@ -27,8 +27,8 @@ var bootstrap = function ($, learun) { | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/Form', | |||
width: 600, | |||
height: 400, | |||
width: 800, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
@@ -46,8 +46,8 @@ var bootstrap = function ($, learun) { | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
width: 800, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
@@ -81,6 +81,7 @@ var bootstrap = function ($, learun) { | |||
{ label: "毕业学校", name: "BySchool", width: 150, align: "left" }, | |||
{ label: "初中学号", name: "H_SchoolNo", width: 150, align: "left" }, | |||
{ label: "报名号", name: "ApplyNo", width: 150, align: "left" }, | |||
{ label: "省编学号", name: "ProvinceCode", width: 150, align: "left" }, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "Sex", width: 100, align: "left", | |||
@@ -0,0 +1,79 @@ | |||
@{ | |||
ViewBag.Title = "教材信息管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">教材号<font face="宋体">*</font></div> | |||
<input id="TextBookNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">教材名称</div> | |||
<input id="TextBookName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">出版号<font face="宋体">*</font></div> | |||
<input id="PublishNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div> | |||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">第一作者<font face="宋体">*</font></div> | |||
<input id="FirstAuthor" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">其他作者</div> | |||
<input id="OtherAuthor" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">出版日期<font face="宋体">*</font></div> | |||
<input id="Pubdate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Pubdate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">出版社<font face="宋体">*</font></div> | |||
<input id="Publisher" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">教材类型<font face="宋体">*</font></div> | |||
<div id="TextBookType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">教材性质<font face="宋体">*</font></div> | |||
<div id="TextBookNature" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">价格</div> | |||
<input id="Price" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">版次</div> | |||
<input id="Edition" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">印次</div> | |||
<input id="Impression" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">是否有练习册</div> | |||
<div id="IsWorkBook" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">是否有教参教辅</div> | |||
<div id="IsTeachConsult" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="TextBookInfo" > | |||
<div class="lr-form-item-title">内容简介</div> | |||
<textarea id="Description" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" style="display: none; " > | |||
<div class="lr-form-item-title">当前信息</div> | |||
<input id="CreateUserID" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" style="display: none; " > | |||
<div class="lr-form-item-title">当前信息</div> | |||
<input id="Createdate" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInfo/Form.js") |
@@ -0,0 +1,58 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-01-24 12:19 | |||
* 描 述:教材信息管理 | |||
*/ | |||
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 () { | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#TextBookType').lrDataItemSelect({ code: 'TextBookType' }); | |||
$('#TextBookNature').lrDataItemSelect({ code: 'TextBookNature' }); | |||
$('#IsWorkBook').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#IsTeachConsult').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#CreateUserID')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#CreateUserID').val(learun.clientdata.get(['userinfo']).realName); | |||
$('#Createdate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/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/TextBookInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,50 @@ | |||
@{ | |||
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="TextBookName" type="text" class="form-control" /> | |||
</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="TextBookType"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">教材性质</div> | |||
<div id="TextBookNature"></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-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
<a id="lr_enabled" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | |||
<a id="lr_disabled" class="btn btn-default"><i class="fa fa-unlock"></i> 禁用</a></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInfo/Index.js") |
@@ -0,0 +1,243 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-01-24 12:19 | |||
* 描 述:教材信息管理 | |||
*/ | |||
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); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#TextBookType').lrDataItemSelect({ code: 'TextBookType' }); | |||
$('#TextBookNature').lrDataItemSelect({ code: 'TextBookNature' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/TextBookInfo/Form', | |||
width: 800, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||
return; | |||
} | |||
var IsValid = $('#gridtable').jfGridValue('IsValid'); | |||
if (IsValid == "true") { | |||
learun.alert.warning("选中记录中包含已启用项目,已启用项不可编辑!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/TextBookInfo/Form?keyValue=' + keyValue, | |||
width: 800, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
var IsValid = $('#gridtable').jfGridValue('IsValid'); | |||
if (IsValid.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目,已启用项不能删除!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
//启用 | |||
$('#lr_enabled').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
var IsValid = $('#gridtable').jfGridValue('IsValid'); | |||
if (IsValid.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认启用选中项?', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/EnableEntity', { keyValue: keyValue, IsValid: '1' }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//禁用 | |||
$('#lr_disabled').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
var IsValid = $('#gridtable').jfGridValue('IsValid'); | |||
if (IsValid.indexOf('false') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认禁用选中项?', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/DisableEntity', { keyValue: keyValue, IsValid: '0' }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/TextBookInfo/GetPageList', | |||
headData: [ | |||
{ label: "教材号", name: "TextBookNo", width: 150, align: "left" }, | |||
{ label: "教材名称", name: "TextBookName", width: 150, align: "left" }, | |||
{ label: "出版号", name: "PublishNo", width: 100, align: "left" }, | |||
{ | |||
label: "专业部", name: "DeptNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "第一作者", name: "FirstAuthor", width: 100, align: "left" }, | |||
{ label: "其他作者", name: "OtherAuthor", width: 100, align: "left" }, | |||
{ | |||
label: "出版日期", name: "Pubdate", width: 80, align: "left", | |||
formatter: function (value) { | |||
return learun.formatDate(value, 'yyyy-MM-dd'); | |||
} | |||
}, | |||
{ label: "出版社", name: "Publisher", width: 100, align: "left" }, | |||
{ | |||
label: "教材类型", name: "TextBookType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'TextBookType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "教材性质", name: "TextBookNature", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'TextBookNature', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "价格", name: "Price", width: 60, align: "left" }, | |||
{ label: "版次", name: "Edition", width: 100, align: "left" }, | |||
{ label: "印次", name: "Impression", width: 100, align: "left" }, | |||
{ | |||
label: "是否有练习册", name: "IsWorkBook", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "<span class=\"label label-success\">是</span>" : | |||
"<span class=\"label label-danger\">否</span>"; | |||
} | |||
}, | |||
{ | |||
label: "是否有教参教辅", name: "IsTeachConsult", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "<span class=\"label label-success\">是</span>" : | |||
"<span class=\"label label-danger\">否</span>"; | |||
} | |||
}, | |||
{ label: "内容简介", name: "Description", width: 100, align: "left" }, | |||
{ | |||
label: "录入用户", name: "CreateUserID", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('user', { | |||
key: value, | |||
callback: function (_data) { | |||
callback(_data.name); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "录入时间", name: "Createdate", width: 100, align: "left" }, | |||
{ | |||
label: "修改用户", name: "UpdateUserID", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('user', { | |||
key: value, | |||
callback: function (_data) { | |||
callback(_data.name); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "修改时间", name: "Updatetime", width: 100, align: "left" }, | |||
{ | |||
label: "是否有效", name: "IsValid", width: 80, 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, | |||
isMultiselect: true, | |||
sidx: 'Createdate desc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = " and Isdel = '0' "; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -836,6 +836,7 @@ | |||
<Compile Include="Areas\LR_Desktop\Controllers\FormulaChildController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\ProjectProcessManageController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\FD_BudgetFileController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookInfoController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -1081,6 +1082,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasicChange\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasicChange\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasicChange\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\FormTran.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\FormOfDC.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\Graduate.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\CreateGraduateNo.js" /> | |||
@@ -6629,6 +6631,10 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\FD_BudgetFile\Index.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\FD_BudgetFile\Form.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\FD_BudgetFile\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TextBookInfo\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TextBookInfo\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TextBookInfo\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TextBookInfo\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" /> | |||
@@ -7551,6 +7557,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\FormGenerate.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexMajor.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\FormMajor.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\FormTran.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-01-24 12:19 | |||
/// 描 述:教材信息管理 | |||
/// </summary> | |||
public class TextBookInfoMap : EntityTypeConfiguration<TextBookInfoEntity> | |||
{ | |||
public TextBookInfoMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("TEXTBOOKINFO"); | |||
//主键 | |||
this.HasKey(t => t.ID); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -590,6 +590,7 @@ | |||
<Compile Include="EducationalAdministration\FillinFromMap.cs" /> | |||
<Compile Include="LogisticsManagement\ProjectProcessManageMap.cs" /> | |||
<Compile Include="PersonnelManagement\FD_BudgetFileMap.cs" /> | |||
<Compile Include="EducationalAdministration\TextBookInfoMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -708,6 +708,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[Column("TWOPOSITION")] | |||
public string TwoPosition { get; set; } | |||
/// <summary> | |||
/// 省编学号 | |||
/// </summary> | |||
[Column("PROVINCECODE")] | |||
public string ProvinceCode { get; set; } | |||
#endregion | |||
@@ -736,7 +742,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[NotMapped] public List<StuPunishmentEntity> StuPunishmentList { get; set; } | |||
[NotMapped] public List<StuScoreClassOne> StuScoreClassOneList { get; set; } | |||
[NotMapped] public string IsTran { get; set; } | |||
#endregion | |||
@@ -71,6 +71,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("Grade", "" + queryParam["Grade"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.Grade=@Grade "); | |||
} | |||
if (!queryParam["GenderNo"].IsEmpty()) | |||
{ | |||
dp.Add("GenderNo", "" + queryParam["GenderNo"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.GenderNo=@GenderNo "); | |||
} | |||
if (!queryParam["IdentityCardNo"].IsEmpty()) | |||
{ | |||
dp.Add("IdentityCardNo", "%" + queryParam["IdentityCardNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.IdentityCardNo Like @IdentityCardNo "); | |||
} | |||
if (!queryParam["NationalityNo"].IsEmpty()) | |||
{ | |||
dp.Add("NationalityNo", "" + queryParam["NationalityNo"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.NationalityNo = @NationalityNo "); | |||
} | |||
if (!queryParam["FinishSchoolMark"].IsEmpty()) | |||
{ | |||
dp.Add("FinishSchoolMark", "" + queryParam["FinishSchoolMark"].ToString() + "", DbType.String); | |||
@@ -681,6 +696,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
else | |||
{ | |||
entity.Create(); | |||
if (entity.IsTran == "0") | |||
{ | |||
StuInfoBasicChangeEntity stuinfoChange = new StuInfoBasicChangeEntity | |||
{ | |||
Id = Guid.NewGuid().ToString(), | |||
StuNo = entity.StuNo, | |||
StuName = entity.StuName, | |||
DeptNo = entity.DeptNo, | |||
MajorNo = entity.MajorNo, | |||
ClassNo = entity.ClassNo, | |||
StuChangeRemark = entity.Remark, | |||
NewDeptNo = entity.DeptNo, | |||
NewMajorNo = entity.MajorNo, | |||
NewClassNo = entity.ClassNo, | |||
CreateUserId = entity.StuNo, | |||
StuChangeType = "04", | |||
StuChangeReason = "10", | |||
CreateTime = DateTime.Now, | |||
}; | |||
this.BaseRepository("CollegeMIS").Insert(stuinfoChange); | |||
} | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
@@ -165,6 +165,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// 日 期:2019-10-28 11:48 | |||
/// 描 述:学籍异动 | |||
/// </summary> | |||
public class StuInfoBasicChangeEntity | |||
public class StuInfoBasicChangeEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
@@ -99,6 +99,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[Column("CHECKSTATUS")] | |||
public int? CheckStatus { get; set; } | |||
/// <summary> | |||
/// 转出学校 | |||
/// </summary> | |||
[Column("OUTSCHOOL")] | |||
public string OutSchool { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
@@ -43,7 +43,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <summary> | |||
/// <returns></returns> | |||
void SaveEntity(string keyValue, StuInfoBasicChangeEntity entity); | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -57,6 +57,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <summary> | |||
/// <returns></returns> | |||
void DoUnCheck(string keyValue); | |||
#endregion | |||
} | |||
@@ -153,7 +153,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
if (entity != null) | |||
{ | |||
//处理数据 | |||
if (entity.StuChangeType == "01" || entity.StuChangeType == "02" || entity.StuChangeType == "03") //降级、转班、转专业 | |||
if (entity.StuChangeType == "01" || entity.StuChangeType == "03") //降级、转班、转专业 | |||
{ | |||
//改信息; | |||
var classInfoEntity = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.NewClassNo); | |||
@@ -162,7 +162,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
db.ExecuteBySql($"update StuInfoBasic set DeptNo='{entity.NewDeptNo}',MajorNo='{entity.NewMajorNo}',ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' "); | |||
} | |||
} | |||
else if (entity.StuChangeType == "04" || entity.StuChangeType == "05") //退学、休学 | |||
else if (entity.StuChangeType == "02" || entity.StuChangeType == "04") //退学、休学 | |||
{ | |||
//改信息;不显示成绩; | |||
db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=1 where StuNo='{entity.StuNo}' "); | |||
@@ -251,6 +251,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("LINKPHONE")] | |||
public string LinkPhone { get; set; } | |||
/// <summary> | |||
/// 省编学号 | |||
/// </summary> | |||
[Column("PROVINCECODE")] | |||
public string ProvinceCode { get; set; } | |||
#endregion | |||
@@ -324,11 +324,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
db.ExecuteBySql(updSql); | |||
string addSql = @"insert into StuInfoBasic ( | |||
Stuid,StuNo,StuCode,ClassNo,StuName,GenderNo,DeptNo,MajorNo,IdentityCardNo,ExamScore | |||
) | |||
select newid(),StuNo,'G'+CardNo,ClassNo,StuName,Sex,DeptNo,MajorNo,CardNo,StuScore | |||
from StuVolunteer t where t.ClassStatus=1 | |||
and t.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=t.StuNo) "; | |||
Stuid,StuNo,StuCode,ClassNo,StuName,GenderNo,DeptNo,MajorNo,IdentityCardNo,ExamScore,ProvinceCode | |||
) | |||
select newid(),StuNo,'G'+CardNo,ClassNo,StuName,Sex,DeptNo,MajorNo,CardNo,StuScore,ProvinceCode | |||
from StuVolunteer t where t.ClassStatus=1 | |||
and t.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=t.StuNo) "; | |||
db.ExecuteBySql(addSql); | |||
db.Commit(); | |||
@@ -0,0 +1,169 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-01-24 12:19 | |||
/// 描 述:教材信息管理 | |||
/// </summary> | |||
public class TextBookInfoBLL : TextBookInfoIBLL | |||
{ | |||
private TextBookInfoService textBookInfoService = new TextBookInfoService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<TextBookInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return textBookInfoService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取TextBookInfo表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public TextBookInfoEntity GetTextBookInfoEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return textBookInfoService.GetTextBookInfoEntity(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 | |||
{ | |||
textBookInfoService.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, TextBookInfoEntity entity) | |||
{ | |||
try | |||
{ | |||
textBookInfoService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 启用或禁用 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="IsValid">状态</param> | |||
public void EnabOrDisabEntity(string keyValue, string IsValid) | |||
{ | |||
try | |||
{ | |||
textBookInfoService.EnabOrDisabEntity(keyValue, IsValid); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
public TextBookInfoEntity GetRepetitions(string keyValue, string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression) | |||
{ | |||
try | |||
{ | |||
return textBookInfoService.GetRepetitions(keyValue, TextBookNo, TextBookName, PublishNo, DeptNo, Publisher, TextBookNature, TextBookType, Edition, Impression); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} |
@@ -0,0 +1,155 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-01-24 12:19 | |||
/// 描 述:教材信息管理 | |||
/// </summary> | |||
public class TextBookInfoEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// ID | |||
/// </summary> | |||
[Column("ID")] | |||
public string ID { get; set; } | |||
/// <summary> | |||
/// 专业部 | |||
/// </summary> | |||
[Column("DEPTNO")] | |||
public string DeptNo { get; set; } | |||
/// <summary> | |||
/// 教材号 | |||
/// </summary> | |||
[Column("TEXTBOOKNO")] | |||
public string TextBookNo { get; set; } | |||
/// <summary> | |||
/// 教材名称 | |||
/// </summary> | |||
[Column("TEXTBOOKNAME")] | |||
public string TextBookName { get; set; } | |||
/// <summary> | |||
/// 出版号 | |||
/// </summary> | |||
[Column("PUBLISHNO")] | |||
public string PublishNo { get; set; } | |||
/// <summary> | |||
/// 第一作者 | |||
/// </summary> | |||
[Column("FIRSTAUTHOR")] | |||
public string FirstAuthor { get; set; } | |||
/// <summary> | |||
/// 其他作者 | |||
/// </summary> | |||
[Column("OTHERAUTHOR")] | |||
public string OtherAuthor { get; set; } | |||
/// <summary> | |||
/// 出版日期 | |||
/// </summary> | |||
[Column("PUBDATE")] | |||
public DateTime? Pubdate { get; set; } | |||
/// <summary> | |||
/// 出版社 | |||
/// </summary> | |||
[Column("PUBLISHER")] | |||
public string Publisher { get; set; } | |||
/// <summary> | |||
/// 教材类型 | |||
/// </summary> | |||
[Column("TEXTBOOKTYPE")] | |||
public string TextBookType { get; set; } | |||
/// <summary> | |||
/// 教材性质 | |||
/// </summary> | |||
[Column("TEXTBOOKNATURE")] | |||
public string TextBookNature { get; set; } | |||
/// <summary> | |||
/// 价格 | |||
/// </summary> | |||
[Column("PRICE")] | |||
public decimal? Price { get; set; } | |||
/// <summary> | |||
/// 版次 | |||
/// </summary> | |||
[Column("EDITION")] | |||
public string Edition { get; set; } | |||
/// <summary> | |||
/// 印次 | |||
/// </summary> | |||
[Column("IMPRESSION")] | |||
public string Impression { get; set; } | |||
/// <summary> | |||
/// 是否有练习册 | |||
/// </summary> | |||
[Column("ISWORKBOOK")] | |||
public bool? IsWorkBook { get; set; } | |||
/// <summary> | |||
/// 是否有教参教辅 | |||
/// </summary> | |||
[Column("ISTEACHCONSULT")] | |||
public bool? IsTeachConsult { get; set; } | |||
/// <summary> | |||
/// 内容简介 | |||
/// </summary> | |||
[Column("DESCRIPTION")] | |||
public string Description { get; set; } | |||
/// <summary> | |||
/// 是否有效 | |||
/// </summary> | |||
[Column("ISVALID")] | |||
public bool? IsValid { get; set; } | |||
/// <summary> | |||
/// Createdate | |||
/// </summary> | |||
[Column("CREATEDATE")] | |||
public DateTime? Createdate { get; set; } | |||
/// <summary> | |||
/// Updatetime | |||
/// </summary> | |||
[Column("UPDATETIME")] | |||
public DateTime? Updatetime { get; set; } | |||
/// <summary> | |||
/// CreateUserID | |||
/// </summary> | |||
[Column("CREATEUSERID")] | |||
public string CreateUserID { get; set; } | |||
/// <summary> | |||
/// UpdateUserID | |||
/// </summary> | |||
[Column("UPDATEUSERID")] | |||
public string UpdateUserID { get; set; } | |||
/// <summary> | |||
/// 删除 0 1 | |||
/// </summary> | |||
public int? IsDel { 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,69 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-01-24 12:19 | |||
/// 描 述:教材信息管理 | |||
/// </summary> | |||
public interface TextBookInfoIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<TextBookInfoEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取TextBookInfo表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
TextBookInfoEntity GetTextBookInfoEntity(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, TextBookInfoEntity entity); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 启用或禁用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="IsValid"></param> | |||
void EnabOrDisabEntity(string keyValue, string IsValid); | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="TextBookName">名称</param> | |||
/// <param name="PublishNo">出版号</param> | |||
/// <param name="DeptNo">专业部</param> | |||
/// <param name="Publisher"></param> | |||
/// <param name="TextBookNature"></param> | |||
/// <param name="TextBookType"></param> | |||
/// <param name="Impression">版次</param> | |||
/// <returns></returns> | |||
TextBookInfoEntity GetRepetitions(string keyValue,string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,255 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-01-24 12:19 | |||
/// 描 述:教材信息管理 | |||
/// </summary> | |||
public class TextBookInfoService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<TextBookInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" * "); | |||
strSql.Append(" FROM TextBookInfo t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["TextBookName"].IsEmpty()) | |||
{ | |||
dp.Add("TextBookName", "%" + queryParam["TextBookName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.TextBookName Like @TextBookName "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||
} | |||
if (!queryParam["TextBookType"].IsEmpty()) | |||
{ | |||
dp.Add("TextBookType", queryParam["TextBookType"].ToString(), DbType.String); | |||
strSql.Append(" AND t.TextBookType = @TextBookType "); | |||
} | |||
if (!queryParam["TextBookNature"].IsEmpty()) | |||
{ | |||
dp.Add("TextBookNature", queryParam["TextBookNature"].ToString(), DbType.String); | |||
strSql.Append(" AND t.TextBookNature = @TextBookNature "); | |||
} | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<TextBookInfoEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取TextBookInfo表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public TextBookInfoEntity GetTextBookInfoEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>(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) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
var keyValueArr = keyValue.Split(','); | |||
foreach (var item in keyValueArr) | |||
{ | |||
var entity = BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>(x => x.ID == item); | |||
entity.IsDel = 1; | |||
db.Update(entity); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
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, TextBookInfoEntity 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 扩展数据 | |||
/// <summary> | |||
/// 启用或禁用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void EnabOrDisabEntity(string keyValue, string IsValid) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
var keyValueArr = keyValue.Split(','); | |||
foreach (var item in keyValueArr) | |||
{ | |||
var entity = BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>(x => x.ID == item); | |||
entity.IsValid = IsValid.ToString() == "1" ? true : false; | |||
db.Update(entity); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 去重 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="TextBookNo"></param> | |||
/// <param name="TextBookName"></param> | |||
/// <param name="PublishNo"></param> | |||
/// <param name="DeptNo"></param> | |||
/// <param name="Publisher"></param> | |||
/// <param name="TextBookNature"></param> | |||
/// <param name="TextBookType"></param> | |||
/// <param name="Edition"></param> | |||
/// <param name="Impression"></param> | |||
/// <returns></returns> | |||
public TextBookInfoEntity GetRepetitions(string keyValue, string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>( | |||
x => x.ID != keyValue && x.TextBookNo == TextBookNo && x.TextBookName == TextBookName && x.PublishNo == PublishNo && | |||
x.DeptNo == DeptNo && x.PublishNo == Publisher && x.TextBookNature == TextBookNature && x.TextBookType == TextBookType | |||
&& x.Edition == Edition && x.Impression == Impression && x.IsDel == 0); | |||
} | |||
else | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>( | |||
x => x.TextBookNo == TextBookNo && x.TextBookName == TextBookName && x.PublishNo == PublishNo && | |||
x.DeptNo == DeptNo && x.PublishNo == Publisher && x.TextBookNature == TextBookNature && x.TextBookType == TextBookType | |||
&& x.Edition == Edition && x.Impression == Impression && x.IsDel == 0); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -1790,6 +1790,10 @@ | |||
<Compile Include="PersonnelManagement\FD_BudgetFile\FD_BudgetFileService.cs" /> | |||
<Compile Include="PersonnelManagement\FD_BudgetFile\FD_BudgetFileBLL.cs" /> | |||
<Compile Include="PersonnelManagement\FD_BudgetFile\FD_BudgetFileIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\TextBookInfo\TextBookInfoEntity.cs" /> | |||
<Compile Include="EducationalAdministration\TextBookInfo\TextBookInfoService.cs" /> | |||
<Compile Include="EducationalAdministration\TextBookInfo\TextBookInfoBLL.cs" /> | |||
<Compile Include="EducationalAdministration\TextBookInfo\TextBookInfoIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||