From 4e192d081001c00e79c2f196646295c6f5cecb87 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 7 Nov 2022 18:13:04 +0800 Subject: [PATCH 01/38] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E4=B8=93=E4=B8=9A=E5=8F=91=E5=B1=95=EF=BC=9A=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E8=8D=A3=E8=AA=89=E5=A5=96=E5=8A=B1=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StudentHonorController.cs | 175 ++++++++++ .../Views/StudentHonor/Form.cshtml | 63 ++++ .../Views/StudentHonor/Form.js | 173 ++++++++++ .../Views/StudentHonor/FormScore.cshtml | 23 ++ .../Views/StudentHonor/FormScore.js | 94 ++++++ .../Views/StudentHonor/Index.cshtml | 77 +++++ .../Views/StudentHonor/Index.js | 305 +++++++++++++++++ .../Learun.Application.Web.csproj | 7 + .../XmlConfig/ioc.config | 2 + .../StudentHonorMap.cs | 29 ++ .../Learun.Application.Mapping.csproj | 1 + .../StudentHonor/StudentHonorBLL.cs | 208 ++++++++++++ .../StudentHonor/StudentHonorEntity.cs | 138 ++++++++ .../StudentHonor/StudentHonorIBLL.cs | 63 ++++ .../StudentHonor/StudentHonorService.cs | 308 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + .../Learun.Application.WorkFlow.csproj | 1 + .../NodeMethod/StudentHonorMethod.cs | 27 ++ 18 files changed, 1698 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentHonorController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentHonorMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorService.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentHonorMethod.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentHonorController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentHonorController.cs new file mode 100644 index 000000000..2f07c5a33 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentHonorController.cs @@ -0,0 +1,175 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using Learun.Application.TwoDevelopment.LR_CodeDemo; +using System.Collections.Generic; +using Learun.Application.Base.SystemModule; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:05 + /// 描 述:学生荣誉奖励 + /// + public class StudentHonorController : MvcControllerBase + { + private StudentHonorIBLL studentHonorIBLL = new StudentHonorBLL(); + private CodeRuleIBLL codeRuleIBLL = new CodeRuleBLL(); + private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 修改分值 + /// + /// + [HttpGet] + public ActionResult FormScore() + { + return View(); + } + + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = studentHonorIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var StudentHonorData = studentHonorIBLL.GetStudentHonorEntity(keyValue); + var jsonData = new + { + StudentHonor = StudentHonorData, + }; + return Success(jsonData); + } + + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetStuData(string stuno, string stuname) + { + var stuData = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNoOrStuName(stuno, stuname); + + return Success(stuData); + } + /// + /// 获取表单数据 + /// + /// 流程实例主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormDataByProcessId(string processId) + { + var StudentHonorData = studentHonorIBLL.GetEntityByProcessId(processId); + var jsonData = new + { + StudentHonor = StudentHonorData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + studentHonorIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + StudentHonorEntity entity = strEntity.ToObject(); + studentHonorIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + + /// + /// 提交 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult ChangeStatusById(string keyValue, string processId) + { + studentHonorIBLL.ChangeStatusById(keyValue, 1, processId); + return Success("操作成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.cshtml new file mode 100644 index 000000000..152bf5c29 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.cshtml @@ -0,0 +1,63 @@ +@{ + ViewBag.Title = "学生荣誉奖励"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
学生学号*
+ +
+
+
学生姓名*
+ +
+
+
专业部*
+
+
+
+
专业*
+
+
+
+
班级*
+
+
+
+
荣誉名称*
+ +
+
+
荣誉级别*
+ +
+
+
荣誉种类*
+ +
+
+
颁发单位*
+ +
+
+
分值*
+ +
+
+
获取时间*
+ +
+
+
附件上传
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentHonor/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.js new file mode 100644 index 000000000..bc7203bcf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Form.js @@ -0,0 +1,173 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 11:05 + * 描 述:学生荣誉奖励 + */ +var acceptClick; +var keyValue = request('keyValue'); +var type = request('type'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + if (!!data) { + for (var field in data) { + if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 + $('#' + data[field].fieldId).parent().remove(); + } + else { + if (data[field].isEdit != 1) { + $('#' + data[field].fieldId).attr('disabled', 'disabled'); + if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { + $('#' + data[field].fieldId).css({ 'padding-right': '58px' }); + $('#' + data[field].fieldId).find('.btn-success').remove(); + } + } + } + } + } + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#Url').lrUploader(); + + $('#StuNo').blur(function () { + learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StudentHonor/GetStuData?stuno=' + $('#StuNo').val(), function (res) { + learun.loading(false); + if (res.code == learun.httpCode.success) { + var data = res.data; + if (!!data) { + $('#StuName').val(data.StuName); + $('#DeptNo').lrselectSet(data.DeptNo); + $('#MajorNo').lrselectSet(data.MajorNo); + $('#ClassNo').lrselectSet(data.ClassNo); + } else { + $('#StuName').val(); + $('#DeptNo').lrselectSet(); + $('#MajorNo').lrselectSet(); + $('#ClassNo').lrselectSet(); + } + } + else { + learun.alert.error(res.info); + } + }); + }); + $('#StuName').blur(function () { + learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StudentHonor/GetStuData?stuname=' + $('#StuName').val(), function (res) { + learun.loading(false); + if (res.code == learun.httpCode.success) { + var data = res.data; + if (!!data) { + $('#StuNo').val(data.StuNo); + $('#DeptNo').lrselectSet(data.DeptNo); + $('#MajorNo').lrselectSet(data.MajorNo); + $('#ClassNo').lrselectSet(data.ClassNo); + } else { + $('#StuName').val(); + $('#DeptNo').lrselectSet(); + $('#MajorNo').lrselectSet(); + $('#ClassNo').lrselectSet(); + } + } + else { + learun.alert.error(res.info); + } + }); + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 设置表单数据 + setFormData = function (processId, param, callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/GetFormDataByProcessId?processId=' + processId, function (data) { + for (var id in data) { + if (!!data[id] && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + if (id == 'StudentHonor' && data[id]) { + keyValue = data[id].Id; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + if (!!processId) { + formData.processId = processId; + } + if (type == 'copy') { + keyValue = ''; + } + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, i); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.cshtml new file mode 100644 index 000000000..cc23dde24 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "学生荣誉奖励"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学生学号*
+ +
+
+
学生姓名*
+ +
+
+
荣誉名称*
+ +
+
+
分值*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentHonor/FormScore.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.js new file mode 100644 index 000000000..8982c9c90 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/FormScore.js @@ -0,0 +1,94 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 11:05 + * 描 述:学生荣誉奖励 + */ +var acceptClick; +var keyValue = request('keyValue'); +var type = request('type'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 设置表单数据 + setFormData = function (processId, param, callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/GetFormDataByProcessId?processId=' + processId, function (data) { + for (var id in data) { + if (!!data[id] && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + if (id == 'StudentHonor' && data[id]) { + keyValue = data[id].Id; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + if (!!processId) { + formData.processId = processId; + } + if (type == 'copy') { + keyValue = ''; + } + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, i); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.cshtml new file mode 100644 index 000000000..f0faa5755 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.cshtml @@ -0,0 +1,77 @@ +@{ + ViewBag.Title = "学生荣誉奖励"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
学生学号
+ +
+
+
学生姓名
+ +
+
+
专业部
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
荣誉名称
+ +
+
+
荣誉级别
+ +
+
+
荣誉种类
+ +
+ +
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentHonor/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.js new file mode 100644 index 000000000..dda8b2d43 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentHonor/Index.js @@ -0,0 +1,305 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 11:05 + * 描 述:学生荣誉奖励 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 240, 400); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/StudentHonor/Form', + width: 1000, + height: 800, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + processId = learun.newGuid(); + res = top[id].save(processId, refreshGirdData); + } + return res; + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == '2') { + learun.alert.warning("当前项目已审批通过!"); + return; + } + if (Status != '0') { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/StudentHonor/Form?keyValue=' + keyValue, + width: 1000, + height: 800, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + //修改分值 + $('#lr_updscore').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == '2') { + learun.alert.warning("当前项目已审批通过!"); + return; + } + if (Status != '0') { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerForm({ + id: 'form_updscore', + title: '修改分值', + url: top.$.rootUrl + '/EducationalAdministration/StudentHonor/FormScore?keyValue=' + keyValue, + width: 500, + height: 350, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + //复制 + $('#lr_copy').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/StudentHonor/Form?keyValue=' + keyValue + '&type=copy', + width: 1000, + height: 800, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == '2') { + learun.alert.warning("当前项目已审批通过!"); + return; + } + if (Status != '0') { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == '2') { + learun.alert.warning("当前项目已审批通过!"); + return; + } + if (Status != '0') { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StudentHonor/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StudentHonor/GetPageList', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, + { label: "学期", name: "Semester", width: 80, align: "left" }, + { label: "学生学号", name: "StuNo", width: 150, align: "left" }, + { label: "学生姓名", name: "StuName", width: 100, align: "left" }, + { + label: "专业部", name: "DeptNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "专业", name: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { label: "荣誉名称", name: "SHName", width: 100, align: "left" }, + { label: "荣誉级别", name: "SHLevel", width: 100, align: "left" }, + { label: "荣誉种类", name: "SHType", width: 100, align: "left" }, + { label: "颁发单位", name: "Unit", width: 100, align: "left" }, + { label: "分值", name: "Score", width: 100, align: "left" }, + { + label: "获取时间", name: "SHTime", width: 100, align: "left", + formatter: function (cellvalue, row) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { + label: "状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 1) { + return '审批中'; + } else if (cellvalue === 2) { + return '审核通过'; + } else { + return '草稿'; + } + } + }, + ], + mainId: 'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (res && res.code && res.code == 200) { + var postData = { + schemeCode: 'StudentHonor',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + } + page.search(); + + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index c242205b0..a41bc1b13 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -351,6 +351,7 @@ + @@ -1166,6 +1167,9 @@ + + + @@ -1277,6 +1281,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config index cc52f4118..c14b8b64d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config @@ -34,6 +34,7 @@ + @@ -78,6 +79,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentHonorMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentHonorMap.cs new file mode 100644 index 000000000..177e3f246 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentHonorMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:05 + /// 描 述:学生荣誉奖励 + /// + public class StudentHonorMap : EntityTypeConfiguration + { + public StudentHonorMap() + { + #region 表、主键 + //表 + this.ToTable("STUDENTHONOR"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index fb9bf0e16..c6d8f065c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -110,6 +110,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorBLL.cs new file mode 100644 index 000000000..ca4d900bd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorBLL.cs @@ -0,0 +1,208 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:05 + /// 描 述:学生荣誉奖励 + /// + public class StudentHonorBLL : StudentHonorIBLL + { + private StudentHonorService studentHonorService = new StudentHonorService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return studentHonorService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取StudentHonor表实体数据 + /// + /// 主键 + /// + public StudentHonorEntity GetStudentHonorEntity(string keyValue) + { + try + { + return studentHonorService.GetStudentHonorEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// + public IEnumerable GetList(string queryJson) + { + try + { + return studentHonorService.GetList(queryJson); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public StudentHonorEntity GetEntityByProcessId(string processId) + { + try + { + return studentHonorService.GetEntityByProcessId(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + studentHonorService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, StudentHonorEntity entity) + { + try + { + studentHonorService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public void ChangeStatusByProcessId(string processId, int status) + { + try + { + studentHonorService.ChangeStatusByProcessId(processId, status); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void ChangeStatusById(string keyValue, int status, string processId) + { + try + { + studentHonorService.ChangeStatusById(keyValue, status, processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorEntity.cs new file mode 100644 index 000000000..8f8c02358 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorEntity.cs @@ -0,0 +1,138 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:05 + /// 描 述:学生荣誉奖励 + /// + public class StudentHonorEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// StuNo + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// StuName + /// + [Column("STUNAME")] + public string StuName { get; set; } + /// + /// DeptNo + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// MajorNo + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// ClassNo + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// 荣誉名称 + /// + [Column("SHNAME")] + public string SHName { get; set; } + /// + /// 荣誉级别 + /// + [Column("SHLEVEL")] + public string SHLevel { get; set; } + /// + /// 荣誉获取时间 + /// + [Column("SHTIME")] + public DateTime? SHTime { get; set; } + /// + /// 荣誉种类 + /// + [Column("SHTYPE")] + public string SHType { get; set; } + /// + /// 分值 + /// + [Column("SCORE")] + public decimal? Score { get; set; } + /// + /// 附件 + /// + [Column("URL")] + public string Url { get; set; } + /// + /// 颁发单位 + /// + [Column("UNIT")] + public string Unit { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// CreateUserId + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// processId + /// + [Column("PROCESSID")] + public string processId { get; set; } + /// + /// Status + /// + [Column("STATUS")] + public int? Status { get; set; } + /// + /// 学年 + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// 学期 + /// + [Column("SEMESTER")] + public string Semester { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + this.CreateTime = DateTime.Now; + this.CreateUserId = LoginUserInfo.Get().userId; + this.Status = 0; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorIBLL.cs new file mode 100644 index 000000000..9d6583a8e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorIBLL.cs @@ -0,0 +1,63 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:05 + /// 描 述:学生荣誉奖励 + /// + public interface StudentHonorIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取StudentHonor表实体数据 + /// + /// 主键 + /// + StudentHonorEntity GetStudentHonorEntity(string keyValue); + + /// + /// 获取页面显示列表数据 + /// + /// + IEnumerable GetList(string queryJson); + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + StudentHonorEntity GetEntityByProcessId(string processId); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, StudentHonorEntity entity); + void ChangeStatusByProcessId(string processId, int status); + void ChangeStatusById(string keyValue, int status,string processId); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorService.cs new file mode 100644 index 000000000..35d099579 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentHonor/StudentHonorService.cs @@ -0,0 +1,308 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:05 + /// 描 述:学生荣誉奖励 + /// + public class StudentHonorService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM StudentHonor t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuNo Like @StuNo "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.ClassNo = @ClassNo "); + } + if (!queryParam["SHName"].IsEmpty()) + { + dp.Add("SHName", "%" + queryParam["SHName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.SHName Like @SHName "); + } + if (!queryParam["SHLevel"].IsEmpty()) + { + dp.Add("SHLevel", "%" + queryParam["SHLevel"].ToString() + "%", DbType.String); + strSql.Append(" AND t.SHLevel Like @SHLevel "); + } + if (!queryParam["SHTime"].IsEmpty()) + { + dp.Add("SHTime", queryParam["SHTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND t.SHTime = @SHTime "); + } + if (!queryParam["SHType"].IsEmpty()) + { + dp.Add("SHType", "%" + queryParam["SHType"].ToString() + "%", DbType.String); + strSql.Append(" AND t.SHType Like @SHType "); + } + if (!queryParam["Unit"].IsEmpty()) + { + dp.Add("Unit", "%" + queryParam["Unit"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Unit Like @Unit "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取StudentHonor表实体数据 + /// + /// 主键 + /// + public StudentHonorEntity GetStudentHonorEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public StudentHonorEntity GetEntityByProcessId(string processId) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(t => t.processId == processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// + public IEnumerable GetList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM StudentHonor t "); + strSql.Append(" WHERE 1=1 and t.Status=2 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, StudentHonorEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public void ChangeStatusByProcessId(string processId, int status) + { + try + { + this.BaseRepository("CollegeMIS").ExecuteBySql($"update StudentHonor set Status='{status}' where processId='{processId}'"); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public void ChangeStatusById(string keyValue, int status, string processId) + { + try + { + this.BaseRepository("CollegeMIS").ExecuteBySql($"update StudentHonor set Status='{status}',processId='{processId}' where Id='{keyValue}'"); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index c7c9de24c..dad8d6a82 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -265,6 +265,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj index 4e78e8099..735f99cb1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj @@ -97,6 +97,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentHonorMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentHonorMethod.cs new file mode 100644 index 000000000..e59b8df43 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/StudentHonorMethod.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Learun.Application.TwoDevelopment.EducationalAdministration; + +namespace Learun.Application.WorkFlow +{ + public class StudentHonorMethod : IWorkFlowMethod + { + StudentHonorIBLL asset = new StudentHonorBLL(); + + + public void Execute(WfMethodParameter parameter) + { + if (parameter.code == "agree") + { + asset.ChangeStatusByProcessId(parameter.processId, 2); + } + else + { + asset.ChangeStatusByProcessId(parameter.processId, 0); + } + } + } +} From 34067edb830ead5aa2ec955f694c6c143c0107af Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Tue, 8 Nov 2022 09:38:53 +0800 Subject: [PATCH 02/38] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=EF=BC=9A123=E9=95=BF=E9=98=B3?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.Web/XmlConfig/database.config | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config index 4a65676bf..c5c724312 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config @@ -16,14 +16,14 @@ - + + + - + + --> From e18a7fd7143093c5178e7b9693f36039a1624302 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 8 Nov 2022 10:10:37 +0800 Subject: [PATCH 03/38] =?UTF-8?q?=E8=B4=A2=E6=94=BF=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/WageScheduleController.cs | 121 +++++++ .../Views/WageSchedule/Form.cshtml | 163 ++++++++++ .../Views/WageSchedule/Form.js | 38 +++ .../Views/WageSchedule/Index.cshtml | 48 +++ .../Views/WageSchedule/Index.js | 158 +++++++++ .../Learun.Application.Web.csproj | 5 + .../WageScheduleMap.cs | 29 ++ .../Learun.Application.Mapping.csproj | 1 + .../WageSchedule/WageScheduleBLL.cs | 148 +++++++++ .../WageSchedule/WageScheduleEntity.cs | 302 ++++++++++++++++++ .../WageSchedule/WageScheduleIBLL.cs | 55 ++++ .../WageSchedule/WageScheduleService.cs | 198 ++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 1270 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/WageScheduleController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/WageScheduleMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/WageScheduleController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/WageScheduleController.cs new file mode 100644 index 000000000..7721703d0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/WageScheduleController.cs @@ -0,0 +1,121 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Util; +using System.Data; +using System.Web.Mvc; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:54 + /// 描 述:工资条 + /// + public class WageScheduleController : MvcControllerBase + { + private WageScheduleIBLL wageScheduleIBLL = new WageScheduleBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList( string queryJson ) + { + var data = wageScheduleIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = wageScheduleIBLL.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 data = wageScheduleIBLL.GetEntity(keyValue); + return Success(data); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + wageScheduleIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue,WageScheduleEntity entity) + { + wageScheduleIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Form.cshtml new file mode 100644 index 000000000..f025d5a75 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Form.cshtml @@ -0,0 +1,163 @@ +@{ + ViewBag.Title = "工资条"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
序号
+ +
+
+
姓名
+ +
+
+
身份证号
+ +
+
+
人员类别
+ +
+
+
岗位等级
+ +
+
+
薪级
+ +
+
+
应发合计
+ +
+
+
岗位工资
+ +
+
+
薪级工资
+ +
+
+
百分之十
+ +
+
+
基本工资小计
+ +
+
+
艰边津贴
+ +
+
+
民族津贴
+ +
+
+
教师津贴
+ +
+
+
津贴补贴小计
+ +
+
+
基础性绩效
+ +
+
+
女职工卫生费
+ +
+
+
交通补贴
+ +
+
+
物业补贴
+ +
+
+
工改保留补贴
+ +
+
+
改革性补贴小计
+ +
+
+
住房补贴
+ +
+
+
住房公积金
+ +
+
+
特级教师津贴和乡镇补贴
+ +
+
+
扣款小计
+ +
+
+
公积金
+ +
+
+
工会工费
+ +
+
+
个人所得税
+ +
+
+
养老保险
+ +
+
+
职业年金
+ +
+
+
医疗保险
+ +
+
+
失业保险
+ +
+
+
其他
+ +
+
+
财政直达
+ +
+
+
银行代扣
+ +
+
+
实发合计
+ +
+
+
工资卡号
+ +
+
+
发放月份
+ +
+
+
发放年份
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/WageSchedule/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Form.js new file mode 100644 index 000000000..591dd67b3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Form.js @@ -0,0 +1,38 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 11:54 + * 描 述:工资条 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var selectedRow = learun.frameTab.currentIframe().selectedRow; + var page = { + init: function () { + page.initData(); + }, + bind: function () { + }, + initData: function () { + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/WageSchedule/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Index.cshtml new file mode 100644 index 000000000..6791db429 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Index.cshtml @@ -0,0 +1,48 @@ +@{ + ViewBag.Title = "工资条"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
年份
+
+
+
+
月份
+
+
+
+
姓名
+ +
+
+
人员类别
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/WageSchedule/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Index.js new file mode 100644 index 000000000..d781932b5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Index.js @@ -0,0 +1,158 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 11:54 + * 描 述:工资条 + */ +var selectedRow; +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); + //年份 + $('#IssueYear').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear', + value: 'value', + text: 'text' + }); + $('#IssueMonth').lrDataItemSelect({ code: 'MPMonth' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + selectedRow = null; + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/Form', + width: 700, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/Form?keyValue=' + keyValue, + width: 700, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/WageSchedule/DeleteForm', { keyValue: keyValue }, function () { + }); + } + }); + } + }); + }, + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/GetPageList', + headData: [ + { label: '序号', name: 'No', width: 70, align: "left" }, + { label: '姓名', name: 'EmpName', width: 70, align: "left" }, + { label: '身份证号', name: 'IdCardNo', width: 140, align: "left" }, + { label: '人员类别', name: 'PeopleType', width: 70, align: "left" }, + { label: '岗位等级', name: 'PostType', width: 70, align: "left" }, + { label: '薪级', name: 'PayGrade', width: 50, align: "left" }, + { label: '应发合计', name: 'TotalGrossPay', width: 70, align: "left", statistics: true }, + { + label: '基本工资', name: '基本工资', width: 130, align: "center", statistics: true, + children: [ + { label: '岗位工资', name: 'PostWage', width: 70, align: "left", statistics: true }, + { label: '薪级工资', name: 'PayGradeWage', width: 70, align: "left", statistics: true }, + { label: '百分之十', name: 'TenPercent', width: 70, align: "left", statistics: true }, + { label: '小计', name: 'BasePay', width: 70, align: "left", statistics: true } + ] + }, + { + label: '津贴补贴', name: '津贴补贴', width: 130, align: "center", statistics: true, + children: [ + { label: '艰边津贴', name: 'RoughEdgeAllowance', width: 70, align: "left", statistics: true }, + { label: '民族津贴', name: 'NationAllowance', width: 70, align: "left", statistics: true }, + { label: '教师津贴', name: 'TeachAllowance', width: 70, align: "left", statistics: true }, + { label: '小计', name: 'SubsidiesAllowances', width: 70, align: "left", statistics: true }, + ] + }, + { label: '基础性绩效', name: 'BasicsPerformance', width: 70, align: "left", statistics: true }, + { label: '女职工卫生费', name: 'GirlStaffSanitation', width: 70, align: "left", statistics: true }, + { + label: '改革性补贴', name: '改革性补贴', width: 70, align: "center", statistics: true, + children: [ + { label: '交通补贴', name: 'Transportation', width: 70, align: "left", statistics: true }, + { label: '物业补贴', name: 'RealeState', width: 70, align: "left", statistics: true }, + { label: '工改保留补贴', name: 'WorkKeep', width: 90, align: "left", statistics: true }, + { label: '小计', name: 'ReformSubsidySum', width: 70, align: "left", statistics: true } + ] + }, + { label: '住房补贴', name: 'HousingAllowance', width: 80, align: "left", statistics: true }, + { label: '住房公积金', name: 'HousingFundAllowance', width: 80, align: "left", statistics: true }, + { label: '特级教师津贴和乡镇补贴', name: 'TeacherAndTown', width: 130, align: "center", statistics: true }, + { + label: '扣款', name: '扣款', width: 130, align: "center", statistics: true, + children: [ + { label: '小计', name: 'DeductionsSubtotal', width: 70, align: "left", statistics: true }, + { label: '公积金', name: 'AccumulationFund', width: 70, align: "left", statistics: true }, + { label: '工会工费', name: 'LaborUnionWage', width: 70, align: "left", statistics: true }, + { label: '个人所得税', name: 'PersonalIncomeTax', width: 70, align: "left", statistics: true }, + { label: '养老保险', name: 'EndowmentInsurance', width: 70, align: "left", statistics: true }, + { label: '职业年金', name: 'OccupationalAnnuities', width: 70, align: "left", statistics: true }, + { label: '医疗保险', name: 'MedicalInsurance', width: 70, align: "left", statistics: true }, + { label: '失业保险', name: 'UnemploymentInsurance', width: 70, align: "left", statistics: true }, + { label: '其他', name: 'Other', width: 70, align: "left", statistics: true } + ] + }, + { label: '财政直达', name: 'FiscalDirect', width: 70, align: "left", statistics: true }, + { label: '银行代扣', name: 'BankWithholding', width: 70, align: "left", statistics: true }, + { label: '实发合计', name: 'NetCombined', width: 70, align: "left", statistics: true }, + { label: '工资卡号', name: 'WageCardNo', width: 130, align: "left" }, + { label: '创建用户', name: 'CreateUser', width: 70, align: "left" }, + { label: '创建时间', name: 'CreateTime', width: 130, align: "left" }, + { label: '发放月份', name: 'IssueMonth', width: 70, align: "left" }, + { label: '发放年份', name: 'IssueYear', width: 70, align: "left" }, + ], + mainId: 'Id', + isPage: true, + rows: 300, + sidx: 'CreateTime', + }); + 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 b28bdbdec..e201f23f3 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 @@ -877,6 +877,7 @@ + @@ -6939,6 +6940,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/WageScheduleMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/WageScheduleMap.cs new file mode 100644 index 000000000..09520baa8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/WageScheduleMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:54 + /// 描 述:工资条 + /// + public class WageScheduleMap : EntityTypeConfiguration + { + public WageScheduleMap() + { + #region 表、主键 + //表 + this.ToTable("WAGESCHEDULE"); + //主键 + 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 1e664fd1a..e6bbe42ed 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 @@ -635,6 +635,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleBLL.cs new file mode 100644 index 000000000..da246672b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleBLL.cs @@ -0,0 +1,148 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:54 + /// 描 述:工资条 + /// + public class WageScheduleBLL : WageScheduleIBLL + { + private WageScheduleService wageScheduleService = new WageScheduleService(); + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList( string queryJson ) + { + try + { + return wageScheduleService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return wageScheduleService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public WageScheduleEntity GetEntity(string keyValue) + { + try + { + return wageScheduleService.GetEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + wageScheduleService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, WageScheduleEntity entity) + { + try + { + wageScheduleService.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/WageSchedule/WageScheduleEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleEntity.cs new file mode 100644 index 000000000..2851a3904 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleEntity.cs @@ -0,0 +1,302 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.EducationalAdministration + +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:54 + /// 描 述:工资条 + /// + public class WageScheduleEntity + { + #region 实体成员 + /// + /// Id + /// + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 序号 + /// + /// + [Column("NO")] + public string No { get; set; } + /// + /// 姓名 + /// + /// + [Column("EMPNAME")] + public string EmpName { get; set; } + /// + /// 账号/身份证号 + /// + /// + [Column("IDCARDNO")] + public string IdCardNo { get; set; } + /// + /// 人员类别 + /// + /// + [Column("PEOPLETYPE")] + public string PeopleType { get; set; } + /// + /// 岗位等级 + /// + /// + [Column("POSTTYPE")] + public string PostType { get; set; } + /// + /// 薪级 + /// + /// + [Column("PAYGRADE")] + public string PayGrade { get; set; } + /// + /// 应发合计 + /// + /// + [Column("TOTALGROSSPAY")] + public string TotalGrossPay { get; set; } + /// + /// 岗位工资 + /// + /// + [Column("POSTWAGE")] + public decimal? PostWage { get; set; } + /// + /// 薪级工资 + /// + /// + [Column("PAYGRADEWAGE")] + public decimal? PayGradeWage { get; set; } + /// + /// 百分之十 + /// + /// + [Column("TENPERCENT")] + public decimal? TenPercent { get; set; } + /// + /// 基本工资小计 + /// + /// + [Column("BASEPAY")] + public decimal? BasePay { get; set; } + /// + /// 艰边津贴 + /// + /// + [Column("ROUGHEDGEALLOWANCE")] + public decimal? RoughEdgeAllowance { get; set; } + /// + /// 民族津贴 + /// + /// + [Column("NATIONALLOWANCE")] + public decimal? NationAllowance { get; set; } + /// + /// 教师津贴 + /// + /// + [Column("TEACHALLOWANCE")] + public decimal? TeachAllowance { get; set; } + /// + /// 津贴补贴小计 + /// + /// + [Column("SUBSIDIESALLOWANCES")] + public decimal? SubsidiesAllowances { get; set; } + /// + /// 基础性绩效 + /// + /// + [Column("BASICSPERFORMANCE")] + public decimal? BasicsPerformance { get; set; } + /// + /// 女职工卫生费 + /// + /// + [Column("GIRLSTAFFSANITATION")] + public decimal? GirlStaffSanitation { get; set; } + /// + /// 交通补贴 + /// + /// + [Column("TRANSPORTATION")] + public decimal? Transportation { get; set; } + /// + /// 物业补贴 + /// + /// + [Column("REALESTATE")] + public decimal? RealeState { get; set; } + /// + /// 工改保留补贴 + /// + /// + [Column("WORKKEEP")] + public decimal? WorkKeep { get; set; } + /// + /// 改革性补贴小计 + /// + /// + [Column("REFORMSUBSIDYSUM")] + public decimal? ReformSubsidySum { get; set; } + /// + /// 住房补贴 + /// + /// + [Column("HOUSINGALLOWANCE")] + public decimal? HousingAllowance { get; set; } + /// + /// 住房公积金 + /// + /// + [Column("HOUSINGFUNDALLOWANCE")] + public decimal? HousingFundAllowance { get; set; } + /// + /// 特级教师津贴和乡镇补贴 + /// + /// + [Column("TEACHERANDTOWN")] + public decimal? TeacherAndTown { get; set; } + /// + /// 扣款小计 + /// + /// + [Column("DEDUCTIONSSUBTOTAL")] + public decimal? DeductionsSubtotal { get; set; } + /// + /// 公积金 + /// + /// + [Column("ACCUMULATIONFUND")] + public decimal? AccumulationFund { get; set; } + /// + /// 工会工费 + /// + /// + [Column("LABORUNIONWAGE")] + public decimal? LaborUnionWage { get; set; } + /// + /// 个人所得税 + /// + /// + [Column("PERSONALINCOMETAX")] + public decimal? PersonalIncomeTax { get; set; } + /// + /// 养老保险 + /// + /// + [Column("ENDOWMENTINSURANCE")] + public decimal? EndowmentInsurance { get; set; } + /// + /// 职业年金 + /// + /// + [Column("OCCUPATIONALANNUITIES")] + public decimal? OccupationalAnnuities { get; set; } + /// + /// 医疗保险 + /// + /// + [Column("MEDICALINSURANCE")] + public decimal? MedicalInsurance { get; set; } + /// + /// 失业保险 + /// + /// + [Column("UNEMPLOYMENTINSURANCE")] + public decimal? UnemploymentInsurance { get; set; } + /// + /// 其他 + /// + /// + [Column("OTHER")] + public decimal? Other { get; set; } + /// + /// 财政直达 + /// + /// + [Column("FISCALDIRECT")] + public decimal? FiscalDirect { get; set; } + /// + /// 银行代扣 + /// + /// + [Column("BANKWITHHOLDING")] + public decimal? BankWithholding { get; set; } + /// + /// 实发合计 + /// + /// + [Column("NETCOMBINED")] + public decimal? NetCombined { get; set; } + /// + /// 工资卡号 + /// + /// + [Column("WAGECARDNO")] + public string WageCardNo { get; set; } + /// + /// CreateUser + /// + /// + [Column("CREATEUSER")] + public string CreateUser { get; set; } + /// + /// CreateTime + /// + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// UpdateUser + /// + /// + [Column("UPDATEUSER")] + public string UpdateUser { get; set; } + /// + /// UpdateTime + /// + /// + [Column("UPDATETIME")] + public DateTime? UpdateTime { get; set; } + /// + /// 发放月份 + /// + /// + [Column("ISSUEMONTH")] + public string IssueMonth { get; set; } + /// + /// 发放年份 + /// + /// + [Column("ISSUEYEAR")] + public string IssueYear { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleIBLL.cs new file mode 100644 index 000000000..d1895dbd8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleIBLL.cs @@ -0,0 +1,55 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:54 + /// 描 述:工资条 + /// + public interface WageScheduleIBLL + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList( string queryJson ); + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取实体数据 + /// + /// 主键 + /// + WageScheduleEntity GetEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, WageScheduleEntity entity); + #endregion + + } +} 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 new file mode 100644 index 000000000..09236daf9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WageSchedule/WageScheduleService.cs @@ -0,0 +1,198 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 11:54 + /// 描 述:工资条 + /// + public class WageScheduleService : RepositoryFactory + { + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 条件参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + //参考写法 + //var queryParam = queryJson.ToJObject(); + // 虚拟参数 + //var dp = new DynamicParameters(new { }); + //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append("t.*"); + strSql.Append(" FROM WageSchedule t "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* FROM WageSchedule t where 1=1 "); + var userInfo = LoginUserInfo.Get(); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (userInfo.Description != "管理员") + { + strSql.Append(" AND t.IdCardNo = " + userInfo.IdentityCardNo + " "); + } + if (!queryParam["EmpName"].IsEmpty()) + { + dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.EmpName like @EmpName "); + } + if (!queryParam["PeopleType"].IsEmpty()) + { + dp.Add("PeopleType", "%" + queryParam["PeopleType"].ToString() + "%", DbType.String); + strSql.Append(" AND t.PeopleType like @PeopleType "); + } + if (!queryParam["IssueMonth"].IsEmpty()) + { + dp.Add("IssueMonth", queryParam["IssueMonth"].ToString(), DbType.String); + strSql.Append(" AND t.IssueMonth = IssueMonth "); + } + if (!queryParam["IssueYear"].IsEmpty()) + { + dp.Add("IssueYear", queryParam["IssueYear"].ToString(), DbType.String); + strSql.Append(" AND t.IssueYear = IssueYear "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public WageScheduleEntity GetEntity(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, WageScheduleEntity 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 ae26c240b..0dd52f7c9 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 @@ -1963,6 +1963,10 @@ + + + + From d53ee2d541ffa12c3927a826defa4082af6b8ee3 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 8 Nov 2022 10:21:38 +0800 Subject: [PATCH 04/38] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E6=9D=A1=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.WebApi.csproj | 3 + .../Modules/OuoutsourcingApi.cs | 64 +++++++++++++++++++ .../Modules/WageScheduleApi.cs | 64 +++++++++++++++++++ .../Modules/WelfarePositionApi.cs | 64 +++++++++++++++++++ 4 files changed, 195 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OuoutsourcingApi.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WageScheduleApi.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WelfarePositionApi.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj index 0d2a2619b..93fd1d6c5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj @@ -203,6 +203,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OuoutsourcingApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OuoutsourcingApi.cs new file mode 100644 index 000000000..932938868 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OuoutsourcingApi.cs @@ -0,0 +1,64 @@ +using Nancy; +using Learun.Util; +using System.Collections.Generic; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using static Learun.Application.WebApi.Modules.StuInfoFreshApi; +using System; +using System.IO; +using System.Linq; +using Learun.Application.Base.SystemModule; +using Learun.Application.OA; +using Learun.Application.OA.File.FileInfo; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using Learun.Application.TwoDevelopment.LR_Desktop; +using Learun.Application.WorkFlow; +using Microsoft.Ajax.Utilities; + +namespace Learun.Application.WebApi +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 力软敏捷开发框架 + /// Copyright (c) 2013-2018 上海力软信息技术有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-08-19 17:50 + /// 描 述:工资条 + /// + + public class OuoutsourcingApi : BaseApi + { + + private OuoutsourcingIBLL ououtsourcingIBLL = new OuoutsourcingBLL(); + + /// + /// 一卡通接口 + /// + public OuoutsourcingApi() + : base("/Learun/adms/Ououtsourcing") + { + Get["/getlist"] = GetList; + } + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = ououtsourcingIBLL.GetPageList(parameter.pagination, parameter.queryJson); + var jsonData = new + { + rows = data, + total = parameter.pagination.total, + page = parameter.pagination.page, + records = parameter.pagination.records + }; + return Success(jsonData); + } + + #endregion + } + +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WageScheduleApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WageScheduleApi.cs new file mode 100644 index 000000000..8fd221624 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WageScheduleApi.cs @@ -0,0 +1,64 @@ +using Nancy; +using Learun.Util; +using System.Collections.Generic; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using static Learun.Application.WebApi.Modules.StuInfoFreshApi; +using System; +using System.IO; +using System.Linq; +using Learun.Application.Base.SystemModule; +using Learun.Application.OA; +using Learun.Application.OA.File.FileInfo; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using Learun.Application.TwoDevelopment.LR_Desktop; +using Learun.Application.WorkFlow; +using Microsoft.Ajax.Utilities; + +namespace Learun.Application.WebApi +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 力软敏捷开发框架 + /// Copyright (c) 2013-2018 上海力软信息技术有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-08-19 17:50 + /// 描 述:工资条 + /// + + public class WageScheduleApi : BaseApi + { + + private WageScheduleIBLL wageScheduleIBLL = new WageScheduleBLL(); + + /// + /// 一卡通接口 + /// + public WageScheduleApi() + : base("/Learun/adms/WageSchedule") + { + Get["/getlist"] = GetList; + } + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = wageScheduleIBLL.GetPageList(parameter.pagination, parameter.queryJson); + var jsonData = new + { + rows = data, + total = parameter.pagination.total, + page = parameter.pagination.page, + records = parameter.pagination.records + }; + return Success(jsonData); + } + + #endregion + } + +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WelfarePositionApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WelfarePositionApi.cs new file mode 100644 index 000000000..62fcbd0fe --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WelfarePositionApi.cs @@ -0,0 +1,64 @@ +using Nancy; +using Learun.Util; +using System.Collections.Generic; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using static Learun.Application.WebApi.Modules.StuInfoFreshApi; +using System; +using System.IO; +using System.Linq; +using Learun.Application.Base.SystemModule; +using Learun.Application.OA; +using Learun.Application.OA.File.FileInfo; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using Learun.Application.TwoDevelopment.LR_Desktop; +using Learun.Application.WorkFlow; +using Microsoft.Ajax.Utilities; + +namespace Learun.Application.WebApi +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 力软敏捷开发框架 + /// Copyright (c) 2013-2018 上海力软信息技术有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-08-19 17:50 + /// 描 述:工资条 + /// + + public class WelfarePositionApi : BaseApi + { + + private WelfarePositionIBLL WelfarePositionIBLL = new WelfarePositionBLL(); + + /// + /// 一卡通接口 + /// + public WelfarePositionApi() + : base("/Learun/adms/WelfarePosition") + { + Get["/getlist"] = GetList; + } + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = WelfarePositionIBLL.GetPageList(parameter.pagination, parameter.queryJson); + var jsonData = new + { + rows = data, + total = parameter.pagination.total, + page = parameter.pagination.page, + records = parameter.pagination.records + }; + return Success(jsonData); + } + + #endregion + } + +} \ No newline at end of file From 89fc88ccccbb9b75403fd876669b632c4f6ab123 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 8 Nov 2022 11:02:24 +0800 Subject: [PATCH 05/38] =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Login/Default/Index.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js index aa71f1ff5..cb0246620 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js @@ -176,28 +176,28 @@ success: function (res) { if (res.code == 200) { if (source == "noLogin") { - window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index"; - //window.location.href = "/SSOSystem/Index"; + //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index"; + window.location.href = "/SSOSystem/Index"; } else if (source == "NoLogin") { - window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne"; - //window.location.href = "/SSOSystem/DragModelOne"; + //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne"; + window.location.href = "/SSOSystem/DragModelOne"; } else { if (res.data.pwd == true) { if (res.data.pwdtip == true) { - window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdpwdtip=true"; - //window.location.href = "/Home/Index?pwdpwdtip=true"; + //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdpwdtip=true"; + window.location.href = "/Home/Index?pwdpwdtip=true"; } else { - window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true"; - //window.location.href ="/Home/Index?pwd=true"; + //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true"; + window.location.href = "/Home/Index?pwd=true"; } } else { if (res.data.pwdtip == true) { - window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdtip=true"; - //window.location.href ="/Home/Index?pwdtip=true"; + //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdtip=true"; + window.location.href = "/Home/Index?pwdtip=true"; } else { - window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index"; - //window.location.href = "/Home/Index"; + //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index"; + window.location.href = "/Home/Index"; } //window.location.href = "/Home/Index"; } From 5832b537926517a9654c29f9284cbcef20383025 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 8 Nov 2022 16:51:39 +0800 Subject: [PATCH 06/38] =?UTF-8?q?=E4=BD=93=E8=82=B2=E5=99=A8=E6=9D=90?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/SportEquipmentController.cs | 117 +++++++++++++ .../Views/SportEquipment/Form.cshtml | 27 +++ .../Views/SportEquipment/Form.js | 50 ++++++ .../Views/SportEquipment/Index.cshtml | 44 +++++ .../Views/SportEquipment/Index.js | 96 +++++++++++ .../Learun.Application.Web.csproj | 5 + .../SportEquipmentMap.cs | 29 ++++ .../Learun.Application.Mapping.csproj | 1 + .../SportEquipment/SportEquipmentBLL.cs | 125 ++++++++++++++ .../SportEquipment/SportEquipmentEntity.cs | 96 +++++++++++ .../SportEquipment/SportEquipmentIBLL.cs | 48 ++++++ .../SportEquipment/SportEquipmentService.cs | 157 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 799 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SportEquipmentController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SportEquipmentMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SportEquipmentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SportEquipmentController.cs new file mode 100644 index 000000000..d1fb7d504 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SportEquipmentController.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 15:35 + /// 描 述:体育器材库存管理 + /// + public class SportEquipmentController : MvcControllerBase + { + private SportEquipmentIBLL sportEquipmentIBLL = new SportEquipmentBLL(); + + #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 = sportEquipmentIBLL.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 SportEquipmentData = sportEquipmentIBLL.GetSportEquipmentEntity( keyValue ); + var jsonData = new { + SportEquipment = SportEquipmentData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + sportEquipmentIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + SportEquipmentEntity entity = strEntity.ToObject(); + sportEquipmentIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Form.cshtml new file mode 100644 index 000000000..7f1d24dc5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Form.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "体育器材库存管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
实训室名称*
+ +
+
+
器材名称*
+ +
+
+
器材型号*
+ +
+
+
现存*
+ +
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SportEquipment/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Form.js new file mode 100644 index 000000000..bcb460e02 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Form.js @@ -0,0 +1,50 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-08 15:35 + * 描 述:体育器材库存管理 + */ +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/SportEquipment/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/SportEquipment/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Index.cshtml new file mode 100644 index 000000000..e6ce3e239 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Index.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "体育器材库存管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
实训室名称
+ +
+
+
器材名称
+ +
+
+
器材型号
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SportEquipment/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Index.js new file mode 100644 index 000000000..e902a9ba0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SportEquipment/Index.js @@ -0,0 +1,96 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-08 15:35 + * 描 述:体育器材库存管理 + */ +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/SportEquipment/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/SportEquipment/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/SportEquipment/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/SportEquipment/GetPageList', + headData: [ + { label: "实训室名称", name: "TrainingName", width: 200, align: "left" }, + { label: "器材名称", name: "EquipmentName", width: 200, align: "left" }, + { label: "器材型号", name: "EquipmentModel", width: 300, align: "left" }, + { label: "现存", name: "Stock", width: 150, align: "left" }, + { label: "备注", name: "Remark", width: 300, align: "left" }, + { label: "创建时间", name: "CreateTime", width: 140, align: "left" }, + { label: "创建用户", name: "CreateUser", width: 100, align: "left" }, + { label: "修改时间", name: "UpdateTime", width: 140, align: "left" }, + { label: "修改用户", name: "UpdateUser", width: 100, align: "left" }, + ], + mainId: 'ID', + sidx: 'CreateTime', + 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 2d23ef3cf..3b0b89afd 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 @@ -880,6 +880,7 @@ + @@ -6958,6 +6959,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SportEquipmentMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SportEquipmentMap.cs new file mode 100644 index 000000000..cad6a71a6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SportEquipmentMap.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 15:35 + /// 描 述:体育器材库存管理 + /// + public class SportEquipmentMap : EntityTypeConfiguration + { + public SportEquipmentMap() + { + #region 表、主键 + //表 + this.ToTable("SPORTEQUIPMENT"); + //主键 + 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 6a69277ee..ef3963417 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 @@ -638,6 +638,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentBLL.cs new file mode 100644 index 000000000..b1c9fd0a9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentBLL.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 15:35 + /// 描 述:体育器材库存管理 + /// + public class SportEquipmentBLL : SportEquipmentIBLL + { + private SportEquipmentService sportEquipmentService = new SportEquipmentService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return sportEquipmentService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取SportEquipment表实体数据 + /// + /// 主键 + /// + public SportEquipmentEntity GetSportEquipmentEntity(string keyValue) + { + try + { + return sportEquipmentService.GetSportEquipmentEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + sportEquipmentService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, SportEquipmentEntity entity) + { + try + { + sportEquipmentService.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/SportEquipment/SportEquipmentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentEntity.cs new file mode 100644 index 000000000..1c2e19c9a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentEntity.cs @@ -0,0 +1,96 @@ +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 15:35 + /// 描 述:体育器材库存管理 + /// + public class SportEquipmentEntity + { + #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; } + /// + /// Stock + /// + [Column("STOCK")] + public decimal? Stock { get; set; } + /// + /// Remark + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// CreateUser + /// + [Column("CREATEUSER")] + public string CreateUser { get; set; } + /// + /// UpdateTime + /// + [Column("UPDATETIME")] + public DateTime? UpdateTime { get; set; } + /// + /// UpdateUser + /// + [Column("UPDATEUSER")] + public string UpdateUser { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + UserInfo userInfo = LoginUserInfo.Get(); + this.CreateTime = DateTime.Now; + this.CreateUser = userInfo.realName; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + UserInfo userInfo = LoginUserInfo.Get(); + this.UpdateTime = DateTime.Now; + this.UpdateUser = userInfo.realName; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentIBLL.cs new file mode 100644 index 000000000..90aa1ffc7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentIBLL.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 15:35 + /// 描 述:体育器材库存管理 + /// + public interface SportEquipmentIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取SportEquipment表实体数据 + /// + /// 主键 + /// + SportEquipmentEntity GetSportEquipmentEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, SportEquipmentEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentService.cs new file mode 100644 index 000000000..e9b5b5475 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SportEquipment/SportEquipmentService.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 15:35 + /// 描 述:体育器材库存管理 + /// + public class SportEquipmentService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@"t.* "); + strSql.Append(" FROM SportEquipment 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); + } + } + } + + /// + /// 获取SportEquipment表实体数据 + /// + /// 主键 + /// + public SportEquipmentEntity GetSportEquipmentEntity(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, SportEquipmentEntity 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 fceed143c..f3e4763a5 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 @@ -1975,6 +1975,10 @@ + + + + From a801ae8f589d05e2c9ec94af1f4c4add354123e4 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 8 Nov 2022 17:27:27 +0800 Subject: [PATCH 07/38] =?UTF-8?q?=E7=BB=8F=E8=B4=B9=E5=BC=80=E6=94=AF?= =?UTF-8?q?=E7=94=B3=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/FundsApplyController.cs | 134 ++++++++++ .../Controllers/FundsApplyDetailController.cs | 117 +++++++++ .../Views/FundsApply/Form.cshtml | 48 ++++ .../Views/FundsApply/Form.js | 236 ++++++++++++++++++ .../Views/FundsApply/Index.cshtml | 27 ++ .../Views/FundsApply/Index.js | 143 +++++++++++ .../Views/FundsApplyDetail/Form.cshtml | 23 ++ .../Views/FundsApplyDetail/Form.js | 79 ++++++ .../Views/FundsApplyDetail/Index.cshtml | 27 ++ .../Views/FundsApplyDetail/Index.js | 91 +++++++ .../Learun.Application.Web.csproj | 10 + .../FundsApplyDetailMap.cs | 29 +++ .../AssetManagementSystem/FundsApplyMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 2 + .../FundsApply/FundsApplyBLL.cs | 148 +++++++++++ .../FundsApply/FundsApplyEntity.cs | 90 +++++++ .../FundsApply/FundsApplyIBLL.cs | 55 ++++ .../FundsApply/FundsApplyService.cs | 169 +++++++++++++ .../FundsApplyDetail/FundsApplyDetailBLL.cs | 125 ++++++++++ .../FundsApplyDetailEntity.cs | 70 ++++++ .../FundsApplyDetail/FundsApplyDetailIBLL.cs | 48 ++++ .../FundsApplyDetailService.cs | 148 +++++++++++ .../Learun.Application.TwoDevelopment.csproj | 8 + 23 files changed, 1856 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyDetailController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/FundsApplyDetailMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/FundsApplyMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs new file mode 100644 index 000000000..76c79dc0a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs @@ -0,0 +1,134 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.AssetManagementSystem; +using System.Web.Mvc; +using Learun.Application.TwoDevelopment.LR_CodeDemo; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 14:25 + /// 描 述:经费开支申报 + /// + public class FundsApplyController : MvcControllerBase + { + private FundsApplyIBLL fundsApplyIBLL = new FundsApplyBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + ViewBag.EnCode = "JFKZ_" + CommonHelper.CreateNo(); + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = fundsApplyIBLL.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 FundsApplyData = fundsApplyIBLL.GetFundsApplyEntity( keyValue ); + var jsonData = new { + FundsApply = FundsApplyData, + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 流程实例主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormDataByProcessId(string processId) + { + var FundsApplyData = fundsApplyIBLL.GetEntityByProcessId( processId ); + var jsonData = new { + FundsApply = FundsApplyData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + fundsApplyIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + FundsApplyEntity entity = strEntity.ToObject(); + fundsApplyIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyDetailController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyDetailController.cs new file mode 100644 index 000000000..95999d54b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyDetailController.cs @@ -0,0 +1,117 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.AssetManagementSystem; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 12:26 + /// 描 述:经费申报明细 + /// + public class FundsApplyDetailController : MvcControllerBase + { + private FundsApplyDetailIBLL fundsApplyDetailIBLL = new FundsApplyDetailBLL(); + + #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 = fundsApplyDetailIBLL.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 FundsApplyDetailData = fundsApplyDetailIBLL.GetFundsApplyDetailEntity( keyValue ); + var jsonData = new { + FundsApplyDetail = FundsApplyDetailData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + fundsApplyDetailIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + FundsApplyDetailEntity entity = strEntity.ToObject(); + fundsApplyDetailIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.cshtml new file mode 100644 index 000000000..a4bd971e6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.cshtml @@ -0,0 +1,48 @@ +@{ + ViewBag.Title = "经费开支申报"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+ +
+
申报单号
+ +
+
+
申报部门
+
+
+
+
填报时间
+ +
+
+
填报人
+ +
+
+ @*
备注
*@ + +
+
+
总金额
+ +
+
+
人民币(大写)
+ +
+
+
明细操作
+ + + +
+
+
+
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/FundsApply/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js new file mode 100644 index 000000000..61729de56 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js @@ -0,0 +1,236 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 14:25 + * 描 述:经费开支申报 + */ +var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var refreshGirdData; +var acceptClick; +var selectedRow; +var tempdatra = new Array(); +//总价计算 +var pricecount = 0; +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(); + $("#detailadd").on('click', function () { + selectedRow = null; + learun.layerForm({ + id: 'formdetail', + title: '新增明细', + url: top.$.rootUrl + '/AssetManagementSystem/FundsApplyDetail/Form', + width: 500, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + $("#detailedit").on('click', function () { + var keyValue = $('#FundsApplyDetail').jfGridValue('Id'); + selectedRow = $('#FundsApplyDetail').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formdetail', + title: '编辑明细', + url: top.$.rootUrl + '/AssetManagementSystem/FundsApplyDetail/Form?keyValue=' + keyValue, + width: 500, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + $("#detaildel").on('click', function () { + var keyValue = $('#FundsApplyDetail').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res, index) { + if (res) { + $.each(tempdatra, function (key, val) { + if (tempdatra[key].Id === keyValue) { + pricecount -= tempdatra[key].Amount; + tempdatra.splice(key, 1); + } + }); + $("#SumAmount").val(pricecount); + $("#UpperAmount").val(smalltoBIG(pricecount)); + $('#FundsApplyDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); + top.layer.close(index); + } + }); + } + }); + + page.bind(); + page.initData(); + }, + bind: function () { + $('#ApplyDept').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); + $('#ApplyDept').lrselectSet(learun.clientdata.get(['userinfo']).departmentId); + $('#ApplyTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); + $('#ApplyUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; + $('#ApplyUser').val(learun.clientdata.get(['userinfo']).realName); + $('#FundsApplyDetail').jfGrid({ + headData: [ + { + label: '项目内容', name: 'ProjectContent', width: 150, align: 'left' + }, + { + label: '数量', name: 'Number', width: 150, align: 'left' + }, + { + label: '单价(元)', name: 'Price', width: 150, align: 'left' + }, + { + label: '金额(元)', name: 'Amount', width: 150, align: 'left' + }, + ], + height: 400, + mainId: 'AAIId', + reloadSelected: false, + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/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]); + } + } + }); + } else { + $("#EnCode").val(NewEnCode); + } + } + }; + refreshGirdData = function (temprow) { + var ifnewrow = true; + $.each(tempdatra, function (key, val) { + if (tempdatra[key].Id === temprow.Id) { + tempdatra[key] = temprow; + ifnewrow = false; + } + }); + if (ifnewrow) { + tempdatra.push(temprow); + } + //总价计算 + pricecount = 0; + for (var i = 0; i < tempdatra.length; i++) { + pricecount += parseFloat(tempdatra[i].Amount); + } + $("#SumAmount").val(pricecount); + $("#UpperAmount").val(smalltoBIG(pricecount)); + $('#FundsApplyDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); + }; + function sortNumber(a, b) { + return a.AAIOrder - b.AAIOrder; + } + // 设置表单数据 + setFormData = function (processId, param, callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/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 == 'FundsApply' && 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 postData = {}; + var formData = $('[data-table="FundsApply"]').lrGetFormData(); + if (!!processId) { + formData.ProcessId = processId; + } + postData.strEntity = JSON.stringify(formData); + postData.FundsApplyDetailList = JSON.stringify($('#FundsApplyDetail').jfGridGet('rowdatas')); + + $.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, i); + } + }); + }; + page.init(); + function smalltoBIG(n) { + var fraction = ['角', '分']; + var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; + var unit = [ + ['元', '万', '亿'], + ['', '拾', '佰', '仟'] + ]; + var head = n < 0 ? '欠' : ''; + n = Math.abs(n); + + var s = ''; + + for (var i = 0; i < fraction.length; i++) { + s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, ''); + } + s = s || '整'; + n = Math.floor(n); + + for (var i = 0; i < unit[0].length && n > 0; i++) { + var p = ''; + for (var j = 0; j < unit[1].length && n > 0; j++) { + p = digit[n % 10] + unit[1][j] + p; + n = Math.floor(n / 10); + } + s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s; + } + return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整'); + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml new file mode 100644 index 000000000..dd563c3ab --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "经费开支申报"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/FundsApply/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js new file mode 100644 index 000000000..5766bbf48 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js @@ -0,0 +1,143 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 14:25 + * 描 述:经费开支申报 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'formFundsApply', + title: '申请', + url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/Form', + width: 860, + height: 600, + 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)) { + learun.layerForm({ + id: 'formFundsApply', + title: '编辑', + url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/Form?keyValue=' + keyValue, + width: 860, + height: 600, + 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)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/GetPageList', + headData: [ + { label: "申报单号", name: "EnCode", width: 100, align: "left" }, + { label: "申报部门", name: "ApplyDept", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('department', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + }}, + { label: "填报时间", name: "ApplyTime", width: 100, align: "left"}, + { label: "填报人", name: "ApplyUser", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + }}, + { label: "备注", name: "Remark", width: 100, align: "left"}, + { label: "总金额", name: "SumAmount", width: 100, align: "left"}, + { label: "人民币(大写)", name: "UpperAmount", width: 100, align: "left"}, + ], + mainId:'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (!!res) + { + if (res.code == 200) + { + // 发起流程 + var postData = { + schemeCode:'',// 填写流程对应模板编号 + 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/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.cshtml new file mode 100644 index 000000000..e65943f99 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "经费申报明细"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
项目内容*
+ +
+
+
数量*
+ +
+
+
单价(元)*
+ +
+
+
金额(元)
+ +
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js new file mode 100644 index 000000000..86e3c8d85 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js @@ -0,0 +1,79 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 12:26 + * 描 述:经费申报明细 + */ +var acceptClick; +var keyValue = request('keyValue'); +var selectedRow; +var bootstrap = function ($, learun) { + "use strict"; + selectedRow = top["layer_formFundsApply"].selectedRow; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('.calcul').blur(function () { + var num = $('#Number').val(); + var Price = $('#Price').val(); + if (!!num && !!Price) { + $('#Amount').val(parseInt(num) * parseFloat(Price)); + } + }); + }, + initData: function () { + if (!!keyValue) { + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); + //$("#AAOldCode").find('span').text(selectedRow.AAIName); + } + } + //if (!!keyValue) { + // $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/FundsApplyDetail/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 = $('body').lrGetFormData(); + if (!!keyValue) { + if (!!selectedRow) { + postData.Id = selectedRow.Id; + } + } else { + postData.Id = learun.newGuid(); + } + if (!!callBack) { + callBack(postData); + return true; + } + //var postData = { + // strEntity: JSON.stringify($('body').lrGetFormData()) + //}; + //$.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/FundsApplyDetail/SaveForm?keyValue=' + keyValue, postData, function (res) { + // // 保存成功后才回调 + // if (!!callBack) { + // callBack(); + // } + //}); + }; + page.init(); + + +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Index.cshtml new file mode 100644 index 000000000..c2f012dcf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Index.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "经费申报明细"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/FundsApplyDetail/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Index.js new file mode 100644 index 000000000..50342f841 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Index.js @@ -0,0 +1,91 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 12:26 + * 描 述:经费申报明细 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/AssetManagementSystem/FundsApplyDetail/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 + '/AssetManagementSystem/FundsApplyDetail/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 + '/AssetManagementSystem/FundsApplyDetail/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/AssetManagementSystem/FundsApplyDetail/GetPageList', + headData: [ + { label: "项目内容", name: "ProjectContent", width: 100, align: "left"}, + { label: "数量", name: "Number", width: 100, align: "left"}, + { label: "单价(元)", name: "Price", width: 100, align: "left"}, + { label: "金额(元)", name: "Amount", width: 100, align: "left"}, + ], + mainId:'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index b28bdbdec..818d9e8e6 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 @@ -877,6 +877,8 @@ + + @@ -6939,6 +6941,14 @@ + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/FundsApplyDetailMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/FundsApplyDetailMap.cs new file mode 100644 index 000000000..61c848721 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/FundsApplyDetailMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.AssetManagementSystem; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 12:26 + /// 描 述:经费申报明细 + /// + public class FundsApplyDetailMap : EntityTypeConfiguration + { + public FundsApplyDetailMap() + { + #region 表、主键 + //表 + this.ToTable("FUNDSAPPLYDETAIL"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/FundsApplyMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/FundsApplyMap.cs new file mode 100644 index 000000000..47f38ebe4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/FundsApplyMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.AssetManagementSystem; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 14:25 + /// 描 述:经费开支申报 + /// + public class FundsApplyMap : EntityTypeConfiguration + { + public FundsApplyMap() + { + #region 表、主键 + //表 + this.ToTable("FUNDSAPPLY"); + //主键 + 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 1e664fd1a..e768a96aa 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 @@ -635,6 +635,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyBLL.cs new file mode 100644 index 000000000..981de1559 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyBLL.cs @@ -0,0 +1,148 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.AssetManagementSystem +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 14:25 + /// 描 述:经费开支申报 + /// + public class FundsApplyBLL : FundsApplyIBLL + { + private FundsApplyService fundsApplyService = new FundsApplyService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return fundsApplyService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取FundsApply表实体数据 + /// + /// 主键 + /// + public FundsApplyEntity GetFundsApplyEntity(string keyValue) + { + try + { + return fundsApplyService.GetFundsApplyEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public FundsApplyEntity GetEntityByProcessId(string processId) + { + try + { + return fundsApplyService.GetEntityByProcessId(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + fundsApplyService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, FundsApplyEntity entity) + { + try + { + fundsApplyService.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/AssetManagementSystem/FundsApply/FundsApplyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyEntity.cs new file mode 100644 index 000000000..d530ec7fc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyEntity.cs @@ -0,0 +1,90 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.AssetManagementSystem +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 14:25 + /// 描 述:经费开支申报 + /// + public class FundsApplyEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 编号 + /// + [Column("ENCODE")] + public string EnCode { get; set; } + /// + /// ApplyTime + /// + [Column("APPLYTIME")] + public DateTime? ApplyTime { get; set; } + /// + /// ApplyDept + /// + [Column("APPLYDEPT")] + public string ApplyDept { get; set; } + /// + /// ApplyUser + /// + [Column("APPLYUSER")] + public string ApplyUser { get; set; } + /// + /// SumAmount + /// + [Column("SUMAMOUNT")] + public decimal? SumAmount { get; set; } + /// + /// 人民币大写 + /// + [Column("UPPERAMOUNT")] + public string UpperAmount { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 流程Id + /// + [Column("PROCESSID")] + public string ProcessId { get; set; } + /// + /// 状态 + /// + [Column("STATUS")] + public int? Status { 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/AssetManagementSystem/FundsApply/FundsApplyIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyIBLL.cs new file mode 100644 index 000000000..0aa366d15 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyIBLL.cs @@ -0,0 +1,55 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.AssetManagementSystem +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 14:25 + /// 描 述:经费开支申报 + /// + public interface FundsApplyIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取FundsApply表实体数据 + /// + /// 主键 + /// + FundsApplyEntity GetFundsApplyEntity(string keyValue); + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + FundsApplyEntity GetEntityByProcessId(string processId); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, FundsApplyEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs new file mode 100644 index 000000000..14b5b3a7e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs @@ -0,0 +1,169 @@ +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.AssetManagementSystem +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 14:25 + /// 描 述:经费开支申报 + /// + public class FundsApplyService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM FundsApply t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取FundsApply表实体数据 + /// + /// 主键 + /// + public FundsApplyEntity GetFundsApplyEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public FundsApplyEntity 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); + } + } + } + + #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, FundsApplyEntity 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/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs new file mode 100644 index 000000000..ed08fc2b6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs @@ -0,0 +1,125 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.AssetManagementSystem +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 12:26 + /// 描 述:经费申报明细 + /// + public class FundsApplyDetailBLL : FundsApplyDetailIBLL + { + private FundsApplyDetailService fundsApplyDetailService = new FundsApplyDetailService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return fundsApplyDetailService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取FundsApplyDetail表实体数据 + /// + /// 主键 + /// + public FundsApplyDetailEntity GetFundsApplyDetailEntity(string keyValue) + { + try + { + return fundsApplyDetailService.GetFundsApplyDetailEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + fundsApplyDetailService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, FundsApplyDetailEntity entity) + { + try + { + fundsApplyDetailService.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/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailEntity.cs new file mode 100644 index 000000000..48ac73593 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailEntity.cs @@ -0,0 +1,70 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.AssetManagementSystem +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 12:26 + /// 描 述:经费申报明细 + /// + public class FundsApplyDetailEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 主表Id + /// + [Column("APPLYID")] + public string ApplyId { get; set; } + /// + /// 项目内容 + /// + [Column("PROJECTCONTENT")] + public string ProjectContent { get; set; } + /// + /// 数量 + /// + [Column("NUMBER")] + public int? Number { get; set; } + /// + /// 单价 + /// + [Column("PRICE")] + public decimal? Price { get; set; } + /// + /// 金额(数量*单价) + /// + [Column("AMOUNT")] + public decimal? Amount { 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/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailIBLL.cs new file mode 100644 index 000000000..1154b4ec0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailIBLL.cs @@ -0,0 +1,48 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.AssetManagementSystem +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 12:26 + /// 描 述:经费申报明细 + /// + public interface FundsApplyDetailIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取FundsApplyDetail表实体数据 + /// + /// 主键 + /// + FundsApplyDetailEntity GetFundsApplyDetailEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, FundsApplyDetailEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs new file mode 100644 index 000000000..27a70d4ef --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs @@ -0,0 +1,148 @@ +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.AssetManagementSystem +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-07 12:26 + /// 描 述:经费申报明细 + /// + public class FundsApplyDetailService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.Id, + t.ProjectContent, + t.Number, + t.Price, + t.Amount + "); + strSql.Append(" FROM FundsApplyDetail t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取FundsApplyDetail表实体数据 + /// + /// 主键 + /// + public FundsApplyDetailEntity GetFundsApplyDetailEntity(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, FundsApplyDetailEntity 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 ae26c240b..fbb0f8938 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 @@ -1963,6 +1963,14 @@ + + + + + + + + From fb9eac7317a38189d377bb42066d464ae1641a32 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 8 Nov 2022 17:29:31 +0800 Subject: [PATCH 08/38] =?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 09/38] =?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 10/38] =?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 11/38] =?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 12/38] =?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 13/38] =?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 14/38] 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 15/38] =?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 16/38] =?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 17/38] =?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 18/38] =?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); + } + } + } +} From 9d7fa42f50c7feb35ecc7a422ec4b4d05dcf9a0a Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Wed, 9 Nov 2022 18:26:28 +0800 Subject: [PATCH 20/38] =?UTF-8?q?=E7=BB=8F=E8=B4=B9=E5=BC=80=E6=94=AF?= =?UTF-8?q?=E7=94=B3=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/FundsApplyController.cs | 40 ++- .../Views/FundsApply/Form.cshtml | 8 +- .../Views/FundsApply/Form.js | 12 +- .../Views/FundsApply/FormView.cshtml | 52 ++++ .../Views/FundsApply/FormView.js | 242 ++++++++++++++++++ .../Views/FundsApply/Index.cshtml | 1 + .../Views/FundsApply/Index.js | 46 +++- .../Views/FundsApplyDetail/Form.js | 2 +- .../Learun.Application.Web.csproj | 2 + .../XmlConfig/ioc.config | 2 + .../FundsApply/FundsApplyBLL.cs | 41 ++- .../FundsApply/FundsApplyEntity.cs | 6 + .../FundsApply/FundsApplyIBLL.cs | 9 +- .../FundsApply/FundsApplyService.cs | 62 ++++- .../FundsApplyDetail/FundsApplyDetailBLL.cs | 18 ++ .../FundsApplyDetail/FundsApplyDetailIBLL.cs | 1 + .../FundsApplyDetailService.cs | 24 +- .../Learun.Application.WorkFlow.csproj | 1 + .../NodeMethod/FundsApplyMethod.cs | 27 ++ 19 files changed, 570 insertions(+), 26 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/FormView.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/FormView.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/FundsApplyMethod.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs index 76c79dc0a..da27d80a3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs @@ -17,6 +17,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers public class FundsApplyController : MvcControllerBase { private FundsApplyIBLL fundsApplyIBLL = new FundsApplyBLL(); + private FundsApplyDetailIBLL fundsApplyDetailIBLL = new FundsApplyDetailBLL(); #region 视图功能 @@ -27,7 +28,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -39,6 +40,12 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers ViewBag.EnCode = "JFKZ_" + CommonHelper.CreateNo(); return View(); } + + [HttpGet] + public ActionResult FormView() + { + return View(); + } #endregion #region 获取数据 @@ -73,9 +80,12 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var FundsApplyData = fundsApplyIBLL.GetFundsApplyEntity( keyValue ); - var jsonData = new { + var FundsApplyData = fundsApplyIBLL.GetFundsApplyEntity(keyValue); + var FundsApplyDetailData = fundsApplyDetailIBLL.GetListByApplyId(keyValue); + var jsonData = new + { FundsApply = FundsApplyData, + FundsApplyDetail = FundsApplyDetailData, }; return Success(jsonData); } @@ -88,8 +98,9 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [AjaxOnly] public ActionResult GetFormDataByProcessId(string processId) { - var FundsApplyData = fundsApplyIBLL.GetEntityByProcessId( processId ); - var jsonData = new { + var FundsApplyData = fundsApplyIBLL.GetEntityByProcessId(processId); + var jsonData = new + { FundsApply = FundsApplyData, }; return Success(jsonData); @@ -119,15 +130,30 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [HttpPost] [ValidateAntiForgeryToken] [AjaxOnly] - public ActionResult SaveForm(string keyValue, string strEntity) + public ActionResult SaveForm(string keyValue, string strEntity, string fundsApplyDetailList) { FundsApplyEntity entity = strEntity.ToObject(); - fundsApplyIBLL.SaveEntity(keyValue,entity); + List detailList = fundsApplyDetailList.ToObject>(); + fundsApplyIBLL.SaveEntity(keyValue, entity, detailList); if (string.IsNullOrEmpty(keyValue)) { } return Success("保存成功!"); } + + /// + /// 提交 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult ChangeStatusById(string keyValue, string processId) + { + fundsApplyIBLL.ChangeStatusById(keyValue, 1, processId); + return Success("操作成功!"); + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.cshtml index a4bd971e6..907fcd77e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.cshtml @@ -7,7 +7,7 @@
-
+
申报单号
@@ -19,12 +19,16 @@
填报时间
+
+
是否固定资产
+
+
填报人
- @*
备注
*@ +
备注
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js index 61729de56..7e40036df 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js @@ -78,11 +78,12 @@ var bootstrap = function ($, learun) { learun.layerConfirm('是否确认删除该项!', function (res, index) { if (res) { $.each(tempdatra, function (key, val) { - if (tempdatra[key].Id === keyValue) { + if (tempdatra[key] && tempdatra[key].Id === keyValue) { pricecount -= tempdatra[key].Amount; tempdatra.splice(key, 1); } }); + pricecount = pricecount.toFixed(2); $("#SumAmount").val(pricecount); $("#UpperAmount").val(smalltoBIG(pricecount)); $('#FundsApplyDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); @@ -96,6 +97,7 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + $('#IsFixedAssets').lrDataItemSelect({ code: 'YesOrNoInt' }); $('#ApplyDept').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); $('#ApplyDept').lrselectSet(learun.clientdata.get(['userinfo']).departmentId); $('#ApplyTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); @@ -127,9 +129,13 @@ var bootstrap = function ($, learun) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { $('#' + id).jfGridSet('refreshdata', data[id]); + tempdatra = data[id]; } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); + if (data[id].SumAmount) { + pricecount = data[id].SumAmount; + } } } }); @@ -154,7 +160,7 @@ var bootstrap = function ($, learun) { for (var i = 0; i < tempdatra.length; i++) { pricecount += parseFloat(tempdatra[i].Amount); } - $("#SumAmount").val(pricecount); + $("#SumAmount").val(pricecount.toFixed(2)); $("#UpperAmount").val(smalltoBIG(pricecount)); $('#FundsApplyDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); }; @@ -195,7 +201,7 @@ var bootstrap = function ($, learun) { formData.ProcessId = processId; } postData.strEntity = JSON.stringify(formData); - postData.FundsApplyDetailList = JSON.stringify($('#FundsApplyDetail').jfGridGet('rowdatas')); + postData.fundsApplyDetailList = JSON.stringify($('#FundsApplyDetail').jfGridGet('rowdatas')); $.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/SaveForm?keyValue=' + keyValue, postData, function (res) { // 保存成功后才回调 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/FormView.cshtml new file mode 100644 index 000000000..77e8a894a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/FormView.cshtml @@ -0,0 +1,52 @@ +@{ + ViewBag.Title = "经费开支申报"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+ +
+
申报单号
+ +
+
+
申报部门
+
+
+
+
填报时间
+ +
+
+
是否固定资产
+
+
+
+
填报人
+ +
+
+
备注
+ +
+
+
总金额
+ +
+
+
人民币(大写)
+ +
+ @*
+
明细操作
+ + + +
*@ +
+
+
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/FundsApply/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/FormView.js new file mode 100644 index 000000000..7e40036df --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/FormView.js @@ -0,0 +1,242 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-07 14:25 + * 描 述:经费开支申报 + */ +var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var refreshGirdData; +var acceptClick; +var selectedRow; +var tempdatra = new Array(); +//总价计算 +var pricecount = 0; +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(); + $("#detailadd").on('click', function () { + selectedRow = null; + learun.layerForm({ + id: 'formdetail', + title: '新增明细', + url: top.$.rootUrl + '/AssetManagementSystem/FundsApplyDetail/Form', + width: 500, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + $("#detailedit").on('click', function () { + var keyValue = $('#FundsApplyDetail').jfGridValue('Id'); + selectedRow = $('#FundsApplyDetail').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formdetail', + title: '编辑明细', + url: top.$.rootUrl + '/AssetManagementSystem/FundsApplyDetail/Form?keyValue=' + keyValue, + width: 500, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + $("#detaildel").on('click', function () { + var keyValue = $('#FundsApplyDetail').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res, index) { + if (res) { + $.each(tempdatra, function (key, val) { + if (tempdatra[key] && tempdatra[key].Id === keyValue) { + pricecount -= tempdatra[key].Amount; + tempdatra.splice(key, 1); + } + }); + pricecount = pricecount.toFixed(2); + $("#SumAmount").val(pricecount); + $("#UpperAmount").val(smalltoBIG(pricecount)); + $('#FundsApplyDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); + top.layer.close(index); + } + }); + } + }); + + page.bind(); + page.initData(); + }, + bind: function () { + $('#IsFixedAssets').lrDataItemSelect({ code: 'YesOrNoInt' }); + $('#ApplyDept').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); + $('#ApplyDept').lrselectSet(learun.clientdata.get(['userinfo']).departmentId); + $('#ApplyTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); + $('#ApplyUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; + $('#ApplyUser').val(learun.clientdata.get(['userinfo']).realName); + $('#FundsApplyDetail').jfGrid({ + headData: [ + { + label: '项目内容', name: 'ProjectContent', width: 150, align: 'left' + }, + { + label: '数量', name: 'Number', width: 150, align: 'left' + }, + { + label: '单价(元)', name: 'Price', width: 150, align: 'left' + }, + { + label: '金额(元)', name: 'Amount', width: 150, align: 'left' + }, + ], + height: 400, + mainId: 'AAIId', + reloadSelected: false, + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + tempdatra = data[id]; + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + if (data[id].SumAmount) { + pricecount = data[id].SumAmount; + } + } + } + }); + } else { + $("#EnCode").val(NewEnCode); + } + } + }; + refreshGirdData = function (temprow) { + var ifnewrow = true; + $.each(tempdatra, function (key, val) { + if (tempdatra[key].Id === temprow.Id) { + tempdatra[key] = temprow; + ifnewrow = false; + } + }); + if (ifnewrow) { + tempdatra.push(temprow); + } + //总价计算 + pricecount = 0; + for (var i = 0; i < tempdatra.length; i++) { + pricecount += parseFloat(tempdatra[i].Amount); + } + $("#SumAmount").val(pricecount.toFixed(2)); + $("#UpperAmount").val(smalltoBIG(pricecount)); + $('#FundsApplyDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); + }; + function sortNumber(a, b) { + return a.AAIOrder - b.AAIOrder; + } + // 设置表单数据 + setFormData = function (processId, param, callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/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 == 'FundsApply' && 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 postData = {}; + var formData = $('[data-table="FundsApply"]').lrGetFormData(); + if (!!processId) { + formData.ProcessId = processId; + } + postData.strEntity = JSON.stringify(formData); + postData.fundsApplyDetailList = JSON.stringify($('#FundsApplyDetail').jfGridGet('rowdatas')); + + $.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, i); + } + }); + }; + page.init(); + function smalltoBIG(n) { + var fraction = ['角', '分']; + var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; + var unit = [ + ['元', '万', '亿'], + ['', '拾', '佰', '仟'] + ]; + var head = n < 0 ? '欠' : ''; + n = Math.abs(n); + + var s = ''; + + for (var i = 0; i < fraction.length; i++) { + s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, ''); + } + s = s || '整'; + n = Math.floor(n); + + for (var i = 0; i < unit[0].length && n > 0; i++) { + var p = ''; + for (var j = 0; j < unit[1].length && n > 0; j++) { + p = digit[n % 10] + unit[1][j] + p; + n = Math.floor(n / 10); + } + s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s; + } + return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整'); + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml index dd563c3ab..e97220d9e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml @@ -16,6 +16,7 @@  申请  编辑  删除 +  提交  打印
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js index 5766bbf48..a356e7b1c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js @@ -32,8 +32,11 @@ var bootstrap = function ($, learun) { res = top[id].validForm(); // 保存数据 if (res) { - processId = learun.newGuid(); - res = top[id].save(processId, refreshGirdData); + res = top[id].save('', function () { + page.search(); + }); + //processId = learun.newGuid(); + //res = top[id].save(processId, refreshGirdData); } return res; } @@ -81,13 +84,33 @@ var bootstrap = function ($, learun) { $('#lr_print').on('click', function () { $('#gridtable').jqprintTable(); }); + // 提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status !== 0) { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + }, // 初始化列表 initGird: function () { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/GetPageList', headData: [ - { label: "申报单号", name: "EnCode", width: 100, align: "left" }, + { label: "申报单号", name: "EnCode", width: 200, align: "left" }, { label: "申报部门", name: "ApplyDept", width: 100, align: "left", formatterAsync: function (callback, value, row, op,$cell) { learun.clientdata.getAsync('department', { @@ -109,7 +132,20 @@ var bootstrap = function ($, learun) { }}, { label: "备注", name: "Remark", width: 100, align: "left"}, { label: "总金额", name: "SumAmount", width: 100, align: "left"}, - { label: "人民币(大写)", name: "UpperAmount", width: 100, align: "left"}, + { label: "人民币(大写)", name: "UpperAmount", width: 100, align: "left" }, + { + 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 @@ -128,7 +164,7 @@ var bootstrap = function ($, learun) { { // 发起流程 var postData = { - schemeCode:'',// 填写流程对应模板编号 + schemeCode:'LC_FundsApply',// 填写流程对应模板编号 processId:processId, level:'1', }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js index 86e3c8d85..ef5c48880 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js @@ -21,7 +21,7 @@ var bootstrap = function ($, learun) { var num = $('#Number').val(); var Price = $('#Price').val(); if (!!num && !!Price) { - $('#Amount').val(parseInt(num) * parseFloat(Price)); + $('#Amount').val((parseInt(num) * parseFloat(Price)).toFixed(2)); } }); }, 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 b6dc1e70d..0eb6ac75b 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 @@ -1003,6 +1003,7 @@ + @@ -1288,6 +1289,7 @@ + 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..9c34b10f1 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.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyBLL.cs index 981de1559..4262e49b8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyBLL.cs @@ -123,11 +123,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem ///
/// 主键 /// 实体 - public void SaveEntity(string keyValue, FundsApplyEntity entity) + public void SaveEntity(string keyValue, FundsApplyEntity entity, List detailList) { try { - fundsApplyService.SaveEntity(keyValue, entity); + fundsApplyService.SaveEntity(keyValue, entity, detailList); } catch (Exception ex) { @@ -142,6 +142,43 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } + public void ChangeStatusById(string keyValue,int status, string processId) + { + try + { + fundsApplyService.ChangeStatusById(keyValue, status, processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void ChangeStatusByProcessId(string processId, int status) + { + try + { + fundsApplyService.ChangeStatusByProcessId(processId, status); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyEntity.cs index d530ec7fc..52107d240 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyEntity.cs @@ -35,6 +35,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem [Column("APPLYDEPT")] public string ApplyDept { get; set; } /// + /// 是否固定资产 + /// + [Column("ISFIXEDASSETS")] + public int? IsFixedAssets { get; set; } + /// /// ApplyUser /// [Column("APPLYUSER")] @@ -73,6 +78,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem public void Create() { this.Id = Guid.NewGuid().ToString(); + this.Status = 0; } /// /// 编辑调用 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyIBLL.cs index 0aa366d15..ec0738361 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyIBLL.cs @@ -48,7 +48,14 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// /// 主键 /// 实体 - void SaveEntity(string keyValue, FundsApplyEntity entity); + void SaveEntity(string keyValue, FundsApplyEntity entity, List detailList); + /// + /// 提交 + /// + /// + /// + void ChangeStatusById(string keyValue,int status, string processId); + void ChangeStatusByProcessId(string processId, int status); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs index 14b5b3a7e..367911a38 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs @@ -135,20 +135,76 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// 主键 /// 实体 /// - public void SaveEntity(string keyValue, FundsApplyEntity entity) + public void SaveEntity(string keyValue, FundsApplyEntity entity, List detailList) { + var db = this.BaseRepository("CollegeMIS"); try { + db.BeginTrans(); if (!string.IsNullOrEmpty(keyValue)) { entity.Modify(keyValue); - this.BaseRepository("CollegeMIS").Update(entity); + db.Update(entity); } else { entity.Create(); - this.BaseRepository("CollegeMIS").Insert(entity); + db.Insert(entity); } + //子表 + db.ExecuteBySql($"delete FundsApplyDetail where ApplyId='{entity.Id}'"); + foreach (var detail in detailList) + { + detail.Create(); + detail.ApplyId = entity.Id; + db.Insert(detail); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + 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 FundsApply set ProcessId='{processId}',status='{status}' where Id='{keyValue}'"); + } + 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 FundsApply set status='{status}' where ProcessId='{processId}'"); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs index ed08fc2b6..57835808a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs @@ -67,6 +67,24 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } + public List GetListByApplyId(string applyId) + { + try + { + return fundsApplyDetailService.GetListByApplyId(applyId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailIBLL.cs index 1154b4ec0..bfd0f536d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailIBLL.cs @@ -27,6 +27,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// 主键 /// FundsApplyDetailEntity GetFundsApplyDetailEntity(string keyValue); + List GetListByApplyId(string applyId); #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs index 27a70d4ef..5fdd277a2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs @@ -4,6 +4,7 @@ using Learun.Util; using System; using System.Collections.Generic; using System.Data; +using System.Linq; using System.Text; namespace Learun.Application.TwoDevelopment.AssetManagementSystem @@ -43,7 +44,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -82,6 +83,25 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } + + public List GetListByApplyId(string applyId) + { + try + { + return this.BaseRepository("CollegeMIS").FindList(x => x.ApplyId == applyId).ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据 @@ -94,7 +114,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem { try { - this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue); + this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue); } catch (Exception ex) { 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..0ee1148a0 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/FundsApplyMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/FundsApplyMethod.cs new file mode 100644 index 000000000..db949d68d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/FundsApplyMethod.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.AssetManagementSystem; + +namespace Learun.Application.WorkFlow +{ + public class FundsApplyMethod : IWorkFlowMethod + { + FundsApplyIBLL fundsApply = new FundsApplyBLL(); + + + public void Execute(WfMethodParameter parameter) + { + if (parameter.code == "agree") + { + fundsApply.ChangeStatusByProcessId(parameter.processId, 2); + } + else + { + fundsApply.ChangeStatusByProcessId(parameter.processId, 0); + } + } + } +} From 636a7f7dcd1130523fc38eb881aea698ac8e63ce Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 10 Nov 2022 12:06:38 +0800 Subject: [PATCH 21/38] =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=BA=8F=E5=8F=B7?= =?UTF-8?q?=E8=B6=85=E8=BF=871000=E5=B1=95=E7=A4=BA=E4=B8=8D=E5=AE=8C?= =?UTF-8?q?=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Content/jquery/plugin/jfGrid/jfgrid.js | 6 +++--- .../Views/LR_Content/plugin/grid/jfgrid.css | 4 ++-- .../Views/LR_Content/plugin/grid/jfgrid.js | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jfGrid/jfgrid.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jfGrid/jfgrid.js index 3ad7c4e6a..a4575149b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jfGrid/jfgrid.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jfGrid/jfgrid.js @@ -204,18 +204,18 @@ if (dfop.isShowNum) { var $num = $('
'); $border.prepend($num); - _width += 30; + _width += 60; } if (dfop.isMultiselect) { var $cb = $('
') .css('left', _width + 'px').css('line-height', (dfop._headHeight - 1) + 'px'); $border.prepend($cb); - _width += 30; + _width += 60; } if (dfop.isSubGrid) { var $sub = $('
').css('left', _width + 'px'); $border.prepend($sub); - _width += 30; + _width += 60; } dfop._borderLeftPadding = _width; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.css index 9e1c2d243..d1ba7817b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.css +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.css @@ -47,7 +47,7 @@ position: absolute; top: 0; left: 0; - width: 30px; + width: 60px; height: 100%; border-right: 1px solid #ccc; } @@ -165,7 +165,7 @@ left: 0; font-size: 12px; color: #333; - width: 30px; + width: 60px; line-height: 27px; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js index 767cc70ed..0e52883b1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js @@ -998,20 +998,20 @@ // 判断是否有序号列 if (op.isShowNum) { $border.append('
'); - op.running.leftWidth += 30; + op.running.leftWidth += 60; } // 判断是否允许多选 if (op.isMultiselect) { var $cb = $('
') .css({ 'left': op.running.leftWidth, 'line-height': (op.running.headHeight - 1) + 'px' }); $border.append($cb); - op.running.leftWidth += 30; + op.running.leftWidth += 60; } // 是否有展开 if (op.isSubGrid) { var $sub = $('
').css('left', op.running.leftWidth); $border.append($sub); - op.running.leftWidth += 30; + op.running.leftWidth += 60; } op.running.leftWidth += op.running.frozenleft; $self.css({ 'padding-top': op.running.headHeight }); @@ -1281,7 +1281,7 @@ row['jfcheck'].$cell.css({ 'top': row['jfcheck'].top, 'left': row['jfcheck'].left, 'text-align': 'center', 'height': op.rowHeight, 'line-height': (op.rowHeight - 1) + 'px' }); $left.append(row['jfcheck'].$cell); - _left += 30; + _left += 60; } // 是否有子表选项 if (op.isSubGrid) { @@ -1293,7 +1293,7 @@ }; row['jfsubGrid'].$cell.css({ 'top': row['jfsubGrid'].top, 'left': row['jfsubGrid'].left, 'text-align': 'center', 'height': op.rowHeight, 'line-height': (op.rowHeight - 1) + 'px' }); $left.append(row['jfsubGrid'].$cell); - _left += 30; + _left += 60; } // 加载固定列数据 @@ -2153,7 +2153,7 @@ isAutoHeight: false, // 自动适应表格高度 height: 0, rowHeight: 28, // 行高 - numRowWitdh: 30 // 序号列宽度 + numRowWitdh: 60 // 序号列宽度 }; From e2832db662d257de858a6c03a8029c7782637b74 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 10 Nov 2022 18:22:46 +0800 Subject: [PATCH 22/38] =?UTF-8?q?=E6=B0=91=E4=BD=93=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PeopleSportsActivitiesController.cs | 121 +++++++++++ .../Views/PeopleSportsActivities/Form.cshtml | 31 +++ .../Views/PeopleSportsActivities/Form.js | 38 ++++ .../Views/PeopleSportsActivities/Index.cshtml | 44 ++++ .../Views/PeopleSportsActivities/Index.js | 93 +++++++++ .../Learun.Application.Web.csproj | 5 + .../PeopleSportsActivitiesMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 1 + .../PeopleSportsActivitiesBLL.cs | 148 ++++++++++++++ .../PeopleSportsActivitiesEntity.cs | 95 +++++++++ .../PeopleSportsActivitiesIBLL.cs | 55 +++++ .../PeopleSportsActivitiesService.cs | 189 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 853 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PeopleSportsActivitiesController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/PeopleSportsActivitiesMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PeopleSportsActivitiesController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PeopleSportsActivitiesController.cs new file mode 100644 index 000000000..94dc428ed --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PeopleSportsActivitiesController.cs @@ -0,0 +1,121 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Util; +using System.Data; +using System.Web.Mvc; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-10 17:25 + /// 描 述:民体活动管理 + /// + public class PeopleSportsActivitiesController : MvcControllerBase + { + private PeopleSportsActivitiesIBLL peopleSportsActivitiesIBLL = new PeopleSportsActivitiesBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList( string queryJson ) + { + var data = peopleSportsActivitiesIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = peopleSportsActivitiesIBLL.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 data = peopleSportsActivitiesIBLL.GetEntity(keyValue); + return Success(data); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + peopleSportsActivitiesIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue,PeopleSportsActivitiesEntity entity) + { + peopleSportsActivitiesIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.cshtml new file mode 100644 index 000000000..d0763d8ff --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.cshtml @@ -0,0 +1,31 @@ +@{ + ViewBag.Title = "民体活动管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
赛事
+ +
+
+
内容
+ +
+
+
单位
+ +
+
+
时间
+ +
+
+
荣誉
+ +
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.js new file mode 100644 index 000000000..d04ae307c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.js @@ -0,0 +1,38 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-10 17:25 + * 描 述:民体活动管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var selectedRow = learun.frameTab.currentIframe().selectedRow; + var page = { + init: function () { + page.initData(); + }, + bind: function () { + }, + initData: function () { + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/PeopleSportsActivities/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.cshtml new file mode 100644 index 000000000..dce55dc9d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "民体活动管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
赛项
+ +
+
+
单位
+ +
+
+
荣誉
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.js new file mode 100644 index 000000000..c17b729ce --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.js @@ -0,0 +1,93 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-10 17:25 + * 描 述:民体活动管理 + */ +var selectedRow; +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 () { + selectedRow = null; + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/PeopleSportsActivities/Form', + width: 700, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/PeopleSportsActivities/Form?keyValue=' + keyValue, + width: 700, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/PeopleSportsActivities/DeleteForm', { keyValue: keyValue}, function () { + }); + } + }); + } + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/PeopleSportsActivities/GetPageList', + headData: [ + { label: '赛事', name: 'ContestItem', width: 200, align: "left" }, + { label: '内容', name: 'Contents', width: 300, align: "left" }, + { label: '单位', name: 'Unit', width: 200, align: "left" }, + { label: '时间', name: 'MatchTime', width: 200, align: "left" }, + { label: '荣誉', name: 'Honour', width: 200, align: "left" }, + { label: '备注', name: 'Remark', width: 300, align: "left" }, + ], + mainId:'ID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} 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 c648110db..cf73cad65 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 @@ -887,6 +887,7 @@ + @@ -6999,6 +7000,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/PeopleSportsActivitiesMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/PeopleSportsActivitiesMap.cs new file mode 100644 index 000000000..b0db4a715 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/PeopleSportsActivitiesMap.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-10 17:25 + /// 描 述:民体活动管理 + /// + public class PeopleSportsActivitiesMap : EntityTypeConfiguration + { + public PeopleSportsActivitiesMap() + { + #region 表、主键 + //表 + this.ToTable("PEOPLESPORTSACTIVITIES"); + //主键 + 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 aa3cbcfc5..8862c2c62 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 @@ -645,6 +645,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesBLL.cs new file mode 100644 index 000000000..936aac3df --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesBLL.cs @@ -0,0 +1,148 @@ +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-10 17:25 + /// 描 述:民体活动管理 + /// + public class PeopleSportsActivitiesBLL : PeopleSportsActivitiesIBLL + { + private PeopleSportsActivitiesService peopleSportsActivitiesService = new PeopleSportsActivitiesService(); + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList( string queryJson ) + { + try + { + return peopleSportsActivitiesService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return peopleSportsActivitiesService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public PeopleSportsActivitiesEntity GetEntity(string keyValue) + { + try + { + return peopleSportsActivitiesService.GetEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + peopleSportsActivitiesService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, PeopleSportsActivitiesEntity entity) + { + try + { + peopleSportsActivitiesService.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/PeopleSportsActivities/PeopleSportsActivitiesEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesEntity.cs new file mode 100644 index 000000000..c7c61c1bb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesEntity.cs @@ -0,0 +1,95 @@ +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-10 17:25 + /// 描 述:民体活动管理 + /// + public class PeopleSportsActivitiesEntity + { + #region 实体成员 + /// + /// ID + /// + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 赛事 + /// + /// + [Column("CONTESTITEM")] + public string ContestItem { get; set; } + /// + /// 内容 + /// + /// + [Column("CONTENTS")] + public string Contents { get; set; } + /// + /// 单位 + /// + /// + [Column("UNIT")] + public string Unit { get; set; } + /// + /// MatchTime + /// + /// + [Column("MATCHTIME")] + public DateTime? MatchTime { get; set; } + /// + /// 荣誉 + /// + /// + [Column("HONOUR")] + public string Honour { get; set; } + /// + /// Remark + /// + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// CreateUserId + /// + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// CreateTime + /// + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + var userlogin = LoginUserInfo.Get(); + this.ID = Guid.NewGuid().ToString(); + this.CreateTime = DateTime.Now; + this.CreateUserId = userlogin.userId; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesIBLL.cs new file mode 100644 index 000000000..64285d587 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesIBLL.cs @@ -0,0 +1,55 @@ +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-10 17:25 + /// 描 述:民体活动管理 + /// + public interface PeopleSportsActivitiesIBLL + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList( string queryJson ); + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取实体数据 + /// + /// 主键 + /// + PeopleSportsActivitiesEntity GetEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, PeopleSportsActivitiesEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesService.cs new file mode 100644 index 000000000..f459f7506 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesService.cs @@ -0,0 +1,189 @@ +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-10 17:25 + /// 描 述:民体活动管理 + /// + public class PeopleSportsActivitiesService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 条件参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + //参考写法 + //var queryParam = queryJson.ToJObject(); + // 虚拟参数 + //var dp = new DynamicParameters(new { }); + //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*"); + strSql.Append(" FROM PeopleSportsActivities t "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM PeopleSportsActivities t "); + strSql.Append(" where 1= 1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + var userInfo = LoginUserInfo.Get(); + if (!queryParam["ContestItem"].IsEmpty()) + { + dp.Add("ContestItem", "%" + queryParam["ContestItem"].ToString() + "%", DbType.String); + strSql.Append(" AND t.ContestItem like @ContestItem "); + } + if (!queryParam["Unit"].IsEmpty()) + { + dp.Add("Unit", "%" + queryParam["Unit"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Unit like @Unit "); + } + if (!queryParam["Honour"].IsEmpty()) + { + dp.Add("Honour", "%" + queryParam["Honour"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Honour like @Honour "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public PeopleSportsActivitiesEntity GetEntity(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, PeopleSportsActivitiesEntity 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 961103abf..d3c6ee25c 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 @@ -2003,6 +2003,10 @@ + + + + From 4e13ff3552a22468fc97eaaa2fcda87f09bb6a3b Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 11 Nov 2022 09:27:13 +0800 Subject: [PATCH 23/38] =?UTF-8?q?=E7=BB=8F=E8=B4=B9=E5=BC=80=E6=94=AF?= =?UTF-8?q?=E7=94=B3=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/FundsApplyController.cs | 2 + .../Views/FundsApply/Index.cshtml | 7 +- .../Views/FundsApply/Index.js | 108 +++++++++++------- .../XmlConfig/ioc.config | 2 +- .../FundsApply/FundsApplyService.cs | 1 + .../FundsApplyDetail/FundsApplyDetailBLL.cs | 1 + .../FundsApplyDetailService.cs | 1 + 7 files changed, 78 insertions(+), 44 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs index da27d80a3..da691f003 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs @@ -99,9 +99,11 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers public ActionResult GetFormDataByProcessId(string processId) { var FundsApplyData = fundsApplyIBLL.GetEntityByProcessId(processId); + var FundsApplyDetailData = fundsApplyDetailIBLL.GetListByApplyId(FundsApplyData.Id); var jsonData = new { FundsApply = FundsApplyData, + FundsApplyDetail = FundsApplyDetailData, }; return Success(jsonData); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml index e97220d9e..eae4e3edb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml @@ -13,11 +13,12 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js index a356e7b1c..4ccfa8b43 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js @@ -46,6 +46,12 @@ var bootstrap = function ($, learun) { $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status !== 0) { + learun.alert.warning("当前项目已提交不能编辑!"); + return; + } + learun.layerForm({ id: 'formFundsApply', title: '编辑', @@ -71,10 +77,15 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status !== 0) { + learun.alert.warning("当前项目已提交不能编辑!"); + return; + } learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/DeleteForm', { keyValue: keyValue}, function () { - refreshGirdData(); + learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/DeleteForm', { keyValue: keyValue }, function () { + page.search(); }); } }); @@ -103,7 +114,22 @@ var bootstrap = function ($, learun) { }); } }); + //查看 + $('#lr_look').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formFundsApply', + title: '查看', + url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/FormView?keyValue=' + keyValue, + width: 860, + height: 600, + callBack: function (id) { + } + }); + } + }); }, // 初始化列表 initGird: function () { @@ -111,27 +137,31 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/GetPageList', headData: [ { label: "申报单号", name: "EnCode", width: 200, align: "left" }, - { label: "申报部门", name: "ApplyDept", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('department', { - key: value, - callback: function (_data) { - callback(_data.name); - } - }); - }}, - { label: "填报时间", name: "ApplyTime", width: 100, align: "left"}, - { label: "填报人", name: "ApplyUser", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('user', { - key: value, - callback: function (_data) { - callback(_data.name); - } - }); - }}, - { label: "备注", name: "Remark", width: 100, align: "left"}, - { label: "总金额", name: "SumAmount", width: 100, align: "left"}, + { + label: "申报部门", name: "ApplyDept", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('department', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "填报时间", name: "ApplyTime", width: 100, align: "left" }, + { + label: "填报人", name: "ApplyUser", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + { label: "总金额", name: "SumAmount", width: 100, align: "left" }, { label: "人民币(大写)", name: "UpperAmount", width: 100, align: "left" }, { label: "审批状态", name: "Status", width: 100, align: "left", @@ -147,33 +177,31 @@ var bootstrap = function ($, learun) { } ], - mainId:'Id', + mainId: 'Id', isPage: true }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function (res, postData) { - if (!!res) - { - if (res.code == 200) - { - // 发起流程 - var postData = { - schemeCode:'LC_FundsApply',// 填写流程对应模板编号 - processId:processId, - level:'1', - }; - learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function(data) { - learun.loading(false); - }); + if (!!res) { + if (res.code == 200) { + // 发起流程 + var postData = { + schemeCode: 'LC_FundsApply',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + } + page.search(); } - page.search(); - } }; page.init(); } 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 45e3931a9..c6bb783be 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config @@ -35,7 +35,7 @@ - + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs index 367911a38..2c897ed60 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs @@ -115,6 +115,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem try { this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue); + this.BaseRepository("CollegeMIS").Delete(t => t.ApplyId == keyValue); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs index 57835808a..c8909b2c4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs @@ -85,6 +85,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } } + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs index 5fdd277a2..19718c593 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs @@ -102,6 +102,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } } + #endregion #region 提交数据 From 4045b2468a8209c2d876fb05df7340d4a5d768fa Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Fri, 11 Nov 2022 11:03:52 +0800 Subject: [PATCH 24/38] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E5=9B=BE=E4=B9=A6=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86=EF=BC=9B?= =?UTF-8?q?=E5=9B=BE=E4=B9=A6=E5=80=9F=E9=98=85=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/BookBorrow/Form.cshtml | 29 ++++++++--------- .../Views/BookBorrow/Form.js | 3 ++ .../Views/BookBorrow/Index.cshtml | 4 +-- .../Views/BookBorrow/Index.js | 26 +++++++++++++--- .../Views/BookInfo/Form.cshtml | 18 ++++++----- .../Views/BookInfo/Index.cshtml | 4 +-- .../Views/BookInfo/Index.js | 15 ++++----- .../BookBorrow/BookBorrowService.cs | 17 +++------- .../BookBorrow/Book_borrowinfoEntity.cs | 31 +++++++++++++++++++ .../BookInfo/BookInfoService.cs | 18 +---------- .../BookInfo/Book_infoEntity.cs | 5 +++ .../LearunApp-2.2.0/config.js | 4 +-- 12 files changed, 106 insertions(+), 68 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml index aa8883f02..65d792a19 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml @@ -3,25 +3,26 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
-
借书时间
- + +
+
图书*
+
-
-
还书时间
- +
+
借阅时间*
+
-
-
借书证
- +
+
借阅人*
+
-
-
书籍编号
- +
+
借书证
+
-
+
审核
- +
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookBorrow/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js index 8eaa05bd6..bbf6ab106 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js @@ -15,6 +15,9 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + $("#BookID").lrDataSourceSelect({ code: 'BookInfo', value: 'id', text: 'bookname' }); + $("#UserId").lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); + }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.cshtml index 3df951628..638528194 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.cshtml @@ -18,8 +18,8 @@
-
书籍编号
- +
图书名称
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.js index 9dc653200..486f9c9eb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.js @@ -98,13 +98,29 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/BookBorrow/GetPageList', headData: [ - { label: "借书时间", name: "BorrowTime", width: 130, align: "left"}, - { label: "还书时间", name: "ReturnTime", width: 130, align: "left"}, - { label: "借书证", name: "LibraryCard", width: 100, align: "left"}, - { label: "书籍编号", name: "BookID", width: 100, align: "left"}, + { label: "图书名称", name: "BookName", width: 100, align: "left" }, + { label: "书籍出版号", name: "ISBN", width: 100, align: "left" }, + { label: "书籍作者", name: "Author", width: 100, align: "left" }, + { label: "书籍出版社", name: "Publisher", width: 100, align: "left" }, + { label: "数量", name: "Amount", width: 100, align: "left" }, + { label: "借阅时间", name: "BorrowTime", width: 130, align: "left" }, + { + label: "借阅人姓名", name: "UserId", width: 130, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: "借书证", name: "LibraryCard", width: 100, align: "left" }, { label: "审核", name: "CheckMark", width: 100, align: "left"}, ], mainId:'ID', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Form.cshtml index 76fe6638d..f0de48bfc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Form.cshtml @@ -4,7 +4,7 @@ }
-
书籍名称*
+
图书名称*
@@ -12,8 +12,8 @@
-
书籍ISBN
- +
书籍出版号*
+
书籍类别号
@@ -28,21 +28,25 @@
-
书籍编号
- +
书籍编号*
+
出版时间
- +
入库时间
- +
书籍价格
+
+
数量
+ +
存放位置
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.cshtml index e2bdc7563..d844f4f79 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.cshtml @@ -11,11 +11,11 @@
-
书籍名称
+
图书名称
-
书籍ISBN
+
书籍出版号
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.js index d16cb59d1..ca6d77fbc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.js @@ -26,8 +26,8 @@ var bootstrap = function ($, learun) { id: 'form', title: '新增', url: top.$.rootUrl + '/EducationalAdministration/BookInfo/Form', - width: 600, - height: 400, + width: 800, + height: 600, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -41,8 +41,8 @@ var bootstrap = function ($, learun) { id: 'form', title: '编辑', url: top.$.rootUrl + '/EducationalAdministration/BookInfo/Form?keyValue=' + keyValue, - width: 600, - height: 400, + width: 800, + height: 600, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -69,12 +69,12 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/BookInfo/GetPageList', headData: [ - { label: "书籍名称", name: "BookName", width: 100, align: "left" }, + { label: "图书名称", name: "BookName", width: 100, align: "left" }, { label: "书籍提要", name: "Collation", width: 100, align: "left" }, - { label: "书籍ISBN", name: "ISBN", width: 100, align: "left" }, + { label: "书籍出版号", name: "ISBN", width: 100, align: "left" }, { label: "书籍类别号", name: "BookType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -94,6 +94,7 @@ var bootstrap = function ($, learun) { { label: "出版时间", name: "PublishTime", width: 100, align: "left" }, { label: "入库时间", name: "AddTime", width: 100, align: "left" }, { label: "书籍价格", name: "Price", width: 100, align: "left" }, + { label: "数量", name: "Amount", width: 100, align: "left" }, { label: "存放位置", name: "BookLocation", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/BookBorrowService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/BookBorrowService.cs index 969b5dd38..665548fe8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/BookBorrowService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/BookBorrowService.cs @@ -29,16 +29,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.BorrowTime, - t.ReturnTime, - t.LibraryCard, - t.BookID, - t.CheckMark - "); + strSql.Append("SELECT t.*,b.BookName,b.ISBN,b.Author,b.Publisher "); strSql.Append(" FROM Book_borrowinfo t "); + strSql.Append(" left join Book_info b on t.BookID=b.ID "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 @@ -54,10 +47,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("LibraryCard", "%" + queryParam["LibraryCard"].ToString() + "%", DbType.String); strSql.Append(" AND t.LibraryCard Like @LibraryCard "); } - if (!queryParam["BookID"].IsEmpty()) + if (!queryParam["BookName"].IsEmpty()) { - dp.Add("BookID", "%" + queryParam["BookID"].ToString() + "%", DbType.String); - strSql.Append(" AND t.BookID Like @BookID "); + dp.Add("BookName", "%" + queryParam["BookName"].ToString() + "%", DbType.String); + strSql.Append(" AND b.BookName Like @BookName "); } return this.BaseRepository().FindList(strSql.ToString(),dp, pagination); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/Book_borrowinfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/Book_borrowinfoEntity.cs index 8113df78e..e80a91479 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/Book_borrowinfoEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/Book_borrowinfoEntity.cs @@ -44,6 +44,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ///
[Column("CHECKMARK")] public string CheckMark { get; set; } + /// + /// 数量 + /// + [Column("AMOUNT")] + public int? Amount { get; set; } + /// + /// 借阅人 + /// + [Column("USERID")] + public string UserId { get; set; } #endregion #region 扩展操作 @@ -64,6 +74,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 扩展字段 + + /// + /// 书籍名称 + /// + [NotMapped] + public string BookName { get; set; } + /// + /// 书籍ISBN + /// + [NotMapped] + public string ISBN { get; set; } + /// + /// 书籍作者 + /// + [NotMapped] + public string Author { get; set; } + /// + /// 书籍出版社 + /// + [NotMapped] + public string Publisher { get; set; } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/BookInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/BookInfoService.cs index ad4901284..0e68d167e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/BookInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/BookInfoService.cs @@ -29,23 +29,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.BookName, - t.Collation, - t.ISBN, - t.BookType, - t.Author, - t.Publisher, - t.BookCode, - t.PublishTime, - t.AddTime, - t.Price, - t.BookLocation, - t.CheckMark, - t.Remark - "); + strSql.Append("SELECT t.* "); strSql.Append(" FROM Book_info t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/Book_infoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/Book_infoEntity.cs index 0a0741ecc..e1339d497 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/Book_infoEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/Book_infoEntity.cs @@ -84,6 +84,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ///
[Column("CHECKMARK")] public string CheckMark { get; set; } + /// + /// 数量 + /// + [Column("AMOUNT")] + public int? Amount { get; set; } #endregion #region 扩展操作 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 d304bee48..b14aeb67f 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -23,11 +23,11 @@ export default { "apiHost": [ // "http://cyzjzx.gnway.cc:31218/"//测试地址接口 // "http://cyzjzx.gnway.cc:29904/"//正式地址接口 - "http://192.168.10.58:8012/" + "http://192.168.10.31:8088/" ], // "webHost":"http://cyzjzx.gnway.cc:30549/",//测试地址 // "webHost":"http://wxd3f.cyzjzx.com/",//正式地址 - "webHost":"http://192.168.10.58:8009/", + "webHost":"http://192.168.10.31:8087/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [ // 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428 From fe024babc27f7bd18abdbde9c4de3bbea4b248bb Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 11 Nov 2022 11:16:43 +0800 Subject: [PATCH 25/38] =?UTF-8?q?=E7=BB=8F=E8=B4=B9=E5=BC=80=E6=94=AF?= =?UTF-8?q?=E7=94=B3=E6=8A=A5=E5=A4=9A=E6=9D=A1=E4=BB=B6=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/FundsApply/Index.cshtml | 14 +++++++ .../Views/FundsApply/Index.js | 41 +++++++++++++++++-- .../FundsApply/FundsApplyService.cs | 11 +++++ 3 files changed, 63 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml index eae4e3edb..4d1e1614f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml @@ -7,6 +7,20 @@
+
+
+
+
+
+
+
+
申请人
+
+
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js index 4ccfa8b43..5d431a34c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js @@ -7,6 +7,8 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; + var startTime; + var endTime; var processId = ''; var page = { init: function () { @@ -14,6 +16,37 @@ var bootstrap = function ($, learun) { page.bind(); }, bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '3', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#ApplyUser').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -148,7 +181,7 @@ var bootstrap = function ($, learun) { }); } }, - { label: "填报时间", name: "ApplyTime", width: 100, align: "left" }, + { label: "填报时间", name: "ApplyTime", width: 150, align: "left" }, { label: "填报人", name: "ApplyUser", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -162,7 +195,7 @@ var bootstrap = function ($, learun) { }, { label: "备注", name: "Remark", width: 100, align: "left" }, { label: "总金额", name: "SumAmount", width: 100, align: "left" }, - { label: "人民币(大写)", name: "UpperAmount", width: 100, align: "left" }, + { label: "人民币(大写)", name: "UpperAmount", width: 200, align: "left" }, { label: "审批状态", name: "Status", width: 100, align: "left", formatter: function (cellvalue, row) { @@ -180,10 +213,12 @@ var bootstrap = function ($, learun) { mainId: 'Id', isPage: true }); - page.search(); + //page.search(); }, search: function (param) { param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs index 2c897ed60..12ec5cf91 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs @@ -39,6 +39,17 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.ApplyTime >= @startTime AND t.ApplyTime <= @endTime ) "); + } + if (!queryParam["ApplyUser"].IsEmpty()) + { + dp.Add("ApplyUser", queryParam["ApplyUser"].ToString(), DbType.String); + strSql.Append(" AND t.ApplyUser = @ApplyUser "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) From 55faa749fa86ee73942108958a7e1211511532b2 Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 11 Nov 2022 14:42:17 +0800 Subject: [PATCH 26/38] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E6=9D=A1=E5=85=B6?= =?UTF-8?q?=E4=BB=96=20=E5=A4=9A=E8=A1=8C=E6=96=87=E6=9C=AC=E6=A1=86?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=8D=95=E8=A1=8C=E6=96=87=E6=9C=AC=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/pages/Payslip/Payslip/single.vue | 4 ++-- .../LearunApp-2.2.0/pages/Payslip/recruitPayslip/single.vue | 4 ++-- .../LearunApp-2.2.0/pages/Payslip/welfarePayslip/single.vue | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) 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 02e7b80f1..74e8f59c1 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="失业保险" /> - 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 684931955..da90f3d78 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 @@ -214,10 +214,10 @@ :disabled="!edit" title="失业保险" /> - 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 7b831a783..aa82a1f37 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 @@ -214,10 +214,10 @@ :disabled="!edit" title="失业保险" /> - From 8a1a77da5d393c23643a4a7d2f3f60817be1cf3f Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 11 Nov 2022 14:43:07 +0800 Subject: [PATCH 27/38] --- .../LearunApp-2.2.0/pages/Payslip/welfarePayslip/single.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 aa82a1f37..4d3b6596a 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 @@ -214,7 +214,7 @@ :disabled="!edit" title="失业保险" /> - Date: Fri, 11 Nov 2022 18:00:01 +0800 Subject: [PATCH 28/38] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E5=9B=BE=E4=B9=A6=E5=BD=92=E8=BF=98=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../www/config/config.js | 4 +- .../Controllers/BookReturnController.cs | 111 ++++++++++++ .../Views/BookReturn/Form.cshtml | 28 ++++ .../Views/BookReturn/Form.js | 53 ++++++ .../Views/BookReturn/Index.cshtml | 44 +++++ .../Views/BookReturn/Index.js | 141 ++++++++++++++++ .../Learun.Application.Web.csproj | 5 + .../Book_returninfoMap.cs | 29 ++++ .../Learun.Application.Mapping.csproj | 1 + .../BookReturn/BookReturnBLL.cs | 124 ++++++++++++++ .../BookReturn/BookReturnIBLL.cs | 49 ++++++ .../BookReturn/BookReturnService.cs | 158 ++++++++++++++++++ .../BookReturn/Book_returninfoEntity.cs | 101 +++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 14 files changed, 850 insertions(+), 2 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookReturnController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_returninfoMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/Book_returninfoEntity.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js index 356c54ea0..84277feb3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js @@ -7,8 +7,8 @@ // web:"http://112.230.201.53/:8081/"//web地址,用于配置logo //}; var config = { - webapi: 'http://localhost:8088/', - web: "http://localhost:8087/"//web地址,用于配置logo + webapi: 'http://192.168.10.31:8088/', + web: "http://192.168.10.31:8087/"//web地址,用于配置logo }; // var config = { // webapi: 'http://123.57.209.16:31173/', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookReturnController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookReturnController.cs new file mode 100644 index 000000000..dee12f2eb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookReturnController.cs @@ -0,0 +1,111 @@ +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-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-11 09:45 + /// 描 述:图书归还管理 + /// + public class BookReturnController : MvcControllerBase + { + private BookReturnIBLL bookReturnIBLL = new BookReturnBLL(); + + #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 = bookReturnIBLL.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 Book_returninfoData = bookReturnIBLL.GetBook_returninfoEntity( keyValue ); + var jsonData = new { + Book_returninfo = Book_returninfoData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + bookReturnIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Book_returninfoEntity entity = strEntity.ToObject(); + bookReturnIBLL.SaveEntity(keyValue,entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml new file mode 100644 index 000000000..606a8525b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml @@ -0,0 +1,28 @@ +@{ + ViewBag.Title = "图书归还管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+ +
+
图书*
+
+
+
+
归还时间*
+ +
+
+
归还人*
+
+
+
+
借书证
+ +
+
+
审核
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookReturn/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js new file mode 100644 index 000000000..e84acbf33 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js @@ -0,0 +1,53 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-11 09:45 + * 描 述:图书归还管理 + */ +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 () { + $("#BookID").lrDataSourceSelect({ code: 'BookInfo', value: 'id', text: 'bookname' }); + $("#UserId").lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/BookReturn/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/BookReturn/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.cshtml new file mode 100644 index 000000000..b52246d73 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "图书归还管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
借书证
+ +
+
+
图书名称
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookReturn/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.js new file mode 100644 index 000000000..518ccfe70 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.js @@ -0,0 +1,141 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-11 09:45 + * 描 述:图书归还管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + $('#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/BookReturn/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/BookReturn/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/BookReturn/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/BookReturn/GetPageList', + headData: [ + { label: "图书名称", name: "BookName", width: 100, align: "left" }, + { label: "书籍出版号", name: "ISBN", width: 100, align: "left" }, + { label: "书籍作者", name: "Author", width: 100, align: "left" }, + { label: "书籍出版社", name: "Publisher", width: 100, align: "left" }, + { label: "数量", name: "Amount", width: 100, align: "left" }, + { label: "归还时间", name: "ReturnTime", width: 130, align: "left" }, + { + label: "归还人姓名", name: "UserId", width: 130, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: "借书证", name: "LibraryCard", width: 100, align: "left" }, + { label: "审核", name: "CheckMark", width: 100, align: "left"}, + ], + mainId:'ID', + isPage: true + }); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + 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 cf73cad65..2d56849f6 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 @@ -320,6 +320,7 @@ + @@ -1046,6 +1047,8 @@ + + @@ -1307,6 +1310,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_returninfoMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_returninfoMap.cs new file mode 100644 index 000000000..a9af83ef3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_returninfoMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-11 09:45 + /// 描 述:图书归还管理 + /// + public class Book_returninfoMap : EntityTypeConfiguration + { + public Book_returninfoMap() + { + #region 表、主键 + //表 + this.ToTable("BOOK_RETURNINFO"); + //主键 + 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 8862c2c62..26c9da754 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 @@ -75,6 +75,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnBLL.cs new file mode 100644 index 000000000..c2349cf37 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnBLL.cs @@ -0,0 +1,124 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-11 09:45 + /// 描 述:图书归还管理 + /// + public class BookReturnBLL : BookReturnIBLL + { + private BookReturnService bookReturnService = new BookReturnService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return bookReturnService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Book_returninfo表实体数据 + /// 主键 + /// + /// + public Book_returninfoEntity GetBook_returninfoEntity(string keyValue) + { + try + { + return bookReturnService.GetBook_returninfoEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + bookReturnService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, Book_returninfoEntity entity) + { + try + { + bookReturnService.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/BookReturn/BookReturnIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnIBLL.cs new file mode 100644 index 000000000..c3b3b9b76 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnIBLL.cs @@ -0,0 +1,49 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-11 09:45 + /// 描 述:图书归还管理 + /// + public interface BookReturnIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Book_returninfo表实体数据 + /// 主键 + /// + /// + Book_returninfoEntity GetBook_returninfoEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(string keyValue, Book_returninfoEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs new file mode 100644 index 000000000..a3116a7cc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs @@ -0,0 +1,158 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-11 09:45 + /// 描 述:图书归还管理 + /// + public class BookReturnService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*,b.BookName,b.ISBN,b.Author,b.Publisher "); + strSql.Append(" FROM Book_returninfo t "); + strSql.Append(" left join Book_info b on t.BookID=b.ID "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.BorrowTime >= @startTime AND t.BorrowTime <= @endTime ) "); + } + if (!queryParam["LibraryCard"].IsEmpty()) + { + dp.Add("LibraryCard", "%" + queryParam["LibraryCard"].ToString() + "%", DbType.String); + strSql.Append(" AND t.LibraryCard Like @LibraryCard "); + } + if (!queryParam["BookName"].IsEmpty()) + { + dp.Add("BookName", "%" + queryParam["BookName"].ToString() + "%", DbType.String); + strSql.Append(" AND b.BookName Like @BookName "); + } + return this.BaseRepository().FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Book_returninfo表实体数据 + /// 主键 + /// + /// + public Book_returninfoEntity GetBook_returninfoEntity(string keyValue) + { + try + { + return this.BaseRepository().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().Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, Book_returninfoEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository().Update(entity); + } + else + { + entity.Create(); + this.BaseRepository().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/EducationalAdministration/BookReturn/Book_returninfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/Book_returninfoEntity.cs new file mode 100644 index 000000000..b4ea465bf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/Book_returninfoEntity.cs @@ -0,0 +1,101 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-11 09:45 + /// 描 述:图书归还管理 + /// + public class Book_returninfoEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 借阅主键 + /// + [Column("BORROWID")] + public string BorrowID { get; set; } + /// + /// 书籍主键 + /// + [Column("BOOKID")] + public string BookID { get; set; } + /// + /// 借书证 + /// + [Column("LIBRARYCARD")] + public string LibraryCard { get; set; } + /// + /// 数量 + /// + [Column("AMOUNT")] + public int? Amount { get; set; } + /// + /// 借阅人 + /// + [Column("USERID")] + public string UserId { get; set; } + /// + /// 还书时间 + /// + [Column("RETURNTIME")] + public DateTime? ReturnTime { get; set; } + /// + /// 审核 + /// + [Column("CHECKMARK")] + public string CheckMark { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + + /// + /// 书籍名称 + /// + [NotMapped] + public string BookName { get; set; } + /// + /// 书籍ISBN + /// + [NotMapped] + public string ISBN { get; set; } + /// + /// 书籍作者 + /// + [NotMapped] + public string Author { get; set; } + /// + /// 书籍出版社 + /// + [NotMapped] + public string Publisher { get; set; } + #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 d3c6ee25c..f1f1d81cc 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 @@ -125,6 +125,10 @@ + + + + From 0d99a9170b618fd2d078aeb91fb457ef0f6c35a7 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Fri, 11 Nov 2022 18:24:52 +0800 Subject: [PATCH 29/38] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E5=9B=BE=E4=B9=A6=E5=BD=92=E8=BF=98=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EducationalAdministration/BookReturn/BookReturnService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs index a3116a7cc..e614914be 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs @@ -40,7 +40,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); - strSql.Append(" AND ( t.BorrowTime >= @startTime AND t.BorrowTime <= @endTime ) "); + strSql.Append(" AND ( t.ReturnTime >= @startTime AND t.ReturnTime <= @endTime ) "); } if (!queryParam["LibraryCard"].IsEmpty()) { From ce23667b0423f72a1f4dcf518c576684d91ad62f Mon Sep 17 00:00:00 2001 From: lb01 Date: Fri, 11 Nov 2022 18:30:20 +0800 Subject: [PATCH 30/38] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E8=AF=BE=E5=A0=82=E8=80=83=E5=8B=A4=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=88=E8=AF=BE=E5=A0=82=E8=80=83=E5=8B=A4=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=92=8C=E5=AD=A6=E7=94=9F=E7=AD=BE=E5=88=B0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/studentAttendance/list.vue | 724 ++++++++++-------- .../pages/studentAttendance/single.vue | 29 +- 2 files changed, 438 insertions(+), 315 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/list.vue index c91be8a0a..be691ca81 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/list.vue @@ -11,34 +11,39 @@ {{todayWeek.Monday}} - {{todayWeek.Sunday}} - + - - {{ item.en }} - {{ item.cn }} + + + {{ item.en }} + {{ item.cn }} + - + - 该时间段没有课程 - - - 第 {{ k.sectionTime }} 节 + + 该时间段没有课程 + + + + 第 {{ k.jc }} 节 - {{ k.LessonName }} + {{ k.curriculum }} - {{ k.EmpName }} + {{ k.teacher }} - {{ k.ClassroomName }} + {{ k.className }} @@ -51,303 +56,420 @@ diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/single.vue index a0a2db9b2..eb20952fb 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/single.vue @@ -2,19 +2,19 @@ - {{ pageInfo.LessonDate }} 第{{ pageInfo.LessonTime.substring(1) }}节 + {{ pageInfo.lessonDate }} 第{{ pageInfo.jc }}节 -
{{ pageInfo.LessonName }}
+
{{ pageInfo.curriculum }}
- {{ pageInfo.EmpName }} - {{ pageInfo.ClassroomName }} + {{ pageInfo.teacher }} + {{ pageInfo.classRoomNo }} 应到 {{ weekData.records }} @@ -121,13 +121,13 @@ export default{ sord: 'DESC' }, queryJson: JSON.stringify({ - year: _this.pageInfo.AcademicYear, - semester: _this.pageInfo.Semester, - empno: _this.pageInfo.EmpNo, - lessonNo: _this.pageInfo.LessonNo, - teachClassNo: _this.pageInfo.TeachClassNo, - lessonTime: _this.pageInfo.LessonTime, - LessonSortNo: _this.pageInfo.LessonSortNo, + year: _this.pageInfo.academicyear, + semester: _this.pageInfo.semester, + empno: _this.pageInfo.empno, + lessonNo: _this.pageInfo.lessonNo, + teachClassNo: _this.pageInfo.teachClassNo, + lessonTime: _this.pageInfo.lessonTime, + LessonSortNo: _this.pageInfo.lessonSortNo, }) }; @@ -159,9 +159,9 @@ export default{ _this.LOADING('保存数据中…'); _this.HTTP_POST('/Learun/adms/EducationalAdministration/StuAttendanceLeave/apply', { - lessonTime: _this.pageInfo.LessonTime, - lessonDate: _this.pageInfo.LessonDate, - classRoomNo: _this.pageInfo.ClassRoomNo, + lessonTime: _this.pageInfo.lessonTime, + lessonDate: _this.pageInfo.lessonDate, + classRoomNo: _this.pageInfo.classRoomNo, dataJson: JSON.stringify(_this.weekData.rows) }, '加载数据时出错').then(res => { _this.HIDE_LOADING(); @@ -184,6 +184,7 @@ export default{ }, created() { this.pageInfo = this.GET_PARAM(); //获取页面传递参数 + console.log(this.pageInfo) this.init(); } } From 31f42e522fa88a003c5ce80e245d6b5a7d5059a6 Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 11 Nov 2022 18:32:08 +0800 Subject: [PATCH 31/38] =?UTF-8?q?app2.0=E5=8D=81=E5=A4=A9=E8=AF=BE?= =?UTF-8?q?=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=B0=83=E6=95=B4=20=E5=AD=A6?= =?UTF-8?q?=E5=B9=B4=E5=AD=A6=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.WebApi/Modules/TimeTable.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs index f4cec3a59..06cf05a57 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs @@ -13,7 +13,7 @@ using Nancy; namespace Learun.Application.WebApi.Modules { - public class TimeTable : BaseNoLoginApi + public class TimeTable : BaseApi { public TimeTable() : base("/learun/adms/timetable") @@ -251,8 +251,8 @@ namespace Learun.Application.WebApi.Modules curriculum = e.LessonSortNo == "2" ? e.LessonName + "[选修]" : e.LessonName, teacher = e?.EmpName, classRoom = string.IsNullOrEmpty(e.ClassroomName) ? "" : e.ClassroomName.Trim(), - academicyear = semesterAndYear.AcademicYearShort, - semester = strSemester, + academicyear = e.AcademicYear, + semester = e.Semester, lessonNo = e?.LessonNo, teachClassNo = e?.TeachClassNo, empno = e?.EmpNo, From acc0038002b40c4a066e92ebd22a896fd43db7a5 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Sat, 12 Nov 2022 10:42:38 +0800 Subject: [PATCH 32/38] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E5=9B=BE=E4=B9=A6=E5=85=A5=E5=BA=93=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/BookPutInController.cs | 111 +++++++++++++ .../Views/BookBorrow/Form.cshtml | 10 +- .../Views/BookPutIn/Form.cshtml | 28 ++++ .../Views/BookPutIn/Form.js | 53 ++++++ .../Views/BookPutIn/Index.cshtml | 40 +++++ .../Views/BookPutIn/Index.js | 140 ++++++++++++++++ .../Views/BookReturn/Form.cshtml | 10 +- .../Learun.Application.Web.csproj | 5 + .../Book_putininfoMap.cs | 29 ++++ .../Learun.Application.Mapping.csproj | 1 + .../BookPutIn/BookPutInBLL.cs | 124 ++++++++++++++ .../BookPutIn/BookPutInIBLL.cs | 49 ++++++ .../BookPutIn/BookPutInService.cs | 153 ++++++++++++++++++ .../BookPutIn/Book_putininfoEntity.cs | 91 +++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 15 files changed, 842 insertions(+), 6 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookPutInController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_putininfoMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInService.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/Book_putininfoEntity.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookPutInController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookPutInController.cs new file mode 100644 index 000000000..114c728c3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookPutInController.cs @@ -0,0 +1,111 @@ +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-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-12 09:45 + /// 描 述:图书入库管理 + /// + public class BookPutInController : MvcControllerBase + { + private BookPutInIBLL bookPutInIBLL = new BookPutInBLL(); + + #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 = bookPutInIBLL.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 Book_putininfoData = bookPutInIBLL.GetBook_putininfoEntity( keyValue ); + var jsonData = new { + Book_putininfo = Book_putininfoData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + bookPutInIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Book_putininfoEntity entity = strEntity.ToObject(); + bookPutInIBLL.SaveEntity(keyValue,entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml index 65d792a19..da41636e7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml @@ -6,15 +6,19 @@
图书*
-
+
借阅时间*
- +
借阅人*
-
+
+
+
+
数量
+
借书证
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.cshtml new file mode 100644 index 000000000..59db79761 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.cshtml @@ -0,0 +1,28 @@ +@{ + ViewBag.Title = "图书入库管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+ +
+
图书*
+
+
+
+
入库时间*
+ +
+
+
入库人*
+
+
+
+
数量
+ +
+
+
审核
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookPutIn/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.js new file mode 100644 index 000000000..6e0ec5a08 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.js @@ -0,0 +1,53 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-12 09:45 + * 描 述:图书入库管理 + */ +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 () { + $("#BookID").lrDataSourceSelect({ code: 'BookInfo', value: 'id', text: 'bookname' }); + $("#UserId").lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/BookPutIn/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/BookPutIn/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.cshtml new file mode 100644 index 000000000..32cda1ee4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.cshtml @@ -0,0 +1,40 @@ +@{ + ViewBag.Title = "图书入库管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
图书名称
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookPutIn/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.js new file mode 100644 index 000000000..cf2434bc0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.js @@ -0,0 +1,140 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-12 09:45 + * 描 述:图书入库管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + $('#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/BookPutIn/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/BookPutIn/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/BookPutIn/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/BookPutIn/GetPageList', + headData: [ + { label: "图书名称", name: "BookName", width: 100, align: "left" }, + { label: "书籍出版号", name: "ISBN", width: 100, align: "left" }, + { label: "书籍作者", name: "Author", width: 100, align: "left" }, + { label: "书籍出版社", name: "Publisher", width: 100, align: "left" }, + { label: "数量", name: "Amount", width: 100, align: "left" }, + { label: "入库时间", name: "PutInTime", width: 130, align: "left" }, + { + label: "入库人姓名", name: "UserId", width: 130, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: "审核", name: "CheckMark", width: 100, align: "left"}, + ], + mainId:'ID', + isPage: true + }); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml index 606a8525b..d1199254b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml @@ -6,15 +6,19 @@
图书*
-
+
归还时间*
- +
归还人*
-
+
+
+
+
数量
+
借书证
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 2d56849f6..dbccc4328 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 @@ -320,6 +320,7 @@ + @@ -1047,6 +1048,8 @@ + + @@ -1312,6 +1315,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_putininfoMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_putininfoMap.cs new file mode 100644 index 000000000..70374f9fb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_putininfoMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-12 09:45 + /// 描 述:图书入库管理 + /// + public class Book_putininfoMap : EntityTypeConfiguration + { + public Book_putininfoMap() + { + #region 表、主键 + //表 + this.ToTable("BOOK_PUTININFO"); + //主键 + 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 26c9da754..8cd6dcff9 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 @@ -75,6 +75,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInBLL.cs new file mode 100644 index 000000000..70b90ae4b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInBLL.cs @@ -0,0 +1,124 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-12 09:45 + /// 描 述:图书入库管理 + /// + public class BookPutInBLL : BookPutInIBLL + { + private BookPutInService bookPutInService = new BookPutInService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return bookPutInService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Book_putininfo表实体数据 + /// 主键 + /// + /// + public Book_putininfoEntity GetBook_putininfoEntity(string keyValue) + { + try + { + return bookPutInService.GetBook_putininfoEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + bookPutInService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, Book_putininfoEntity entity) + { + try + { + bookPutInService.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/BookPutIn/BookPutInIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInIBLL.cs new file mode 100644 index 000000000..223bc3c01 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInIBLL.cs @@ -0,0 +1,49 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-12 09:45 + /// 描 述:图书入库管理 + /// + public interface BookPutInIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Book_putininfo表实体数据 + /// 主键 + /// + /// + Book_putininfoEntity GetBook_putininfoEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(string keyValue, Book_putininfoEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInService.cs new file mode 100644 index 000000000..ac6858275 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInService.cs @@ -0,0 +1,153 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-12 09:45 + /// 描 述:图书入库管理 + /// + public class BookPutInService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*,b.BookName,b.ISBN,b.Author,b.Publisher "); + strSql.Append(" FROM Book_putininfo t "); + strSql.Append(" left join Book_info b on t.BookID=b.ID "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.PutInTime >= @startTime AND t.PutInTime <= @endTime ) "); + } + if (!queryParam["BookName"].IsEmpty()) + { + dp.Add("BookName", "%" + queryParam["BookName"].ToString() + "%", DbType.String); + strSql.Append(" AND b.BookName Like @BookName "); + } + return this.BaseRepository().FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Book_putininfo表实体数据 + /// 主键 + /// + /// + public Book_putininfoEntity GetBook_putininfoEntity(string keyValue) + { + try + { + return this.BaseRepository().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().Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, Book_putininfoEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository().Update(entity); + } + else + { + entity.Create(); + this.BaseRepository().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/EducationalAdministration/BookPutIn/Book_putininfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/Book_putininfoEntity.cs new file mode 100644 index 000000000..892642f08 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/Book_putininfoEntity.cs @@ -0,0 +1,91 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-12 09:45 + /// 描 述:图书入库管理 + /// + public class Book_putininfoEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 书籍主键 + /// + [Column("BOOKID")] + public string BookID { get; set; } + /// + /// 数量 + /// + [Column("AMOUNT")] + public int? Amount { get; set; } + /// + /// 入库人 + /// + [Column("USERID")] + public string UserId { get; set; } + /// + /// 入库时间 + /// + [Column("PUTINTIME")] + public DateTime? PutInTime { get; set; } + /// + /// 审核 + /// + [Column("CHECKMARK")] + public string CheckMark { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + + /// + /// 书籍名称 + /// + [NotMapped] + public string BookName { get; set; } + /// + /// 书籍ISBN + /// + [NotMapped] + public string ISBN { get; set; } + /// + /// 书籍作者 + /// + [NotMapped] + public string Author { get; set; } + /// + /// 书籍出版社 + /// + [NotMapped] + public string Publisher { get; set; } + #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 f1f1d81cc..84488bd4a 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 @@ -125,6 +125,10 @@ + + + + From 99db57c3fdff3b4c6aa9ae367baa85948c2a5e27 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Sat, 12 Nov 2022 17:49:09 +0800 Subject: [PATCH 33/38] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E8=B5=9B=E9=A1=B9=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompetitionManagementController.cs | 117 +++++++++++++ .../Views/CompetitionManagement/Form.cshtml | 27 +++ .../Views/CompetitionManagement/Form.js | 52 ++++++ .../Views/CompetitionManagement/Index.cshtml | 48 +++++ .../Views/CompetitionManagement/Index.js | 114 ++++++++++++ .../Learun.Application.Web.csproj | 5 + .../CompetitionManagementMap.cs | 29 ++++ .../Learun.Application.Mapping.csproj | 1 + .../CompetitionManagementBLL.cs | 125 +++++++++++++ .../CompetitionManagementEntity.cs | 80 +++++++++ .../CompetitionManagementIBLL.cs | 48 +++++ .../CompetitionManagementService.cs | 164 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 814 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CompetitionManagementController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/CompetitionManagementMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CompetitionManagementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CompetitionManagementController.cs new file mode 100644 index 000000000..36c15b2bc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CompetitionManagementController.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-12 17:45 + /// 描 述:赛项管理 + /// + public class CompetitionManagementController : MvcControllerBase + { + private CompetitionManagementIBLL competitionManagementIBLL = new CompetitionManagementBLL(); + + #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 = competitionManagementIBLL.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 CompetitionManagementData = competitionManagementIBLL.GetCompetitionManagementEntity( keyValue ); + var jsonData = new { + CompetitionManagement = CompetitionManagementData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + competitionManagementIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + CompetitionManagementEntity entity = strEntity.ToObject(); + competitionManagementIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Form.cshtml new file mode 100644 index 000000000..8e086e2e8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Form.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "赛项管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
赛项名称*
+ +
+
+
赛项级别*
+
+
+
+
赛项种类*
+ +
+
+
附件上传
+
+
+
+
描述
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CompetitionManagement/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Form.js new file mode 100644 index 000000000..273bd11db --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Form.js @@ -0,0 +1,52 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-12 17:45 + * 描 述:赛项管理 + */ +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 () { + $('#Levels').lrDataItemSelect({ code: 'Level' }); + $('#Url').lrUploader(); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/CompetitionManagement/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/CompetitionManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.cshtml new file mode 100644 index 000000000..7cab76b21 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.cshtml @@ -0,0 +1,48 @@ +@{ + ViewBag.Title = "赛项管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
赛项名称
+ +
+
+
赛项级别
+
+
+
+
赛项种类
+ +
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CompetitionManagement/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.js new file mode 100644 index 000000000..0693b8c6e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.js @@ -0,0 +1,114 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-12 17:45 + * 描 述:赛项管理 + */ +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); + $('#Levels').lrDataItemSelect({ code: 'Level' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/CompetitionManagement/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/CompetitionManagement/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/CompetitionManagement/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + //  导入 + $('#lr_import').on('click', function () { + }); + //  导出 + $('#lr_export').on('click', function () { + }); + //  成绩录入 + $('#lr_input').on('click', function () { + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/CompetitionManagement/GetPageList', + headData: [ + { label: "赛项名称", name: "Name", width: 100, align: "left"}, + { label: "赛项级别", name: "Levels", 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: "Type", width: 100, align: "left"}, + { label: "附件上传", name: "Url", width: 100, align: "left"}, + { label: "描述", name: "Remark", width: 100, align: "left"}, + ], + mainId:'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} 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 dbccc4328..525293b64 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 @@ -890,6 +890,7 @@ + @@ -7014,6 +7015,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/CompetitionManagementMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/CompetitionManagementMap.cs new file mode 100644 index 000000000..a5e868cac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/CompetitionManagementMap.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-12 17:45 + /// 描 述:赛项管理 + /// + public class CompetitionManagementMap : EntityTypeConfiguration + { + public CompetitionManagementMap() + { + #region 表、主键 + //表 + this.ToTable("COMPETITIONMANAGEMENT"); + //主键 + 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 8cd6dcff9..eae9c015e 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 @@ -648,6 +648,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementBLL.cs new file mode 100644 index 000000000..a83361582 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementBLL.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-12 17:45 + /// 描 述:赛项管理 + /// + public class CompetitionManagementBLL : CompetitionManagementIBLL + { + private CompetitionManagementService competitionManagementService = new CompetitionManagementService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return competitionManagementService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取CompetitionManagement表实体数据 + /// + /// 主键 + /// + public CompetitionManagementEntity GetCompetitionManagementEntity(string keyValue) + { + try + { + return competitionManagementService.GetCompetitionManagementEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + competitionManagementService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, CompetitionManagementEntity entity) + { + try + { + competitionManagementService.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/CompetitionManagement/CompetitionManagementEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementEntity.cs new file mode 100644 index 000000000..c43ba18b4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementEntity.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-12 17:45 + /// 描 述:赛项管理 + /// + public class CompetitionManagementEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 赛项名称 + /// + [Column("NAME")] + public string Name { get; set; } + /// + /// 赛项级别 + /// + [Column("LEVELS")] + public string Levels { get; set; } + /// + /// 赛项种类 + /// + [Column("TYPE")] + public string Type { get; set; } + /// + /// 附件 + /// + [Column("URL")] + public string Url { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// CreateUserId + /// + [Column("CREATEUSERID")] + public string CreateUserId { 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/CompetitionManagement/CompetitionManagementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementIBLL.cs new file mode 100644 index 000000000..cd7ff7a6d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementIBLL.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-12 17:45 + /// 描 述:赛项管理 + /// + public interface CompetitionManagementIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取CompetitionManagement表实体数据 + /// + /// 主键 + /// + CompetitionManagementEntity GetCompetitionManagementEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, CompetitionManagementEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementService.cs new file mode 100644 index 000000000..122c11576 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionManagement/CompetitionManagementService.cs @@ -0,0 +1,164 @@ +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-12 17:45 + /// 描 述:赛项管理 + /// + public class CompetitionManagementService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.Id, + t.Name, + t.Levels, + t.Type, + t.Url, + t.Remark + "); + strSql.Append(" FROM CompetitionManagement t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["Name"].IsEmpty()) + { + dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Name Like @Name "); + } + if (!queryParam["Levels"].IsEmpty()) + { + dp.Add("Levels",queryParam["Levels"].ToString(), DbType.String); + strSql.Append(" AND t.Levels = @Levels "); + } + if (!queryParam["Type"].IsEmpty()) + { + dp.Add("Type", "%" + queryParam["Type"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Type Like @Type "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取CompetitionManagement表实体数据 + /// + /// 主键 + /// + public CompetitionManagementEntity GetCompetitionManagementEntity(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, CompetitionManagementEntity 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 84488bd4a..bbd833c4b 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 @@ -2015,6 +2015,10 @@ + + + + From 82b141d2dfa4d4464edffd5c74940726d7e6fb7d Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Sat, 12 Nov 2022 18:02:50 +0800 Subject: [PATCH 34/38] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E8=B5=9B=E9=A1=B9=E6=88=90=E7=BB=A9=E5=BD=95=E5=85=A5=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/CompetitionScoreController.cs | 117 ++++++++++++++ .../Views/CompetitionScore/Form.cshtml | 19 +++ .../Views/CompetitionScore/Form.js | 52 ++++++ .../Views/CompetitionScore/Index.cshtml | 40 +++++ .../Views/CompetitionScore/Index.js | 111 +++++++++++++ .../Learun.Application.Web.csproj | 5 + .../CompetitionScoreMap.cs | 29 ++++ .../Learun.Application.Mapping.csproj | 1 + .../CompetitionScore/CompetitionScoreBLL.cs | 125 +++++++++++++++ .../CompetitionScoreEntity.cs | 70 ++++++++ .../CompetitionScore/CompetitionScoreIBLL.cs | 48 ++++++ .../CompetitionScoreService.cs | 151 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 772 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CompetitionScoreController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/CompetitionScoreMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CompetitionScoreController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CompetitionScoreController.cs new file mode 100644 index 000000000..fe9afaad9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CompetitionScoreController.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-12 17:55 + /// 描 述:赛项成绩录入 + /// + public class CompetitionScoreController : MvcControllerBase + { + private CompetitionScoreIBLL competitionScoreIBLL = new CompetitionScoreBLL(); + + #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 = competitionScoreIBLL.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 CompetitionScoreData = competitionScoreIBLL.GetCompetitionScoreEntity( keyValue ); + var jsonData = new { + CompetitionScore = CompetitionScoreData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + competitionScoreIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + CompetitionScoreEntity entity = strEntity.ToObject(); + competitionScoreIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Form.cshtml new file mode 100644 index 000000000..b26a9d1c4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Form.cshtml @@ -0,0 +1,19 @@ +@{ + ViewBag.Title = "赛项成绩录入"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
赛项*
+
+
+
+
学生*
+
+
+
+
分数*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CompetitionScore/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Form.js new file mode 100644 index 000000000..f2e47212c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Form.js @@ -0,0 +1,52 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-12 17:55 + * 描 述:赛项成绩录入 + */ +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 () { + $('#CompetitionId').lrDataSourceSelect({ code: 'CompetitionInfo',value: 'id',text: 'name' }); + $('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic',value: 'stuno',text: 'stuname' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/CompetitionScore/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/CompetitionScore/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Index.cshtml new file mode 100644 index 000000000..dfc50518a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Index.cshtml @@ -0,0 +1,40 @@ +@{ + ViewBag.Title = "赛项成绩录入"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
赛项
+
+
+
+
学生
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CompetitionScore/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Index.js new file mode 100644 index 000000000..87f0d12f1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionScore/Index.js @@ -0,0 +1,111 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-12 17:55 + * 描 述:赛项成绩录入 + */ +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); + $('#CompetitionId').lrDataSourceSelect({ code: 'CompetitionInfo',value: 'id',text: 'name' }); + $('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic',value: 'stuno',text: 'stuname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/CompetitionScore/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/CompetitionScore/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/CompetitionScore/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/CompetitionScore/GetPageList', + headData: [ + { label: "赛项", name: "CompetitionId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CompetitionInfo', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + }}, + { label: "学生", name: "StuNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', + key: value, + keyId: 'stuno', + callback: function (_data) { + callback(_data['stuname']); + } + }); + }}, + { label: "分数", name: "Score", width: 100, align: "left"}, + ], + mainId:'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} 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 525293b64..ed64ee2a0 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 @@ -891,6 +891,7 @@ + @@ -7019,6 +7020,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/CompetitionScoreMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/CompetitionScoreMap.cs new file mode 100644 index 000000000..7fbaedb48 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/CompetitionScoreMap.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-12 17:55 + /// 描 述:赛项成绩录入 + /// + public class CompetitionScoreMap : EntityTypeConfiguration + { + public CompetitionScoreMap() + { + #region 表、主键 + //表 + this.ToTable("COMPETITIONSCORE"); + //主键 + 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 eae9c015e..6bc5afd74 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 @@ -649,6 +649,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreBLL.cs new file mode 100644 index 000000000..506b974d8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreBLL.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-12 17:55 + /// 描 述:赛项成绩录入 + /// + public class CompetitionScoreBLL : CompetitionScoreIBLL + { + private CompetitionScoreService competitionScoreService = new CompetitionScoreService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return competitionScoreService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取CompetitionScore表实体数据 + /// + /// 主键 + /// + public CompetitionScoreEntity GetCompetitionScoreEntity(string keyValue) + { + try + { + return competitionScoreService.GetCompetitionScoreEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + competitionScoreService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, CompetitionScoreEntity entity) + { + try + { + competitionScoreService.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/CompetitionScore/CompetitionScoreEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreEntity.cs new file mode 100644 index 000000000..2098a6b6c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreEntity.cs @@ -0,0 +1,70 @@ +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-12 17:55 + /// 描 述:赛项成绩录入 + /// + public class CompetitionScoreEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 赛项主键 + /// + [Column("COMPETITIONID")] + public string CompetitionId { get; set; } + /// + /// 学生编号 + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// 成绩 + /// + [Column("SCORE")] + public string Score { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// CreateUserId + /// + [Column("CREATEUSERID")] + public string CreateUserId { 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/CompetitionScore/CompetitionScoreIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreIBLL.cs new file mode 100644 index 000000000..96a11c108 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreIBLL.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-12 17:55 + /// 描 述:赛项成绩录入 + /// + public interface CompetitionScoreIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取CompetitionScore表实体数据 + /// + /// 主键 + /// + CompetitionScoreEntity GetCompetitionScoreEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, CompetitionScoreEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreService.cs new file mode 100644 index 000000000..6ac9d4c87 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CompetitionScore/CompetitionScoreService.cs @@ -0,0 +1,151 @@ +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-12 17:55 + /// 描 述:赛项成绩录入 + /// + public class CompetitionScoreService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM CompetitionScore t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["CompetitionId"].IsEmpty()) + { + dp.Add("CompetitionId",queryParam["CompetitionId"].ToString(), DbType.String); + strSql.Append(" AND t.CompetitionId = @CompetitionId "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo",queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取CompetitionScore表实体数据 + /// + /// 主键 + /// + public CompetitionScoreEntity GetCompetitionScoreEntity(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, CompetitionScoreEntity 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 bbd833c4b..a6667fd76 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 @@ -2019,6 +2019,10 @@ + + + + From 464043a8103431e8792f2ab85c52795b8c3a7e68 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Sat, 12 Nov 2022 18:24:09 +0800 Subject: [PATCH 35/38] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E6=A0=A1=E8=B5=9B=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/CompetitionManagement/Index.cshtml | 3 --- .../Views/CompetitionManagement/Index.js | 9 --------- 2 files changed, 12 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.cshtml index 7cab76b21..3532ace50 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.cshtml @@ -36,9 +36,6 @@  删除  打印
-
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.js index 0693b8c6e..985542daf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CompetitionManagement/Index.js @@ -67,15 +67,6 @@ var bootstrap = function ($, learun) { $('#lr_print').on('click', function () { $('#gridtable').jqprintTable(); }); - //  导入 - $('#lr_import').on('click', function () { - }); - //  导出 - $('#lr_export').on('click', function () { - }); - //  成绩录入 - $('#lr_input').on('click', function () { - }); }, // 初始化列表 initGird: function () { From aaf5bd958791a875809547371a44ffec6038394e Mon Sep 17 00:00:00 2001 From: lb01 Date: Mon, 14 Nov 2022 11:01:28 +0800 Subject: [PATCH 36/38] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=80=81=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E8=80=83=E5=8B=A4=E5=88=97=E8=A1=A8=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=92=8C=E5=AD=A6=E5=BA=A6=E5=AD=A6=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/studentAttendance/single.vue | 940 +++++++++--------- 1 file changed, 467 insertions(+), 473 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/single.vue index eb20952fb..064c92c49 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/single.vue @@ -1,65 +1,58 @@ From 6861e1782e28256c70b7e7e2d98f990a35a6606f Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 14 Nov 2022 11:02:21 +0800 Subject: [PATCH 37/38] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=A1=A8=E5=AD=A6?= =?UTF-8?q?=E5=B9=B4=E5=AD=A6=E6=9C=9F=20=E5=89=8D=E7=AB=AF=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/TimeTable.cs | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs index 06cf05a57..3359f0d1c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs @@ -193,14 +193,29 @@ namespace Learun.Application.WebApi.Modules var endDate = Common.CalculateLastDateOfWeek(startdate).ToString("yyyy-MM-dd"); // 获取学年,学期 - var semesterAndYear = Common.GetSemesterAndYear(startDate); - var strAcademicYear = semesterAndYear.AcademicYearLong; - var strSemester = semesterAndYear.Semester; + var strAcademicYear = ""; + var strSemester = ""; + var AcademicYearShort = ""; + if (!string.IsNullOrEmpty(param.StartDate)) + { + var NewsemesterAndYear = Common.GetSemesterAndYear(param.StartDate); + strAcademicYear = NewsemesterAndYear.AcademicYearLong; + strSemester = NewsemesterAndYear.Semester; + AcademicYearShort = NewsemesterAndYear.AcademicYearShort; + } + else + { + var semesterAndYear = Common.GetSemesterAndYear(startDate); + strAcademicYear = semesterAndYear.AcademicYearLong; + strSemester = semesterAndYear.Semester; + AcademicYearShort = semesterAndYear.AcademicYearShort; + } + if (param.StartDate.IsEmpty() && param.EndDate.IsEmpty()) { // 校历 - var entity = schoolCalendarIbll.GetSchoolCalendarEntityByNo(semesterAndYear.AcademicYearShort, semesterAndYear.Semester); + var entity = schoolCalendarIbll.GetSchoolCalendarEntityByNo(AcademicYearShort, strSemester); var StartTime = entity.StartTime.Value; //获取第几周 var curWeek = WeekOfYear(startdate, entity.StartTime.Value, entity.EndTime.Value); From c3670f9969d1676da6b7f41dceabe7df0035a4e6 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 14 Nov 2022 11:37:40 +0800 Subject: [PATCH 38/38] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E8=AF=B7=E5=81=87API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/StuLeaveManagementApi.cs | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuLeaveManagementApi.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuLeaveManagementApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuLeaveManagementApi.cs new file mode 100644 index 000000000..8479f9349 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuLeaveManagementApi.cs @@ -0,0 +1,121 @@ +using Nancy; +using Learun.Util; +using System.Collections.Generic; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using static Learun.Application.WebApi.Modules.StuInfoFreshApi; +using System; +using System.IO; +using System.Linq; +using Learun.Application.Base.SystemModule; +using Learun.Application.OA; +using Learun.Application.OA.File.FileInfo; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using Learun.Application.TwoDevelopment.LR_Desktop; +using Learun.Application.WorkFlow; +using Microsoft.Ajax.Utilities; + +namespace Learun.Application.WebApi +{ + ///2022.11.14 + /// + /// 学生请假 + /// + + public class StuLeaveManagementApi : BaseApi + { + + private StuLeaveManagementIBLL stuLeaveManagementIBLL = new StuLeaveManagementBLL(); + + /// + /// 注册接口 + /// + public StuLeaveManagementApi() + : base("/Learun/adms/EducationalAdministration/StuLeaveManagement") + { + Get["/pagelist"] = GetPageList; + Get["/form"] = GetForm; + Post["/delete"] = DeleteForm; + Post["/save"] = SaveForm; + } + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetPageList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = stuLeaveManagementIBLL.GetPageList(parameter.pagination, parameter.queryJson); + var jsonData = new + { + rows = data, + total = parameter.pagination.total, + page = parameter.pagination.page, + records = parameter.pagination.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var StuLeaveManagementData = stuLeaveManagementIBLL.GetStuLeaveManagementEntity(keyValue); + var jsonData = new + { + StuLeaveManagement = StuLeaveManagementData, + }; + return Success(jsonData); + } + + + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// + /// + public Response DeleteForm(dynamic _) + { + string keyValue = this.GetReqData(); + stuLeaveManagementIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// + /// + public Response SaveForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + StuLeaveManagementEntity entity = parameter.strEntity.ToObject(); + stuLeaveManagementIBLL.SaveEntity(parameter.keyValue, entity); + return Success("保存成功!"); + } + #endregion + + #region 私有类 + + /// + /// 表单实体类 + /// + private class ReqFormEntity + { + public string keyValue { get; set; } + public string strEntity { get; set; } + } + #endregion + + } + +} \ No newline at end of file