diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs index 78a9cde53..a25982bb8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs @@ -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 视图功能 /// @@ -68,6 +69,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { Pagination paginationobj = pagination.ToObject(); 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, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs index cecc15137..952067fec 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs @@ -122,7 +122,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers stuInfoBasicChangeIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } - + /// /// 审核实体数据 /// 主键 @@ -148,6 +148,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers stuInfoBasicChangeIBLL.DoUnCheck(keyValue); return Success("操作成功!"); } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs index bb578e616..9f0477867 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs @@ -91,6 +91,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 异动转入 + /// + /// + public ActionResult FormTran() + { + return View(); + } + /// /// 学生列表【班级信息管理】 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInfoController.cs new file mode 100644 index 000000000..409f87055 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInfoController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-01-24 12:19 + /// 描 述:教材信息管理 + /// + public class TextBookInfoController : MvcControllerBase + { + private TextBookInfoIBLL textBookInfoIBLL = new TextBookInfoBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = textBookInfoIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var TextBookInfoData = textBookInfoIBLL.GetTextBookInfoEntity(keyValue); + var jsonData = new + { + TextBookInfo = TextBookInfoData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + textBookInfoIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + TextBookInfoEntity entity = strEntity.ToObject(); + + 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 扩展数据 + + /// + /// 启用 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult EnableEntity(string keyValue, string IsValid) + { + textBookInfoIBLL.EnabOrDisabEntity(keyValue, IsValid); + return Success("启用成功!"); + } + + /// + /// 禁用 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DisableEntity(string keyValue, string IsValid) + { + textBookInfoIBLL.EnabOrDisabEntity(keyValue, IsValid); + return Success("禁用成功!"); + } + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml index ece15903d..4381b907b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml @@ -29,7 +29,7 @@
学生人数*
- +
班主任
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js index 222eebbcf..dbb4686dd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js @@ -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'); } }; // 保存数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js index 4fef293f4..c0fc654ac 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js @@ -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 () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js index 7ed171482..baf34ed51 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js @@ -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(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js index df7273066..14ffc8aab 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js @@ -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(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml index cca53fdce..66e5e6da3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml @@ -23,6 +23,10 @@
通知书号*
+
+
省编学号
+ +
身份证号*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.cshtml new file mode 100644 index 000000000..8854572f9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.cshtml @@ -0,0 +1,204 @@ +@{ + ViewBag.Title = "学生学籍"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学校*
+
+
+
+
学号*
+ +
+
+
学籍号
+ +
+
+
考生号*
+ +
+
+
通知书号*
+ +
+
+
省编学号
+ +
+
+
身份证号*
+ +
+
+
姓名*
+ +
+
+
民族*
+
+
+
+
性别*
+
+
+
+
疫情状态
+
+
+
+
政治面貌
+
+
+
+
出生日期*
+ +
+
+
健康状况
+
+
+
+
户口分类
+
+
+
+
籍贯
+
+
+
+
+
+
+
+
照片
+
+
+
+
联系电话*
+ +
+
+
E-mail
+ +
+
+
通信地址*
+ +
+
+
邮政编码*
+ +
+
+
户口所在地
+ +
+
+
档案所在地
+ +
+
+
父亲姓名*
+ +
+
+
父亲电话*
+ +
+
+
母亲姓名*
+ +
+
+
母亲电话*
+ +
+
+
家庭出身
+
+
+
+
港澳台侨
+
+
+
+
年级*
+
+
+
+
本专科
+
+
+
+
学制
+
+
+
+
报到日期*
+ +
+
+
学习形式
+
+
+
+
毕业证号
+ +
+
+
毕业日期
+ +
+
+
系所*
+
+
+
+
专业*
+
+
+
+
班级*
+
+
+
+
入学年月*
+ +
+
+
入党时间
+ +
+
+
入团时间
+ +
+
+
校内地址
+ +
+
+
校内电话
+ +
+
+
QQ
+ +
+
+
特长
+ +
+
+
备注
+ +
+
+
毕业证书备注
+ + +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js new file mode 100644 index 000000000..c3a4fa33e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); + +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml index 85e50b95a..480cbbc9e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml @@ -10,14 +10,6 @@
-
-
学号
- -
-
-
姓名
- -
系部
@@ -30,6 +22,26 @@
班级
+
+
年级
+
+
+
+
姓名
+ +
+
+
性别
+
+
+
+
民族
+
+
+
+
身份证号
+ +
@@ -40,6 +52,7 @@
 录入 +  异动转入  修改  删除  查看 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js index f5f544879..426a7ea21 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js @@ -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" ? "" : ""; - } - }, + //{ + // label: "异动状态", name: "AbmormityMoveMark", width: 80, align: "center", + // formatter: function (cellvalue) { + // return cellvalue == "1" ? "" : ""; + // } + //}, { label: "审核状态", name: "CheckMark", width: 80, align: "center", formatter: function (cellvalue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml index 14626a53b..ea287be9c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml @@ -26,7 +26,7 @@
