diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DtStuLeaveController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DtStuLeaveController.cs index 44971c722..4e37e6c2e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DtStuLeaveController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DtStuLeaveController.cs @@ -3,6 +3,7 @@ using System.Data; using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; using System.Collections.Generic; +using System; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -26,7 +27,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -35,7 +36,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); } #endregion @@ -82,8 +83,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var DtStuLeaveData = dtStuLeaveIBLL.GetDtStuLeaveEntity( keyValue ); - var jsonData = new { + var DtStuLeaveData = dtStuLeaveIBLL.GetDtStuLeaveEntity(keyValue); + var jsonData = new + { DtStuLeave = DtStuLeaveData, }; return Success(jsonData); @@ -115,10 +117,60 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { DtStuLeaveEntity entity = strEntity.ToObject(); - dtStuLeaveIBLL.SaveEntity(keyValue,entity); + entity.FlowNo = "0"; + if (string.IsNullOrEmpty(keyValue)) + { + entity.LeaveAddTime = DateTime.Now; + } + dtStuLeaveIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } #endregion + #region 扩展数据 + + #region MyRegion + /// + /// 提交数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult SubmitList(string keyValue) + { + var Model = dtStuLeaveIBLL.GetDtStuLeaveEntity(keyValue); + if (Model != null) + { + Model.FlowNo = "1"; + dtStuLeaveIBLL.SaveEntity(keyValue, Model); + } + return Success("提交成功!"); + } + #endregion + + #region 教师审核 + /// + /// 提交数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult TeacherAudit(string keyValue) + { + var Model = dtStuLeaveIBLL.GetDtStuLeaveEntity(keyValue); + if (Model != null) + { + Model.FlowNo = "2"; + dtStuLeaveIBLL.SaveEntity(keyValue, Model); + } + return Success("审核成功!"); + } + #endregion + + #endregion + + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Form.cshtml index 97e3dba88..b7bdcf466 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Form.cshtml @@ -4,11 +4,11 @@ }
-
所属系*
+
所  属  系*
-
班级*
+
班       级*
@@ -16,7 +16,7 @@
-
申请类型*
+
请假类型*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Form.js index c12d49d22..8553489af 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Form.js @@ -15,18 +15,35 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#CreateUserDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); - $('#CreateUserClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' }); + $('#LeaveType').lrDataSourceSelect({ code: 'StuLeaveType', value: 'typeno', text: 'typename' }); + $('#CreateUserDeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', + value: 'deptno', + text: 'deptname', + maxHeight: 200, + select: function (item) { + var ClassNo = $("#CreateUserDeptNo").lrselectGet(); + if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { + $('#CreateUserClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: " 1=1 and deptno in (" + ClassNo + ")" }, + value: "classno", + text: "classname", + maxHeight: 200 + }); + } + } + }); + $("#CreateUserClassNo").lrselect(); $('#CreateUserName')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; $('#CreateUserName').val(learun.clientdata.get(['userinfo']).realName); - $('#LeaveType').lrDataItemSelect({ code: 'LeaveType' }); }, initData: function () { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DtStuLeave/GetFormData?keyValue=' + keyValue, function (data) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { - $('#' + id ).jfGridSet('refreshdata', data[id]); + $('#' + id).jfGridSet('refreshdata', data[id]); } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Index.cshtml index e5144461a..487e79011 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Index.cshtml @@ -31,9 +31,11 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Index.js index 26bb585a5..4fcf6dd79 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Index.js @@ -16,9 +16,26 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); - $('#CreateUserDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); - $('#CreateUserClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' }); - $('#LeaveType').lrDataItemSelect({ code: 'LeaveType' }); + $('#LeaveType').lrDataSourceSelect({ code: 'StuLeaveType', value: 'typeno', text: 'typename' }); + $('#CreateUserDeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', + value: 'deptno', + text: 'deptname', + maxHeight: 200, + select: function (item) { + var ClassNo = $("#CreateUserDeptNo").lrselectGet(); + if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { + $('#CreateUserClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: " 1=1 and deptno in (" + ClassNo + ")" }, + value: "classno", + text: "classname", + maxHeight: 200 + }); + } + } + }); + $("#CreateUserClassNo").lrselect(); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -58,7 +75,7 @@ var bootstrap = function ($, learun) { if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/DtStuLeave/DeleteForm', { keyValue: keyValue}, function () { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/DtStuLeave/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } @@ -71,60 +88,89 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/DtStuLeave/GetPageList', headData: [ - { label: "所属系", name: "CreateUserDeptNo", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', - key: value, - keyId: 'deptno', - callback: function (_data) { - callback(_data['deptname']); - } - }); - }}, - { label: "班级", name: "CreateUserClassNo", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', - key: value, - keyId: 'classno', - callback: function (_data) { - callback(_data['classname']); - } - }); - }}, - { label: "申请用户", name: "CreateUserName", 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: "LeaveType", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('dataItem', { - key: value, - code: 'LeaveType', - callback: function (_data) { - callback(_data.text); - } - }); - }}, - { label: "开始时间", name: "BeginDate", width: 200, align: "left"}, - { label: "结束时间", name: "EndDate", width: 200, align: "left"}, - { label: "申请理由", name: "LeaveReason", width: 100, align: "left"}, - { label: "流程Id", name: "processId", width: 100, align: "left"}, + { + label: "所属系", name: "CreateUserDeptNo", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "班级", name: "CreateUserClassNo", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { + label: "申请用户", name: "CreateUserName", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "当前时间", name: "LeaveAddTime", width: 200, align: "left" }, + { + label: "请假类型", name: "LeaveType", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuLeaveType', + key: value, + keyId: 'typeno', + callback: function (_data) { + callback(_data['typename']); + } + }); + } + }, + { label: "开始时间", name: "BeginDate", width: 200, align: "left" }, + { label: "结束时间", name: "EndDate", width: 200, align: "left" }, + { label: "申请理由", name: "LeaveReason", width: 350, align: "left" }, + { + label: "当前状态", name: "FlowNo", width: 50, align: "center", + formatter: function (cellvalue, row) { + if (cellvalue == 0) { + return '草稿'; + } + else if (cellvalue == 1) { + return '审批中'; + } + else if (cellvalue == 2) { + return '请假中'; + } + else if (cellvalue == 3) { + return '已销假'; + } + } + }, + { + label: "流程Id", name: "processId", width: 100, align: "left" + }, ], - mainId:'Id', + mainId: 'Id', isPage: true }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/SW_Ask_StudentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/SW_Ask_StudentController.cs new file mode 100644 index 000000000..3b8957d6b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/SW_Ask_StudentController.cs @@ -0,0 +1,117 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.StudentWork; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.StudentWork.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-07-26 15:41 + /// 描 述:奖学金可申请名单 + /// + public class SW_Ask_StudentController : MvcControllerBase + { + private SW_Ask_StudentIBLL sW_Ask_StudentIBLL = new SW_Ask_StudentBLL(); + + #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 = sW_Ask_StudentIBLL.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 SW_Ask_StudentData = sW_Ask_StudentIBLL.GetSW_Ask_StudentEntity( keyValue ); + var jsonData = new { + SW_Ask_Student = SW_Ask_StudentData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + sW_Ask_StudentIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + SW_Ask_StudentEntity entity = strEntity.ToObject(); + sW_Ask_StudentIBLL.SaveEntity(keyValue,entity); + if (keyValue != null) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Form.cshtml new file mode 100644 index 000000000..329ed78ac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Form.cshtml @@ -0,0 +1,19 @@ +@{ + ViewBag.Title = "奖学金可申请名单"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
所属系*
+
+
+
+
班级*
+
+
+
+
学生*
+
+
+
+@Html.AppendJsFile("/Areas/StudentWork/Views/SW_Ask_Student/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Form.js new file mode 100644 index 000000000..6bb8a0926 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Form.js @@ -0,0 +1,84 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-07-26 15:41 + * 描 述:奖学金可申请名单 + */ +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 () { + $('#UserDeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', + value: 'deptno', + text: 'deptname', + maxHeight: 200, + select: function (item) { + var DeptNo = $("#UserDeptNo").lrselectGet(); + if (DeptNo != null && DeptNo != "" && DeptNo != undefined) { + $('#UserClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: " 1=1 and deptno in (" + DeptNo + ")" }, + value: "classno", + text: "classname", + maxHeight: 200, + select: function (item) { + var ClassNo = $("#UserClassNo").lrselectGet(); + if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { + $('#StuName').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuList', + param: { strWhere: " 1=1 and classno in (" + ClassNo + ")" }, + value: "stuno", + text: "stuname", + maxHeight: 200, + allowSearch: true + }); + } + } + //{ code: 'StuList', value: 'stuno', text: 'stuname' } + }); + } + } + }); + $("#UserClassNo").lrselect(); + $('#StuName').lrselect(); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/StudentWork/SW_Ask_Student/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 + '/StudentWork/SW_Ask_Student/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Index.cshtml new file mode 100644 index 000000000..db1d4bb71 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Index.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "奖学金可申请名单"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
所属系
+
+
+
+
班级
+
+
+
+
学生
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/StudentWork/Views/SW_Ask_Student/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Index.js new file mode 100644 index 000000000..2110dbb4b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Index.js @@ -0,0 +1,167 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-07-26 15:41 + * 描 述:奖学金可申请名单 + */ +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); + $('#UserDeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', + value: 'deptno', + text: 'deptname', + maxHeight: 200, + select: function (item) { + var DeptNo = $("#UserDeptNo").lrselectGet(); + if (DeptNo != null && DeptNo != "" && DeptNo != undefined) { + $('#UserClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: " 1=1 and deptno in (" + DeptNo + ")" }, + value: "classno", + text: "classname", + allowSearch: false, + maxHeight: 200, + select: function (item) { + var ClassNo = $("#UserClassNo").lrselectGet(); + if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { + $('#StuName').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuList', + param: { strWhere: " 1=1 and classno in (" + ClassNo + ")" }, + value: "stuno", + text: "stuno", + maxHeight: 200, + allowSearch: true + }); + } + } + }); + } else { + $("#UserClassNo").lrselect(); + } + } + }); + $("#UserClassNo").lrselect(); + $("#StuName").lrselect(); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/StudentWork/SW_Ask_Student/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('F_ItemId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/StudentWork/SW_Ask_Student/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('F_ItemId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/StudentWork/SW_Ask_Student/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/StudentWork/SW_Ask_Student/GetPageList', + headData: [ + { + label: "所属系", name: "UserDeptNo", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "班级", name: "UserClassNo", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { + label: "学生", name: "StuName", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', + key: value, + keyId: 'stuid', + callback: function (_data) { + callback(_data['stuname']); + } + }); + } + }, + { label: "创建时间", name: "CreateTime", width: 200, align: "left" }, + { label: "创建用户", name: "CreateUserName", width: 200, align: "left" }, + { label: "备注", name: "DEMO", width: 300, align: "left" }, + ], + mainId: 'F_ItemId', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.CreateTime = learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'); + param.CreateUserId = learun.clientdata.get(['userinfo']).userId; + param.CreateUserName = learun.clientdata.get(['userinfo']).realName; + $('#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 062435a24..3b6e5de78 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 @@ -834,6 +834,7 @@ + @@ -6505,6 +6506,10 @@ + + + + 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 8842acc19..b08eea1c2 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 @@ -583,6 +583,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/StudentWork/SW_Ask_StudentMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/StudentWork/SW_Ask_StudentMap.cs new file mode 100644 index 000000000..071e6f6c0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/StudentWork/SW_Ask_StudentMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.StudentWork; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-07-26 15:41 + /// 描 述:奖学金可申请名单 + /// + public class SW_Ask_StudentMap : EntityTypeConfiguration + { + public SW_Ask_StudentMap() + { + #region 表、主键 + //表 + this.ToTable("SW_ASK_STUDENT"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStuLeave/DtStuLeaveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStuLeave/DtStuLeaveService.cs index 353faf9cf..df49269dc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStuLeave/DtStuLeaveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStuLeave/DtStuLeaveService.cs @@ -31,17 +31,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" - t.Id, - t.CreateUserDeptNo, - t.CreateUserClassNo, - t.CreateUserName, - t.LeaveType, - t.BeginDate, - t.EndDate, - t.LeaveReason, - t.processId - "); + strSql.Append(@" t.* "); strSql.Append(" FROM DtStuLeave t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); @@ -88,16 +78,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" - t.CreateUserDeptNo, - t.CreateUserClassNo, - t.CreateUserName, - t.LeaveType, - t.BeginDate, - t.EndDate, - t.LeaveReason, - t.processId - "); + strSql.Append(@" t.* "); strSql.Append(" FROM DtStuLeave t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 759ed6f8f..9d7b391c4 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 @@ -1750,6 +1750,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Student/SW_Ask_StudentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Student/SW_Ask_StudentBLL.cs new file mode 100644 index 000000000..6b4d812dc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Student/SW_Ask_StudentBLL.cs @@ -0,0 +1,125 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.StudentWork +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-07-26 15:41 + /// 描 述:奖学金可申请名单 + /// + public class SW_Ask_StudentBLL : SW_Ask_StudentIBLL + { + private SW_Ask_StudentService sW_Ask_StudentService = new SW_Ask_StudentService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return sW_Ask_StudentService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取SW_Ask_Student表实体数据 + /// + /// 主键 + /// + public SW_Ask_StudentEntity GetSW_Ask_StudentEntity(string keyValue) + { + try + { + return sW_Ask_StudentService.GetSW_Ask_StudentEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + sW_Ask_StudentService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, SW_Ask_StudentEntity entity) + { + try + { + sW_Ask_StudentService.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/StudentWork/SW_Ask_Student/SW_Ask_StudentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Student/SW_Ask_StudentEntity.cs new file mode 100644 index 000000000..717ef1187 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Student/SW_Ask_StudentEntity.cs @@ -0,0 +1,90 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.StudentWork +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-07-26 15:41 + /// 描 述:奖学金可申请名单 + /// + public class SW_Ask_StudentEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 账户 + /// + [Column("ACCOUNT")] + public string Account { get; set; } + /// + /// StuUser + /// + [Column("STUUSER")] + public string StuUser { get; set; } + /// + /// StuName + /// + [Column("STUNAME")] + public string StuName { get; set; } + /// + /// 系 + /// + [Column("USERDEPTNO")] + public string UserDeptNo { get; set; } + /// + /// 班级 + /// + [Column("USERCLASSNO")] + public string UserClassNo { get; set; } + /// + /// 创建用户 + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// 创建人 + /// + [Column("CREATEUSERNAME")] + public string CreateUserName { get; set; } + /// + /// 创建时间 + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// 备注 + /// + [Column("DEMO")] + public string Demo { 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/StudentWork/SW_Ask_Student/SW_Ask_StudentIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Student/SW_Ask_StudentIBLL.cs new file mode 100644 index 000000000..f9b66a9cc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Student/SW_Ask_StudentIBLL.cs @@ -0,0 +1,48 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.StudentWork +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-07-26 15:41 + /// 描 述:奖学金可申请名单 + /// + public interface SW_Ask_StudentIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取SW_Ask_Student表实体数据 + /// + /// 主键 + /// + SW_Ask_StudentEntity GetSW_Ask_StudentEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, SW_Ask_StudentEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Student/SW_Ask_StudentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Student/SW_Ask_StudentService.cs new file mode 100644 index 000000000..262e27c28 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Student/SW_Ask_StudentService.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.StudentWork +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-07-26 15:41 + /// 描 述:奖学金可申请名单 + /// + public class SW_Ask_StudentService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" t.* "); + strSql.Append(" FROM SW_Ask_Student t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["UserDeptNo"].IsEmpty()) + { + dp.Add("UserDeptNo",queryParam["UserDeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.UserDeptNo = @UserDeptNo "); + } + if (!queryParam["UserClassNo"].IsEmpty()) + { + dp.Add("UserClassNo",queryParam["UserClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.UserClassNo = @UserClassNo "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName",queryParam["StuName"].ToString(), DbType.String); + strSql.Append(" AND t.StuName = @StuName "); + } + return this.BaseRepository().FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取SW_Ask_Student表实体数据 + /// + /// 主键 + /// + public SW_Ask_StudentEntity GetSW_Ask_StudentEntity(string keyValue) + { + try + { + return this.BaseRepository().FindEntity(keyValue.ToInt()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository().Delete(t=>t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, SW_Ask_StudentEntity entity) + { + try + { + if (keyValue != null) + { + entity.Modify(keyValue); + this.BaseRepository().Update(entity); + } + else + { + entity.Create(); + this.BaseRepository().Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln b/Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln index b2f47cb27..1a066636b 100644 --- a/Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln +++ b/Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln @@ -1637,7 +1637,7 @@ Global {E05A2B9A-A939-450F-9A44-A8B3201D055A} = {ED258CD0-0A0C-490B-9D8F-B4CEC4467251} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {968C278F-4142-4DFF-96B0-B3D70A649451} EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35 + SolutionGuid = {968C278F-4142-4DFF-96B0-B3D70A649451} EndGlobalSection EndGlobal