From 1592f82c355bb99ad51b601e674d6ccd3cad81b6 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 7 Nov 2022 12:11:38 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E4=BA=BA=E4=BA=8B=E3=80=81=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=AE=8C=E5=96=84=EF=BC=9A=E8=B5=84=E6=A0=BC=E8=AF=81=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/PM_CertificateController.cs | 164 +++++++++++ .../Views/EmpInfo/Form.cshtml | 11 +- .../Views/EmpInfo/Form.js | 2 + .../Views/PM_Certificate/Form.cshtml | 31 ++ .../Views/PM_Certificate/Form.js | 56 ++++ .../Views/PM_Certificate/Index.cshtml | 58 ++++ .../Views/PM_Certificate/Index.js | 174 ++++++++++++ .../PM_Certificate/StatisticIndex.cshtml | 56 ++++ .../Views/PM_Certificate/StatisticIndex.js | 98 +++++++ .../Views/PM_YearAssess/Form.cshtml | 4 +- .../Learun.Application.Web.csproj | 7 + .../Views/UserCenter/IndexInTeacher.cshtml | 4 + .../Views/UserCenter/IndexInTeacher.js | 1 + .../PM_CertificateMap.cs | 29 ++ .../Learun.Application.Mapping.csproj | 1 + .../PM_Certificate/PM_CertificateBLL.cs | 171 +++++++++++ .../PM_Certificate/PM_CertificateEntity.cs | 95 +++++++ .../PM_Certificate/PM_CertificateIBLL.cs | 57 ++++ .../PM_Certificate/PM_CertificateService.cs | 267 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 20 files changed, 1287 insertions(+), 3 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PM_CertificateController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/StatisticIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/StatisticIndex.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/PM_CertificateMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PM_CertificateController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PM_CertificateController.cs new file mode 100644 index 000000000..32b8fe47f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PM_CertificateController.cs @@ -0,0 +1,164 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; +using System; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-11-07 14:08 + /// 描 述:资格证获取情况 + /// + public class PM_CertificateController : MvcControllerBase + { + private PM_CertificateIBLL pM_CertificateIBLL = new PM_CertificateBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + + /// + /// 主页面-统计 + /// + /// + [HttpGet] + public ActionResult StatisticIndex() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = pM_CertificateIBLL.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 PM_CertificateData = pM_CertificateIBLL.GetPM_CertificateEntity( keyValue ); + var jsonData = new { + PM_Certificate = PM_CertificateData, + }; + return Success(jsonData); + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageStatisticList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = pM_CertificateIBLL.GetPageStatisticList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + pM_CertificateIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + var loginUserInfo = LoginUserInfo.Get(); + PM_CertificateEntity entity = strEntity.ToObject(); + entity.Updater = loginUserInfo.userId; + entity.UpdateTime = DateTime.Now; + pM_CertificateIBLL.SaveEntity(keyValue,entity); + return Success("保存成功!"); + } + /// + /// 提交 + /// + /// + /// + /// + public ActionResult Submit(string empId,bool status) + { + pM_CertificateIBLL.Submit(empId,status); + if (status) + { + return Success("提交成功!"); + } + else + { + return Success("取消提交成功"); + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml index 31e2a6db7..09316e60d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml @@ -22,7 +22,8 @@ #tab5 > .lr-scroll-box, #tab6 > .lr-scroll-box, #tab7 > .lr-scroll-box, - #tab8 > .lr-scroll-box { + #tab8 > .lr-scroll-box, + #tab9 > .lr-scroll-box { height: 100%; width: 100%; } @@ -40,6 +41,7 @@
  • 家庭情况
  • 教师聘任变更记录
  • 年度考核结果管理
  • +
  • 资格证获取情况
  • @@ -295,6 +297,10 @@
    考核结果
    +
    +
    普通话等级
    +
    +
    学历学位信息
    @@ -437,6 +443,9 @@
    +
    + +
    diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js index 8cad4920f..386328de5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js @@ -65,6 +65,7 @@ var bootstrap = function ($, learun) { $("#PM_FamilySituation").attr("src", "/EducationalAdministration/PM_FamilySituation/Index?empId=" + NewEmpId); $("#PM_PositionChange").attr("src", "/EducationalAdministration/PM_PositionChange/Index?empId=" + NewEmpId); $("#PM_YearAssess").attr("src", "/EducationalAdministration/PM_YearAssess/Index?empId=" + NewEmpId); + $("#PM_Certificate").attr("src", "/EducationalAdministration/PM_Certificate/Index?empId=" + NewEmpId); $('#lr_form_tabs').lrFormTab(); $('#lr_form_tabs ul li').eq(0).trigger('click'); //校区 @@ -169,6 +170,7 @@ var bootstrap = function ($, learun) { $('#ProfessionalTitle').lrDataItemSelect({ code: 'jszc' }); $('#ProfessionalTitleLevel').lrDataItemSelect({ code: 'TeacherTitlePostLevel' }); $('#TeacherQualifications').lrDataItemSelect({ code: 'TeacherQualifications' }); + $('#MandarinLevel').lrDataItemSelect({ code: 'MandarinLevel' }); //内容编辑器 ue = UE.getEditor('editor'); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Form.cshtml new file mode 100644 index 000000000..436c4dcac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Form.cshtml @@ -0,0 +1,31 @@ +@{ + ViewBag.Title = "资格证获取情况"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
    +
    +
    证书编号
    + +
    +
    +
    教师资格证种类
    +
    +
    +
    +
    其他职业资格证
    + +
    +
    +
    普通话等级
    +
    +
    +
    +
    备注*
    + +
    +
    +
    是否同步
    +
    +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/PM_Certificate/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Form.js new file mode 100644 index 000000000..e2e79b131 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Form.js @@ -0,0 +1,56 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-11-07 14:08 + * 描 述:资格证获取情况 + */ +var acceptClick; +var keyValue = request('keyValue'); +var empId = request('empId'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#IsSync').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#TeacherQualifications').lrDataItemSelect({ code: 'TeacherQualifications' }); + $('#MandarinLevel').lrDataItemSelect({ code: 'MandarinLevel' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/PM_Certificate/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var data = $('body').lrGetFormData(); + data["EmpId"] = empId; + var postData = { + strEntity: JSON.stringify(data) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/PM_Certificate/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Index.cshtml new file mode 100644 index 000000000..e24a86ed5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Index.cshtml @@ -0,0 +1,58 @@ +@{ + ViewBag.Title = "资格证获取情况"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    证书编号
    + +
    +
    +
    教师资格证种类
    +
    +
    +
    +
    其他职业资格证
    + +
    +
    +
    普通话等级
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/PM_Certificate/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Index.js new file mode 100644 index 000000000..d18923242 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/Index.js @@ -0,0 +1,174 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-11-07 14:08 + * 描 述:资格证获取情况 + */ +var refreshGirdData; +var empId = request('empId'); +var status = false; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.refreshStatus(); + page.initGird(); + page.bind(); + }, + refreshStatus: function () { + //获取主表状态 + learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/EmpInfo/GetFormData?keyValue=' + empId, function (res) { + if (res.code == 200) { + if (res.data.EmpInfo != null) { + status = res.data.EmpInfo.CertificateStatus; + } + } + }); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#TeacherQualifications').lrDataItemSelect({ code: 'TeacherQualifications' }); + $('#MandarinLevel').lrDataItemSelect({ code: 'MandarinLevel' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + if (status == 'true') { + learun.alert.warning('已提交,不能再修改!'); + return; + } + learun.layerForm({ + id: 'formInPM_Certificate', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/PM_Certificate/Form?empId=' + empId, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + if (status == 'true') { + learun.alert.warning('已提交,不能再修改!'); + return; + } + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formInPM_Certificate', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/PM_Certificate/Form?keyValue=' + keyValue + '&empId=' + empId, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + if (status == 'true') { + learun.alert.warning('已提交,不能再修改!'); + return; + } + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/PM_Certificate/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 提交 + $('#lr_check').on('click', function () { + if (status == 'true') { + learun.alert.warning('已提交,不能再修改!'); + return; + } + learun.layerConfirm('是否确认提交!', function (res) { + if (res) { + learun.postForm( top.$.rootUrl + '/EducationalAdministration/PM_Certificate/Submit', { empId: empId, status: true }, function (info) { + refreshGirdData(); + }); + } + }); + }); + // 取消提交 + $('#lr_uncheck').on('click', function () { + learun.layerConfirm('是否取消提交!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/PM_Certificate/Submit', { empId: empId, status: false }, function () { + refreshGirdData(); + }); + } + }); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/PM_Certificate/GetPageList', + headData: [ + { label: "证书编号", name: "TeacherQualificationsNo", width: 100, align: "left" }, + { + label: "教师资格证种类", name: "TeacherQualifications", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'TeacherQualifications', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "其他职业资格证", name: "OtherTeacherQualifications", width: 100, align: "left" }, + { + label: "普通话等级", name: "MandarinLevel", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'MandarinLevel', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + { label: "是否同步", name: "IsSync", width: 100, align: "left", formatter: function (cellvalue) { return cellvalue == true ? "是" : "否" } }, + { + label: "提交状态", name: "SubmitStatus", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "" : ""; + } + }, + ], + mainId: 'ID', + isPage: true, + sidx:'UpdateTime desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.EmpId = empId; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + page.refreshStatus(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/StatisticIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/StatisticIndex.cshtml new file mode 100644 index 000000000..9d2659345 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/StatisticIndex.cshtml @@ -0,0 +1,56 @@ +@{ + ViewBag.Title = "资格证获取情况"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    教师姓名
    + +
    +
    +
    证书编号
    + +
    +
    +
    教师资格证种类
    +
    +
    +
    +
    其他职业资格证
    + +
    +
    +
    普通话等级
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/PM_Certificate/StatisticIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/StatisticIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/StatisticIndex.js new file mode 100644 index 000000000..dfd597952 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_Certificate/StatisticIndex.js @@ -0,0 +1,98 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-11-07 14:08 + * 描 述:资格证获取情况 + */ +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); + $('#TeacherQualifications').lrDataItemSelect({ code: 'TeacherQualifications' }); + $('#MandarinLevel').lrDataItemSelect({ code: 'MandarinLevel' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/PM_Certificate/GetPageStatisticList', + headData: [ + { + label: "教师", name: "EmpId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: value, + keyId: 'empid', + callback: function (_data) { + callback(_data['empname']); + } + }); + } + }, + { label: "证书编号", name: "TeacherQualificationsNo", width: 100, align: "left" }, + { + label: "教师资格证种类", name: "TeacherQualifications", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'TeacherQualifications', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "其他职业资格证", name: "OtherTeacherQualifications", width: 100, align: "left" }, + { + label: "普通话等级", name: "MandarinLevel", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'MandarinLevel', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "变更时间", name: "UpdateTime", width: 130, align: "left" }, + { + label: "变更人", name: "Updater", width: 100, align: "left", + formatterAsync: function (callback, value, row) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (item) { + callback(item.name); + } + }); + } + }, + ], + mainId: 'ID', + isPage: true, + sidx:'UpdateTime desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_YearAssess/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_YearAssess/Form.cshtml index b5ba18cd5..da9db08dc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_YearAssess/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_YearAssess/Form.cshtml @@ -5,11 +5,11 @@
    考核时间*
    - +
    考核年度*
    - +
    考核结果
    diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 0ee2c70ac..f7f2f8000 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -340,6 +340,7 @@ + @@ -1107,6 +1108,9 @@ + + + @@ -1265,6 +1269,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/IndexInTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/IndexInTeacher.cshtml index 1e54b24af..c7c07f2f4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/IndexInTeacher.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/IndexInTeacher.cshtml @@ -20,6 +20,7 @@
  • 家庭情况
  • 教师聘任变更记录
  • 年度考核结果管理
  • +
  • 资格证获取情况
  • }
    @@ -835,6 +836,9 @@
    +
    + +
    diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/IndexInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/IndexInTeacher.js index 30f774045..ff9ac3c5d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/IndexInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/IndexInTeacher.js @@ -23,6 +23,7 @@ var bootstrap = function ($, learun) { $("#PM_FamilySituation").attr("src", "/EducationalAdministration/PM_FamilySituation/Index?empId=" + NewEmpId); $("#PM_PositionChange").attr("src", "/EducationalAdministration/PM_PositionChange/Index?empId=" + NewEmpId); $("#PM_YearAssess").attr("src", "/EducationalAdministration/PM_YearAssess/Index?empId=" + NewEmpId); + $("#PM_Certificate").attr("src", "/EducationalAdministration/PM_Certificate/Index?empId=" + NewEmpId); // 显示信息选项卡 $('#tablist').lrFormTabEx(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/PM_CertificateMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/PM_CertificateMap.cs new file mode 100644 index 000000000..2485a0d3d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/PM_CertificateMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-11-07 14:08 + /// 描 述:资格证获取情况 + /// + public class PM_CertificateMap : EntityTypeConfiguration + { + public PM_CertificateMap() + { + #region 表、主键 + //表 + this.ToTable("PM_CERTIFICATE"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 7bbabcb0a..203c7251c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -98,6 +98,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateBLL.cs new file mode 100644 index 000000000..c492c46d9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateBLL.cs @@ -0,0 +1,171 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-11-07 14:08 + /// 描 述:资格证获取情况 + /// + public class PM_CertificateBLL : PM_CertificateIBLL + { + private PM_CertificateService pM_CertificateService = new PM_CertificateService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return pM_CertificateService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取PM_Certificate表实体数据 + /// 主键 + /// + /// + public PM_CertificateEntity GetPM_CertificateEntity(string keyValue) + { + try + { + return pM_CertificateService.GetPM_CertificateEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageStatisticList(Pagination pagination, string queryJson) + { + try + { + return pM_CertificateService.GetPageStatisticList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + pM_CertificateService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, PM_CertificateEntity entity) + { + try + { + pM_CertificateService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 修改提交状态 + /// 主键 + /// + /// + public void Submit(string keyValue, bool status) + { + try + { + pM_CertificateService.Submit(keyValue, status); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateEntity.cs new file mode 100644 index 000000000..ea62abadf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateEntity.cs @@ -0,0 +1,95 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-11-07 14:08 + /// 描 述:资格证获取情况 + /// + public class PM_CertificateEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 人员ID + /// + [Column("EMPID")] + public string EmpId { get; set; } + /// + /// 证书编号 + /// + [Column("TEACHERQUALIFICATIONSNO")] + public string TeacherQualificationsNo { get; set; } + /// + /// 教师资格证种类 + /// + [Column("TEACHERQUALIFICATIONS")] + public string TeacherQualifications { get; set; } + /// + /// 其他职业资格证 + /// + [Column("OTHERTEACHERQUALIFICATIONS")] + public string OtherTeacherQualifications { get; set; } + /// + /// 普通话等级 + /// + [Column("MANDARINLEVEL")] + public string MandarinLevel { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 是否同步 + /// + [Column("ISSYNC")] + public bool? IsSync { get; set; } + /// + /// 最后修改人 + /// + [Column("UPDATER")] + public string Updater { get; set; } + /// + /// 最后修改时间 + /// + [Column("UPDATETIME")] + public DateTime? UpdateTime { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + /// + /// 提交状态 + /// + [NotMapped] + public bool? SubmitStatus { get; set; } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateIBLL.cs new file mode 100644 index 000000000..5ac61cade --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateIBLL.cs @@ -0,0 +1,57 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-11-07 14:08 + /// 描 述:资格证获取情况 + /// + public interface PM_CertificateIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取PM_Certificate表实体数据 + /// 主键 + /// + /// + PM_CertificateEntity GetPM_CertificateEntity(string keyValue); + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageStatisticList(Pagination pagination, string queryJson); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(string keyValue, PM_CertificateEntity entity); + void Submit(string keyValue, bool status); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateService.cs new file mode 100644 index 000000000..c505d7808 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_Certificate/PM_CertificateService.cs @@ -0,0 +1,267 @@ +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-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-11-07 14:08 + /// 描 述:资格证获取情况 + /// + public class PM_CertificateService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*,e.CertificateStatus as SubmitStatus "); + strSql.Append(" FROM PM_Certificate t "); + strSql.Append(" left join EmpInfo e on t.EmpId=e.EmpId "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["TeacherQualificationsNo"].IsEmpty()) + { + dp.Add("TeacherQualificationsNo", "%"+queryParam["TeacherQualificationsNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.TeacherQualificationsNo like @TeacherQualificationsNo "); + } + if (!queryParam["TeacherQualifications"].IsEmpty()) + { + dp.Add("TeacherQualifications", queryParam["TeacherQualifications"].ToDate(), DbType.DateTime); + strSql.Append(" AND t.TeacherQualifications = @TeacherQualifications "); + } + if (!queryParam["OtherTeacherQualifications"].IsEmpty()) + { + dp.Add("OtherTeacherQualifications", "%" + queryParam["OtherTeacherQualifications"].ToString() + "%", DbType.String); + strSql.Append(" AND t.OtherTeacherQualifications like @OtherTeacherQualifications "); + } + if (!queryParam["MandarinLevel"].IsEmpty()) + { + dp.Add("MandarinLevel", queryParam["MandarinLevel"].ToDate(), DbType.DateTime); + strSql.Append(" AND t.MandarinLevel = @MandarinLevel "); + } + if (!queryParam["EmpId"].IsEmpty()) + { + dp.Add("EmpId", queryParam["EmpId"].ToString(), DbType.String); + strSql.Append(" AND t.EmpId = @EmpId "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取PM_Certificate表实体数据 + /// 主键 + /// + /// + public PM_CertificateEntity GetPM_CertificateEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageStatisticList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM PM_Certificate t "); + strSql.Append(" left join EmpInfo e on t.EmpId=e.EmpId "); + strSql.Append(" WHERE 1=1 and t.IsSync=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["TeacherQualificationsNo"].IsEmpty()) + { + dp.Add("TeacherQualificationsNo", "%" + queryParam["TeacherQualificationsNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.TeacherQualificationsNo like @TeacherQualificationsNo "); + } + if (!queryParam["TeacherQualifications"].IsEmpty()) + { + dp.Add("TeacherQualifications", queryParam["TeacherQualifications"].ToDate(), DbType.DateTime); + strSql.Append(" AND t.TeacherQualifications = @TeacherQualifications "); + } + if (!queryParam["OtherTeacherQualifications"].IsEmpty()) + { + dp.Add("OtherTeacherQualifications", "%" + queryParam["OtherTeacherQualifications"].ToString() + "%", DbType.String); + strSql.Append(" AND t.OtherTeacherQualifications like @OtherTeacherQualifications "); + } + if (!queryParam["MandarinLevel"].IsEmpty()) + { + dp.Add("MandarinLevel", queryParam["MandarinLevel"].ToDate(), DbType.DateTime); + strSql.Append(" AND t.MandarinLevel = @MandarinLevel "); + } + if (!queryParam["EmpId"].IsEmpty()) + { + dp.Add("EmpId", queryParam["EmpId"].ToString(), DbType.String); + strSql.Append(" AND t.EmpId = @EmpId "); + } + if (!queryParam["EmpName"].IsEmpty()) + { + dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); + strSql.Append(" AND e.EmpName like @EmpName "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, PM_CertificateEntity entity) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + db.Update(entity); + } + else + { + entity.Create(); + db.Insert(entity); + } + + //“是否同步”:选是,则更新教师表; + if (entity.IsSync.HasValue && entity.IsSync.Value == true) + { + db.ExecuteBySql("update EmpInfo set TeacherQualificationsNo='" + entity.TeacherQualificationsNo + "',TeacherQualifications='" + entity.TeacherQualifications + "',OtherTeacherQualifications='" + entity.OtherTeacherQualifications + "',MandarinLevel='"+entity.MandarinLevel + "' where EmpId='" + entity.EmpId + "' "); + } + + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 修改提交状态 + /// 主键 + /// + /// + public void Submit(string keyValue, bool status) + { + try + { + var empEntity = this.BaseRepository("CollegeMIS").FindEntity(a => a.EmpId == keyValue); + if (empEntity != null) + { + empEntity.CertificateStatus = status; + this.BaseRepository("CollegeMIS").Update(empEntity); + } + } + 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 5ae8eaf64..e0c742b0b 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 @@ -224,6 +224,10 @@ + + + + From ad54136fc4bd32b1c5b6dc143582370da681b13d Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 7 Nov 2022 12:14:08 +0800 Subject: [PATCH 2/6] =?UTF-8?q?web=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.Web/Learun.Application.Web.csproj | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index b28bdbdec..c242205b0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -340,6 +340,7 @@ + @@ -1109,6 +1110,9 @@ + + + @@ -1270,6 +1274,9 @@ + + + From 9129b3303b0689fe4fb35e73b5facf3ca5c0307a Mon Sep 17 00:00:00 2001 From: liangkun Date: Mon, 7 Nov 2022 12:16:38 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.Web/XmlConfig/database.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config index 68e50b2b1..2a2e54cd1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config @@ -27,7 +27,7 @@ - + From 516150d991436a03f006be4493ffdb4aa1d0c260 Mon Sep 17 00:00:00 2001 From: liangkun Date: Mon, 7 Nov 2022 17:50:56 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Login/Default/Index.js | 24 +++++++++---------- .../XmlConfig/database.config | 8 +++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js index e5d7dff1c..aa71f1ff5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js @@ -176,28 +176,28 @@ success: function (res) { if (res.code == 200) { if (source == "noLogin") { - //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index"; - window.location.href = "/SSOSystem/Index"; + window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index"; + //window.location.href = "/SSOSystem/Index"; } else if (source == "NoLogin") { - //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne"; - window.location.href = "/SSOSystem/DragModelOne"; + window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne"; + //window.location.href = "/SSOSystem/DragModelOne"; } else { if (res.data.pwd == true) { if (res.data.pwdtip == true) { - //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdpwdtip=true"; - window.location.href = "/Home/Index?pwdpwdtip=true"; + window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdpwdtip=true"; + //window.location.href = "/Home/Index?pwdpwdtip=true"; } else { - //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true"; - window.location.href ="/Home/Index?pwd=true"; + window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true"; + //window.location.href ="/Home/Index?pwd=true"; } } else { if (res.data.pwdtip == true) { - //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdtip=true"; - window.location.href ="/Home/Index?pwdtip=true"; + window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdtip=true"; + //window.location.href ="/Home/Index?pwdtip=true"; } else { - //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index"; - window.location.href = "/Home/Index"; + window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index"; + //window.location.href = "/Home/Index"; } //window.location.href = "/Home/Index"; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config index 2a2e54cd1..4a65676bf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config @@ -20,10 +20,10 @@ --> - - - - + + + + From 4e192d081001c00e79c2f196646295c6f5cecb87 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 7 Nov 2022 18:13:04 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E4=B8=93=E4=B8=9A=E5=8F=91=E5=B1=95=EF=BC=9A=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E8=8D=A3=E8=AA=89=E5=A5=96=E5=8A=B1=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StudentHonorController.cs | 175 ++++++++++ .../Views/StudentHonor/Form.cshtml | 63 ++++ .../Views/StudentHonor/Form.js | 173 ++++++++++ .../Views/StudentHonor/FormScore.cshtml | 23 ++ .../Views/StudentHonor/FormScore.js | 94 ++++++ .../Views/StudentHonor/Index.cshtml | 77 +++++ .../Views/StudentHonor/Index.js | 305 +++++++++++++++++ .../Learun.Application.Web.csproj | 7 + .../XmlConfig/ioc.config | 2 + .../StudentHonorMap.cs | 29 ++ .../Learun.Application.Mapping.csproj | 1 + .../StudentHonor/StudentHonorBLL.cs | 208 ++++++++++++ .../StudentHonor/StudentHonorEntity.cs | 138 ++++++++ .../StudentHonor/StudentHonorIBLL.cs | 63 ++++ .../StudentHonor/StudentHonorService.cs | 308 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + .../Learun.Application.WorkFlow.csproj | 1 + .../NodeMethod/StudentHonorMethod.cs | 27 ++ 18 files changed, 1698 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentHonorController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentHonorMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorService.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentHonorMethod.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentHonorController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentHonorController.cs new file mode 100644 index 000000000..2f07c5a33 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentHonorController.cs @@ -0,0 +1,175 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using Learun.Application.TwoDevelopment.LR_CodeDemo; +using System.Collections.Generic; +using Learun.Application.Base.SystemModule; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:05 + /// 描 述:学生荣誉奖励 + /// + public class StudentHonorController : MvcControllerBase + { + private StudentHonorIBLL studentHonorIBLL = new StudentHonorBLL(); + private CodeRuleIBLL codeRuleIBLL = new CodeRuleBLL(); + private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 修改分值 + /// + /// + [HttpGet] + public ActionResult FormScore() + { + return View(); + } + + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = studentHonorIBLL.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 StudentHonorData = studentHonorIBLL.GetStudentHonorEntity(keyValue); + var jsonData = new + { + StudentHonor = StudentHonorData, + }; + return Success(jsonData); + } + + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetStuData(string stuno, string stuname) + { + var stuData = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNoOrStuName(stuno, stuname); + + return Success(stuData); + } + /// + /// 获取表单数据 + /// + /// 流程实例主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormDataByProcessId(string processId) + { + var StudentHonorData = studentHonorIBLL.GetEntityByProcessId(processId); + var jsonData = new + { + StudentHonor = StudentHonorData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + studentHonorIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + StudentHonorEntity entity = strEntity.ToObject(); + studentHonorIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + + /// + /// 提交 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult ChangeStatusById(string keyValue, string processId) + { + studentHonorIBLL.ChangeStatusById(keyValue, 1, processId); + return Success("操作成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.cshtml new file mode 100644 index 000000000..152bf5c29 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.cshtml @@ -0,0 +1,63 @@ +@{ + ViewBag.Title = "学生荣誉奖励"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
    +
    +
    学年*
    +
    +
    +
    +
    学期*
    +
    +
    +
    +
    学生学号*
    + +
    +
    +
    学生姓名*
    + +
    +
    +
    专业部*
    +
    +
    +
    +
    专业*
    +
    +
    +
    +
    班级*
    +
    +
    +
    +
    荣誉名称*
    + +
    +
    +
    荣誉级别*
    + +
    +
    +
    荣誉种类*
    + +
    +
    +
    颁发单位*
    + +
    +
    +
    分值*
    + +
    +
    +
    获取时间*
    + +
    +
    +
    附件上传
    +
    +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentHonor/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.js new file mode 100644 index 000000000..bc7203bcf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.js @@ -0,0 +1,173 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 11:05 + * 描 述:学生荣誉奖励 + */ +var acceptClick; +var keyValue = request('keyValue'); +var type = request('type'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + if (!!data) { + for (var field in data) { + if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 + $('#' + data[field].fieldId).parent().remove(); + } + else { + if (data[field].isEdit != 1) { + $('#' + data[field].fieldId).attr('disabled', 'disabled'); + if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { + $('#' + data[field].fieldId).css({ 'padding-right': '58px' }); + $('#' + data[field].fieldId).find('.btn-success').remove(); + } + } + } + } + } + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#Url').lrUploader(); + + $('#StuNo').blur(function () { + learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StudentHonor/GetStuData?stuno=' + $('#StuNo').val(), function (res) { + learun.loading(false); + if (res.code == learun.httpCode.success) { + var data = res.data; + if (!!data) { + $('#StuName').val(data.StuName); + $('#DeptNo').lrselectSet(data.DeptNo); + $('#MajorNo').lrselectSet(data.MajorNo); + $('#ClassNo').lrselectSet(data.ClassNo); + } else { + $('#StuName').val(); + $('#DeptNo').lrselectSet(); + $('#MajorNo').lrselectSet(); + $('#ClassNo').lrselectSet(); + } + } + else { + learun.alert.error(res.info); + } + }); + }); + $('#StuName').blur(function () { + learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StudentHonor/GetStuData?stuname=' + $('#StuName').val(), function (res) { + learun.loading(false); + if (res.code == learun.httpCode.success) { + var data = res.data; + if (!!data) { + $('#StuNo').val(data.StuNo); + $('#DeptNo').lrselectSet(data.DeptNo); + $('#MajorNo').lrselectSet(data.MajorNo); + $('#ClassNo').lrselectSet(data.ClassNo); + } else { + $('#StuName').val(); + $('#DeptNo').lrselectSet(); + $('#MajorNo').lrselectSet(); + $('#ClassNo').lrselectSet(); + } + } + else { + learun.alert.error(res.info); + } + }); + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/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]); + } + } + }); + } + } + }; + // 设置表单数据 + setFormData = function (processId, param, callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/GetFormDataByProcessId?processId=' + processId, function (data) { + for (var id in data) { + if (!!data[id] && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + if (id == 'StudentHonor' && data[id]) { + keyValue = data[id].Id; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + if (!!processId) { + formData.processId = processId; + } + if (type == 'copy') { + keyValue = ''; + } + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, i); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.cshtml new file mode 100644 index 000000000..cc23dde24 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "学生荣誉奖励"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
    +
    +
    学生学号*
    + +
    +
    +
    学生姓名*
    + +
    +
    +
    荣誉名称*
    + +
    +
    +
    分值*
    + +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentHonor/FormScore.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.js new file mode 100644 index 000000000..8982c9c90 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.js @@ -0,0 +1,94 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 11:05 + * 描 述:学生荣誉奖励 + */ +var acceptClick; +var keyValue = request('keyValue'); +var type = request('type'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +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' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/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]); + } + } + }); + } + } + }; + // 设置表单数据 + setFormData = function (processId, param, callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/GetFormDataByProcessId?processId=' + processId, function (data) { + for (var id in data) { + if (!!data[id] && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + if (id == 'StudentHonor' && data[id]) { + keyValue = data[id].Id; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + if (!!processId) { + formData.processId = processId; + } + if (type == 'copy') { + keyValue = ''; + } + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, i); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.cshtml new file mode 100644 index 000000000..f0faa5755 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.cshtml @@ -0,0 +1,77 @@ +@{ + ViewBag.Title = "学生荣誉奖励"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    学年
    +
    +
    +
    +
    学期
    +
    +
    +
    +
    学生学号
    + +
    +
    +
    学生姓名
    + +
    +
    +
    专业部
    +
    +
    +
    +
    专业
    +
    +
    +
    +
    班级
    +
    +
    +
    +
    荣誉名称
    + +
    +
    +
    荣誉级别
    + +
    +
    +
    荣誉种类
    + +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentHonor/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.js new file mode 100644 index 000000000..dda8b2d43 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.js @@ -0,0 +1,305 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 11:05 + * 描 述:学生荣誉奖励 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 240, 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' }); + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/StudentHonor/Form', + width: 1000, + height: 800, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + processId = learun.newGuid(); + res = top[id].save(processId, refreshGirdData); + } + return res; + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == '2') { + learun.alert.warning("当前项目已审批通过!"); + return; + } + if (Status != '0') { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/StudentHonor/Form?keyValue=' + keyValue, + width: 1000, + height: 800, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + //修改分值 + $('#lr_updscore').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == '2') { + learun.alert.warning("当前项目已审批通过!"); + return; + } + if (Status != '0') { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerForm({ + id: 'form_updscore', + title: '修改分值', + url: top.$.rootUrl + '/EducationalAdministration/StudentHonor/FormScore?keyValue=' + keyValue, + width: 500, + height: 350, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + //复制 + $('#lr_copy').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/StudentHonor/Form?keyValue=' + keyValue + '&type=copy', + width: 1000, + height: 800, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == '2') { + learun.alert.warning("当前项目已审批通过!"); + return; + } + if (Status != '0') { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == '2') { + learun.alert.warning("当前项目已审批通过!"); + return; + } + if (Status != '0') { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StudentHonor/GetPageList', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, + { label: "学期", name: "Semester", width: 80, align: "left" }, + { label: "学生学号", name: "StuNo", width: 150, align: "left" }, + { label: "学生姓名", name: "StuName", 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: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { label: "荣誉名称", name: "SHName", width: 100, align: "left" }, + { label: "荣誉级别", name: "SHLevel", width: 100, align: "left" }, + { label: "荣誉种类", name: "SHType", width: 100, align: "left" }, + { label: "颁发单位", name: "Unit", width: 100, align: "left" }, + { label: "分值", name: "Score", width: 100, align: "left" }, + { + label: "获取时间", name: "SHTime", width: 100, align: "left", + formatter: function (cellvalue, row) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { + label: "状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 1) { + return '审批中'; + } else if (cellvalue === 2) { + return '审核通过'; + } else { + return '草稿'; + } + } + }, + ], + mainId: 'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (res && res.code && res.code == 200) { + var postData = { + schemeCode: 'StudentHonor',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + } + page.search(); + + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index c242205b0..a41bc1b13 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -351,6 +351,7 @@ + @@ -1166,6 +1167,9 @@ + + + @@ -1277,6 +1281,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config index cc52f4118..c14b8b64d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config @@ -34,6 +34,7 @@ + @@ -78,6 +79,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentHonorMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentHonorMap.cs new file mode 100644 index 000000000..177e3f246 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentHonorMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:05 + /// 描 述:学生荣誉奖励 + /// + public class StudentHonorMap : EntityTypeConfiguration + { + public StudentHonorMap() + { + #region 表、主键 + //表 + this.ToTable("STUDENTHONOR"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index fb9bf0e16..c6d8f065c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -110,6 +110,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorBLL.cs new file mode 100644 index 000000000..ca4d900bd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorBLL.cs @@ -0,0 +1,208 @@ +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-11-07 11:05 + /// 描 述:学生荣誉奖励 + /// + public class StudentHonorBLL : StudentHonorIBLL + { + private StudentHonorService studentHonorService = new StudentHonorService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return studentHonorService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取StudentHonor表实体数据 + /// + /// 主键 + /// + public StudentHonorEntity GetStudentHonorEntity(string keyValue) + { + try + { + return studentHonorService.GetStudentHonorEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// + public IEnumerable GetList(string queryJson) + { + try + { + return studentHonorService.GetList(queryJson); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public StudentHonorEntity GetEntityByProcessId(string processId) + { + try + { + return studentHonorService.GetEntityByProcessId(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + studentHonorService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, StudentHonorEntity entity) + { + try + { + studentHonorService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public void ChangeStatusByProcessId(string processId, int status) + { + try + { + studentHonorService.ChangeStatusByProcessId(processId, status); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void ChangeStatusById(string keyValue, int status, string processId) + { + try + { + studentHonorService.ChangeStatusById(keyValue, status, processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorEntity.cs new file mode 100644 index 000000000..8f8c02358 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorEntity.cs @@ -0,0 +1,138 @@ +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-11-07 11:05 + /// 描 述:学生荣誉奖励 + /// + public class StudentHonorEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// StuNo + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// StuName + /// + [Column("STUNAME")] + public string StuName { get; set; } + /// + /// DeptNo + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// MajorNo + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// ClassNo + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// 荣誉名称 + /// + [Column("SHNAME")] + public string SHName { get; set; } + /// + /// 荣誉级别 + /// + [Column("SHLEVEL")] + public string SHLevel { get; set; } + /// + /// 荣誉获取时间 + /// + [Column("SHTIME")] + public DateTime? SHTime { get; set; } + /// + /// 荣誉种类 + /// + [Column("SHTYPE")] + public string SHType { get; set; } + /// + /// 分值 + /// + [Column("SCORE")] + public decimal? Score { get; set; } + /// + /// 附件 + /// + [Column("URL")] + public string Url { get; set; } + /// + /// 颁发单位 + /// + [Column("UNIT")] + public string Unit { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// CreateUserId + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// processId + /// + [Column("PROCESSID")] + public string processId { get; set; } + /// + /// Status + /// + [Column("STATUS")] + public int? Status { get; set; } + /// + /// 学年 + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// 学期 + /// + [Column("SEMESTER")] + public string Semester { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + this.CreateTime = DateTime.Now; + this.CreateUserId = LoginUserInfo.Get().userId; + this.Status = 0; + } + /// + /// 编辑调用 + /// + /// + 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/StudentHonor/StudentHonorIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorIBLL.cs new file mode 100644 index 000000000..9d6583a8e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorIBLL.cs @@ -0,0 +1,63 @@ +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-11-07 11:05 + /// 描 述:学生荣誉奖励 + /// + public interface StudentHonorIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取StudentHonor表实体数据 + /// + /// 主键 + /// + StudentHonorEntity GetStudentHonorEntity(string keyValue); + + /// + /// 获取页面显示列表数据 + /// + /// + IEnumerable GetList(string queryJson); + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + StudentHonorEntity GetEntityByProcessId(string processId); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, StudentHonorEntity entity); + void ChangeStatusByProcessId(string processId, int status); + void ChangeStatusById(string keyValue, int status,string processId); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorService.cs new file mode 100644 index 000000000..35d099579 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorService.cs @@ -0,0 +1,308 @@ +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-11-07 11:05 + /// 描 述:学生荣誉奖励 + /// + public class StudentHonorService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM StudentHonor t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuNo Like @StuNo "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.ClassNo = @ClassNo "); + } + if (!queryParam["SHName"].IsEmpty()) + { + dp.Add("SHName", "%" + queryParam["SHName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.SHName Like @SHName "); + } + if (!queryParam["SHLevel"].IsEmpty()) + { + dp.Add("SHLevel", "%" + queryParam["SHLevel"].ToString() + "%", DbType.String); + strSql.Append(" AND t.SHLevel Like @SHLevel "); + } + if (!queryParam["SHTime"].IsEmpty()) + { + dp.Add("SHTime", queryParam["SHTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND t.SHTime = @SHTime "); + } + if (!queryParam["SHType"].IsEmpty()) + { + dp.Add("SHType", "%" + queryParam["SHType"].ToString() + "%", DbType.String); + strSql.Append(" AND t.SHType Like @SHType "); + } + if (!queryParam["Unit"].IsEmpty()) + { + dp.Add("Unit", "%" + queryParam["Unit"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Unit Like @Unit "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取StudentHonor表实体数据 + /// + /// 主键 + /// + public StudentHonorEntity GetStudentHonorEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public StudentHonorEntity GetEntityByProcessId(string processId) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(t => t.processId == processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// + public IEnumerable GetList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM StudentHonor t "); + strSql.Append(" WHERE 1=1 and t.Status=2 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, StudentHonorEntity 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); + } + } + } + + public void ChangeStatusByProcessId(string processId, int status) + { + try + { + this.BaseRepository("CollegeMIS").ExecuteBySql($"update StudentHonor set Status='{status}' where processId='{processId}'"); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public void ChangeStatusById(string keyValue, int status, string processId) + { + try + { + this.BaseRepository("CollegeMIS").ExecuteBySql($"update StudentHonor set Status='{status}',processId='{processId}' where Id='{keyValue}'"); + } + 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 c7c9de24c..dad8d6a82 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 @@ -265,6 +265,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj index 4e78e8099..735f99cb1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj @@ -97,6 +97,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentHonorMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentHonorMethod.cs new file mode 100644 index 000000000..e59b8df43 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentHonorMethod.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Learun.Application.TwoDevelopment.EducationalAdministration; + +namespace Learun.Application.WorkFlow +{ + public class StudentHonorMethod : IWorkFlowMethod + { + StudentHonorIBLL asset = new StudentHonorBLL(); + + + public void Execute(WfMethodParameter parameter) + { + if (parameter.code == "agree") + { + asset.ChangeStatusByProcessId(parameter.processId, 2); + } + else + { + asset.ChangeStatusByProcessId(parameter.processId, 0); + } + } + } +} From 34067edb830ead5aa2ec955f694c6c143c0107af Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Tue, 8 Nov 2022 09:38:53 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=EF=BC=9A123=E9=95=BF=E9=98=B3?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.Web/XmlConfig/database.config | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config index 4a65676bf..c5c724312 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config @@ -16,14 +16,14 @@ - + + + - + + -->