-
学籍原安排
+
学籍异动前信息
系部*
@@ -39,8 +39,14 @@
班级*
- -
学籍新安排
+
转出学校
+ +
学籍异动后信息
[Column("TWOPOSITION")] public string TwoPosition { get; set; } + /// + /// 省编学号 + /// + [Column("PROVINCECODE")] + + public string ProvinceCode { get; set; } #endregion @@ -736,7 +742,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [NotMapped] public List StuPunishmentList { get; set; } [NotMapped] public List StuScoreClassOneList { get; set; } - + [NotMapped] public string IsTran { get; set; } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index a31760d11..50d15c53e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -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); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs index c3076b071..2372848e8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs @@ -165,6 +165,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs index 4e04ce9f7..b58c8c2b2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 日 期:2019-10-28 11:48 /// 描 述:学籍异动 ///
- public class StuInfoBasicChangeEntity + public class StuInfoBasicChangeEntity { #region 实体成员 /// @@ -99,6 +99,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("CHECKSTATUS")] public int? CheckStatus { get; set; } + /// + /// 转出学校 + /// + [Column("OUTSCHOOL")] + public string OutSchool { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs index 3380c21a7..0b89d4c67 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs @@ -43,7 +43,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void SaveEntity(string keyValue, StuInfoBasicChangeEntity entity); - + /// /// 审核实体数据 /// 主键 @@ -57,6 +57,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void DoUnCheck(string keyValue); + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs index 5fb126220..17f8e9173 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs @@ -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(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}' "); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerEntity.cs index d6aef3475..8ea525103 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerEntity.cs @@ -251,6 +251,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("LINKPHONE")] public string LinkPhone { get; set; } + /// + /// 省编学号 + /// + [Column("PROVINCECODE")] + public string ProvinceCode { get; set; } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs index 5eae36568..5d9689f7b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs @@ -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(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoBLL.cs new file mode 100644 index 000000000..6bca1c47c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoBLL.cs @@ -0,0 +1,169 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-01-24 12:19 + /// 描 述:教材信息管理 + /// + public class TextBookInfoBLL : TextBookInfoIBLL + { + private TextBookInfoService textBookInfoService = new TextBookInfoService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return textBookInfoService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取TextBookInfo表实体数据 + /// + /// 主键 + /// + 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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + textBookInfoService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + 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 扩展数据 + /// + /// 启用或禁用 + /// + /// 主键 + /// 状态 + 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); + } + } + } + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoEntity.cs new file mode 100644 index 000000000..de827f00f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoEntity.cs @@ -0,0 +1,155 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-01-24 12:19 + /// 描 述:教材信息管理 + /// + public class TextBookInfoEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 专业部 + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 教材号 + /// + [Column("TEXTBOOKNO")] + public string TextBookNo { get; set; } + /// + /// 教材名称 + /// + [Column("TEXTBOOKNAME")] + public string TextBookName { get; set; } + /// + /// 出版号 + /// + [Column("PUBLISHNO")] + public string PublishNo { get; set; } + /// + /// 第一作者 + /// + [Column("FIRSTAUTHOR")] + public string FirstAuthor { get; set; } + /// + /// 其他作者 + /// + [Column("OTHERAUTHOR")] + public string OtherAuthor { get; set; } + /// + /// 出版日期 + /// + [Column("PUBDATE")] + public DateTime? Pubdate { get; set; } + /// + /// 出版社 + /// + [Column("PUBLISHER")] + public string Publisher { get; set; } + /// + /// 教材类型 + /// + [Column("TEXTBOOKTYPE")] + public string TextBookType { get; set; } + /// + /// 教材性质 + /// + [Column("TEXTBOOKNATURE")] + public string TextBookNature { get; set; } + /// + /// 价格 + /// + [Column("PRICE")] + public decimal? Price { get; set; } + /// + /// 版次 + /// + [Column("EDITION")] + public string Edition { get; set; } + /// + /// 印次 + /// + [Column("IMPRESSION")] + public string Impression { get; set; } + /// + /// 是否有练习册 + /// + [Column("ISWORKBOOK")] + public bool? IsWorkBook { get; set; } + /// + /// 是否有教参教辅 + /// + [Column("ISTEACHCONSULT")] + public bool? IsTeachConsult { get; set; } + /// + /// 内容简介 + /// + [Column("DESCRIPTION")] + public string Description { get; set; } + /// + /// 是否有效 + /// + [Column("ISVALID")] + public bool? IsValid { get; set; } + /// + /// Createdate + /// + [Column("CREATEDATE")] + public DateTime? Createdate { get; set; } + /// + /// Updatetime + /// + [Column("UPDATETIME")] + public DateTime? Updatetime { get; set; } + /// + /// CreateUserID + /// + [Column("CREATEUSERID")] + public string CreateUserID { get; set; } + /// + /// UpdateUserID + /// + [Column("UPDATEUSERID")] + public string UpdateUserID { get; set; } + /// + /// 删除 0 1 + /// + public int? IsDel { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoIBLL.cs new file mode 100644 index 000000000..4754bc473 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoIBLL.cs @@ -0,0 +1,69 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-01-24 12:19 + /// 描 述:教材信息管理 + /// + public interface TextBookInfoIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取TextBookInfo表实体数据 + /// + /// 主键 + /// + TextBookInfoEntity GetTextBookInfoEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, TextBookInfoEntity entity); + #endregion + + #region 扩展数据 + /// + /// 启用或禁用 + /// + /// + /// + void EnabOrDisabEntity(string keyValue, string IsValid); + /// + /// + /// + /// 名称 + /// 出版号 + /// 专业部 + /// + /// + /// + /// 版次 + /// + TextBookInfoEntity GetRepetitions(string keyValue,string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression); + + #endregion + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoService.cs new file mode 100644 index 000000000..5d78e1ce4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoService.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-01-24 12:19 + /// 描 述:教材信息管理 + /// + public class TextBookInfoService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable 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(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取TextBookInfo表实体数据 + /// + /// 主键 + /// + public TextBookInfoEntity GetTextBookInfoEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + 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(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); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + 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 扩展数据 + /// + /// 启用或禁用 + /// + /// + 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(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); + } + } + } + /// + /// 去重 + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + 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( + 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( + 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 + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 4da072d09..66eff34c6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1790,6 +1790,10 @@ + + + +