diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DailyAssessController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DailyAssessController.cs new file mode 100644 index 000000000..814ee2fcf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DailyAssessController.cs @@ -0,0 +1,112 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using System; + +namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-08-11 16:55 + /// 描 述:寝室日常考核管理 + /// + public class Acc_DailyAssessController : MvcControllerBase + { + private Acc_DailyAssessIBLL acc_DailyAssessIBLL = new Acc_DailyAssessBLL(); + + #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 = acc_DailyAssessIBLL.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 Acc_DailyAssessData = acc_DailyAssessIBLL.GetAcc_DailyAssessEntity( keyValue ); + var jsonData = new { + Acc_DailyAssess = Acc_DailyAssessData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + acc_DailyAssessIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Acc_DailyAssessEntity entity = strEntity.ToObject(); + acc_DailyAssessIBLL.SaveEntity(keyValue,entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.cshtml new file mode 100644 index 000000000..01911c853 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.cshtml @@ -0,0 +1,70 @@ +@{ + ViewBag.Title = "寝室日常考核管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
+
宿舍楼
+
+
+
+
单元
+
+
+
+
楼层
+
+
+
+
宿舍*
+
+
+ +
+
专业部*
+
+
+
+
专业*
+
+
+
+
班级*
+
+
+
+
学生*
+
+
+
+
+
日期*
+ +
+
+
卫生奖分
+ +
+
+
卫生扣分
+ +
+
+
纪律奖分
+ +
+
+
纪律扣分
+ +
+
+
奖扣分原因*
+ +
+
+
附件上传
+
+
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.js new file mode 100644 index 000000000..2f76c5f80 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.js @@ -0,0 +1,147 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-08-11 16:55 + * 描 述:寝室日常考核管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var selectedRow = learun.frameTab.currentIframe().selectedRow; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#Dormitory').lrDataSourceSelect({ + code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { + if (item) { + $('#Unit').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } + }); + } + } + }); + $('#Unit').lrselect({ + text: 'name', + value: 'id', + select: function (item) { + if (item) { + $('#Floor').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } + }); + } + } + }); + $('#Floor').lrselect({ + text: 'name', + value: 'id', + select: function (item) { + if (item) { + $('#RId').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } + }); + } + } + }); + $('#RId').lrselect({ + text: 'name', + value: 'id', + allowSearch: true + }); + + $('#DeptNo').lrselect({ + allowSearch: true, + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + select: function (item) { + if (item) { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } + }); + } else { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + + } + }); + $('#MajorNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + value: "majorno", + text: "majorname", + param: { strWhere: "1=1 AND CheckMark=1" }, + select: function (item) { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" }, + value: "classno", + text: "classname" + }); + $('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); + $('#Files').lrUploader(); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/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]); + } + } + }); + } + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.cshtml new file mode 100644 index 000000000..efbe2b52c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.cshtml @@ -0,0 +1,70 @@ +@{ + ViewBag.Title = "寝室日常考核管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
宿舍楼
+
+
+
+
单元
+
+
+
+
楼层
+
+
+
+
宿舍
+
+
+
+
专业部
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
学生姓名
+ +
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.js new file mode 100644 index 000000000..efb227770 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.js @@ -0,0 +1,340 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-08-11 16:55 + * 描 述:寝室日常考核管理 + */ +var selectedRow; +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 300, 400); + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#Dormitory').lrDataSourceSelect({ + code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { + if (item) { + $('#Unit').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } + }); + } + } + }); + $('#Unit').lrselect({ + text: 'name', + value: 'id', + select: function (item) { + if (item) { + $('#Floor').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } + }); + } + } + }); + $('#Floor').lrselect({ + text: 'name', + value: 'id', + select: function (item) { + if (item) { + $('#RId').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } + }); + } + } + }); + $('#RId').lrselect({ + text: 'name', + value: 'id', + allowSearch: true + }); + $('#DeptNo').lrselect({ + allowSearch: true, + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + select: function (item) { + if (item) { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } + }); + } else { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + + } + }); + $('#MajorNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + value: "majorno", + text: "majorname", + param: { strWhere: "1=1 AND CheckMark=1" }, + select: function (item) { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" }, + value: "classno", + text: "classname" + }); + + // 新增 + $('#lr_add').on('click', function () { + selectedRow = null; + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form', + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + selectedRow = null; + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form?keyValue=' + keyValue, + width: 800, + height: 600, + 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 + '/LogisticsManagement/Acc_DailyAssess/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + + // 快速新增 + $('#lr_addQuickly').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + selectedRow = $('#gridtable').jfGridGet('rowdata'); + //console.log(selectedRow); + learun.layerForm({ + id: 'form', + title: '快速新增', + url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form', + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/GetPageList', + headData: [ + { + label: "专业部", name: "DeptNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "专业", name: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { + label: "宿舍楼", name: "Dormitory", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_DormitoryData', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: "单元", name: "Unit", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_UnitData', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: "楼层", name: "Floor", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_FloorData', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: "寝室号", name: "RId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_RoomData', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: "学生姓名", name: "StuNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', + key: value, + keyId: 'stuno', + callback: function (_data) { + callback(_data['stuname']); + } + }); + } + }, + { label: "日期", name: "Date", width: 130, align: "left" }, + { label: "卫生奖分", name: "AddScoreHealth", width: 100, align: "left" }, + { label: "卫生扣分", name: "MinusScoreHealth", width: 100, align: "left" }, + { label: "纪律奖分", name: "AddScore", width: 100, align: "left" }, + { label: "纪律扣分", name: "MinusScore", width: 100, align: "left" }, + { label: "奖扣分原因", name: "Reason", width: 200, align: "left" }, + ], + mainId: 'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 92a9810a2..9bb76a158 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 @@ -382,6 +382,7 @@ + @@ -1482,6 +1483,8 @@ + + @@ -7871,6 +7874,8 @@ + + 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 61f5d8b8d..cdc7b7936 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 @@ -127,6 +127,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DailyAssessMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DailyAssessMap.cs new file mode 100644 index 000000000..5182e934d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DailyAssessMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-08-11 16:55 + /// 描 述:学生日常规管理 + /// + public class Acc_DailyAssessMap : EntityTypeConfiguration + { + public Acc_DailyAssessMap() + { + #region 表、主键 + //表 + this.ToTable("ACC_DAILYASSESS"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #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 ea017b381..02316ccb0 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 @@ -373,6 +373,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessBLL.cs new file mode 100644 index 000000000..067a2d030 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessBLL.cs @@ -0,0 +1,124 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-08-11 16:55 + /// 描 述:寝室日常考核管理 + /// + public class Acc_DailyAssessBLL : Acc_DailyAssessIBLL + { + private Acc_DailyAssessService acc_DailyAssessService = new Acc_DailyAssessService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return acc_DailyAssessService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Acc_DailyAssess表实体数据 + /// 主键 + /// + /// + public Acc_DailyAssessEntity GetAcc_DailyAssessEntity(string keyValue) + { + try + { + return acc_DailyAssessService.GetAcc_DailyAssessEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + acc_DailyAssessService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, Acc_DailyAssessEntity entity) + { + try + { + acc_DailyAssessService.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/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessEntity.cs new file mode 100644 index 000000000..e303a6851 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessEntity.cs @@ -0,0 +1,146 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-08-11 16:55 + /// 描 述:寝室日常考核管理 + /// + public class Acc_DailyAssessEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 宿舍楼 + /// + [Column("DORMITORY")] + public string Dormitory { get; set; } + /// + /// 单元 + /// + [Column("UNIT")] + public string Unit { get; set; } + /// + /// 楼层 + /// + [Column("FLOOR")] + public string Floor { get; set; } + /// + /// 宿舍号 + /// + [Column("RID")] + public string RId { get; set; } + /// + /// 系 + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 专业 + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// 班级 + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// 学号 + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// 日期 + /// + [Column("DATE")] + public DateTime? Date { get; set; } + /// + /// 卫生奖分 + /// + [Column("ADDSCOREHEALTH")] + public decimal? AddScoreHealth { get; set; } + /// + /// 卫生扣分 + /// + [Column("MINUSSCOREHEALTH")] + public decimal? MinusScoreHealth { get; set; } + /// + /// 奖分 + /// + [Column("ADDSCORE")] + public decimal? AddScore { get; set; } + /// + /// 扣分 + /// + [Column("MINUSSCORE")] + public decimal? MinusScore { get; set; } + /// + /// 奖扣分原因 + /// + [Column("REASON")] + public string Reason { get; set; } + /// + /// 创建人 + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// 创建时间 + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// 编辑人 + /// + [Column("MODIFYUSERID")] + public string ModifyUserId { get; set; } + /// + /// 编辑时间 + /// + [Column("MODIFYTIME")] + public DateTime? ModifyTime { get; set; } + /// + /// 附件上传 + /// + [Column("FILES")] + public string Files { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + this.CreateTime = DateTime.Now; + UserInfo userInfo = LoginUserInfo.Get(); + this.CreateUserId = userInfo.userId; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + this.ModifyTime = DateTime.Now; + UserInfo userInfo = LoginUserInfo.Get(); + this.ModifyUserId = userInfo.userId; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessIBLL.cs new file mode 100644 index 000000000..5fd2d09ee --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessIBLL.cs @@ -0,0 +1,49 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-08-11 16:55 + /// 描 述:寝室日常考核管理 + /// + public interface Acc_DailyAssessIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Acc_DailyAssess表实体数据 + /// 主键 + /// + /// + Acc_DailyAssessEntity GetAcc_DailyAssessEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(string keyValue, Acc_DailyAssessEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessService.cs new file mode 100644 index 000000000..258176b1b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessService.cs @@ -0,0 +1,188 @@ +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.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-08-11 16:55 + /// 描 述:寝室日常考核管理 + /// + public class Acc_DailyAssessService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM Acc_DailyAssess t "); + strSql.Append(" left join StuInfoBasic s on t.StuNo=s.StuNo "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.Date >= @startTime AND t.Date <= @endTime ) "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.ClassNo = @ClassNo "); + } + if (!queryParam["Dormitory"].IsEmpty()) + { + dp.Add("Dormitory", queryParam["Dormitory"].ToString(), DbType.String); + strSql.Append(" AND t.Dormitory = @Dormitory "); + } + if (!queryParam["Unit"].IsEmpty()) + { + dp.Add("Unit", queryParam["Unit"].ToString(), DbType.String); + strSql.Append(" AND t.Unit = @Unit "); + } + if (!queryParam["Floor"].IsEmpty()) + { + dp.Add("Floor", queryParam["Floor"].ToString(), DbType.String); + strSql.Append(" AND t.Floor = @Floor "); + } + if (!queryParam["RId"].IsEmpty()) + { + dp.Add("RId", queryParam["RId"].ToString(), DbType.String); + strSql.Append(" AND t.RId = @RId "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%"+queryParam["StuName"].ToString()+"%", DbType.String); + strSql.Append(" AND s.StuName like @StuName "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Acc_DailyAssess表实体数据 + /// 主键 + /// + /// + public Acc_DailyAssessEntity GetAcc_DailyAssessEntity(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, Acc_DailyAssessEntity 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 + + } +}