From 50478506dcbd74c775db6413c982775f241a9e05 Mon Sep 17 00:00:00 2001 From: liangkun Date: Fri, 18 Jun 2021 16:49:35 +0800 Subject: [PATCH 01/19] =?UTF-8?q?=E6=97=A0ui=E7=99=BB=E5=BD=95=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/LoginController.cs | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) 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..21298bc89 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,54 @@ namespace Learun.Application.Web.Controllers } } + [HttpGet] + public ActionResult CheckLoginForSSOBC(string u) + { + try + { + string uid = Request.QueryString["u"]; + if (!string.IsNullOrEmpty(uid)) + { + string username = uid; + string password = "www.qj.com"; + 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("参数错误"); + } + } #endregion #region 微信登录 From 0de8db6c35760fd404cb5db8af265658dc386a8f Mon Sep 17 00:00:00 2001 From: liangkun Date: Wed, 23 Jun 2021 11:01:40 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E8=A5=BF=E6=98=8C=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E6=97=A0ui=E7=99=BB=E5=BD=95=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...一身份认证补充接口说明V1.0.docx | Bin 0 -> 20485 bytes .../Controllers/LoginController.cs | 39 ++++++++++++++++-- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园统一身份认证补充接口说明V1.0.docx 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 0000000000000000000000000000000000000000..0c95c7c1dc306b127bd39c762e6c26be8e01cfd0 GIT binary patch literal 20485 zcmeFZb_yr(9WO)EU-}(RF^?$Jk8k47F2IvriuEaV8_bDaT9rz%aF9638MK237tzG~h>}DH7`Plh8i|X44_}szSN3%$mr%Z^#Jb`T;Xt z^cd4CFVPf&5nGcdH<6HVg6(S~PMAcNFyUf&kqnJ0VBSPXl1w}8WiP%2hpEcqX{QgI zLl+XK`QtQs1MI9_6IZ$sEP)gCL_|4?K-ZgT)~&0mHT2vwojR+VtSY3YTLt=$CEtF! zs_|mA(s(=UmkeByGUW3YO7&&VV{8iATmisT=mu{r)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Y}2yfQ>r8QYtj`Q3MY{>%NoQzy^e|0C+1 zjpVa{q}RP3C+1sOr!9)fYUI_LqQ@EhO6=#+M@?MLT+)HbPnLXT+_Q6m(tI)24R$S| z%1skGB|e=#Dsw}lJ^Fp`G$p~KY{-@q3-1RuRR6L*SmN9{b8VpPxj(ukD)GP5 zPc7f<>3E-iSF;;K+xNqWkv&ExUEm55><5j(VhKiLId&|-8`S{Rqm5u1LG*cM1_q>q zj?gutp7(;R@iTA-2)@%_&`m-=x&vWW5pXRH#z7wF+R=BMA+-MzgK9_Fe}=9feajL; z|4#|1e&h{I=-ScuydboH2QCl+yB>W947w5M>xmIY+*5=afxNmHT|4^PB7}B9EvR<1 zl}6|$ps#8{m~c}Y<^XJKT+q!yA8AII(`$iZ4yZ^)*NoZ + /// 无ui登录 + /// + /// + /// + /// [HttpGet] - public ActionResult CheckLoginForSSOBC(string u) + public ActionResult CheckLoginForSSOBC(string u,string p) { try { string uid = Request.QueryString["u"]; - if (!string.IsNullOrEmpty(uid)) + string pwd = Request.QueryString["p"]; + if (!string.IsNullOrEmpty(uid)&&!string.IsNullOrEmpty(pwd)) { string username = uid; - string password = "www.qj.com"; + string password = pwd; UserEntity userEntity = userBll.CheckLogin(username, Md5Helper.Encrypt(password, 32)); LogEntity logEntity = new LogEntity(); @@ -769,7 +776,7 @@ namespace Learun.Application.Web.Controllers } else { - //OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_PC", null);//写入缓存信息 + OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_PC", null);//写入缓存信息 //写入日志 logEntity.F_ExecuteResult = 1; logEntity.F_ExecuteResultJson = "无ui接口登录成功"; @@ -787,6 +794,30 @@ namespace Learun.Application.Web.Controllers 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 微信登录 From 28f089f535c5159af4342be2e2cf8ef183b5b71c Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Wed, 7 Jul 2021 11:11:00 +0800 Subject: [PATCH 03/19] =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../www/config/config.js | 14 +-- .../pages/login/IdCardLogin/IdCardLogin.css | 63 +++++++++++ .../pages/login/IdCardLogin/IdCardLogin.html | 17 +++ .../pages/login/IdCardLogin/IdCardLogin.js | 104 ++++++++++++++++++ .../www/pages/login/login.html | 5 +- .../www/pages/login/login.js | 7 +- .../User/UserBLL.cs | 81 ++++++++++++++ .../User/UserIBLL.cs | 7 ++ .../User/UserService.cs | 25 +++++ .../Modules/BaseApi.cs | 2 +- .../Modules/UserApi.cs | 76 +++++++++++++ 11 files changed, 390 insertions(+), 11 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.css create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.html create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.js 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..17e9e4444 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 = { + webapi: 'http://localhost:8080/', + web: "http://localhost:8082/"//web地址,用于配置logo }; -//var config = { +// var config = { // webapi: 'http://112.230.201.53:31173/', // web:"http://112.230.201.53/:8081/"//web地址,用于配置logo -//}; -//var config = { +// }; +// 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/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..790d1b681 --- /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..813d452be --- /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 = true; + 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('pwd', true); + } else { + learun.storage.set('pwd', 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..dcffc2025 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_ReceiveFile/IndexGWJS.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js index d85c98cff..1b7090297 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js @@ -8,8 +8,8 @@ var refreshGirdData; var selectedRow; var bootstrap = function ($, learun) { "use strict"; - var startTime; - var endTime; + var startTime = ''; + var endTime = ''; var page = { init: function () { page.initGird(); @@ -35,8 +35,6 @@ var bootstrap = function ($, learun) { yxShow: false, preyShow: false, yShow: false, - // 默认 - dfvalue: '1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -79,22 +77,22 @@ var bootstrap = function ($, learun) { }); } }); - // 指定接收人 - $('#lr_SpecifyReceiver').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('RFileId'); - if (learun.checkrow(keyValue)) { - learun.layerForm({ - id: 'formSys_ReceiveFile', - title: '指定接收人', - url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SpecifyReceiverForm?keyValue=' + keyValue, - width: 600, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); - } - }); + //// 指定接收人 + //$('#lr_SpecifyReceiver').on('click', function () { + // var keyValue = $('#gridtable').jfGridValue('RFileId'); + // if (learun.checkrow(keyValue)) { + // learun.layerForm({ + // id: 'formSys_ReceiveFile', + // title: '指定接收人', + // url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SpecifyReceiverForm?keyValue=' + keyValue, + // width: 600, + // height: 400, + // callBack: function (id) { + // return top[id].acceptClick(refreshGirdData); + // } + // }); + // } + //}); // 删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('RFileId'); @@ -118,32 +116,28 @@ var bootstrap = function ($, learun) { var keyValue = $('#gridtable').jfGridValue('RFileId'); selectedRow = $('#gridtable').jfGridGet('rowdata'); if (learun.checkrow(keyValue)) { - top.layer.open({ + + //判断查阅状态 + if (selectedRow.ReadFlag == false) { + //判断附件 + //if (selectedRow.Url == null || selectedRow.Url == "") { + //自动已读 + learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + //} + } + learun.layerForm({ id: 'formSys_ReceiveFile', - type: 2, title: '查看', - area: ['1000px', '600px'], - btn: null, - content: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Form?keyValue=' + keyValue, - skin: 'lr-layer-nobtn', - success: function (layero, index) { - top['formSys_ReceiveFile'] = learun.iframe($(layero).find('iframe').attr('id'), top.frames); - - //判断查阅状态 - if (selectedRow.ReadFlag == false) { - //判断附件 - //if (selectedRow.Url == null || selectedRow.Url == "") { - //自动已读 - learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () { - refreshGirdData(); - }); - //} - } - }, - end: function () { - top['formSys_ReceiveFile'] = null; + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Form?keyValue=' + keyValue + '&readFlag=' + selectedRow.ReadFlag, + width: 1000, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); } }); + } }); @@ -162,43 +156,12 @@ var bootstrap = function ($, learun) { callback(_data.name); } }); - }}, - { label: "主题", name: "Title", width: 300, align: "left" }, - { label: "发送时间", name: "SendTime", width: 130, 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: "Title", width: 300, align: "left" }, + { label: "发送时间", name: "SendTime", width: 130, align: "left" }, { - label: "指定接收人", name: "SpecifyReceiver", width: 150, align: "left", formatterAsync: - function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('user', - { - key: value, - callback: function (_data) { - if (_data.length > 0) { - var text = ''; - $.each(_data, - function (i, item) { - if (item) { - text += item.name + ','; - } - }); - text = text.substring(0, text.lastIndexOf(',')); - callback(text); - } else { - callback(_data.name); - } - } - }); - } + label: "签批意见", name: "SpecifyReceiver", width: 300, align: "left" }, { label: "状态", name: "ReadFlag", width: 100, align: "left", @@ -210,6 +173,19 @@ var bootstrap = function ($, learun) { } } }, + { + label: "是否通知管理员", name: "RStatus", width: 100, align: "left", + formatter: function (callback, value, row, op, $cell) { + switch (callback) { + + case 1: + return '不通知'; + case 0: + return '通知'; + default: + } + } + }, { label: "查阅时间", name: "ReadTime", width: 130, align: "left" }, ], mainId: 'RFileId', @@ -217,6 +193,7 @@ var bootstrap = function ($, learun) { sidx: 'SendTime', sord: 'DESC' }); + page.search(); }, search: function (param) { param = param || {}; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.cshtml index e919b7d9e..7ac792dd4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.cshtml @@ -18,6 +18,10 @@ +
+
接收人
+ +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml index 6312927ed..99af5e50c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml @@ -27,6 +27,10 @@
接收校区*
+
+
文号*
+ +
文件
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.cshtml index 820e37035..0e94f634e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.cshtml @@ -7,6 +7,9 @@
+
+
+
@@ -14,6 +17,10 @@
主题
+
+
接收人
+ +
@@ -31,6 +38,7 @@   提交   查看   查阅情况 +  结束下发
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js index eb523302a..1f76fa33c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.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,20 @@ 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 () { @@ -145,6 +189,7 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageList', headData: [ { label: "主题", name: "Title", width: 300, align: "left" }, + { label: "文号", name: "DocNo", width: 300, align: "left" }, { label: "接收对象", name: "SendType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -157,7 +202,7 @@ var bootstrap = function ($, learun) { }); } }, - { + { label: "接收人", name: "Receiver", width: 300, align: "left" }, { @@ -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/IndexFile.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.cshtml new file mode 100644 index 000000000..7535a137a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.cshtml @@ -0,0 +1,41 @@ +@{ + ViewBag.Title = "公文发送"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
主题
+ +
+
+
接收人
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.js new file mode 100644 index 000000000..764968a24 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.js @@ -0,0 +1,131 @@ +/* * 版 本 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/FormView?keyValue=' + keyValue, + width: 800, + height: 700, + btn: null + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageList', + 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.StartTime = startTime; + param.EndTime = endTime; + param.SqlParameter = ' AND SendFlag=4'; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.cshtml index 8be5f45bb..b74172e37 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.cshtml @@ -7,6 +7,9 @@
+
+
+
@@ -15,6 +18,10 @@
+
+
接收人
+ +
@@ -31,6 +38,7 @@   提交   查看   查阅情况 +  结束下发
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/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/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index d233e837b..44143ded1 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 @@ -469,6 +469,7 @@ + @@ -1005,6 +1006,8 @@ + + @@ -1021,9 +1024,12 @@ + + + @@ -1350,6 +1356,8 @@ + + @@ -6942,6 +6950,13 @@ + + + + + + + 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..9ad49e5dd 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 @@ -193,6 +193,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_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/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 08dfee67c..046f04901 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 @@ -273,6 +273,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); + } + } + } + } +} From 32c74907a1fe624a88a9ad13cc444154d466cbb4 Mon Sep 17 00:00:00 2001 From: liangkun Date: Thu, 15 Jul 2021 15:38:14 +0800 Subject: [PATCH 09/19] =?UTF-8?q?=E5=85=AC=E6=96=87=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=B8=8E=E9=87=91=E9=9A=85=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sys_ReceiveDocumentController.cs | 53 +++- .../Controllers/Sys_ReceiveFileController.cs | 72 ++++++ .../Controllers/Sys_SendFileController.cs | 78 +++++- .../Controllers/MessageRindController.cs | 188 ++++++++++++++ .../LR_Desktop/Views/MessageRind/Form.cshtml | 35 +++ .../LR_Desktop/Views/MessageRind/Form.js | 41 ++++ .../LR_Desktop/Views/MessageRind/Index.cshtml | 94 +++++++ .../LR_Desktop/Views/MessageRind/Index.js | 150 ++++++++++++ .../Views/MessageRind/UnreadIndex.cshtml | 141 +++++++++++ .../Learun.Application.Web.csproj | 6 + .../LR_Desktop/MessageRemindMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 1 + .../MessageRind/MessageRemindEntity.cs | 95 +++++++ .../LR_Desktop/MessageRind/MessageRindBLL.cs | 194 +++++++++++++++ .../LR_Desktop/MessageRind/MessageRindIBLL.cs | 63 +++++ .../MessageRind/MessageRindService.cs | 231 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 17 files changed, 1469 insertions(+), 6 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/MessageRemindMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRemindEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs index d0bd4e1dc..891c892ed 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs @@ -3,6 +3,7 @@ using System.Data; using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; using System.Collections.Generic; +using System.Linq; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -16,6 +17,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class SYS_ReceiveDocumentController : MvcControllerBase { private SYS_ReceiveDocumentIBLL sYS_ReceiveDocumentIBLL = new SYS_ReceiveDocumentBLL(); + private Sys_ReceiveFileIBLL receiveFileIbll=new Sys_ReceiveFileBLL(); #region 视图功能 @@ -28,6 +30,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + + /// + /// 公文接收归档 + /// + /// + [HttpGet] + public ActionResult IndexFile() + { + return View(); + } + /// /// 表单页 /// @@ -56,17 +69,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + + /// + /// 阅读详情 + /// + /// [HttpGet] - public ActionResult SelectUserForm() + public ActionResult ReadList() { return View(); } /// - /// 阅读详情 + /// 打印页面 /// /// [HttpGet] - public ActionResult ReadList() + public ActionResult PrintView() { return View(); } @@ -85,6 +103,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { Pagination paginationobj = pagination.ToObject(); var data = sYS_ReceiveDocumentIBLL.GetPageList(paginationobj, queryJson); + + foreach (var item in data) + { + var sql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where ReadFlag=1 AND SFileId='{item.RID}'"; + var sendSql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where SFileId='{item.RID}'"; + var readdt = sYS_ReceiveDocumentIBLL.Execute(sql); + var senddt = sYS_ReceiveDocumentIBLL.Execute(sendSql); + var readcount = readdt.Rows[0][0]; + var sendcount = senddt.Rows[0][0]; + item.NumberPeople = $"{readcount}/{sendcount}"; + } var jsonData = new { rows = data, @@ -124,6 +153,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + + + public ActionResult PrintInfo(string keyValue) + { + var entity = sYS_ReceiveDocumentIBLL.GetSys_ReceiveDocumentEntity(keyValue); + var entityItem = receiveFileIbll.GetPageListBySendId(keyValue).ToList().Where(a=>a.ReadTime!=null).OrderBy(a=>a.ReadTime); + object data = new + { + entity, + entityItem + }; + + return Success(data); + } #endregion #region 提交数据 @@ -157,6 +201,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } return Success("操作成功!"); } + + + /// /// 保存实体数据(新增、修改) /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs index 84f5a5c1d..3b7c27e01 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs @@ -120,6 +120,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success(jsonData); } /// + /// 获取批示信息 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetInstructions(string keyValue) + { + var data = sys_ReceiveFileIBLL.GetInstructions(keyValue); + var jsonData = new + { + rows = data, + }; + return Success(jsonData); + } + /// /// 获取页面显示列表数据 /// /// 查询参数 @@ -185,6 +201,30 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success("删除成功!"); } /// + /// 设置批示状态为已处理 + /// 主键 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult DisPose(string keyValue) + { + sys_ReceiveFileIBLL.DisPose(keyValue); + return Success("操作成功!"); + } + /// + /// 重置 + /// 主键 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult Reset(string keyValue) + { + sys_ReceiveFileIBLL.Reset(keyValue); + return Success("操作成功!"); + } + /// /// 保存实体数据(新增、修改) /// 主键 /// @@ -230,6 +270,38 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); return Success("保存成功!"); } + + /// + /// 主任批示 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult ZhuRenP(string strEntity) + { + Sys_IssueEntity entity = strEntity.ToObject(); + entity.SpecifyReceiver = sys_ReceiveFileIBLL.ZhuRenP(); + //entity.SpecifyReceiver = "System"; + sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); + return Success("发送成功"); + } + + /// + /// 校长批示 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult XiaoZhangP(string strEntity) + { + Sys_IssueEntity entity = strEntity.ToObject(); + entity.SpecifyReceiver = sys_ReceiveFileIBLL.XiaoZhangP(); + //entity.SpecifyReceiver = "System"; + sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); + return Success("发送成功"); + } + + /// /// 查看实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_SendFileController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_SendFileController.cs index 18a363eee..516563b32 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_SendFileController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_SendFileController.cs @@ -21,7 +21,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { private Sys_SendFileIBLL sys_SendFileIBLL = new Sys_SendFileBLL(); - #region 视图功能 + #region 视图功能 /// /// 主页面 @@ -32,6 +32,26 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + + /// + /// 行政公文归档 + /// + /// + [HttpGet] + public ActionResult IndexFile() + { + return View(); + } + + /// + /// 党政公文归档 + /// + /// + [HttpGet] + public ActionResult IndexPartyFile() + { + return View(); + } [HttpGet] public ActionResult IndexDocument() { @@ -47,6 +67,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// /// 主页面【党政公文下发】 /// @@ -56,11 +77,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + [HttpGet] public ActionResult FormDocument() { return View(); } + /// /// 表单页 /// @@ -70,6 +93,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// /// 表单页【党政公文下发】 /// @@ -91,6 +115,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// /// 【党政公文下发】 /// @@ -100,6 +125,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + [HttpGet] public ActionResult ReadList() { @@ -111,6 +137,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// /// 【党政公文下发】 /// @@ -120,9 +147,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + #endregion - #region 获取数据 + #region 获取数据 /// /// 获取页面显示列表数据 @@ -135,6 +163,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { Pagination paginationobj = pagination.ToObject(); var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 1); + + foreach (var item in data) + { + var sql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where ReadFlag=1 AND SFileId='{item.SFileId}'"; + var sendSql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where SFileId='{item.SFileId}'"; + var readdt = sys_SendFileIBLL.Execute(sql); + var senddt = sys_SendFileIBLL.Execute(sendSql); + var readcount = readdt.Rows[0][0]; + var sendcount = senddt.Rows[0][0]; + item.NumberPeople = $"{readcount}/{sendcount}"; + } + var jsonData = new { rows = data, @@ -144,6 +184,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + [HttpGet] [AjaxOnly] public ActionResult GetPageListDocument(string pagination, string queryJson) @@ -159,12 +200,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + [HttpGet] [AjaxOnly] public ActionResult GetPageListParty(string pagination, string queryJson) { Pagination paginationobj = pagination.ToObject(); var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 3); + + foreach (var item in data) + { + var sql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where ReadFlag=1 AND SFileId='{item.SFileId}'"; + var sendSql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where SFileId='{item.SFileId}'"; + var readdt = sys_SendFileIBLL.Execute(sql); + var senddt = sys_SendFileIBLL.Execute(sendSql); + var readcount = readdt.Rows[0][0]; + var sendcount = senddt.Rows[0][0]; + item.NumberPeople = $"{readcount}/{sendcount}"; + } var jsonData = new { rows = data, @@ -174,6 +227,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + /// /// 获取表单数据 /// @@ -190,6 +244,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + [HttpGet] [AjaxOnly] public ActionResult GetFormDataView(string keyValue) @@ -202,6 +257,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + /// /// 获取表单数据 /// @@ -217,9 +273,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + #endregion - #region 提交数据 + #region 提交数据 /// /// 删除实体数据 @@ -233,6 +290,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers sys_SendFileIBLL.DeleteEntity(keyValue); return Success("删除成功!"); } + /// /// 保存实体数据(新增、修改) /// 主键 @@ -249,6 +307,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { entity.STypeId = 1; } + sys_SendFileIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } @@ -264,6 +323,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { entity.STypeId = 2; } + sys_SendFileIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } @@ -279,9 +339,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { entity.STypeId = 3; } + sys_SendFileIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + /// /// 提交 /// @@ -294,6 +356,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers sys_SendFileIBLL.ChangeStatusById(keyValue, 1, processId); return Success("操作成功!"); } + [HttpPost] [AjaxOnly] public ActionResult ChangeStatusByIdDocument(string keyValue) @@ -303,6 +366,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers sys_SendFileIBLL.ChangeStatusByProcessId(guid, 2); return Success("操作成功!"); } + /// /// 结束下发 /// @@ -316,6 +380,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers sys_SendFileIBLL.OverIssue(keyValue); return Success("下发成功!"); } + + + /* public ActionResult ReceiveFile(string keyValue) + { + + return View(); + }*/ + #endregion } 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/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 44143ded1..77c548708 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 @@ -389,6 +389,7 @@ + @@ -1251,6 +1252,8 @@ + + @@ -6957,6 +6960,9 @@ + + + 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 9ad49e5dd..611ff0175 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -110,6 +110,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/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 046f04901..a6ef09290 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 @@ -256,6 +256,10 @@ + + + + From 325455619bd827cae865b0dad2e3a828d508c507 Mon Sep 17 00:00:00 2001 From: liangkun Date: Thu, 15 Jul 2021 16:50:56 +0800 Subject: [PATCH 10/19] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/HomeController.cs | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) 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..e43c5c53e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs @@ -17,6 +17,7 @@ using Learun.Application.OA; using Learun.Application.TwoDevelopment.LR_Desktop; using Learun.Application.TwoDevelopment.Permission; using Learun.Application.WorkFlow; +using Learun.Application.TwoDevelopment.LR_LGManager; namespace Learun.Application.Web.Controllers { @@ -57,6 +58,9 @@ 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(); + private StudentLeaveIBLL studentLeaveIBLL = new StudentLeaveBLL(); + private StudentLeave_zcIBLL studentLeave_ZcIBLL = new StudentLeave_zcBLL(); #region 视图功能 public ActionResult ChangePwd() @@ -168,7 +172,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 +234,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 +345,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 +438,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 +491,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 = studentLeaveIBLL.GetListWithProcess("{\"F_IsFinished\":\"1\",\"F_CreateUserName\":\"" + userinfo.userId + "\"}").Where(x => x.FileStatus != "1").Count(); + //中层领导请假-未归档数 + ViewBag.UnfileLeaveZC = studentLeave_ZcIBLL.GetListWithProcess("{\"F_IsFinished\":\"1\",\"F_CreateUserName\":\"" + userinfo.userId + "\"}").Where(x => x.FileStatus != "1").Count(); - 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(); From 54d43b68cbbfe9957cd581f6e9c87225c01f604b Mon Sep 17 00:00:00 2001 From: liangkun Date: Thu, 15 Jul 2021 18:10:04 +0800 Subject: [PATCH 11/19] =?UTF-8?q?=E8=A5=BF=E6=98=8C=E5=85=AC=E6=96=87?= =?UTF-8?q?=E5=8F=8A=E9=BB=98=E8=AE=A4=E5=AF=86=E7=A0=81=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=BB=8E=E9=87=91=E9=9A=85=E7=A7=BB=E6=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/login/IdCardLogin/IdCardLogin.js | 2 +- .../modifypasswordandnotice.js | 6 +- .../User/UserBLL.cs | 36 +++ .../User/UserIBLL.cs | 8 + .../Sys_DefaultPwdConfigController.cs | 131 +++++++++++ .../Views/Sys_DefaultPwdConfig/Form.cshtml | 15 ++ .../Views/Sys_DefaultPwdConfig/Form.js | 51 +++++ .../Views/Sys_DefaultPwdConfig/Index.cshtml | 39 ++++ .../Views/Sys_DefaultPwdConfig/Index.js | 112 +++++++++ .../Controllers/HomeController.cs | 7 +- .../Learun.Application.Web.csproj | 5 + .../XmlConfig/system.config | 4 + .../Modules/UserApi.cs | 21 ++ .../Sys_DefaultPwdConfigMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 1 + .../Sys_DefaultPwdConfigBLL.cs | 171 ++++++++++++++ .../Sys_DefaultPwdConfigEntity.cs | 60 +++++ .../Sys_DefaultPwdConfigIBLL.cs | 61 +++++ .../Sys_DefaultPwdConfigService.cs | 213 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 20 files changed, 967 insertions(+), 9 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_DefaultPwdConfigController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_DefaultPwdConfigMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigService.cs 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 index a4f3bdb54..5c155699d 100644 --- 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 @@ -38,7 +38,7 @@ $page.find('#loginBtn').on('tap', function () { var account = $('#idcard').val(); var password = $('#pwd').val(); - var up = true; + var up = false; if (account === "") { learun.layer.warning('身份证号不能为空!', function () { }, '提示', '关闭'); }else if(account.length<=6){ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/modifypasswordandnotice/modifypasswordandnotice.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/modifypasswordandnotice/modifypasswordandnotice.js index 9cd0eff9e..aa49d180c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/modifypasswordandnotice/modifypasswordandnotice.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/modifypasswordandnotice/modifypasswordandnotice.js @@ -23,16 +23,16 @@ var req = { newpassword: $.md5(formdata.newpassword), - oldpassword: $.md5(formdata.oldpassword) + oldpassword: formdata.oldpassword }; learun.layer.loading(true); // 访问后台修改密码 - learun.httppost(config.webapi + "learun/adms/user/modifypw", req, (data,info) => { + learun.httppost(config.webapi + "learun/adms/user/modifypwiden", req, (data,info) => { learun.layer.loading(false); if (data) {// 表单数据保存成功,发起流程 learun.layer.toast(info); learun.storage.set('logininfo', null); - learun.storage.set('pwd', false); + learun.storage.set('pwdandnotice', false); learun.nav.go({ path: 'login', isBack: false, isHead: false }); } return false; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs index 839349ae4..e265b0895 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs @@ -879,6 +879,42 @@ namespace Learun.Application.Organization } } /// + /// 修改用户登录密码身份证后8位 + /// + /// 新密码(MD5 小写) + /// 旧密码(身份证后8位) + public bool RevisePasswordiden(string newPassword, string oldPassword) + { + try + { + UserInfo userInfo = LoginUserInfo.Get(); + cache.Remove(cacheKeyId + userInfo.userId, CacheId.user); + cache.Remove(cacheKeyAccount + userInfo.account, CacheId.user); + + var entity = userService.GetEntity(userInfo.userId); + if (oldPassword == entity.F_IdentityCardNo.Substring(entity.F_IdentityCardNo.Length - 8, 8)) + { + userService.RevisePassword(userInfo.userId, newPassword); + } + else + { + return false; + } + return true; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 重置密码 /// /// 账号主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs index 65f19dcb5..b234f8445 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs @@ -202,5 +202,13 @@ namespace Learun.Application.Organization void UpdateIp(string ip, string id); void GetImgForDC(string userId); UserEntity GetEntityByWeixinOpenIdPC(string openId); + + /// + /// 通过身份证后8位修改密码 + /// + /// + /// + /// + bool RevisePasswordiden(string newPassword, string oldPassword); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_DefaultPwdConfigController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_DefaultPwdConfigController.cs new file mode 100644 index 000000000..06bc4449f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_DefaultPwdConfigController.cs @@ -0,0 +1,131 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-01-19 11:14 + /// 描 述:默认密码配置 + /// + public class Sys_DefaultPwdConfigController : MvcControllerBase + { + private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL(); + + #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 = sys_DefaultPwdConfigIBLL.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 Sys_DefaultPwdConfigData = sys_DefaultPwdConfigIBLL.GetSys_DefaultPwdConfigEntity( keyValue ); + var jsonData = new { + Sys_DefaultPwdConfig = Sys_DefaultPwdConfigData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + sys_DefaultPwdConfigIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Sys_DefaultPwdConfigEntity entity = strEntity.ToObject(); + entity.IsEnabled = false; + sys_DefaultPwdConfigIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + + /// + /// 启用 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DoEnabled(string keyValue) + { + sys_DefaultPwdConfigIBLL.DoEnabled(keyValue); + return Success("操作成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.cshtml new file mode 100644 index 000000000..cabfef4e5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "默认密码配置"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
密码名称*
+ +
+
+
密码*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.js new file mode 100644 index 000000000..83feddc3b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.js @@ -0,0 +1,51 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-01-19 11:14 + * 描 述:默认密码配置 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.cshtml new file mode 100644 index 000000000..eb3bddb53 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "默认密码配置"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
密码名称
+ +
+
+
+
+
+
+
+ +
+ +
+  启用 +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.js new file mode 100644 index 000000000..9c43797f2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.js @@ -0,0 +1,112 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-01-19 11:14 + * 描 述:默认密码配置 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 启用 + $('#lr_enabled').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var IsEnabled = $('#gridtable').jfGridValue('IsEnabled'); + if (IsEnabled == true) { + learun.alert.warning("当前项已启用!"); + return false; + } + learun.layerConfirm('是否确认启用该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/DoEnabled', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/GetPageList', + headData: [ + { label: "密码名称", name: "PwdName", width: 150, align: "left"}, + { label: "密码", name: "Pwd", width: 150, align: "left"}, + { + label: "是否启用", name: "IsEnabled", width: 100, align: "left", + formatter: function (cellvalue, rowObject) { + return cellvalue == true ? "" : ""; + } + }, + ], + mainId:'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs index e43c5c53e..8673ef2c4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs @@ -17,7 +17,6 @@ using Learun.Application.OA; using Learun.Application.TwoDevelopment.LR_Desktop; using Learun.Application.TwoDevelopment.Permission; using Learun.Application.WorkFlow; -using Learun.Application.TwoDevelopment.LR_LGManager; namespace Learun.Application.Web.Controllers { @@ -59,8 +58,6 @@ namespace Learun.Application.Web.Controllers private Perm_FunctionIBLL perm_FunctionIBLL = new Perm_FunctionBLL(); private ICache redisCache = CacheFactory.CaChe(); private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL(); - private StudentLeaveIBLL studentLeaveIBLL = new StudentLeaveBLL(); - private StudentLeave_zcIBLL studentLeave_ZcIBLL = new StudentLeave_zcBLL(); #region 视图功能 public ActionResult ChangePwd() @@ -493,9 +490,9 @@ namespace Learun.Application.Web.Controllers paginationobj.sidx = "SendTime"; ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId).Count(); //普通教师请假-未归档数 - ViewBag.UnfileLeave = studentLeaveIBLL.GetListWithProcess("{\"F_IsFinished\":\"1\",\"F_CreateUserName\":\"" + userinfo.userId + "\"}").Where(x => x.FileStatus != "1").Count(); + ViewBag.UnfileLeave = 0; //中层领导请假-未归档数 - ViewBag.UnfileLeaveZC = studentLeave_ZcIBLL.GetListWithProcess("{\"F_IsFinished\":\"1\",\"F_CreateUserName\":\"" + userinfo.userId + "\"}").Where(x => x.FileStatus != "1").Count(); + ViewBag.UnfileLeaveZC = 0; ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail + ViewBag.UnfileLeave + ViewBag.UnfileLeaveZC; #endregion 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 77c548708..f74fea5ea 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 @@ + @@ -1002,6 +1003,8 @@ + + @@ -6963,6 +6966,8 @@ + + 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/UserApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs index ed00f0269..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,6 +27,7 @@ namespace Learun.Application.WebApi { Post["/login"] = Login; Post["/modifypw"] = ModifyPassword; + Post["/modifypwiden"] = ModifyPasswordiden; Post["/unbundWeiXin"] = DoUnbundWeiXin; Post["/loginbyIdCard"] = LoginByIdCard; @@ -247,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/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 611ff0175..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 @@ + 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/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index a6ef09290..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 @@ + + + + From 7fe0f7fc2cf62d25c0194803e3b8f7f122d789a1 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 27 Jul 2021 11:09:28 +0800 Subject: [PATCH 12/19] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=96=B0?= =?UTF-8?q?=E7=94=9F=E9=A6=96=E6=AC=A1=E7=99=BB=E5=BD=95=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E5=B9=B6=E4=B8=94=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E8=B7=B3=E8=BD=AC=E8=87=B3=E2=80=9C=E6=96=B0=E7=94=9F?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=AE=8C=E5=96=84=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../my/modifypasswordandnotice/modifypasswordandnotice.js | 7 ++++--- .../www/pages/workspace/workspace.html | 7 ++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/modifypasswordandnotice/modifypasswordandnotice.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/modifypasswordandnotice/modifypasswordandnotice.js index aa49d180c..d2aac4dee 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/modifypasswordandnotice/modifypasswordandnotice.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/modifypasswordandnotice/modifypasswordandnotice.js @@ -1,4 +1,4 @@ -(function () { +(function () { var userinfo = null; var page = { isScroll: true, @@ -31,9 +31,10 @@ learun.layer.loading(false); if (data) {// 表单数据保存成功,发起流程 learun.layer.toast(info); - learun.storage.set('logininfo', null); + //learun.storage.set('logininfo', null); learun.storage.set('pwdandnotice', false); - learun.nav.go({ path: 'login', isBack: false, isHead: false }); + learun.storage.set('isUpdStu', true); + learun.nav.go({ path: 'workspace', isBack: false, isHead: false }); } return false; }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/workspace/workspace.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/workspace/workspace.html index 0af8b4ab0..9bf901e5d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/workspace/workspace.html +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/workspace/workspace.html @@ -1,4 +1,4 @@ -