diff --git a/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园统一身份认证补充接口说明V1.0.docx b/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园统一身份认证补充接口说明V1.0.docx new file mode 100644 index 000000000..0c95c7c1d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园统一身份认证补充接口说明V1.0.docx @@ -0,0 +1,69 @@ + + +数字化智慧校园 + + + + + +统一身份认证补充接口 + + + + + + +V1.0 + + + + + + +概述 + 根据特定需求开发补充接口 +登录接口 + 采用标准Http GET 请求发送用户名、密码到认证接口,接口实现用户名密码判定后返回标准json; + +请求地址:http://112.45.152.8:8000/Login/CheckLoginForSSOBC +请求方式:发送标准Http GET请求到认证地址 + +接口请求参数 + 参数 + 说明 +u +用户名 +p +密码 + +认证接口返回参数 + 参数 + 说明 +code +状态码 返回200成功、其他失败 +info +状态消息 返回login success表示登录成功、其他失败 +data +保留 暂时无用 + +登录成功后,认证服务器将在用户浏览器cookies中写入数字化智慧校园系统数据,第三方系统可直接跳转到http://112.45.152.8:8000/Home/Index 进入数字化智慧校园系统。 + +退出登录接口 + 第三方系统退出时,需要主动调用退出登录接口以同步数字化智慧校园系统退出状态。 + 采用标准Http POST 请求,返回标准json; + +请求地址:http://112.45.152.8:8000/Login/OutLoginForSSOBC +请求方式:发送标准Http POST请求到认证地址 + +接口请求参数:无 + +认证接口返回参数 + 参数 + 说明 +code +状态码 返回200成功、其他失败 +info +状态消息 返回logout success表示退出成功、其他失败 +data +保留 暂时无用 + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js index bbf9d244a..aec0dbc56 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js @@ -1,15 +1,15 @@ -var config = { - webapi: 'http://localhost:8088/', - web: "http://localhost:8087/"//web地址,用于配置logo -}; -//var config = { +// var config = { +// webapi: 'http://localhost:8080/', +// web: "http://localhost:8082/"//web地址,用于配置logo +// }; +// var config = { // webapi: 'http://112.230.201.53:31173/', // web:"http://112.230.201.53/:8081/"//web地址,用于配置logo -//}; -//var config = { -// webapi: 'http://localhost:31173/', -// web: "http://localhost:20472/"//web地址,用于配置logo -//}; +// }; +var config = { + webapi: 'http://localhost:31173/', + web: "http://localhost:20472/"//web地址,用于配置logo +}; //var config = { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/data/city.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/data/city.js index 6e6e2f504..b94d2a5d3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/data/city.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/data/city.js @@ -1,4 +1,4 @@ -var cityData = [{ +var cityData = [{ value: '110000', text: '北京市', children: [{ @@ -7242,7 +7242,11 @@ }] }, { value: "441900", - text: "东莞市" + text: "东莞市", + children: [{ + value: "441901", + text: "市辖区" + }] }, { value: "442000", text: "中山市" diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/EpidemicSituationCopy.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/EpidemicSituationCopy.js index 0b8e53ed1..6e0f12140 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/EpidemicSituationCopy.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/EpidemicSituationCopy.js @@ -1,4 +1,4 @@ -/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) * Copyright (c) 2013-2018 北京泉江科技有限公司 * 创建人:超级管理员 * 日 期:2020-02-03 14:37 @@ -48,7 +48,7 @@ code: 'EUserType' }); $page.find('#lr_PersonnelManagementEpidemicSituation_btn').on('tap', function () { - learun.nav.go({ path: 'PersonnelManagement/EpidemicSituationCopy/form', title: '新增', type: 'right' }); + learun.nav.go({ path: 'PersonnelManagement/EpidemicSituationCopy/form', title: '每日疫情打卡', type: 'right' }); }); }, lclass: 'lr-list', @@ -57,7 +57,7 @@ pagination: { rows: param.rows, page: param.page, - sidx: 'ID', + sidx: 'CreateTime', sord: 'DESC' }, queryJson: '{}' diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.html index 3cef3e612..a7a1e3c8c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.html +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.html @@ -1,4 +1,4 @@ -
+
@@ -7,22 +7,22 @@
-
+
-
+
-
+
- +
@@ -32,18 +32,18 @@
-
+
- +
- +
@@ -51,7 +51,7 @@
- +
@@ -61,7 +61,7 @@
- +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.js index 25ed7d764..2d5a734e1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.js @@ -1,4 +1,4 @@ -/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) * Copyright (c) 2013-2018 北京泉江科技有限公司 * 创建人:超级管理员 * 日 期:2020-02-03 14:37 @@ -11,6 +11,7 @@ var page = { isScroll: true, init: function ($page, param) { + learun.layer.loading(true, '正在加载...'); keyValue = param.keyValue; // 添加头部按钮列表 var _html = '\ @@ -363,6 +364,7 @@ $page.find('#Department').parent().show(); $page.find('#StudentSource').parent().hide(); } + learun.layer.loading(false); }, destroy: function (pageinfo) { $header = null; keyValue = ''; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.css new file mode 100644 index 000000000..9cba3d585 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.css @@ -0,0 +1,63 @@ +.lr-login-page { + position: relative; + height: 100%; + width: 100%; + background-color: #fff; +} + + .lr-login-page .login-content { + position: absolute; + width: 100%; + height: 280px; + top: 50%; + margin-top: -210px; + text-align: center; + } + + .lr-login-page .login-content > img { + width: 60px; + height: 60px; + border-radius: 50%; + margin-bottom: 60px; + } + + .lr-login-page .line { + position: relative; + margin: auto; + width: 92%; + height: 35px; + line-height: 35px; + border-bottom: 1px solid #eeeeee; + padding-left: 35px; + } + + .lr-login-page .line i { + position: absolute; + left: 10px; + font-size: 18px; + color: #666; + } + + .lr-login-page .line input { + position: relative; + line-height: 20px; + width: 100%; + background: transparent; + border: none; + font-size: 14px; + } + + .lr-login-page button { + margin: auto; + margin-top: 25px; + width: 92%; + } + + .lr-login-page .version { + position: absolute; + width: 100%; + bottom: 5px; + text-align: center; + font-size: 12px; + color: #ccc; + } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.html new file mode 100644 index 000000000..d71c6f1cf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.html @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.js new file mode 100644 index 000000000..5c155699d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.js @@ -0,0 +1,104 @@ +(function () { + var isBindAccountLogin = '';//切换账号登录 + var bindUserName = '';//绑定账号 + var bindUserPassword = '';//绑定账号密码 + + var page = { + headColor: '#ffffff', + init: function ($page, param) { + //切换账号登录时:登录页赋值,触发登录事件; + isBindAccountLogin = param.isBindAccountLogin; + bindUserName = param.bindUserName; + bindUserPassword = param.bindUserPassword; + if (isBindAccountLogin == 1) { + $page.find('#account').val(bindUserName); + $page.find('#password').val(bindUserPassword); + var timer = setTimeout(function () { + $page.find('#loginBtn').trigger("tap"); + clearTimeout(timer); + }, 3000); + } + + var path = config.webapi; + // learun.http.get(path + "Learun/adms/EducationalAdministration/EmpRegister/registerbutton", + // {}, (res) => { + // if (res.info == "True") { + // var button = $page.find('#RegisterBtn'); + // button.show(); + // } + // }); + //获取ACIp + learun.http.get(path + "weixinapi/GetACIp", + {}, (res) => { + learun.storage.set("Ip", res.data.Ip); + learun.storage.set("ACIp", res.data.ACIp); + learun.storage.set("ACIp2", res.data.ACIp2); + }); + $page.find('img').attr('src', config.web + "Login/GetImg?code=applogo"); + $page.find('#loginBtn').on('tap', function () { + var account = $('#idcard').val(); + var password = $('#pwd').val(); + var up = false; + if (account === "") { + learun.layer.warning('身份证号不能为空!', function () { }, '提示', '关闭'); + }else if(account.length<=6){ + learun.layer.warning('身份证号输入有误!', function () { }, '提示', '关闭'); + } else if (password === "") { + learun.layer.warning('密码不能为空!', function () { }, '提示', '关闭'); + } else { + + var data = { + username: account, + password: password, + up: up + }; + var postdata = { + token: '', + loginMark: learun.deviceId(),// 正式请换用设备号 + data: JSON.stringify(data) + }; + + learun.layer.loading(true, "正在登录,请稍后"); + learun.http.post(path + "learun/adms/user/loginbyIdCard", postdata, (res) => { + learun.layer.loading(false); + if (res === null) { + learun.layer.warning('无法连接服务器,请检测网络!', function () { }, '提示', '关闭'); + return; + } + + if (res.code === 200) { + var logininfo = { + account: account, + token: res.data.baseinfo.token, + date: learun.date.format(new Date(), 'yyyy-MM-dd hh:mm:ss') + }; + learun.storage.set('logininfo', logininfo); + learun.storage.set('userinfo', res.data); + $('#account').val(''); + $('#password').val(''); + if (res.data.pwd === true) { + learun.storage.set('pwdandnotice', true); + } else { + learun.storage.set('pwdandnotice', false); + } + learun.tab.go('workspace'); + if (learun.storage.get("Ip") != null && learun.storage.get("ACIp") != "") { + //Ip上网 + sendToAc(learun.storage.get("ACIp"), 'logon', learun.storage.get("Ip"), account, ''); + } + if (learun.storage.get("Ip") != null && learun.storage.get("ACIp2") != "") { + //Ip上网 + sendToAc(learun.storage.get("ACIp2"), 'logon', learun.storage.get("Ip"), account, ''); + } + } else { + learun.layer.warning(res.info, function () { }, '提示', '关闭'); + } + }); + } + + }); + + } + }; + return page; +})(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/login.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/login.html index 751eb7bb3..5b253ce8c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/login.html +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/login.html @@ -1,4 +1,4 @@ -
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.js index 1ba9aaad7..f2a86e0cf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.js @@ -8,12 +8,42 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var processId = ''; + var startTime; + var endTime; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + + }); $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); @@ -138,6 +168,21 @@ var bootstrap = function ($, learun) { }); } }); + + // 结束下发 + $('#lr_OverIssue').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SFileId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否结束下发!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/OverIssue', { keyValue: keyValue, }, function (res) { + page.search(); + }); + } + }); + } + }); }, // 初始化列表 initGird: function () { @@ -166,6 +211,7 @@ var bootstrap = function ($, learun) { { label: "下发时间", name: "SendTime", width: 150, align: "left" }, + { label: "状态", name: "SendFlag", width: 100, align: "left", formatter: function (cellvalue, row) { @@ -178,14 +224,21 @@ var bootstrap = function ($, learun) { } } }, + { + label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left", + + }, ], mainId: 'SFileId', isPage: true }); - page.search(); + //page.search(); }, search: function (param) { param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + param.SqlParameter = ' AND SendFlag<>4'; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.cshtml new file mode 100644 index 000000000..ce1c71fd2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.cshtml @@ -0,0 +1,41 @@ +@{ + ViewBag.Title = "公文发送"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
主题
+ +
+
+
+
接收人
+ +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.js new file mode 100644 index 000000000..a7714b45e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.js @@ -0,0 +1,149 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-04-11 10:31 + * 描 述:公文发送 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SFileId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/FormPartyView?keyValue=' + keyValue, + width: 800, + height: 700, + btn: null + }); + } + }); + + ////打印 + //$('#lr_print').on('click', function () { + // $('#gridtable').jqprintTable(); + //}); + + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageListParty', + headData: [ + { label: "主题", name: "Title", width: 300, align: "left" }, + { + label: "接收对象", name: "SendType", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'FileSendType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "接收人", name: "Receiver", width: 300, align: "left" + }, + { + label: "下发人", name: "Sender", width: 100, align: "left" + }, + { + label: "下发时间", name: "SendTime", width: 150, align: "left" + }, + + { + label: "状态", name: "SendFlag", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 1) { + return '审批中'; + } else if (cellvalue === 2) { + return '已下发'; + } else if (cellvalue === 4) { + return '下发完毕'; + }else { + return '草稿'; + } + } + }, + { + label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left", + + }, + ], + mainId: 'SFileId', + isPage: true + }); + //page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParameter = ' AND SendFlag=4'; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (res && res.code && res.code == 200) { + var postData = { + schemeCode: 'Sys_SendFileParty',// 填写流程对应模板编号 + 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/EducationalAdministration/Views/Sys_SendFile/PrintView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.cshtml new file mode 100644 index 000000000..2008538c2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.cshtml @@ -0,0 +1,147 @@ +@{ + ViewBag.Title = "打印"; + Layout = "~/Views/Shared/_SimpleForm.cshtml"; +} + + + + + + + + +
+
+
北京金隅科技学校
+
收文处理专用纸(收文登记)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
收文字第收文日期
来文字第
收文标题
处理意见
领导批示 +
+
+
部门处理情况 +
经办人办结日期
+
+
+ + + +
打印
+ + + + + + +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.js new file mode 100644 index 000000000..24e4c8dd1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.js @@ -0,0 +1,80 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-04-11 10:31 + * 描 述:公文发送 + */ +var refreshGirdData; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + console.log(keyValue); + page.bind(); + }, + bind: function () { + $.get(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/PrintInfo?keyValue=' + keyValue, + function(data) { + var data = JSON.parse(data).data; + var entityItem = data.entityItem; + console.log(data); + learun.clientdata.getAsync('department', { + key: data.entity.RReceiveUnit, + callback: function (_data) { + console.log(_data); + $('#RReceiveUnit').html(_data.name); + + } + }); + $('#swz').html(data.entity.swz); + $('#RReceiveTime').html(data.entity.RReceiveTime.substr(0,10)); + $('#RSourceUnit').html(data.entity.RSourceUnit); + $('#lwz').html(data.entity.lwz); + $('#RTitle').html(data.entity.RTitle); + $('#yj1').html(entityItem[0].SpecifyReceiver); + $('#yj2').html(entityItem[1].SpecifyReceiver); + learun.clientdata.getAsync('user', { + key: entityItem[1].ReceiverId, + callback: function (_data) { + console.log(_data); + $('#xiaozhanginfo').html(_data.name + ' ' + (entityItem[1].ReadTime || '').substr(0, 10)); + } + }); + + + learun.clientdata.getAsync('user', { + key: data.entity.SenderId, + callback: function (_data) { + $('#SenderId').html(_data.name); + } + }); + + + + var text = ''; + $.each(entityItem, + function(i, item) { + if (i < 2) {return true;} + learun.clientdata.getAsync('user', { + key: item.ReceiverId, + callback: function (_data) { + + text += '
' + + (item.SpecifyReceiver == '' ? '已阅' : item.SpecifyReceiver) + + '
'+_data.name+' '+(item.ReadTime || '').substr(0,10)+'
'; + } + }); + + + }); + $('#yj3').html(text); + + $('#overDate').html(data.entityItem[data.entityItem.length - 1].ReadTime.substr(0,10)); + }); + + }, + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs new file mode 100644 index 000000000..80bade281 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs @@ -0,0 +1,188 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.LR_Desktop; +using System.Web.Mvc; +using System.Collections.Generic; +using System.Collections; + +namespace Learun.Application.Web.Areas.LR_Desktop.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-04-23 16:58 + /// 描 述:消息提醒 + /// + public class MessageRindController : MvcControllerBase + { + private MessageRindIBLL messageRindIBLL = new MessageRindBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 未读消息页面 + /// + /// + [HttpGet] + public ActionResult UnreadIndex() + { + ViewBag.Name = (LoginUserInfo.Get()).realName; + 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 = messageRindIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + + /// + /// 获取未读的消息的数量 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetCountForUnread() + { + var count = messageRindIBLL.GetCountForUnread(); + + return Success(count); + } + /// + /// 获取未读的消息 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetListForUnread() + { + var data = messageRindIBLL.GetListForUnread(); + List list = new List(); + foreach (var entity in data) + { + Hashtable ht = new Hashtable(); + ht["MessageId"] = entity.MessageId; + ht["SenderName"] = entity.SenderName; + ht["TheTitle"] = entity.TheTitle; + ht["TheContent"] = entity.TheContent; + ht["ConnectionUrl"] = entity.ConnectionUrl; + ht["InstanceId"] = entity.InstanceId; + list.Add(ht); + } + return ToJsonResult(list); + } + + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var MessageRemindData = messageRindIBLL.GetMessageRemindEntity(keyValue); + var jsonData = new + { + MessageRemind = MessageRemindData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + messageRindIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + MessageRemindEntity entity = strEntity.ToObject(); + messageRindIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + + /// + /// 更改状态为已读 + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [AjaxOnly] + public ActionResult SaveReadSigns(string keyValue) + { + if (!string.IsNullOrEmpty(keyValue)) + { + messageRindIBLL.SaveReadSigns(keyValue); + } + return Success("保存成功!"); + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Form.cshtml new file mode 100644 index 000000000..176ce92ce --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Form.cshtml @@ -0,0 +1,35 @@ +@{ + ViewBag.Title = "消息提醒"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
收件人ID
+ +
+
+
收件人姓名
+ +
+
+
发件人ID
+ +
+
+
发件人姓名
+ +
+
+
发送时间
+ +
+
+
标题
+ +
+
+
内容
+ +
+
+@Html.AppendJsFile("/Areas/LR_Desktop/Views/MessageRind/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Form.js new file mode 100644 index 000000000..4a30a5bfb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Form.js @@ -0,0 +1,41 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2021-05-08 + * 描 述:消息提醒 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.bind(); + page.initData(); + }, + bind: function () { + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/LR_Desktop/MessageRemind/GetFormData?keyValue=' + keyValue, function (data) { + $('#form').lrSetFormData(data); + }); + } + } + }; + //保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + $.lrSaveForm(top.$.rootUrl + '/LR_Desktop/MessageRind/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.cshtml new file mode 100644 index 000000000..2ed0fa29c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.cshtml @@ -0,0 +1,94 @@ +@{ + ViewBag.Title = "消息提醒"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+
+ @*
+
您有新的未读消息x
+
+
+ +
*@ +
+@Html.AppendJsFile("/Areas/LR_Desktop/Views/MessageRind/Index.js"); + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js new file mode 100644 index 000000000..60236ceef --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js @@ -0,0 +1,150 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-04-23 16:58 + * 描 述:消息提醒 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/LR_Desktop/MessageRind/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('MessageId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LR_Desktop/MessageRind/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('MessageId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/LR_Desktop/MessageRind/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + // 查看 + $('#lr_view').on('click', function () { + var title = $('#gridtable').jfGridValue('TheTitle'); + var keyValue = $('#gridtable').jfGridValue('InstanceId'); + //var MessageId = $('#gridtable').jfGridValue('MessageId'); + var ConnectionUrl = $('#gridtable').jfGridValue('ConnectionUrl'); + var url = top.$.rootUrl + ConnectionUrl + keyValue; + learun.layerForm({ + id: 'formview', + title: title, + url: url, + width: 1000, + height: 650, + maxmin: true, + btn: null, + }); + }); + + }, + + + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/LR_Desktop/MessageRind/GetPageList', + headData: [ + //{ label: "收件人ID", name: "ReceiptId", width: 100, align: "left"}, + { label: "收件人姓名", name: "ReceiptName", width: 100, align: "left" }, + //{ label: "发件人ID", name: "SenderId", width: 100, align: "left"}, + { label: "发件人姓名", name: "SenderName", width: 100, align: "left" }, + { label: "发送时间", name: "SendTime", width: 100, align: "left" }, + { label: "标题", name: "TheTitle", width: 100, align: "left" }, + { label: "内容", name: "TheContent", width: 400, align: "left" }, + { + label: "状态", name: "ReadSigns", width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue == false ? "未读" : "已读"; + } + }, + ], + mainId: 'MessageId', + isPage: true + }); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); + +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml new file mode 100644 index 000000000..c970e5dc8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml @@ -0,0 +1,141 @@ +@*@{ + ViewBag.Title = "未读消息"; + Layout = "~/Views/Shared/_Index.cshtml"; + } +
+
+
+ +
+
+
+
*@ + + + + + + 未读消息提醒 + + + + + @Html.AppendCssFile( + "/Views/LR_Content/style/lr-common.css", + "/Views/LR_Content/style/lr-iframe-index.css", + "~/Content/jquery/plugin/toastr/toastr.css" + ) + + + +
+ +
+ @Html.AppendJsFile( + "~/Content/jquery/plugin/toastr/toastr.min.js", + "~/Views/LR_Content/script/lr-admin.js", + "~/Views/LR_Content/script/lr-clientdata.js", + "~/Content/jquery/plugin/fullcalendar/js/jquery-1.7.2.min.js", + "~/Areas/LR_Desktop/Views/MessageRind/Index.js" + ) + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/DepartmentReleasePermissionsController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/DepartmentReleasePermissionsController.cs new file mode 100644 index 000000000..d999cf59e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/DepartmentReleasePermissionsController.cs @@ -0,0 +1,117 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.Permission; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.Permission.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsController : MvcControllerBase + { + private DepartmentReleasePermissionsIBLL departmentReleasePermissionsIBLL = new DepartmentReleasePermissionsBLL(); + + #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 = departmentReleasePermissionsIBLL.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 DepartmentReleasePermissionsData = departmentReleasePermissionsIBLL.GetDepartmentReleasePermissionsEntity( keyValue ); + var jsonData = new { + DepartmentReleasePermissions = DepartmentReleasePermissionsData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + departmentReleasePermissionsIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + DepartmentReleasePermissionsEntity entity = strEntity.ToObject(); + departmentReleasePermissionsIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.cshtml new file mode 100644 index 000000000..0f52017bd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "公告发布权限设置"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
发布人员
+
+
+
+
公告类型
+
+
+
+@Html.AppendJsFile("/Areas/Permission/Views/DepartmentReleasePermissions/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.js new file mode 100644 index 000000000..c72b93d3e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.js @@ -0,0 +1,55 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2020-12-22 11:35 + * 描 述:公告发布权限设置 + */ +var acceptClick; +var keyValue = request('keyValue'); +var departmentId = request('departmentId'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#UserID').lrUserSelect(0); + $('#Permission').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/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 formdata = $('body').lrGetFormData(); + formdata.DepartmentID = departmentId; + var postData = { + strEntity: JSON.stringify(formdata) + }; + $.lrSaveForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.cshtml new file mode 100644 index 000000000..26d25bc04 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.cshtml @@ -0,0 +1,36 @@ +@{ + ViewBag.Title = "公告发布权限设置"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
部门
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/Permission/Views/DepartmentReleasePermissions/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js new file mode 100644 index 000000000..66a0baee9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js @@ -0,0 +1,112 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2020-12-22 11:35 + * 描 述:公告发布权限设置 + */ +var refreshGirdData; +var departmentId = request('departmentId'); +console.log(123 + departmentId); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + console.log(departmentId); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#DepartmentID').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form1', + title: '新增', + url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Form?departmentId='+departmentId, + 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: 'form1', + title: '编辑', + url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/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 + '/Permission/DepartmentReleasePermissions/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/GetPageList', + headData: [ + { label: "发布人员", name: "UserID", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + }}, + { label: "公告类型", name: "Permission", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getsAsync('dataItem', { + key: value, + code: 'NoticeCategory', + callback: function (_data) { + callback(_data); + } + }); + }}, + ], + mainId:'ID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.DepartmentID = departmentId; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/EpidemicSituationCopyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/EpidemicSituationCopyController.cs index 4aff3901c..346d61469 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/EpidemicSituationCopyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/EpidemicSituationCopyController.cs @@ -38,6 +38,12 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers return View(); } + [HttpGet] + public ActionResult IndexAll() + { + return View(); + } + /// /// 统计 /// @@ -57,6 +63,12 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers return View(); } + [HttpGet] + public ActionResult FormView() + { + return View(); + } + /// /// 外出原因统计 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.cshtml new file mode 100644 index 000000000..221b3a036 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.cshtml @@ -0,0 +1,72 @@ +@{ + ViewBag.Title = "疫情记录"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
填报人员
+
+
+
+
填报时间
+ +
+
+
类别
+
+
+
+
所在部门
+
+
+
+
系专业班级
+ +
+ +
+
健康状况
+
+
+
+
性别
+
+
+
+
家庭住址
+ +
+
+
联系方式
+ +
+
+
当前地址
+ +
+ + +
+
是否外出
+
+
+
+
+
+
+
家人异常
+
+
+
+
+
+
+
疫区人异常
+
+
+
+
+
+ +
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.js new file mode 100644 index 000000000..5498d45b3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.js @@ -0,0 +1,587 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-02-03 14:37 + * 描 述:疫情记录 + */ +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 () { + $('#Creater').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); + $('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); + $('#UnitName').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#Type').lrDataItemSelect({ + code: 'EUserType', select: function (item) { + if (item) { + if (item.id == "5") { + $("#Departmentdiv").hide(); + $("#StudentSourcediv").show(); + } else { + $("#StudentSourcediv").hide(); + $("#Departmentdiv").show(); + } + } else { + $("#PeopleDetails").parent().hide(); + } + } + }); + $('#RelationShip').lrDataItemSelect({ code: 'ERelationship' }); + $('#OutReason').lrDataItemSelect({ code: 'OutReason' }); + $('#HealthSituation').lrDataItemSelect({ code: 'EpiHealth' }); + $('#IsOut').lrDataItemSelect({ + code: 'YesOrNoInt', + select: function (item) { + if (item) { + if (item.text == "是") { + $("#PassPlaces").parent().show(); + } else { + $("#PassPlaces").parent().hide(); + } + } else { + $("#PassPlaces").parent().hide(); + } + } + }); + $('#HasFamily').lrDataItemSelect({ + code: 'YesOrNoInt', + select: function (item) { + if (item) { + if (item.text == "是") { + $("#ContactsDetails").parent().show(); + } else { + $("#ContactsDetails").parent().hide(); + } + } else { + $("#ContactsDetails").parent().hide(); + } + } + }); + $('#HasPeople').lrDataItemSelect({ + code: 'YesOrNoInt', + select: function (item) { + if (item) { + if (item.text == "是") { + $("#PeopleDetails").parent().show(); + } else { + $("#PeopleDetails").parent().hide(); + } + } else { + $("#PeopleDetails").parent().hide(); + } + } + }); + $('#Gender').lrDataItemSelect({ code: 'usersex' }); + + $('#Provice').lrDataSourceSelect({ + code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', + select: function (item) { + if (!!item) { + $('#OutArea').lrselectRefresh({ + url: "/DIC_CITY/GetListByProvinceCode", + param: { ProvinceCode: item.pcode }, + value: 'CCODE', + text: 'CNAME' + }); + $('#City').lrselectRefresh({ + url: "", + data: [] + }); + } + } + }); + $('#OutArea').lrselect({ + select: function (item) { + if (!!item) { + $('#City').lrselectRefresh({ + url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", + param: { cityCode: item.CCODE }, + value: 'ACODE', + text: 'ANAME' + }); + } + } + }); + $('#City').lrselect(); + $('#Vehicle').lrDataItemSelect({ code: 'Vehicle' }); + $('#PassPlaces').jfGrid({ + headData: [ + + { + label: '类别', name: 'PassType', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataItem', + code: 'EpiPassType' + } + }, + { + label: '省', name: 'Province', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataSource', + code: 'DIC_PROVINCE', + op: { + value: 'pcode', + text: 'pname', + title: 'pname' + } + } + }, { + label: '市', name: 'City', width: 100, align: 'left', + formatter: function (value, row, op, $cell) { + var province = row.Province; + var res; + learun.httpSync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { + $.each(data, function (_index, _item) { + if (value == _item.CCODE) { + + res = _item.CNAME; + } + }); + }); + return res; + }, + edit: { + type: 'select', + init: function (row, $self) { + var province = row.Province; + learun.httpAsync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { + var res = []; + $.each(data, function (_index, _item) { + res.push(_item); + }); + $self.lrselectRefresh({ + data: res, + }); + }); + }, + op: { + value: 'CCODE', + text: 'CNAME', + title: 'CNAME', + + } + } + }, + { + label: '区域', name: 'Area', width: 100, align: 'left', + formatter: function (value, row, op, $cell) { + var cityCode = row.City; + var res; + learun.httpSync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { + $.each(data, function (_index, _item) { + if (value == _item.ACODE) { + + res = _item.ANAME; + } + }); + }); + return res; + }, + edit: { + type: 'select', + init: function (row, $edit) { + var cityCode = row.City; + learun.httpAsync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { + var res = []; + $.each(data, function (_index, _item) { + res.push(_item); + }); + $edit.lrselectRefresh({ + data: res, + }); + }); + }, + op: { + value: 'ACODE', + text: 'ANAME', + title: 'ANAME' + } + } + }, + { + label: '详细地址', name: 'Address', width: 100, align: 'left' + , edit: { + type: 'input', + + } + }, + { + label: '时间', name: 'Time', width: 100, align: 'left', edit: { type: 'datatime' } + }, + { + label: '交通工具', name: 'Vehicle', width: 100, align: 'left', edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataItem', + code: 'Vehicle' + } + }, + { + label: '班次号', name: 'VehicleNo', width: 100, align: 'left' + , edit: { + type: 'input', + + } + }], + + isMultiselect: true, + isEdit: true, + height: 200 + }); + + $('#ContactsDetails').jfGrid({ + headData: [ + { + label: '名字', name: 'Name', width: 100, align: 'left', + edit: { type: 'input' } + }, + { + label: '性别', name: 'Gender', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataItem', + code: 'usersex' + } + }, + { + label: '联系方式', name: 'Mobile', width: 100, align: 'left', edit: { type: 'input' } + }, + { + label: '隔离方式', name: 'QTType', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (data, $edit) { + + }, + datatype: 'dataItem', + code: 'QuarantineType' + } + }, + { + label: '省', name: 'Province', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataSource', + code: 'DIC_PROVINCE', + op: { + value: 'pcode', + text: 'pname', + title: 'pname' + } + } + }, { + label: '市', name: 'City', width: 100, align: 'left', + formatter: function (value, row, op, $cell) { + var province = row.Province; + var res; + learun.httpSync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { + $.each(data, function (_index, _item) { + if (value == _item.CCODE) { + + res = _item.CNAME; + } + }); + }); + return res; + }, + edit: { + type: 'select', + init: function (row, $self) { + var province = row.Province; + learun.httpAsync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { + var res = []; + $.each(data, function (_index, _item) { + res.push(_item); + }); + $self.lrselectRefresh({ + data: res, + }); + }); + }, + op: { + value: 'CCODE', + text: 'CNAME', + title: 'CNAME', + + } + } + }, + { + label: '区域', name: 'Area', width: 100, align: 'left', + formatter: function (value, row, op, $cell) { + var cityCode = row.City; + var res; + learun.httpSync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { + $.each(data, function (_index, _item) { + if (value == _item.ACODE) { + + res = _item.ANAME; + } + }); + }); + return res; + }, + edit: { + type: 'select', + init: function (row, $edit) { + var cityCode = row.City; + learun.httpAsync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { + var res = []; + $.each(data, function (_index, _item) { + res.push(_item); + }); + $edit.lrselectRefresh({ + data: res, + }); + }); + }, + op: { + value: 'ACODE', + text: 'ANAME', + title: 'ANAME' + } + } + }, + { + label: '隔离地点', name: 'QTAddress', width: 100, align: 'left', edit: { type: 'input' } + }, + { + label: '隔离时间', name: 'QTTime', width: 100, align: 'left' + , edit: { + type: 'datatime', + dateformat: '1' + } + }, + { + label: '接触隔离时间', name: 'QTContactTime', width: 100, align: 'left' + , edit: { + type: 'datatime', + dateformat: '1' + } + }, + { + label: '健康状况', name: 'Fever', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (data, $edit) { + + }, + datatype: 'dataItem', + code: 'EpiHealth' + } + }, + ], + + isMultiselect: true, + isEdit: true, + height: 200 + }); + + + $('#PeopleDetails').jfGrid({ + headData: [ + { + label: '名字', name: 'Name', width: 100, align: 'left', + edit: { type: 'input' } + }, + { + label: '性别', name: 'Gender', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataItem', + code: 'usersex' + } + }, + { + label: '联系方式', name: 'Mobile', width: 100, align: 'left', edit: { type: 'input' } + }, + { + label: '隔离方式', name: 'QTType', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (data, $edit) { + + }, + datatype: 'dataItem', + code: 'QuarantineType' + } + }, + { + label: '省', name: 'Province', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataSource', + code: 'DIC_PROVINCE', + op: { + value: 'pcode', + text: 'pname', + title: 'pname' + } + } + }, { + label: '市', name: 'City', width: 100, align: 'left', + formatter: function (value, row, op, $cell) { + var province = row.Province; + var res; + learun.httpSync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { + $.each(data, function (_index, _item) { + if (value == _item.CCODE) { + + res = _item.CNAME; + } + }); + }); + return res; + }, + edit: { + type: 'select', + init: function (row, $self) { + var province = row.Province; + learun.httpAsync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { + var res = []; + $.each(data, function (_index, _item) { + res.push(_item); + }); + $self.lrselectRefresh({ + data: res, + }); + }); + }, + op: { + value: 'CCODE', + text: 'CNAME', + title: 'CNAME', + + } + } + }, + { + label: '区域', name: 'Area', width: 100, align: 'left', + formatter: function (value, row, op, $cell) { + var cityCode = row.City; + var res; + learun.httpSync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { + $.each(data, function (_index, _item) { + if (value == _item.ACODE) { + + res = _item.ANAME; + } + }); + }); + return res; + }, + edit: { + type: 'select', + init: function (row, $edit) { + var cityCode = row.City; + learun.httpAsync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { + var res = []; + $.each(data, function (_index, _item) { + res.push(_item); + }); + $edit.lrselectRefresh({ + data: res, + }); + }); + }, + op: { + value: 'ACODE', + text: 'ANAME', + title: 'ANAME' + } + } + }, + { + label: '隔离地点', name: 'QTAddress', width: 100, align: 'left', edit: { type: 'input' } + }, + { + label: '隔离时间', name: 'QTTime', width: 100, align: 'left' + , edit: { + type: 'datatime', + dateformat: '1' + } + }, + { + label: '接触隔离时间', name: 'QTContactTime', width: 100, align: 'left' + , edit: { + type: 'datatime', + dateformat: '1' + } + }, + { + label: '健康状况', name: 'Fever', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (data, $edit) { + + }, + datatype: 'dataItem', + code: 'EpiHealth' + } + }, + ], + + isMultiselect: true, + isEdit: true, + height: 200 + }); + + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/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 = {}; + postData.strEntity = JSON.stringify($('[data-table="EpidemicSituation"]').lrGetFormData()); + postData.strcontactsDetailsList = JSON.stringify($('#ContactsDetails').jfGridGet('rowdatas')); + postData.passPlaceDetailsList = JSON.stringify($('#PassPlaces').jfGridGet('rowdatas')); + postData.strpeopleDetailsList = JSON.stringify($('#PeopleDetails').jfGridGet('rowdatas')); + + $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.cshtml index 10d01d354..5ddf67344 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.cshtml @@ -12,10 +12,10 @@
- diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.js index 78becc06f..f1f514c79 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.js @@ -51,6 +51,19 @@ var bootstrap = function ($, learun) { }); } }); + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'FormView', + title: '查看', + url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/FormView?keyValue=' + keyValue, + width: 1000, + height: 650, + btn: null + }); + } + }); // 删除 $('#lr_delete').on('click', function () { @@ -104,7 +117,7 @@ var bootstrap = function ($, learun) { } }, { - label: "所在部门", name: "Department", width: 100, align: "left", + label: "所在部门/班级", name: "Department", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { console.log(row); if (row.StudentSource) { @@ -203,7 +216,6 @@ var bootstrap = function ($, learun) { search: function (param) { param = param || {}; var loginInfo = top.learun.clientdata.get(['userinfo']); - console.log('人员id' + createrID); if (createrID) { param.Creater = createrID; } else { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.cshtml new file mode 100644 index 000000000..9d993baa3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.cshtml @@ -0,0 +1,45 @@ +@{ + ViewBag.Title = "疫情记录"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
填表人员
+ +
+
+
类别
+
+
+ @*
+
系|专业|班级
+ +
*@ +
+
+
+
+
+
+ +
+
+  查看 +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.js new file mode 100644 index 000000000..888c1f724 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.js @@ -0,0 +1,232 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-02-03 14:37 + * 描 述:疫情记录 + */ +var refreshGirdData; +var createrID = request('createrID'); +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#Type').lrDataItemSelect({ code: 'EUserType' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'FormView', + title: '查看', + url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/FormView?keyValue=' + keyValue, + width: 1000, + height: 650, + btn: null + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituation/GetPageList', + headData: [ + { + label: "填表人员", name: "Creater", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + + } + }, + { + label: "填报日期", name: "CreateTime", width: 100, align: "left", + formatter: function (value, row) { + return dateFormat("YYYY-mm-dd", new Date(value)); + } + }, + { + label: "类别", name: "Type", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'EUserType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "所在部门/班级", name: "Department", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + if (row.StudentSource) { + callback(row.StudentSource); + } else { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + } + }, + { + label: "性别", name: "Gender", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'usersex', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" }, + { + label: "健康状况", name: "HealthSituation", width: 100, align: "left", + //formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'EpiHealth', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + //} + formatter: function (cellvalue, row) { + if (cellvalue == 0) { + return '健康'; + } else if (cellvalue == 1) { + return '异常'; + } + } + }, + { + label: "是否外出", name: "IsOut", width: 100, align: "left", + //formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'YesOrNoInt', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + //} + formatter: function (cellvalue, row) { + if (cellvalue === 0) { + return ''; + } else if (cellvalue === 1) { + return ''; + } + } + }, + { + label: "家人异常", name: "HasFamily", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 0) { + return ''; + } else if (cellvalue === 1) { + return ''; + } + } + }, + { + label: "疫区人异常", name: "HasPeople", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 0) { + return ''; + } else if (cellvalue === 1) { + return ''; + } + } + }, + { label: "联系方式", name: "Mobile", width: 100, align: "left" }, + { label: "当前地址", name: "Objective", width: 100, 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(); +} +function dateFormat(fmt, date) { + let ret; + const opt = { + "Y+": date.getFullYear().toString(), // 年 + "m+": (date.getMonth() + 1).toString(), // 月 + "d+": date.getDate().toString(), // 日 + "H+": date.getHours().toString(), // 时 + "M+": date.getMinutes().toString(), // 分 + "S+": date.getSeconds().toString() // 秒 + // 有其他格式化字符需求可以继续添加,必须转化成字符串 + }; + for (let k in opt) { + ret = new RegExp("(" + k + ")").exec(fmt); + if (ret) { + fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0"))) + }; + }; + return fmt; +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.cshtml index 19d677a58..ecc2dc562 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.cshtml @@ -12,7 +12,7 @@
填表人员
-
+
类别
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.js index a40972104..20a42daeb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.js @@ -20,7 +20,6 @@ var bootstrap = function ($, learun) { page.search(queryJson); }, 220, 400); $('#Type').lrDataItemSelect({ code: 'EUserType' }); - $('#Creater').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -35,6 +34,7 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/Index?createrID=' + createrID, width: '80%', height: '80%', + btn: null }); } }); @@ -72,9 +72,8 @@ var bootstrap = function ($, learun) { } }, { - label: "所在部门", name: "Department", width: 100, align: "left", + label: "所在部门/班级", name: "Department", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - console.log(row); if (row.StudentSource) { callback(row.StudentSource); } else { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs index 3a789cc9e..8673ef2c4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs @@ -57,6 +57,7 @@ namespace Learun.Application.Web.Controllers private Sys_UpdateRecordIBLL sys_UpdateRecordIBLL = new Sys_UpdateRecordBLL(); private Perm_FunctionIBLL perm_FunctionIBLL = new Perm_FunctionBLL(); private ICache redisCache = CacheFactory.CaChe(); + private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL(); #region 视图功能 public ActionResult ChangePwd() @@ -168,7 +169,8 @@ namespace Learun.Application.Web.Controllers var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); paginationobj.sidx = "SendTime"; - ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Where(a => a.STypeId == 1).Count(); + //ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Where(a => a.STypeId == 1).Count(); + ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId); return View(); } @@ -229,6 +231,11 @@ namespace Learun.Application.Web.Controllers string qingJuurl = ConfigurationManager.AppSettings["QingJuurl"]; string qingjuregisterurl = ConfigurationManager.AppSettings["QingJuRegisterurl"]; string defpwd = ConfigurationManager.AppSettings["defaultpwd"]; + //读取默认密码配置中已启用的密码 + if (sys_DefaultPwdConfigIBLL.GetEnabledEntity() != null) + { + defpwd = sys_DefaultPwdConfigIBLL.GetEnabledEntity().Pwd; + } var qjinfo = qjAccountIbll.GetQingJu_UserAccountEntityByAccount(userinfo.account); if (qjinfo == null || string.IsNullOrEmpty(qjinfo.UserAccount)) { @@ -335,6 +342,11 @@ namespace Learun.Application.Web.Controllers string qingJuurl = ConfigurationManager.AppSettings["QingJuurl"]; string qingjuregisterurl = ConfigurationManager.AppSettings["QingJuRegisterurl"]; string defpwd = ConfigurationManager.AppSettings["defaultpwd"]; + //读取默认密码配置中已启用的密码 + if (sys_DefaultPwdConfigIBLL.GetEnabledEntity() != null) + { + defpwd = sys_DefaultPwdConfigIBLL.GetEnabledEntity().Pwd; + } if (up != null && !string.IsNullOrEmpty(up.QUserName)) { if (userinfo.Description == "教师") @@ -423,7 +435,7 @@ namespace Learun.Application.Web.Controllers #region 待办 var userinfo = LoginUserInfo.Get(); - Pagination paginationobj = new Pagination() { rows = 5, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" }; + Pagination paginationobj = new Pagination() { rows = 100, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" }; //未读邮件 ViewBag.UnreadMail = sYS_ReceiveMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userinfo.userId + "\"}").Count(m => m.READFLAG == 0); //办公事项 @@ -476,12 +488,15 @@ namespace Learun.Application.Web.Controllers var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); paginationobj.sidx = "SendTime"; - ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Count(); + ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId).Count(); + //普通教师请假-未归档数 + ViewBag.UnfileLeave = 0; + //中层领导请假-未归档数 + ViewBag.UnfileLeaveZC = 0; - ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail; + ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail + ViewBag.UnfileLeave + ViewBag.UnfileLeaveZC; #endregion - //获取在线用户人数 ViewBag.OnlineUserNum = 0; var onlineUserResult = sys_UpdateRecordIBLL.GetOnlineUserNum(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs index 58f0e81e4..fee34189e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs @@ -739,6 +739,85 @@ namespace Learun.Application.Web.Controllers } } + /// + /// 无ui登录 + /// + /// + /// + /// + [HttpGet] + public ActionResult CheckLoginForSSOBC(string u,string p) + { + try + { + string uid = Request.QueryString["u"]; + string pwd = Request.QueryString["p"]; + if (!string.IsNullOrEmpty(uid)&&!string.IsNullOrEmpty(pwd)) + { + string username = uid; + string password = pwd; + UserEntity userEntity = userBll.CheckLogin(username, Md5Helper.Encrypt(password, 32)); + + LogEntity logEntity = new LogEntity(); + logEntity.F_CategoryId = 1; + logEntity.F_OperateTypeId = ((int)OperationType.Login).ToString(); + logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Login); + logEntity.F_OperateAccount = username + "(" + userEntity.F_RealName + ")"; + logEntity.F_OperateUserId = !string.IsNullOrEmpty(userEntity.F_UserId) ? userEntity.F_UserId : username; + logEntity.F_Module = "接口登录"; + logEntity.F_Description = "PC端"; + if (!userEntity.LoginOk)//登录失败 + { + //写入日志 + logEntity.F_ExecuteResult = 0; + logEntity.F_ExecuteResultJson = "接口登录失败:" + userEntity.LoginMsg; + logEntity.WriteLog(); + return Fail(userEntity.LoginMsg); + } + else + { + OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_PC", null);//写入缓存信息 + //写入日志 + logEntity.F_ExecuteResult = 1; + logEntity.F_ExecuteResultJson = "无ui接口登录成功"; + logEntity.WriteLog(); + return Success("login success"); + } + } + else + { + return Fail("参数错误"); + } + } + catch (Exception e) + { + return Fail("参数错误"); + } + } + + /// + /// 无ui退出 + /// + /// + [HttpPost] + public ActionResult OutLoginForSSOBC() + { + LogEntity logEntity = new LogEntity(); + logEntity.F_CategoryId = 1; + logEntity.F_OperateTypeId = ((int)OperationType.Exit).ToString(); + logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Exit); + logEntity.F_OperateAccount ="第三方无ui"; + logEntity.F_OperateUserId = "noui"; + logEntity.F_ExecuteResult = 1; + logEntity.F_ExecuteResultJson = "无ui退出系统"; + logEntity.F_Module = "退出"; + logEntity.F_Description = "PC端"; + logEntity.WriteLog(); + Session.Abandon();//清除当前会话 + Session.Clear();//清除当前浏览器所有Session + OperatorHelper.Instance.EmptyCurrent(); + return Success("logout success"); + } #endregion #region 微信登录 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 d233e837b..25f1f5312 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 @@ -331,6 +331,7 @@ + @@ -389,6 +390,7 @@ + @@ -469,6 +471,7 @@ + @@ -1000,11 +1003,15 @@ + + + + @@ -1021,9 +1028,12 @@ + + + @@ -1245,6 +1255,8 @@ + + @@ -1350,9 +1362,13 @@ + + + + @@ -6942,6 +6958,20 @@ + + + + + + + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config index b88965bd6..689551bb5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -163,4 +163,8 @@ + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseApi.cs index 79f18c5e3..9e397ae1d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseApi.cs @@ -180,7 +180,7 @@ namespace Learun.Application.WebApi ReqParameter req = this.Bind(); loginMark = req.loginMark; token = req.token; - if (path == "/learun/adms/user/login" || path == "/" || path == "/bgimg" || path == "/learun/adms/user/img" || path == "/learun/adms/desktop/img"||path== "/learun/adms/user/imgfordc") + if (path == "/learun/adms/user/login"|| path == "/learun/adms/user/loginbyIdCard" || path == "/" || path == "/bgimg" || path == "/learun/adms/user/img" || path == "/learun/adms/desktop/img"||path== "/learun/adms/user/imgfordc") {// 登录接口,默认页面接口不做权限验证处理 return null; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EpidemicSituationCopyApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EpidemicSituationCopyApi.cs index 0d97b9fca..3e05b7948 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EpidemicSituationCopyApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EpidemicSituationCopyApi.cs @@ -144,7 +144,7 @@ namespace Learun.Application.WebApi var userId = entity.Creater; if (epidemicSituationIBLL.HasTodayValue(userId)) { - return Success("不能重复提交"); + return Fail("不能重复提交"); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs index 3ede02163..98c86fe48 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs @@ -27,7 +27,9 @@ namespace Learun.Application.WebApi { Post["/login"] = Login; Post["/modifypw"] = ModifyPassword; + Post["/modifypwiden"] = ModifyPasswordiden; Post["/unbundWeiXin"] = DoUnbundWeiXin; + Post["/loginbyIdCard"] = LoginByIdCard; Get["/info"] = Info; Get["/map"] = GetMap; @@ -119,6 +121,88 @@ namespace Learun.Application.WebApi #endregion } + /// + /// 身份验证-登录接口 + /// + /// + /// + private Response LoginByIdCard(dynamic _) + { + LoginModel loginModel = this.GetReqData(); + + #region 内部账户验证 + UserEntity userEntity = userIBLL.CheckLoginByIdCard(loginModel.username, loginModel.password); + + #region 写入日志 + LogEntity logEntity = new LogEntity(); + logEntity.F_CategoryId = 1; + logEntity.F_OperateTypeId = ((int)OperationType.Login).ToString(); + logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Login); + logEntity.F_OperateAccount = loginModel.username + "(" + userEntity.F_RealName + ")"; + logEntity.F_OperateUserId = !string.IsNullOrEmpty(userEntity.F_UserId) ? userEntity.F_UserId : loginModel.username; + logEntity.F_Module = Config.GetValue("SoftName"); + logEntity.F_Description = "移动端"; + #endregion + + if (!userEntity.LoginOk)//登录失败 + { + //写入日志 + logEntity.F_ExecuteResult = 0; + logEntity.F_ExecuteResultJson = "登录失败:" + userEntity.LoginMsg; + logEntity.WriteLog(); + return Fail(userEntity.LoginMsg); + } + else + { + //新增新生判断 + var stuinfobasic = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(userEntity.F_EnCode); + if (stuinfobasic!=null&&stuinfobasic.Grade!="21") + { + userEntity.LoginMsg = "只有新生支持身份证方式登录"; + return Fail(userEntity.LoginMsg); + } + //记录ip + userIBLL.UpdateIp(GetIP(), userEntity.F_UserId); + string token = OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_App", this.loginMark, false);//写入缓存信息 + //写入日志 + logEntity.F_ExecuteResult = 1; + logEntity.F_ExecuteResultJson = "登录成功"; + logEntity.WriteLog(); + + //保存用户设备号 + userIBLL.UpdateDeviceId(userEntity.F_UserId, loginModel.deviceid); + + OperatorResult res = OperatorHelper.Instance.IsOnLine(token, this.loginMark); + res.userInfo.password = null; + res.userInfo.secretkey = null; + var studententity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(userEntity.F_Account); + if (studententity != null) + { + res.userInfo.grade = studententity.Grade; + var majorinfo = majorIbll.GetCdMajorEntityByMajorNo(studententity.MajorNo); + if (majorinfo != null) + { + res.userInfo.majorno = majorinfo.ID ?? ""; + } + } + //是否强密码验证 + bool pwd = false; + if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["verifypwd"]) && ConfigurationManager.AppSettings["verifypwd"] == "true" && loginModel.up == false) + { + pwd = true; + } + var jsonData = new + { + baseinfo = res.userInfo, + post = postIBLL.GetListByPostIds(res.userInfo.postIds), + role = roleIBLL.GetListByRoleIds(res.userInfo.roleIds), + pwd = pwd + }; + return Success(jsonData); + } + #endregion + } + /// /// 获取用户信息 /// @@ -164,6 +248,26 @@ namespace Learun.Application.WebApi } } } + private Response ModifyPasswordiden(dynamic _) + { + ModifyModel modifyModel = this.GetReqData(); + if (userInfo.isSystem) + { + return Fail("当前账户不能修改密码"); + } + else + { + bool res = userIBLL.RevisePasswordiden(modifyModel.newpassword, modifyModel.oldpassword); + if (!res) + { + return Fail("原密码错误,请重新输入"); + } + else + { + return Success("密码修改成功"); + } + } + } /// /// 解绑微信 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_DefaultPwdConfigMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_DefaultPwdConfigMap.cs new file mode 100644 index 000000000..7fb01847f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_DefaultPwdConfigMap.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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-01-19 11:14 + /// 描 述:默认密码配置 + /// + public class Sys_DefaultPwdConfigMap : EntityTypeConfiguration + { + public Sys_DefaultPwdConfigMap() + { + #region 表、主键 + //表 + this.ToTable("SYS_DEFAULTPWDCONFIG"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/MessageRemindMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/MessageRemindMap.cs new file mode 100644 index 000000000..390cac612 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/MessageRemindMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.LR_Desktop; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-04-23 16:58 + /// 描 述:消息提醒 + /// + public class MessageRemindMap : EntityTypeConfiguration + { + public MessageRemindMap() + { + #region 表、主键 + //表 + this.ToTable("MESSAGEREMIND"); + //主键 + this.HasKey(t => t.MessageId); + #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 bd62fff23..d654231fd 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 @@ -87,6 +87,7 @@ + @@ -110,6 +111,7 @@ + @@ -193,6 +195,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Permission/DepartmentReleasePermissionsMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Permission/DepartmentReleasePermissionsMap.cs new file mode 100644 index 000000000..329dde796 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Permission/DepartmentReleasePermissionsMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.Permission; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsMap : EntityTypeConfiguration + { + public DepartmentReleasePermissionsMap() + { + #region 表、主键 + //表 + this.ToTable("DEPARTMENTRELEASEPERMISSIONS"); + //主键 + 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/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigBLL.cs new file mode 100644 index 000000000..1f48c7da4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigBLL.cs @@ -0,0 +1,171 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-01-19 11:14 + /// 描 述:默认密码配置 + /// + public class Sys_DefaultPwdConfigBLL : Sys_DefaultPwdConfigIBLL + { + private Sys_DefaultPwdConfigService sys_DefaultPwdConfigService = new Sys_DefaultPwdConfigService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return sys_DefaultPwdConfigService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Sys_DefaultPwdConfig表实体数据 + /// + /// 主键 + /// + public Sys_DefaultPwdConfigEntity GetSys_DefaultPwdConfigEntity(string keyValue) + { + try + { + return sys_DefaultPwdConfigService.GetSys_DefaultPwdConfigEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Sys_DefaultPwdConfig表实体数据 + /// + /// 主键 + /// + public Sys_DefaultPwdConfigEntity GetEnabledEntity() + { + try + { + return sys_DefaultPwdConfigService.GetEnabledEntity(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + sys_DefaultPwdConfigService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, Sys_DefaultPwdConfigEntity entity) + { + try + { + sys_DefaultPwdConfigService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 启用 + /// + /// 主键 + public void DoEnabled(string keyValue) + { + try + { + sys_DefaultPwdConfigService.DoEnabled(keyValue); + } + 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/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigEntity.cs new file mode 100644 index 000000000..26c6b516f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigEntity.cs @@ -0,0 +1,60 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-01-19 11:14 + /// 描 述:默认密码配置 + /// + public class Sys_DefaultPwdConfigEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// PwdName + /// + [Column("PWDNAME")] + public string PwdName { get; set; } + /// + /// Pwd + /// + [Column("PWD")] + public string Pwd { get; set; } + /// + /// IsEnabled + /// + [Column("ISENABLED")] + public bool? IsEnabled { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigIBLL.cs new file mode 100644 index 000000000..59108bee8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigIBLL.cs @@ -0,0 +1,61 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-01-19 11:14 + /// 描 述:默认密码配置 + /// + public interface Sys_DefaultPwdConfigIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Sys_DefaultPwdConfig表实体数据 + /// + /// 主键 + /// + Sys_DefaultPwdConfigEntity GetSys_DefaultPwdConfigEntity(string keyValue); + + /// + /// 获取Sys_DefaultPwdConfig表实体数据 + /// + /// 主键 + /// + Sys_DefaultPwdConfigEntity GetEnabledEntity(); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, Sys_DefaultPwdConfigEntity entity); + + /// + /// 启用 + /// + /// 主键 + void DoEnabled(string keyValue); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigService.cs new file mode 100644 index 000000000..691dedf18 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigService.cs @@ -0,0 +1,213 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-01-19 11:14 + /// 描 述:默认密码配置 + /// + public class Sys_DefaultPwdConfigService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.Id, + t.PwdName, + t.Pwd, + t.IsEnabled + "); + strSql.Append(" FROM Sys_DefaultPwdConfig t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["PwdName"].IsEmpty()) + { + dp.Add("PwdName", "%" + queryParam["PwdName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.PwdName Like @PwdName "); + } + return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Sys_DefaultPwdConfig表实体数据 + /// + /// 主键 + /// + public Sys_DefaultPwdConfigEntity GetSys_DefaultPwdConfigEntity(string keyValue) + { + try + { + return this.BaseRepository().FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Sys_DefaultPwdConfig表实体数据 + /// + /// 主键 + /// + public Sys_DefaultPwdConfigEntity GetEnabledEntity() + { + try + { + return this.BaseRepository().FindEntity(x => x.IsEnabled == true); + } + 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, Sys_DefaultPwdConfigEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository().Update(entity); + } + else + { + entity.Create(); + this.BaseRepository().Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 启用 + /// + /// 主键 + public void DoEnabled(string keyValue) + { + var db = this.BaseRepository().BeginTrans(); + try + { + var model = this.BaseRepository().FindEntity(x => x.IsEnabled == true); + if (model != null) + { + model.IsEnabled = false; + db.Update(model); + } + var newmodel = this.BaseRepository().FindEntity(x => x.Id == keyValue); + if (newmodel != null) + { + newmodel.IsEnabled = true; + db.Update(newmodel); + } + + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentBLL.cs index 7c216f686..818fa50e3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentBLL.cs @@ -42,6 +42,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + + public DataTable Execute(string sql) + { + return sYS_ReceiveDocumentService.Execute(sql); + } /// /// 获取Sys_ReceiveDocument表实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs index 26bca29fa..442701c54 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs @@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("RRECEIVEUNIT")] public string RReceiveUnit { get; set; } /// + /// 接收时间 + /// + [Column("RRECEIVETIME")] + public DateTime? RReceiveTime { get; set; } + /// /// 缓急程度 /// [Column("RURGENCYDEGREE")] @@ -74,15 +79,33 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("RFile")] public string RFile { get; set; } - - [Column("F_CREATEDATE")] - public DateTime? F_CreateDate { get; set; } - /// /// 发送人 /// [Column("SENDERID")] public string SenderId { get; set; } + /// + /// 需要处理 + /// + [NotMapped] + [Column("HasDispose")] + public int? HasDispose { get; set; } + + + /// + /// 收文(字) + /// + [Column("SWZ")] + public string swz { get; set; } + + /// + /// 来文(字) + /// + [Column("LWZ")] + public string lwz { get; set; } + + + #endregion #region 扩展操作 @@ -94,8 +117,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var loginUser = LoginUserInfo.Get(); this.RID = Guid.NewGuid().ToString(); this.SenderId = loginUser.userId; + this.RReceiveTime = DateTime.Now; this.RSendFlag = "0"; - } /// /// 编辑调用 @@ -107,6 +130,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 扩展字段 + /// + /// 编号 + /// + [NotMapped] + public string NumberPeople { get; set; } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentIBLL.cs index 513d2aaf6..41dfa8a61 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentIBLL.cs @@ -21,6 +21,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + + DataTable Execute(string sql); /// /// 获取Sys_ReceiveDocument表实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs index d01f2f5a0..20e820ec8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs @@ -4,6 +4,7 @@ using Learun.Util; using System; using System.Collections.Generic; using System.Data; +using System.Linq; using System.Text; namespace Learun.Application.TwoDevelopment.EducationalAdministration @@ -42,13 +43,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration t.SpecifyReceiver, t.RContent, t.RSendFlag, - t.RProcessId,t.F_CreateDate + t.swz, + t.lwz, + t.RReceiveTime, + t.RProcessId "); strSql.Append(" FROM Sys_ReceiveDocument t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); + if (!queryParam["SenderId"].IsEmpty()) + { + dp.Add("SenderId", queryParam["SenderId"].ToString(), DbType.String); + strSql.Append(" AND t.SenderId = @SenderId "); + } if (!queryParam["RReceiveUnit"].IsEmpty()) { dp.Add("RReceiveUnit", queryParam["RReceiveUnit"].ToString(), DbType.String); @@ -64,7 +73,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("RTitle", "%" + queryParam["RTitle"].ToString() + "%", DbType.String); strSql.Append(" AND t.RTitle Like @RTitle "); } - return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); + if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.RReceiveTime >= @startTime AND t.RReceiveTime <= @endTime ) "); + } + //sql条件 + if (!queryParam["SqlParameter"].IsEmpty()) + { + strSql.Append(queryParam["SqlParameter"].ToString()); + } + var list = this.BaseRepository().FindList(strSql.ToString(), dp, pagination); + foreach (var item in list) + { + if (!item.RSendFlag.Equals("4")) + { + var listentity = this.BaseRepository().FindList(a => a.SFileId == item.RID && a.RStatus == 0).Count(); + if (listentity > 0) + { + item.HasDispose = 1; + } + else + { + item.HasDispose = 0; + } + } + + } + + return list; } catch (Exception ex) { @@ -79,6 +117,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + + public DataTable Execute(string sql) + { + return this.BaseRepository().FindTable(sql); + } + /// /// 获取Sys_ReceiveDocument表实体数据 /// 主键 @@ -138,12 +182,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// public void DeleteEntity(string keyValue) { + var db = this.BaseRepository().BeginTrans(); try { - this.BaseRepository().Delete(t => t.RID == keyValue); + db.Delete(t => t.RID == keyValue); + db.Delete(a => a.SFileId == keyValue); + db.Commit(); } catch (Exception ex) { + db.Rollback(); if (ex is ExceptionEx) { throw; @@ -198,7 +246,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - BaseRepository().ExecuteBySql("update Sys_ReceiveDocument set RSendFlag=" + status + ",RProcessId='" + processId + "',F_CreateDate=getdate() where RID='" + keyValue + "'", null); + BaseRepository().ExecuteBySql("update Sys_ReceiveDocument set RSendFlag=" + status + ",RProcessId='" + processId + "' where RID='" + keyValue + "'", null); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs index a30082a12..cb3df3a43 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs @@ -90,6 +90,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public IEnumerable GetPageListBySenderId(string senderId) + { + try + { + return sys_ReceiveFileService.GetPageListBySenderId(senderId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public IEnumerable GetPageListBySendId(string senderId) + { + try + { + return sys_ReceiveFileService.GetPageListBySendId(senderId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取Sys_ReceiveFile表实体数据 @@ -214,6 +250,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public void DisPose(string keyValue) + { + try + { + sys_ReceiveFileService.DisPose(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void Reset(string keyValue) + { + try + { + sys_ReceiveFileService.Reset(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 查看实体数据 @@ -276,6 +349,63 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public string ZhuRenP() + { + try + { + return sys_ReceiveFileService.ZhuRenP(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public string XiaoZhangP() + { + try + { + return sys_ReceiveFileService.XiaoZhangP(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public object GetInstructions(string keyValue) + { + try + { + return sys_ReceiveFileService.GetInstructions(keyValue); + } + 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/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs index fc1bd46af..3b91b4259 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs @@ -90,6 +90,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("DELFLAG")] public bool? DelFlag { get; set; } /// + /// 管理员是否已经处理 + /// + [Column("RSTATUS")] + public int? RStatus { get; set; } + /// /// 查阅时间 /// [Column("READTIME")] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs index 66ab79f86..946422a11 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs @@ -40,6 +40,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 用户编号 /// IEnumerable GetPageListByUserId(Pagination pagination, string queryJson, string userId); + IEnumerable GetPageListBySenderId(string senderId); + IEnumerable GetPageListBySendId(string senderId); #endregion #region 提交数据 @@ -68,6 +70,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void VirtualDeleteEntity(string keyValue); + void DisPose(string keyValue); + void Reset(string keyValue); /// /// 查看实体数据 /// 主键 @@ -79,5 +83,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void Issue(Sys_IssueEntity entity); void ReceiveDocumentIssue(Sys_IssueEntity entity); + string ZhuRenP(); + string XiaoZhangP(); + object GetInstructions(string keyValue); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs index 6f41043e2..194b89d1a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs @@ -9,6 +9,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web; +using Learun.Application.Base.AuthorizeModule; using Learun.Application.Organization; using Learun.Application.TwoDevelopment.LR_Desktop; using Microsoft.AspNet.SignalR.Client; @@ -109,7 +110,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") { dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); @@ -139,6 +140,45 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public IEnumerable GetPageListBySenderId(string userId) + { + try + { + var userInfo = LoginUserInfo.Get(); + var list = this.BaseRepository().FindList(a => a.SenderId == userId && a.RStatus == 0); + return list; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public IEnumerable GetPageListBySendId(string SFileId) + { + try + { + var list = this.BaseRepository().FindList(a => a.SFileId == SFileId); + return list; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取页面显示列表数据 @@ -245,6 +285,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration oldentity.ReplyFlag = true; oldentity.ReplyTime = DateTime.Now; oldentity.SpecifyReceiver = entity.SpecifyReceiver; + oldentity.RStatus = entity.RStatus; this.BaseRepository().Update(oldentity); } else @@ -322,6 +363,58 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public void DisPose(string keyValue) + { + try + { + var entity = this.BaseRepository().FindEntity(a => a.RFileId == keyValue); + if (null != entity) + { + entity.RStatus = 1; + this.BaseRepository().Update(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 重置批示状态 + /// + /// + public void Reset(string keyValue) + { + try + { + var entity = this.BaseRepository().FindEntity(a => a.RFileId == keyValue); + if (null != entity) + { + entity.ReadFlag = false; + this.BaseRepository().Update(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 查看实体数据 /// 主键 @@ -331,7 +424,60 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - this.BaseRepository().ExecuteBySql("update Sys_ReceiveFile set ReadFlag=1,ReadTime='" + DateTime.Now + "' where RFileId='" + keyValue + "'", null); + //状态改为已读 + string sql = "update Sys_ReceiveFile set ReadFlag=1,ReadTime='" + DateTime.Now + "' where RFileId='" + + keyValue + "'"; + this.BaseRepository().ExecuteBySql(sql, null); + + //判断当前公文是否已全部已读,如果全部已读,需要通知提醒下发人,加入消息提醒 + //获取未读人数 + var updSql = + $"select count(1) from Sys_ReceiveFile where SFileId=(select SFileId from Sys_ReceiveFile where RFileId='{keyValue}')and ReadFlag = 0"; + var dt = this.BaseRepository().FindTable(updSql); + if (dt.Rows[0][0] != null && Convert.ToInt32(dt.Rows[0][0]) == 0) + { + var entity = this.BaseRepository().FindEntity(keyValue); + + var receiveDocumentEntity = + this.BaseRepository().FindEntity(entity.SFileId); + + var userInfo = this.BaseRepository().FindEntity(entity.SenderId); + MessageRemindEntity msgEntity = new MessageRemindEntity(); + msgEntity.Create(); + msgEntity.ReceiptId = entity.SenderId; + msgEntity.ReceiptName = userInfo != null ? userInfo.F_RealName : ""; + msgEntity.SenderId = entity.ReceiverId; + msgEntity.SenderName = entity.Receiver; + if (entity.STypeId == 3) + { + msgEntity.TheTitle = "党政公文下发"; + var sendFileEntity = + this.BaseRepository().FindEntity(entity.SFileId); + msgEntity.TheContent = "【全部已阅】" + sendFileEntity.Title; + msgEntity.InstanceId = sendFileEntity.SFileId; + msgEntity.ConnectionUrl = "/EducationalAdministration/Sys_SendFile/ReadListParty?keyValue="; + } + else if (entity.STypeId == 4) + { + msgEntity.TheTitle = "公文接收"; + msgEntity.TheContent = "【全部已阅】" + receiveDocumentEntity.RTitle; + msgEntity.InstanceId = receiveDocumentEntity.RID; + msgEntity.ConnectionUrl = "/EducationalAdministration/Sys_ReceiveDocument/ReadList?keyValue="; + } + else if (entity.STypeId == 1) + { + msgEntity.TheTitle = "行政公文下发"; + var sendFileEntity = + this.BaseRepository().FindEntity(entity.SFileId); + msgEntity.TheContent = "【全部已阅】" + sendFileEntity.Title; + msgEntity.InstanceId = sendFileEntity.SFileId; + msgEntity.ConnectionUrl = "/EducationalAdministration/Sys_SendFile/ReadList?keyValue="; + } + msgEntity.SendTime = DateTime.Now; + msgEntity.ReadSigns = false; + this.BaseRepository().Insert(msgEntity); + } + } catch (Exception ex) { @@ -450,6 +596,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + + public string ZhuRenP() + { + var loginUser = LoginUserInfo.Get(); + var PeopleInTheSameDepartment = this.BaseRepository() + .FindList(a => a.F_DepartmentId == loginUser.departmentId); + //从同一部门的人中找出主任 + var roleEntity = this.BaseRepository().FindEntity(a => a.F_FullName == "中层干部正职"); + var allZhuRen = new List(); + if (null != roleEntity) + { + allZhuRen = this.BaseRepository() + .FindList(a => a.F_ObjectId == roleEntity.F_RoleId).Select(a => a.F_UserId).ToList(); + } + + var zhurenID = PeopleInTheSameDepartment.FirstOrDefault(a => allZhuRen.Contains(a.F_UserId))?.F_UserId; + return zhurenID; + + } + + public string XiaoZhangP() + { + var xiaozhangID = this.BaseRepository().FindEntity(a => a.F_RealName.Contains("关亮"))?.F_UserId; + + return xiaozhangID; + } + + /// /// 公文接收 下发指定接收人 /// @@ -460,12 +634,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { //从‘查阅情况’ 列表中跳转 将发送情况改变 - if (!string.IsNullOrEmpty(entity.RFileId)) - { - var rEntity = db.FindEntity(a => a.RFileId == entity.RFileId); - rEntity.SendStatus = true; - db.Update(rEntity); - } + //if (!string.IsNullOrEmpty(entity.RFileId)) + //{ + // var rEntity = db.FindEntity(a => a.RFileId == entity.RFileId); + // rEntity.SendStatus = true; + // db.Update(rEntity); + //} var Sys_ReceiveDocument = db.FindEntity(a => a.RID == entity.SFileId); var teacherlist = db.FindList(a => entity.SpecifyReceiver.Contains(a.F_UserId)).ToList(); @@ -511,6 +685,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } Sys_ReceiveDocument.ReceiverId = stringBuilder.ToString().TrimEnd(','); + Sys_ReceiveDocument.RSendFlag = "1"; db.Update(Sys_ReceiveDocument); db.Commit(); //读取信息推送管理-公文下发推送(02)的配置 @@ -592,5 +767,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public object GetInstructions(string keyValue) + { + try + { + var sendId = this.BaseRepository().FindEntity(a => a.RFileId == keyValue) + ?.SFileId; + var data = this.BaseRepository().FindList(a => a.SFileId == sendId && a.SpecifyReceiver != null) + .OrderBy(a => a.ReplyTime); + + return data; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + + } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileBLL.cs index 02ca52e88..423b9965a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileBLL.cs @@ -41,6 +41,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public DataTable Execute(string sql) + { + return sys_SendFileService.Execute(sql); + } /// /// 获取页面显示列表数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileEntity.cs index 9401719a8..61b1922e2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileEntity.cs @@ -1,5 +1,6 @@ using Learun.Util; using System; +using System.Collections.Specialized; using System.ComponentModel.DataAnnotations.Schema; namespace Learun.Application.TwoDevelopment.EducationalAdministration @@ -84,8 +85,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("SPROCESSID")] public string SProcessId { get; set; } + /// + /// SProcessId + /// + [Column("DOCNO")] + public string DocNo { get; set; } #endregion - + [NotMapped] + public string NumberPeople { get; set; } #region 扩展操作 /// /// 新增调用 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileIBLL.cs index 4d6e3d7ac..c39fba50e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileIBLL.cs @@ -21,6 +21,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + + DataTable Execute(string sql); IEnumerable GetList(); /// /// 获取Sys_SendFile表实体数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileService.cs index 9050ce8ee..f3978fb73 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileService.cs @@ -44,6 +44,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); + if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.SendTime >= @startTime AND t.SendTime <= @endTime ) "); + } if (!queryParam["Title"].IsEmpty()) { dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); @@ -54,6 +60,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("SenderId", "" + queryParam["SenderId"].ToString() + "", DbType.String); strSql.Append(" AND t.SenderId = @SenderId "); } + if (!queryParam["Receiver"].IsEmpty()) + { + dp.Add("Receiver", "%" + queryParam["Receiver"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Receiver Like @Receiver "); + } + //sql条件 + if (!queryParam["SqlParameter"].IsEmpty()) + { + strSql.Append(queryParam["SqlParameter"].ToString()); + } return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) @@ -68,6 +84,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public DataTable Execute(string sql) + { + return this.BaseRepository().FindTable(sql); + } /// /// 获取页面显示列表数据 /// @@ -392,6 +413,21 @@ on a.F_UserId=b.F_UserId where b.F_ObjectId in(" + string.Join(",", ppostid) + db.Rollback(); } } + else if (status == 0) + { + var db = BaseRepository().BeginTrans(); + try + { + var Sys_SendFile = db.FindEntity(m => m.SProcessId == processId); + Sys_SendFile.SendFlag = status; + db.Update(Sys_SendFile); + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + } + } } public void PushWeixin(List needpostuserlist, string title) @@ -419,7 +455,7 @@ on a.F_UserId=b.F_UserId where b.F_ObjectId in(" + string.Join(",", ppostid) + string access_token = weixintokenobj.access_token; string jsondata = "{\"touser\":\"" + userinfo.OpenIdForWeixin + "\"," + "\"template_id\":\"" + weixintasktempid + "\"," + - "\"url\":\"" + weixintaskurl + "\"," + + "\"url\":\"" + weixintaskurl + "/#/?page=file\"," + "\"data\":{" + "\"first\": {\"value\":\"您有新的公文需要查阅\",\"color\":\"#173177\"}," + "\"keyword1\":{\"value\":\"公文下发\",\"color\":\"#173177\"}," + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRemindEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRemindEntity.cs new file mode 100644 index 000000000..a1d98e964 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRemindEntity.cs @@ -0,0 +1,95 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.LR_Desktop +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-04-23 16:58 + /// 描 述:消息提醒 + /// + public class MessageRemindEntity + { + #region 实体成员 + /// + /// MessageId + /// + [Column("MESSAGEID")] + public string MessageId { get; set; } + /// + /// ReceiptId + /// + [Column("RECEIPTID")] + public string ReceiptId { get; set; } + /// + /// ReceiptName + /// + [Column("RECEIPTNAME")] + public string ReceiptName { get; set; } + /// + /// SenderId + /// + [Column("SENDERID")] + public string SenderId { get; set; } + /// + /// SenderName + /// + [Column("SENDERNAME")] + public string SenderName { get; set; } + /// + /// TheTitle + /// + [Column("THETITLE")] + public string TheTitle { get; set; } + /// + /// TheContent + /// + [Column("THECONTENT")] + public string TheContent { get; set; } + /// + /// ConnectionUrl + /// + [Column("CONNECTIONURL")] + public string ConnectionUrl { get; set; } + /// + /// 实例Id + /// + [Column("INSTANCEId")] + public string InstanceId { get; set; } + /// + /// SendTime + /// + [Column("SENDTIME")] + public DateTime? SendTime { get; set; } + /// + /// ReadSigns + /// + [Column("READSIGNS")] + public bool? ReadSigns { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.MessageId = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.MessageId = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindBLL.cs new file mode 100644 index 000000000..0b332ac33 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindBLL.cs @@ -0,0 +1,194 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LR_Desktop +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-04-23 16:58 + /// 描 述:消息提醒 + /// + public class MessageRindBLL : MessageRindIBLL + { + private MessageRindService messageRindService = new MessageRindService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return messageRindService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 未读消息 + /// + /// + public IEnumerable GetListForUnread() + { + try + { + return messageRindService.GetListForUnread(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + /// + /// 未读消息的数量 + /// + /// + public int GetCountForUnread() + { + try + { + return messageRindService.GetCountForUnread(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取MessageRemind表实体数据 + /// + /// 主键 + /// + public MessageRemindEntity GetMessageRemindEntity(string keyValue) + { + try + { + return messageRindService.GetMessageRemindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + messageRindService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, MessageRemindEntity entity) + { + try + { + messageRindService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 修改为已读 + /// + /// + public void SaveReadSigns(string keyValue) + { + try + { + messageRindService.SaveReadSigns(keyValue); + } + 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/LR_Desktop/MessageRind/MessageRindIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindIBLL.cs new file mode 100644 index 000000000..ea552d6ee --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindIBLL.cs @@ -0,0 +1,63 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LR_Desktop +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-04-23 16:58 + /// 描 述:消息提醒 + /// + public interface MessageRindIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取未读的消息 + /// + /// + IEnumerable GetListForUnread(); + /// + /// 获取未读的消息的数量 + /// + /// + int GetCountForUnread(); + /// + /// 获取MessageRemind表实体数据 + /// + /// 主键 + /// + MessageRemindEntity GetMessageRemindEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, MessageRemindEntity entity); + /// + /// 修改为已读 + /// + /// + void SaveReadSigns(string keyValue); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs new file mode 100644 index 000000000..db2ee1ed8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs @@ -0,0 +1,231 @@ +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.LR_Desktop +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-04-23 16:58 + /// 描 述:消息提醒 + /// + public class MessageRindService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM MessageRemind t "); + 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.SendTime >= @startTime AND t.SendTime <= @endTime ) "); + } + return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取MessageRemind表未读的消息 + /// + /// + public IEnumerable GetListForUnread() + { + try + { + var userInfo = LoginUserInfo.Get(); + return this.BaseRepository().FindList(x => x.ReadSigns == false && x.ReceiptId == userInfo.userId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取MessageRemind表未读消息的数量 + /// + /// + public int GetCountForUnread() + { + try + { + var userInfo = LoginUserInfo.Get(); + string sql = "select count(1) from MessageRemind where ReadSigns=0 "; + + sql += $" and ReceiptId='{userInfo.userId}'"; + + var obj = this.BaseRepository().FindObject(sql); + if (obj == null) + return 0; + else + return Convert.ToInt32(obj); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取MessageRemind表实体数据 + /// + /// 主键 + /// + public MessageRemindEntity GetMessageRemindEntity(string keyValue) + { + try + { + return this.BaseRepository().FindEntity(x => x.MessageId == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository().Delete(t => t.MessageId == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, MessageRemindEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository().Update(entity); + } + else + { + entity.Create(); + this.BaseRepository().Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveReadSigns(string keyValue) + { + try + { + string sql = $"update MessageRemind set ReadSigns=1 where MessageId='{keyValue}'"; + this.BaseRepository().ExecuteBySql(sql); + } + 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 08dfee67c..e177f9df0 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 @@ -191,6 +191,10 @@ + + + + @@ -256,6 +260,10 @@ + + + + @@ -273,6 +281,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsBLL.cs new file mode 100644 index 000000000..df89fa832 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsBLL.cs @@ -0,0 +1,144 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.Permission +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsBLL : DepartmentReleasePermissionsIBLL + { + private DepartmentReleasePermissionsService departmentReleasePermissionsService = new DepartmentReleasePermissionsService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return departmentReleasePermissionsService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取DepartmentReleasePermissions表实体数据 + /// + /// 主键 + /// + public DepartmentReleasePermissionsEntity GetDepartmentReleasePermissionsEntity(string keyValue) + { + try + { + return departmentReleasePermissionsService.GetDepartmentReleasePermissionsEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + departmentReleasePermissionsService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, DepartmentReleasePermissionsEntity entity) + { + try + { + departmentReleasePermissionsService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public DepartmentReleasePermissionsEntity GetTypesByUserId(string userId) + { + try + { + return departmentReleasePermissionsService.GetTypesByUserId(userId); + } + 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/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsEntity.cs new file mode 100644 index 000000000..35ab8f899 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsEntity.cs @@ -0,0 +1,60 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.Permission +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 部门 + /// + [Column("DEPARTMENTID")] + public string DepartmentID { get; set; } + /// + /// 人员 + /// + [Column("USERID")] + public string UserID { get; set; } + /// + /// 权限 + /// + [Column("PERMISSION")] + public string Permission { 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/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsIBLL.cs new file mode 100644 index 000000000..53da848f0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsIBLL.cs @@ -0,0 +1,49 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.Permission +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public interface DepartmentReleasePermissionsIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取DepartmentReleasePermissions表实体数据 + /// + /// 主键 + /// + DepartmentReleasePermissionsEntity GetDepartmentReleasePermissionsEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, DepartmentReleasePermissionsEntity entity); + #endregion + + DepartmentReleasePermissionsEntity GetTypesByUserId(string userId); + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsService.cs new file mode 100644 index 000000000..972446c62 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsService.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.Permission +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.ID, + t.UserID, + t.Permission + "); + strSql.Append(" FROM DepartmentReleasePermissions t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["DepartmentID"].IsEmpty()) + { + dp.Add("DepartmentID",queryParam["DepartmentID"].ToString(), DbType.String); + strSql.Append(" AND t.DepartmentID = @DepartmentID "); + } + return this.BaseRepository().FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取DepartmentReleasePermissions表实体数据 + /// + /// 主键 + /// + public DepartmentReleasePermissionsEntity GetDepartmentReleasePermissionsEntity(string keyValue) + { + try + { + return this.BaseRepository().FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository().Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, DepartmentReleasePermissionsEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository().Update(entity); + } + else + { + entity.Create(); + this.BaseRepository().Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + public DepartmentReleasePermissionsEntity GetTypesByUserId(string userId) + { + try + { + return this.BaseRepository().FindEntity(a=>a.UserID==userId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationEntity.cs index 4312eaf2e..6ad20d401 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationEntity.cs @@ -176,6 +176,9 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } #endregion #region 扩展字段 + + [NotMapped] public string ClassDiredctorNo { get; set; } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationService.cs index 26e75c01f..4c8a288a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationService.cs @@ -6,6 +6,8 @@ using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; +using Learun.Application.Organization; +using Learun.Application.TwoDevelopment.EducationalAdministration; namespace Learun.Application.TwoDevelopment.PersonnelManagement { @@ -60,17 +62,23 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement t.HasFamily, t.HasPeople, t.StudentSource, - t.Contacts + t.Contacts,d.ClassDiredctorNo "); - strSql.Append(" FROM EpidemicSituation t "); + strSql.Append(" FROM EpidemicSituation t left join "+ BaseRepository().getDbConnection().Database+ ".dbo.LR_Base_User b on t.Creater=b.F_UserId left join stuinfobasic c on b.F_EnCode=c.stuno left join classinfo d on c.classno=d.classno "); 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.CreateTime >= @startTime AND t.CreateTime <= @endTime ) "); + } if (!queryParam["Creater"].IsEmpty()) { - dp.Add("Creater", queryParam["Creater"].ToString(), DbType.String); - strSql.Append(" AND t.Creater = @Creater "); + dp.Add("Creater", "%"+queryParam["Creater"].ToString()+"%", DbType.String); + strSql.Append(" AND c.StuName like @Creater "); } if (!queryParam["Type"].IsEmpty()) { @@ -145,14 +153,14 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } - var expression = LinqExtensions.True(); var queryParam = queryJson.ToJObject(); // 填表人员 if (!queryParam["Creater"].IsEmpty()) { string Creater = queryParam["Creater"].ToString(); - expression = expression.And(t => t.Creater.Equals(Creater)); + var studentlist = BaseRepository().FindList(m=>m.F_RealName.Contains(Creater)); + expression = expression.And(t => studentlist.Any(m=>m.F_UserId== t.Creater)); } // 类别 if (!queryParam["Type"].IsEmpty())