From fb9eac7317a38189d377bb42066d464ae1641a32 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 8 Nov 2022 17:29:31 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E5=99=A8=E6=9D=90=E5=80=9F=E5=87=BA?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SportEquipmentLendController.cs | 117 +++++++++++++ .../Views/SportEquipmentLend/Form.cshtml | 31 ++++ .../Views/SportEquipmentLend/Form.js | 50 ++++++ .../Views/SportEquipmentLend/Index.cshtml | 44 +++++ .../Views/SportEquipmentLend/Index.js | 93 ++++++++++ .../Learun.Application.Web.csproj | 5 + .../SportEquipmentLendMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 1 + .../SportEquipmentLendBLL.cs | 125 +++++++++++++ .../SportEquipmentLendEntity.cs | 80 +++++++++ .../SportEquipmentLendIBLL.cs | 48 +++++ .../SportEquipmentLendService.cs | 165 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 792 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SportEquipmentLendController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SportEquipmentLendMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SportEquipmentLendController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SportEquipmentLendController.cs new file mode 100644 index 000000000..5137d6053 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SportEquipmentLendController.cs @@ -0,0 +1,117 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-08 17:00 + /// 描 述:器材借出管理 + /// + public class SportEquipmentLendController : MvcControllerBase + { + private SportEquipmentLendIBLL sportEquipmentLendIBLL = new SportEquipmentLendBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = sportEquipmentLendIBLL.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 SportEquipmentLendData = sportEquipmentLendIBLL.GetSportEquipmentLendEntity( keyValue ); + var jsonData = new { + SportEquipmentLend = SportEquipmentLendData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + sportEquipmentLendIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + SportEquipmentLendEntity entity = strEntity.ToObject(); + sportEquipmentLendIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.cshtml new file mode 100644 index 000000000..1a742470e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.cshtml @@ -0,0 +1,31 @@ +@{ + ViewBag.Title = "器材借出管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
实训室名称*
+ +
+
+
器材名称*
+ +
+
+
器材型号*
+ +
+
+
借出数量*
+ +
+
+
借出时间*
+ +
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.js new file mode 100644 index 000000000..98a0b8974 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.js @@ -0,0 +1,50 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-08 17:00 + * 描 述:器材借出管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SportEquipmentLend/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/SportEquipmentLend/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Index.cshtml new file mode 100644 index 000000000..413b3147a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Index.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "器材借出管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
实训室名称
+ +
+
+
器材名称
+ +
+
+
器材型号
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SportEquipmentLend/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Index.js new file mode 100644 index 000000000..5137da0c2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Index.js @@ -0,0 +1,93 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-08 17:00 + * 描 述:器材借出管理 + */ +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); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/SportEquipmentLend/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/SportEquipmentLend/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SportEquipmentLend/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/SportEquipmentLend/GetPageList', + headData: [ + { label: "实训室名称", name: "TrainingName", width: 100, align: "left" }, + { label: "器材名称", name: "EquipmentName", width: 100, align: "left" }, + { label: "器材型号", name: "EquipmentModel", width: 100, align: "left" }, + { label: "借出数量", name: "LendNum", width: 100, align: "left" }, + { label: "借出时间", name: "LendTime", width: 150, align: "left" }, + { label: "备注", name: "Remark", width: 300, align: "left" }, + ], + mainId: 'ID', + sidx: 'LendTime', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + 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 3b0b89afd..f580c6b38 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 @@ -881,6 +881,7 @@ + @@ -6963,6 +6964,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SportEquipmentLendMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SportEquipmentLendMap.cs new file mode 100644 index 000000000..1c6fc4098 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SportEquipmentLendMap.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-08 17:00 + /// 描 述:器材借出管理 + /// + public class SportEquipmentLendMap : EntityTypeConfiguration + { + public SportEquipmentLendMap() + { + #region 表、主键 + //表 + this.ToTable("SPORTEQUIPMENTLEND"); + //主键 + 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 ef3963417..859a54080 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 @@ -639,6 +639,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendBLL.cs new file mode 100644 index 000000000..f8d8dde97 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendBLL.cs @@ -0,0 +1,125 @@ +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-08 17:00 + /// 描 述:器材借出管理 + /// + public class SportEquipmentLendBLL : SportEquipmentLendIBLL + { + private SportEquipmentLendService sportEquipmentLendService = new SportEquipmentLendService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return sportEquipmentLendService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取SportEquipmentLend表实体数据 + /// + /// 主键 + /// + public SportEquipmentLendEntity GetSportEquipmentLendEntity(string keyValue) + { + try + { + return sportEquipmentLendService.GetSportEquipmentLendEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + sportEquipmentLendService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, SportEquipmentLendEntity entity) + { + try + { + sportEquipmentLendService.SaveEntity(keyValue, entity); + } + 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/SportEquipmentLend/SportEquipmentLendEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendEntity.cs new file mode 100644 index 000000000..7ccbbc590 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendEntity.cs @@ -0,0 +1,80 @@ +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-08 17:00 + /// 描 述:器材借出管理 + /// + public class SportEquipmentLendEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 实训室名称 + /// + [Column("TRAININGNAME")] + public string TrainingName { get; set; } + /// + /// 器材名称 + /// + [Column("EQUIPMENTNAME")] + public string EquipmentName { get; set; } + /// + /// 器材型号 + /// + [Column("EQUIPMENTMODEL")] + public string EquipmentModel { get; set; } + /// + /// LendNum + /// + [Column("LENDNUM")] + public int? LendNum { get; set; } + /// + /// LendTime + /// + [Column("LENDTIME")] + public DateTime? LendTime { get; set; } + /// + /// LendUserID + /// + [Column("LENDUSERID")] + public string LendUserID { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendIBLL.cs new file mode 100644 index 000000000..b99e8dddf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendIBLL.cs @@ -0,0 +1,48 @@ +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-08 17:00 + /// 描 述:器材借出管理 + /// + public interface SportEquipmentLendIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取SportEquipmentLend表实体数据 + /// + /// 主键 + /// + SportEquipmentLendEntity GetSportEquipmentLendEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, SportEquipmentLendEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendService.cs new file mode 100644 index 000000000..1dd1a53f5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentLend/SportEquipmentLendService.cs @@ -0,0 +1,165 @@ +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-08 17:00 + /// 描 述:器材借出管理 + /// + public class SportEquipmentLendService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.ID, + t.TrainingName, + t.EquipmentName, + t.EquipmentModel, + t.LendNum, + t.LendTime, + t.Remark + "); + strSql.Append(" FROM SportEquipmentLend t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["TrainingName"].IsEmpty()) + { + dp.Add("TrainingName", "%" + queryParam["TrainingName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.TrainingName Like @TrainingName "); + } + if (!queryParam["EquipmentName"].IsEmpty()) + { + dp.Add("EquipmentName", "%" + queryParam["EquipmentName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.EquipmentName Like @EquipmentName "); + } + if (!queryParam["EquipmentModel"].IsEmpty()) + { + dp.Add("EquipmentModel", "%" + queryParam["EquipmentModel"].ToString() + "%", DbType.String); + strSql.Append(" AND t.EquipmentModel Like @EquipmentModel "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取SportEquipmentLend表实体数据 + /// + /// 主键 + /// + public SportEquipmentLendEntity GetSportEquipmentLendEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + 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, SportEquipmentLendEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} 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 f3e4763a5..e84334dc1 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 @@ -1979,6 +1979,10 @@ + + + + From a85cd2794a6e16bb3d6576dfc28e099e583d9eda Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Tue, 8 Nov 2022 17:41:18 +0800 Subject: [PATCH 02/12] =?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=B5=9B=E4=BA=8B=E5=A5=96=E5=8A=B1=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StudentCompetitionController.cs | 175 ++++++++++ .../Views/StudentCompetition/Form.cshtml | 63 ++++ .../Views/StudentCompetition/Form.js | 174 ++++++++++ .../Views/StudentCompetition/FormScore.cshtml | 23 ++ .../Views/StudentCompetition/FormScore.js | 94 ++++++ .../Views/StudentCompetition/Index.cshtml | 77 +++++ .../Views/StudentCompetition/Index.js | 317 ++++++++++++++++++ .../Learun.Application.Web.csproj | 7 + .../XmlConfig/ioc.config | 2 + .../StudentCompetitionMap.cs | 29 ++ .../Learun.Application.Mapping.csproj | 1 + .../StudentCompetitionBLL.cs | 208 ++++++++++++ .../StudentCompetitionEntity.cs | 138 ++++++++ .../StudentCompetitionIBLL.cs | 63 ++++ .../StudentCompetitionService.cs | 308 +++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + .../Learun.Application.WorkFlow.csproj | 1 + .../NodeMethod/StudentCompetitionMethod.cs | 27 ++ 18 files changed, 1711 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentCompetitionController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/FormScore.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/FormScore.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentCompetitionMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCompetition/StudentCompetitionBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCompetition/StudentCompetitionEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCompetition/StudentCompetitionIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCompetition/StudentCompetitionService.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentCompetitionMethod.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentCompetitionController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentCompetitionController.cs new file mode 100644 index 000000000..7fee9d525 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentCompetitionController.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-08 11:05 + /// 描 述:学生赛事奖励 + /// + public class StudentCompetitionController : MvcControllerBase + { + private StudentCompetitionIBLL studentCompetitionIBLL = new StudentCompetitionBLL(); + 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 = studentCompetitionIBLL.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 StudentCompetitionData = studentCompetitionIBLL.GetStudentCompetitionEntity(keyValue); + var jsonData = new + { + StudentCompetition = StudentCompetitionData, + }; + 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 StudentCompetitionData = studentCompetitionIBLL.GetEntityByProcessId(processId); + var jsonData = new + { + StudentCompetition = StudentCompetitionData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + studentCompetitionIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + StudentCompetitionEntity entity = strEntity.ToObject(); + studentCompetitionIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + + /// + /// 提交 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult ChangeStatusById(string keyValue, string processId) + { + studentCompetitionIBLL.ChangeStatusById(keyValue, 1, processId); + return Success("操作成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Form.cshtml new file mode 100644 index 000000000..ed6e9ef96 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Form.cshtml @@ -0,0 +1,63 @@ +@{ + ViewBag.Title = "学生赛事奖励"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
学生学号*
+ +
+
+
学生姓名*
+ +
+
+
专业部*
+
+
+
+
专业*
+
+
+
+
班级*
+
+
+
+
赛事名称*
+ +
+
+
赛事级别*
+
+
+
+
赛事种类*
+ +
+
+
颁发单位*
+ +
+
+
分值*
+ +
+
+
获取时间*
+ +
+
+
附件上传
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentCompetition/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Form.js new file mode 100644 index 000000000..5835d5a83 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Form.js @@ -0,0 +1,174 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-08 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(); + $('#SCLevel').lrDataItemSelect({ code: 'Level' }); + + $('#StuNo').blur(function () { + learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StudentCompetition/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/StudentCompetition/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/StudentCompetition/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/StudentCompetition/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 == 'StudentCompetition' && 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/StudentCompetition/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/StudentCompetition/FormScore.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/FormScore.cshtml new file mode 100644 index 000000000..6d70350c3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/FormScore.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "学生赛事奖励"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学生学号*
+ +
+
+
学生姓名*
+ +
+
+
赛事名称*
+ +
+
+
分值*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentCompetition/FormScore.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/FormScore.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/FormScore.js new file mode 100644 index 000000000..ac3fae0b3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/FormScore.js @@ -0,0 +1,94 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-08 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/StudentCompetition/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/StudentCompetition/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 == 'StudentCompetition' && 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/StudentCompetition/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/StudentCompetition/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Index.cshtml new file mode 100644 index 000000000..8681f67e4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Index.cshtml @@ -0,0 +1,77 @@ +@{ + ViewBag.Title = "学生赛事奖励"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
学生学号
+ +
+
+
学生姓名
+ +
+
+
专业部
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
赛事名称
+ +
+
+
赛事级别
+
+
+
+
赛事种类
+ +
+ +
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentCompetition/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Index.js new file mode 100644 index 000000000..8cea599a7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCompetition/Index.js @@ -0,0 +1,317 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-08 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' }); + $('#SCLevel').lrDataItemSelect({ code: 'Level' }); + //学年 + $('#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/StudentCompetition/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/StudentCompetition/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/StudentCompetition/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/StudentCompetition/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/StudentCompetition/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/StudentCompetition/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StudentCompetition/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: "SCName", width: 100, align: "left" }, + { + label: "赛事级别", name: "SCLevel", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'Level', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "赛事种类", name: "SCType", width: 100, align: "left" }, + { label: "颁发单位", name: "Unit", width: 100, align: "left" }, + { label: "分值", name: "Score", width: 100, align: "left" }, + { + label: "获取时间", name: "SCTime", 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: 'StudentCompetition',// 填写流程对应模板编号 + 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 a41bc1b13..c384567fd 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 @@ + @@ -1167,6 +1168,9 @@ + + + @@ -1284,6 +1288,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 c14b8b64d..97d159669 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config @@ -35,6 +35,7 @@ + @@ -80,6 +81,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentCompetitionMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentCompetitionMap.cs new file mode 100644 index 000000000..fa3af4b70 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentCompetitionMap.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-08 11:05 + /// 描 述:学生赛事奖励 + /// + public class StudentCompetitionMap : EntityTypeConfiguration + { + public StudentCompetitionMap() + { + #region 表、主键 + //表 + this.ToTable("STUDENTCOMPETITION"); + //主键 + 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 c6d8f065c..3a4551b45 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/StudentCompetition/StudentCompetitionBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCompetition/StudentCompetitionBLL.cs new file mode 100644 index 000000000..e8d88decd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCompetition/StudentCompetitionBLL.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-08 11:05 + /// 描 述:学生赛事奖励 + /// + public class StudentCompetitionBLL : StudentCompetitionIBLL + { + private StudentCompetitionService studentCompetitionService = new StudentCompetitionService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return studentCompetitionService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取StudentCompetition表实体数据 + /// + /// 主键 + /// + public StudentCompetitionEntity GetStudentCompetitionEntity(string keyValue) + { + try + { + return studentCompetitionService.GetStudentCompetitionEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// + public IEnumerable GetList(string queryJson) + { + try + { + return studentCompetitionService.GetList(queryJson); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public StudentCompetitionEntity GetEntityByProcessId(string processId) + { + try + { + return studentCompetitionService.GetEntityByProcessId(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + studentCompetitionService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, StudentCompetitionEntity entity) + { + try + { + studentCompetitionService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public void ChangeStatusByProcessId(string processId, int status) + { + try + { + studentCompetitionService.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 + { + studentCompetitionService.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/StudentCompetition/StudentCompetitionEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCompetition/StudentCompetitionEntity.cs new file mode 100644 index 000000000..8ffecaef0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCompetition/StudentCompetitionEntity.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-08 11:05 + /// 描 述:学生赛事奖励 + /// + public class StudentCompetitionEntity + { + #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("SCNAME")] + public string SCName { get; set; } + /// + /// 赛事级别 + /// + [Column("SCLEVEL")] + public string SCLevel { get; set; } + /// + /// 赛事获取时间 + /// + [Column("SCTIME")] + public DateTime? SCTime { get; set; } + /// + /// 赛事种类 + /// + [Column("SCTYPE")] + public string SCType { 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/StudentCompetition/StudentCompetitionIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCompetition/StudentCompetitionIBLL.cs new file mode 100644 index 000000000..500e46c05 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCompetition/StudentCompetitionIBLL.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-08 11:05 + /// 描 述:学生赛事奖励 + /// + public interface StudentCompetitionIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取StudentCompetition表实体数据 + /// + /// 主键 + /// + StudentCompetitionEntity GetStudentCompetitionEntity(string keyValue); + + /// + /// 获取页面显示列表数据 + /// + /// + IEnumerable GetList(string queryJson); + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + StudentCompetitionEntity GetEntityByProcessId(string processId); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, StudentCompetitionEntity 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/StudentCompetition/StudentCompetitionService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCompetition/StudentCompetitionService.cs new file mode 100644 index 000000000..c137e2677 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCompetition/StudentCompetitionService.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-08 11:05 + /// 描 述:学生赛事奖励 + /// + public class StudentCompetitionService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM StudentCompetition 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["SCName"].IsEmpty()) + { + dp.Add("SCName", "%" + queryParam["SCName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.SCName Like @SCName "); + } + if (!queryParam["SCLevel"].IsEmpty()) + { + dp.Add("SCLevel",queryParam["SCLevel"].ToString(), DbType.String); + strSql.Append(" AND t.SCLevel = @SCLevel "); + } + if (!queryParam["SCTime"].IsEmpty()) + { + dp.Add("SCTime", queryParam["SCTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND t.SCTime = @SCTime "); + } + if (!queryParam["SCType"].IsEmpty()) + { + dp.Add("SCType", "%" + queryParam["SCType"].ToString() + "%", DbType.String); + strSql.Append(" AND t.SCType Like @SCType "); + } + 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); + } + } + } + + /// + /// 获取StudentCompetition表实体数据 + /// + /// 主键 + /// + public StudentCompetitionEntity GetStudentCompetitionEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public StudentCompetitionEntity 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 StudentCompetition 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, StudentCompetitionEntity 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 StudentCompetition 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 StudentCompetition 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 dad8d6a82..41976da5e 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 735f99cb1..79c628aea 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/StudentCompetitionMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentCompetitionMethod.cs new file mode 100644 index 000000000..895a3b33a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentCompetitionMethod.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 StudentCompetitionMethod : IWorkFlowMethod + { + StudentCompetitionIBLL asset = new StudentCompetitionBLL(); + + + public void Execute(WfMethodParameter parameter) + { + if (parameter.code == "agree") + { + asset.ChangeStatusByProcessId(parameter.processId, 2); + } + else + { + asset.ChangeStatusByProcessId(parameter.processId, 0); + } + } + } +} From 86ddeab908f7ac52a1a60485ef3e0cc910fb4db4 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 8 Nov 2022 17:57:07 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E5=99=A8=E6=9D=90=E5=80=9F=E5=87=BA?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=97=B6=E9=97=B4=E7=BC=96=E8=BE=91=E4=BF=9D?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/SportEquipmentLend/Form.cshtml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.cshtml index 1a742470e..1caa7bd79 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentLend/Form.cshtml @@ -19,9 +19,10 @@
借出数量*
-
+
借出时间*
- + + @**@
备注
From 60348bb3b87e0718e721e849d8d60a0bc78c0b35 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 8 Nov 2022 17:57:26 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E5=99=A8=E6=9D=90=E5=BD=92=E8=BF=98?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SportEquipmentReturnController.cs | 117 +++++++++++++ .../Views/SportEquipmentReturn/Form.cshtml | 31 ++++ .../Views/SportEquipmentReturn/Form.js | 50 ++++++ .../Views/SportEquipmentReturn/Index.cshtml | 44 +++++ .../Views/SportEquipmentReturn/Index.js | 93 +++++++++++ .../Learun.Application.Web.csproj | 5 + .../SportEquipmentReturnMap.cs | 29 ++++ .../Learun.Application.Mapping.csproj | 1 + .../SportEquipmentReturnBLL.cs | 125 ++++++++++++++ .../SportEquipmentReturnEntity.cs | 80 +++++++++ .../SportEquipmentReturnIBLL.cs | 48 ++++++ .../SportEquipmentReturnService.cs | 157 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 784 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SportEquipmentReturnController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SportEquipmentReturnMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SportEquipmentReturnController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SportEquipmentReturnController.cs new file mode 100644 index 000000000..48b516e3a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SportEquipmentReturnController.cs @@ -0,0 +1,117 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-08 17:33 + /// 描 述:器材归还管理 + /// + public class SportEquipmentReturnController : MvcControllerBase + { + private SportEquipmentReturnIBLL sportEquipmentReturnIBLL = new SportEquipmentReturnBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = sportEquipmentReturnIBLL.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 SportEquipmentReturnData = sportEquipmentReturnIBLL.GetSportEquipmentReturnEntity( keyValue ); + var jsonData = new { + SportEquipmentReturn = SportEquipmentReturnData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + sportEquipmentReturnIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + SportEquipmentReturnEntity entity = strEntity.ToObject(); + sportEquipmentReturnIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Form.cshtml new file mode 100644 index 000000000..7f466dd36 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Form.cshtml @@ -0,0 +1,31 @@ +@{ + ViewBag.Title = "器材归还管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
实训室名称*
+ +
+
+
器材名称*
+ +
+
+
器材型号*
+ +
+
+
归还数量*
+ +
+
+
归还时间*
+ +
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SportEquipmentReturn/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Form.js new file mode 100644 index 000000000..81f2870ef --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Form.js @@ -0,0 +1,50 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-08 17:33 + * 描 述:器材归还管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SportEquipmentReturn/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/SportEquipmentReturn/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Index.cshtml new file mode 100644 index 000000000..5eda91ada --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Index.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "器材归还管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
实训室名称
+ +
+
+
器材名称
+ +
+
+
器材型号
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SportEquipmentReturn/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Index.js new file mode 100644 index 000000000..b9fe95859 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipmentReturn/Index.js @@ -0,0 +1,93 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-08 17:33 + * 描 述:器材归还管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/SportEquipmentReturn/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/SportEquipmentReturn/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SportEquipmentReturn/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/SportEquipmentReturn/GetPageList', + headData: [ + { label: "实训室名称", name: "TrainingName", width: 100, align: "left" }, + { label: "器材名称", name: "EquipmentName", width: 100, align: "left" }, + { label: "器材型号", name: "EquipmentModel", width: 100, align: "left" }, + { label: "归还数量", name: "ReturnNum", width: 100, align: "left" }, + { label: "归还时间", name: "ReturnTime", width: 140, align: "left" }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'ID', + sidx: 'ReturnTime', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + 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 f580c6b38..10f61a8c0 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 @@ -882,6 +882,7 @@ + @@ -6968,6 +6969,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SportEquipmentReturnMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SportEquipmentReturnMap.cs new file mode 100644 index 000000000..ed2fe81e4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SportEquipmentReturnMap.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-08 17:33 + /// 描 述:器材归还管理 + /// + public class SportEquipmentReturnMap : EntityTypeConfiguration + { + public SportEquipmentReturnMap() + { + #region 表、主键 + //表 + this.ToTable("SPORTEQUIPMENTRETURN"); + //主键 + 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 859a54080..45e010a87 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 @@ -640,6 +640,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnBLL.cs new file mode 100644 index 000000000..4b271bb58 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnBLL.cs @@ -0,0 +1,125 @@ +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-08 17:33 + /// 描 述:器材归还管理 + /// + public class SportEquipmentReturnBLL : SportEquipmentReturnIBLL + { + private SportEquipmentReturnService sportEquipmentReturnService = new SportEquipmentReturnService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return sportEquipmentReturnService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取SportEquipmentReturn表实体数据 + /// + /// 主键 + /// + public SportEquipmentReturnEntity GetSportEquipmentReturnEntity(string keyValue) + { + try + { + return sportEquipmentReturnService.GetSportEquipmentReturnEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + sportEquipmentReturnService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, SportEquipmentReturnEntity entity) + { + try + { + sportEquipmentReturnService.SaveEntity(keyValue, entity); + } + 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/SportEquipmentReturn/SportEquipmentReturnEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnEntity.cs new file mode 100644 index 000000000..f5046192b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnEntity.cs @@ -0,0 +1,80 @@ +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-08 17:33 + /// 描 述:器材归还管理 + /// + public class SportEquipmentReturnEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 实训室名称 + /// + [Column("TRAININGNAME")] + public string TrainingName { get; set; } + /// + /// 器材名称 + /// + [Column("EQUIPMENTNAME")] + public string EquipmentName { get; set; } + /// + /// 器材型号 + /// + [Column("EQUIPMENTMODEL")] + public string EquipmentModel { get; set; } + /// + /// ReturnNum + /// + [Column("RETURNNUM")] + public int? ReturnNum { get; set; } + /// + /// ReturnTime + /// + [Column("RETURNTIME")] + public DateTime? ReturnTime { get; set; } + /// + /// ReturnUserID + /// + [Column("RETURNUSERID")] + public string ReturnUserID { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnIBLL.cs new file mode 100644 index 000000000..e7c5a991b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnIBLL.cs @@ -0,0 +1,48 @@ +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-08 17:33 + /// 描 述:器材归还管理 + /// + public interface SportEquipmentReturnIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取SportEquipmentReturn表实体数据 + /// + /// 主键 + /// + SportEquipmentReturnEntity GetSportEquipmentReturnEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, SportEquipmentReturnEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnService.cs new file mode 100644 index 000000000..f41d1e4fb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipmentReturn/SportEquipmentReturnService.cs @@ -0,0 +1,157 @@ +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-08 17:33 + /// 描 述:器材归还管理 + /// + public class SportEquipmentReturnService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@"t.* "); + strSql.Append(" FROM SportEquipmentReturn t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["TrainingName"].IsEmpty()) + { + dp.Add("TrainingName", "%" + queryParam["TrainingName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.TrainingName Like @TrainingName "); + } + if (!queryParam["EquipmentName"].IsEmpty()) + { + dp.Add("EquipmentName", "%" + queryParam["EquipmentName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.EquipmentName Like @EquipmentName "); + } + if (!queryParam["EquipmentModel"].IsEmpty()) + { + dp.Add("EquipmentModel", "%" + queryParam["EquipmentModel"].ToString() + "%", DbType.String); + strSql.Append(" AND t.EquipmentModel Like @EquipmentModel "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取SportEquipmentReturn表实体数据 + /// + /// 主键 + /// + public SportEquipmentReturnEntity GetSportEquipmentReturnEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + 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, SportEquipmentReturnEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} 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 e84334dc1..e97a93941 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 @@ -1983,6 +1983,10 @@ + + + + From 7bada55a8a9a50e0ed705a374aba0ef643c61ae7 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 9 Nov 2022 09:18:05 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E6=9D=A1=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/OuoutsourcingApi.cs | 17 ++++++++++++++++- .../Modules/WageScheduleApi.cs | 17 ++++++++++++++++- .../Modules/WelfarePositionApi.cs | 18 +++++++++++++++++- 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OuoutsourcingApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OuoutsourcingApi.cs index 932938868..72abd7c6e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OuoutsourcingApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OuoutsourcingApi.cs @@ -36,6 +36,7 @@ namespace Learun.Application.WebApi : base("/Learun/adms/Ououtsourcing") { Get["/getlist"] = GetList; + Get["/form"] = GetForm; } #region 获取数据 @@ -57,7 +58,21 @@ namespace Learun.Application.WebApi }; return Success(jsonData); } - + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var OuoutsourcingData = ououtsourcingIBLL.GetEntity(keyValue); + var jsonData = new + { + Ououtsourcing = OuoutsourcingData, + }; + return Success(jsonData); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WageScheduleApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WageScheduleApi.cs index 8fd221624..a651846aa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WageScheduleApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WageScheduleApi.cs @@ -36,6 +36,7 @@ namespace Learun.Application.WebApi : base("/Learun/adms/WageSchedule") { Get["/getlist"] = GetList; + Get["/form"] = GetForm; } #region 获取数据 @@ -57,7 +58,21 @@ namespace Learun.Application.WebApi }; return Success(jsonData); } - + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var WageScheduleData = wageScheduleIBLL.GetEntity(keyValue); + var jsonData = new + { + WageSchedule = WageScheduleData, + }; + return Success(jsonData); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WelfarePositionApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WelfarePositionApi.cs index 62fcbd0fe..1d1e11a4b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WelfarePositionApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WelfarePositionApi.cs @@ -36,6 +36,8 @@ namespace Learun.Application.WebApi : base("/Learun/adms/WelfarePosition") { Get["/getlist"] = GetList; + Get["/form"] = GetForm; + } #region 获取数据 @@ -57,7 +59,21 @@ namespace Learun.Application.WebApi }; return Success(jsonData); } - + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var WelfarePositionData = WelfarePositionIBLL.GetEntity(keyValue); + var jsonData = new + { + WelfarePosition = WelfarePositionData, + }; + return Success(jsonData); + } #endregion } From 6cb21da36fe9a5cc529bef5f7d6bded913715161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Wed, 9 Nov 2022 11:10:52 +0800 Subject: [PATCH 06/12] =?UTF-8?q?app2.0=20=E6=96=B0=E5=BB=BA=E5=B7=A5?= =?UTF-8?q?=E8=B5=84=E6=9D=A1=E9=A1=B5=E9=9D=A2=20=E5=88=9D=E6=AD=A5?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E8=B4=A2=E6=94=BF=E5=B7=A5=E8=B5=84=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/pages.json | 42 +- .../pages/Payslip/Payslip/list.vue | 268 +++++++++ .../pages/Payslip/Payslip/single.vue | 560 ++++++++++++++++++ .../pages/Payslip/recruitPayslip/list.vue | 268 +++++++++ .../pages/Payslip/recruitPayslip/single.vue | 560 ++++++++++++++++++ .../pages/Payslip/welfarePayslip/list.vue | 268 +++++++++ .../pages/Payslip/welfarePayslip/single.vue | 560 ++++++++++++++++++ 7 files changed, 2523 insertions(+), 3 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/list.vue create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/single.vue create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/recruitPayslip/list.vue create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/recruitPayslip/single.vue create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/welfarePayslip/list.vue create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/welfarePayslip/single.vue diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json index 38c9cbe18..afa43999c 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json @@ -1090,11 +1090,47 @@ "style": { "navigationBarTitleText": "详情" } + }, + // 财政工资条 + { + "path": "pages/Payslip/Payslip/list", + "style": { + "navigationBarTitleText": "财政工资条" + } + }, + { + "path": "pages/Payslip/Payslip/single", + "style": { + "navigationBarTitleText": "详情" + } + }, + // 外聘工资条 + { + "path": "pages/Payslip/recruitPayslip/list", + "style": { + "navigationBarTitleText": "外聘工资条" + } + }, + { + "path": "pages/Payslip/recruitPayslip/single", + "style": { + "navigationBarTitleText": "详情" + } + }, + // 公益性岗位工资条 + { + "path": "pages/Payslip/welfarePayslip/list", + "style": { + "navigationBarTitleText": "公益性岗位" + } + }, + { + "path": "pages/Payslip/welfarePayslip/single", + "style": { + "navigationBarTitleText": "详情" + } } - - - ], // 全局样式 diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/list.vue new file mode 100644 index 000000000..88df452cc --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/list.vue @@ -0,0 +1,268 @@ + + + + + diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/single.vue new file mode 100644 index 000000000..5c578de11 --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/single.vue @@ -0,0 +1,560 @@ + + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/recruitPayslip/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/recruitPayslip/list.vue new file mode 100644 index 000000000..88df452cc --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/recruitPayslip/list.vue @@ -0,0 +1,268 @@ + + + + + diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/recruitPayslip/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/recruitPayslip/single.vue new file mode 100644 index 000000000..5c578de11 --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/recruitPayslip/single.vue @@ -0,0 +1,560 @@ + + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/welfarePayslip/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/welfarePayslip/list.vue new file mode 100644 index 000000000..88df452cc --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/welfarePayslip/list.vue @@ -0,0 +1,268 @@ + + + + + diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/welfarePayslip/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/welfarePayslip/single.vue new file mode 100644 index 000000000..5c578de11 --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/welfarePayslip/single.vue @@ -0,0 +1,560 @@ + + + + + \ No newline at end of file From 49fca68250f0ea3fc032a4c05683ffebc7d5e87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Wed, 9 Nov 2022 11:12:00 +0800 Subject: [PATCH 07/12] app2.0 config --- Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index 1fef912cf..d304bee48 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -22,12 +22,12 @@ export default { // ], "apiHost": [ // "http://cyzjzx.gnway.cc:31218/"//测试地址接口 - "http://cyzjzx.gnway.cc:29904/"//正式地址接口 - //"http://localhost:31173/" + // "http://cyzjzx.gnway.cc:29904/"//正式地址接口 + "http://192.168.10.58:8012/" ], // "webHost":"http://cyzjzx.gnway.cc:30549/",//测试地址 - "webHost":"http://wxd3f.cyzjzx.com/",//正式地址 - //"webHost":"http://localhost:20472/", + // "webHost":"http://wxd3f.cyzjzx.com/",//正式地址 + "webHost":"http://192.168.10.58:8009/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [ // 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428 From 8cbc10f23e1a0b173f46a80c89df70af7bcf4d66 Mon Sep 17 00:00:00 2001 From: lb01 Date: Wed, 9 Nov 2022 14:16:17 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E8=BE=93=E5=85=A5=E6=A1=86=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E8=A2=AB=E9=81=AE=E6=8C=A1=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/pages/login.vue | 622 ++++++++++-------- 1 file changed, 341 insertions(+), 281 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue index ad16f0386..34154962f 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue @@ -1,308 +1,368 @@ From 5088fe91b0e4de80d4727fc6a464daf965e1ec62 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 9 Nov 2022 14:42:33 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=97=B4=E8=B7=9D;=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=82=AC=E5=8A=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/NWFProcess/NWFContainerForm.js | 13 +++++++++---- .../Content/jquery/plugin/jqprint/jqprint.css | 5 +++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js index 2d358bbf2..89007f238 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js @@ -1873,8 +1873,10 @@ var bootstrap = function ($, learun) { continue; } } - res.push(ainfo[i]); - } + if (ainfo[i].title != '开始') { + res.push(ainfo[i]); + } + } $.jqprintForm(res); } else { @@ -1894,8 +1896,11 @@ var bootstrap = function ($, learun) { continue; } } - res1.push(ainfo[i1]); - } + //res1.push(ainfo[i1]); + if (ainfo[i1].title != '开始') { + res1.push(ainfo[i1]); + } + } $.jqprintForm(res1); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jqprint.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jqprint.css index f9e836c8c..a1f03a905 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jqprint.css +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jqprint.css @@ -482,7 +482,7 @@ body { color: #333; background-color: #fff; -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + -moz-osx-font-smoothing: grayscale; } body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { @@ -510,7 +510,7 @@ a { } body { - padding: 15px; + padding: 25mm; color: #333; } @@ -530,6 +530,7 @@ td,th { } .inputname { text-align: right; + width: 40mm; } .anodeinfod { position:relative; From 73925edd31c1823e90385e7ce91a5b26f3eeda9f Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 9 Nov 2022 16:15:09 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E6=9D=A1=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ououtsourcing/OuoutsourcingService.cs | 4 ++-- .../WageSchedule/WageScheduleService.cs | 4 ++-- .../WelfarePosition/WelfarePositionService.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Ououtsourcing/OuoutsourcingService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Ououtsourcing/OuoutsourcingService.cs index 9b21198c6..f2114c488 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Ououtsourcing/OuoutsourcingService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Ououtsourcing/OuoutsourcingService.cs @@ -82,12 +82,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (!queryParam["IssueMonth"].IsEmpty()) { dp.Add("IssueMonth", queryParam["IssueMonth"].ToString(), DbType.String); - strSql.Append(" AND t.IssueMonth = IssueMonth "); + strSql.Append(" AND t.IssueMonth = @IssueMonth "); } if (!queryParam["IssueYear"].IsEmpty()) { dp.Add("IssueYear", queryParam["IssueYear"].ToString(), DbType.String); - strSql.Append(" AND t.IssueYear = IssueYear "); + strSql.Append(" AND t.IssueYear = @IssueYear "); } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleService.cs index 09236daf9..2820d64f8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleService.cs @@ -86,12 +86,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (!queryParam["IssueMonth"].IsEmpty()) { dp.Add("IssueMonth", queryParam["IssueMonth"].ToString(), DbType.String); - strSql.Append(" AND t.IssueMonth = IssueMonth "); + strSql.Append(" AND t.IssueMonth = @IssueMonth "); } if (!queryParam["IssueYear"].IsEmpty()) { dp.Add("IssueYear", queryParam["IssueYear"].ToString(), DbType.String); - strSql.Append(" AND t.IssueYear = IssueYear "); + strSql.Append(" AND t.IssueYear = @IssueYear "); } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WelfarePosition/WelfarePositionService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WelfarePosition/WelfarePositionService.cs index 5cc4bb26c..77829762b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WelfarePosition/WelfarePositionService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WelfarePosition/WelfarePositionService.cs @@ -82,12 +82,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (!queryParam["IssueMonth"].IsEmpty()) { dp.Add("IssueMonth", queryParam["IssueMonth"].ToString(), DbType.String); - strSql.Append(" AND t.IssueMonth = IssueMonth "); + strSql.Append(" AND t.IssueMonth = @IssueMonth "); } if (!queryParam["IssueYear"].IsEmpty()) { dp.Add("IssueYear", queryParam["IssueYear"].ToString(), DbType.String); - strSql.Append(" AND t.IssueYear = IssueYear "); + strSql.Append(" AND t.IssueYear = @IssueYear "); } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } From a745b01447562348750a0c6fb55e7a7de36dcefa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Wed, 9 Nov 2022 16:40:41 +0800 Subject: [PATCH 11/12] =?UTF-8?q?app2.0=20=E5=B7=A5=E8=B5=84=E6=9D=A1?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/Payslip/Payslip/list.vue | 16 +- .../pages/Payslip/Payslip/single.vue | 26 +- .../pages/Payslip/recruitPayslip/list.vue | 20 +- .../pages/Payslip/recruitPayslip/single.vue | 253 ++++++++++-------- .../pages/Payslip/welfarePayslip/list.vue | 20 +- .../pages/Payslip/welfarePayslip/single.vue | 253 ++++++++++-------- 6 files changed, 320 insertions(+), 268 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/list.vue index 88df452cc..e67185753 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/list.vue @@ -10,6 +10,14 @@ + + 姓名: + {{ displayListItem(item, 'EmpName') }} + + + 人员类别: + {{ displayListItem(item, 'PeopleType') }} + 发放年份: {{ displayListItem(item, 'IssueYear') }} @@ -45,8 +53,8 @@ - - + + @@ -74,6 +82,10 @@ export default { scheme: { // F_CustomerId: { type: 'select', dataSource: '1', dataSourceId: 'crmCustomer,f_fullname,f_customerid' }, // F_InvoiceContent: { type: 'texteditor' }, + // 姓名EmpName + EmpName: { type: 'text' }, + // 人员类别PeopleType + PeopleType: { type: 'text' }, // 发放年份IssueYear IssueYear: { type: 'text' }, // 发放月份IssueMonth diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/single.vue index 5c578de11..02e7b80f1 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/Payslip/single.vue @@ -201,10 +201,10 @@ :disabled="!edit" title="失业保险" /> - @@ -257,26 +257,6 @@ :disabled="!edit" title="发放月份" /> - + + 姓名: + {{ displayListItem(item, 'EmpName') }} + + + 人员类别: + {{ displayListItem(item, 'PeopleType') }} + 发放年份: {{ displayListItem(item, 'IssueYear') }} @@ -45,8 +53,8 @@ - - + + @@ -74,6 +82,10 @@ export default { scheme: { // F_CustomerId: { type: 'select', dataSource: '1', dataSourceId: 'crmCustomer,f_fullname,f_customerid' }, // F_InvoiceContent: { type: 'texteditor' }, + // 姓名EmpName + EmpName: { type: 'text' }, + // 人员类别PeopleType + PeopleType: { type: 'text' }, // 发放年份IssueYear IssueYear: { type: 'text' }, // 发放月份IssueMonth @@ -143,7 +155,7 @@ export default { } const result = await this.HTTP_GET( - 'learun/adms/WageSchedule/getlist', + 'learun/adms/Ououtsourcing/getlist', { pagination: { rows: 10, page: this.page, sidx: 'CreateTime', sord: 'DESC' }, queryJson: JSON.stringify(this.searchData) @@ -188,7 +200,7 @@ export default { return case 'view': - this.NAV_TO('./single?type=view&&id='+item.Id, item, true) + this.NAV_TO('./single?type=view&&id='+item.WPID, item, true) return case 'edit': diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/recruitPayslip/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/recruitPayslip/single.vue index 5c578de11..684931955 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/recruitPayslip/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/recruitPayslip/single.vue @@ -3,260 +3,273 @@ 基本信息 + 基本工资 - + /> --> 津贴补贴 - + /> --> 改革性补贴 - + /> --> + 扣款 - + /> --> - - + /> --> - - + /> --> + + + 姓名: + {{ displayListItem(item, 'EmpName') }} + + + 人员类别: + {{ displayListItem(item, 'PeopleType') }} + 发放年份: {{ displayListItem(item, 'IssueYear') }} @@ -45,8 +53,8 @@ - - + + @@ -74,6 +82,10 @@ export default { scheme: { // F_CustomerId: { type: 'select', dataSource: '1', dataSourceId: 'crmCustomer,f_fullname,f_customerid' }, // F_InvoiceContent: { type: 'texteditor' }, + // 姓名EmpName + EmpName: { type: 'text' }, + // 人员类别PeopleType + PeopleType: { type: 'text' }, // 发放年份IssueYear IssueYear: { type: 'text' }, // 发放月份IssueMonth @@ -143,7 +155,7 @@ export default { } const result = await this.HTTP_GET( - 'learun/adms/WageSchedule/getlist', + 'learun/adms/WelfarePosition/getlist', { pagination: { rows: 10, page: this.page, sidx: 'CreateTime', sord: 'DESC' }, queryJson: JSON.stringify(this.searchData) @@ -188,7 +200,7 @@ export default { return case 'view': - this.NAV_TO('./single?type=view&&id='+item.Id, item, true) + this.NAV_TO('./single?type=view&&id='+item.GYID, item, true) return case 'edit': diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/welfarePayslip/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/welfarePayslip/single.vue index 5c578de11..7b831a783 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/welfarePayslip/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/Payslip/welfarePayslip/single.vue @@ -3,260 +3,273 @@ 基本信息 + 基本工资 - + /> --> 津贴补贴 - + /> --> 改革性补贴 - + /> --> + 扣款 - + /> --> - - + /> --> - - + /> --> + @@ -82,6 +83,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentArticlePublicMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentArticlePublicMap.cs new file mode 100644 index 000000000..9a50bcb8f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentArticlePublicMap.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-09 11:05 + /// 描 述:学生文章发表 + /// + public class StudentArticlePublicMap : EntityTypeConfiguration + { + public StudentArticlePublicMap() + { + #region 表、主键 + //表 + this.ToTable("STUDENTARTICLEPUBLIC"); + //主键 + 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 f8d47fb87..aa3cbcfc5 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/StudentArticlePublic/StudentArticlePublicBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentArticlePublic/StudentArticlePublicBLL.cs new file mode 100644 index 000000000..583dfaf7d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentArticlePublic/StudentArticlePublicBLL.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-09 11:05 + /// 描 述:学生文章发表 + /// + public class StudentArticlePublicBLL : StudentArticlePublicIBLL + { + private StudentArticlePublicService studentArticlePublicService = new StudentArticlePublicService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return studentArticlePublicService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取StudentArticlePublic表实体数据 + /// + /// 主键 + /// + public StudentArticlePublicEntity GetStudentArticlePublicEntity(string keyValue) + { + try + { + return studentArticlePublicService.GetStudentArticlePublicEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// + public IEnumerable GetList(string queryJson) + { + try + { + return studentArticlePublicService.GetList(queryJson); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public StudentArticlePublicEntity GetEntityByProcessId(string processId) + { + try + { + return studentArticlePublicService.GetEntityByProcessId(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + studentArticlePublicService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, StudentArticlePublicEntity entity) + { + try + { + studentArticlePublicService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public void ChangeStatusByProcessId(string processId, int status) + { + try + { + studentArticlePublicService.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 + { + studentArticlePublicService.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/StudentArticlePublic/StudentArticlePublicEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentArticlePublic/StudentArticlePublicEntity.cs new file mode 100644 index 000000000..616812359 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentArticlePublic/StudentArticlePublicEntity.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-09 11:05 + /// 描 述:学生文章发表 + /// + public class StudentArticlePublicEntity + { + #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("SCNAME")] + public string SCName { get; set; } + /// + /// 赛事级别 + /// + [Column("SCLEVEL")] + public string SCLevel { get; set; } + /// + /// 赛事获取时间 + /// + [Column("SCTIME")] + public DateTime? SCTime { get; set; } + /// + /// 赛事种类 + /// + [Column("SCTYPE")] + public string SCType { 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/StudentArticlePublic/StudentArticlePublicIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentArticlePublic/StudentArticlePublicIBLL.cs new file mode 100644 index 000000000..bddf32ff3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentArticlePublic/StudentArticlePublicIBLL.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-09 11:05 + /// 描 述:学生文章发表 + /// + public interface StudentArticlePublicIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取StudentArticlePublic表实体数据 + /// + /// 主键 + /// + StudentArticlePublicEntity GetStudentArticlePublicEntity(string keyValue); + + /// + /// 获取页面显示列表数据 + /// + /// + IEnumerable GetList(string queryJson); + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + StudentArticlePublicEntity GetEntityByProcessId(string processId); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, StudentArticlePublicEntity 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/StudentArticlePublic/StudentArticlePublicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentArticlePublic/StudentArticlePublicService.cs new file mode 100644 index 000000000..5bffc78ff --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentArticlePublic/StudentArticlePublicService.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-09 11:05 + /// 描 述:学生文章发表 + /// + public class StudentArticlePublicService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM StudentArticlePublic 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["APName"].IsEmpty()) + { + dp.Add("APName", "%" + queryParam["APName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.APName Like @APName "); + } + if (!queryParam["APLevel"].IsEmpty()) + { + dp.Add("APLevel", queryParam["APLevel"].ToString(), DbType.String); + strSql.Append(" AND t.APLevel = @APLevel "); + } + if (!queryParam["APTime"].IsEmpty()) + { + dp.Add("APTime", queryParam["APTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND t.APTime = @APTime "); + } + if (!queryParam["Instructor"].IsEmpty()) + { + dp.Add("Instructor", "%" + queryParam["Instructor"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Instructor Like @Instructor "); + } + 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); + } + } + } + + /// + /// 获取StudentArticlePublic表实体数据 + /// + /// 主键 + /// + public StudentArticlePublicEntity GetStudentArticlePublicEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public StudentArticlePublicEntity 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 StudentArticlePublic 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, StudentArticlePublicEntity 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 StudentArticlePublic 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 StudentArticlePublic 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 3136c7e73..961103abf 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 79c628aea..939502688 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/StudentArticlePublicMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentArticlePublicMethod.cs new file mode 100644 index 000000000..eb9c67846 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentArticlePublicMethod.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 StudentArticlePublicMethod : IWorkFlowMethod + { + StudentArticlePublicIBLL asset = new StudentArticlePublicBLL(); + + + public void Execute(WfMethodParameter parameter) + { + if (parameter.code == "agree") + { + asset.ChangeStatusByProcessId(parameter.processId, 2); + } + else + { + asset.ChangeStatusByProcessId(parameter.processId, 0); + } + } + } +}