From e18a7fd7143093c5178e7b9693f36039a1624302 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 8 Nov 2022 10:10:37 +0800 Subject: [PATCH 1/5] =?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 2/5] =?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 3/5] =?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 4/5] =?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 5/5] =?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 @@ + + + + + + + +