From c934f2711f85f91caa1eca5dacc3343658127c9b Mon Sep 17 00:00:00 2001 From: liangkun Date: Fri, 5 Aug 2022 18:29:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E8=B4=B9=E7=94=A8=E5=8F=8B=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../User/UserBLL.cs | 23 +++++++++ .../User/UserIBLL.cs | 6 +++ .../Controllers/StuInfoFreshController.cs | 12 +++-- .../Views/StuInfoFresh/PayFeeForm.cshtml | 2 +- .../Views/StuInfoFresh/PayFeeForm.js | 9 ++++ .../Controllers/HomeController.cs | 5 ++ .../Controllers/UserCenterController.cs | 11 ++++ .../Learun.Application.Web.csproj | 2 + .../Views/Home/AdminDefault/index.js | 28 ++++++++++ .../Views/Home/FirstChangePwd.cshtml | 20 ++++++++ .../Views/Home/FirstChangePwd.js | 51 +++++++++++++++++++ .../Views/Login/Default/FirstIndexWxLogin.js | 6 +-- .../XmlConfig/database.config | 39 +++++++------- .../XmlConfig/system.config | 2 +- .../FinaChargesStandardBLL.cs | 20 ++++++++ .../FinaChargesStandardIBLL.cs | 1 + .../FinaChargesStandardService.cs | 26 ++++++++++ 17 files changed, 237 insertions(+), 26 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/FirstChangePwd.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/FirstChangePwd.js 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 e265b0895..2c6d1d8be 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs @@ -914,6 +914,29 @@ namespace Learun.Application.Organization } } } + + public void FirstRevisePassword(string password) + { + try + { + UserInfo userInfo = LoginUserInfo.Get(); + cache.Remove(cacheKeyId + userInfo.userId, CacheId.user); + cache.Remove(cacheKeyAccount + userInfo.account, CacheId.user); + userService.RevisePassword(userInfo.userId, password); + } + 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 b234f8445..9518caaaa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs @@ -210,5 +210,11 @@ namespace Learun.Application.Organization /// /// bool RevisePasswordiden(string newPassword, string oldPassword); + + /// + /// 直接修改密码 + /// + /// + void FirstRevisePassword(string password); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs index 8168345e6..4b691349c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs @@ -629,11 +629,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers /// [HttpGet] [AjaxOnly] - public ActionResult GetPayFeeDetail(string keyValue) + public ActionResult GetPayFeeDetail(string keyValue,int jiaoFeiYear=0) { + if (jiaoFeiYear==0) + { + jiaoFeiYear = DateTime.Now.Year; + } var StuInfoFreshData = stuInfoFreshIBLL.GetStuInfoFreshEntity(keyValue); + var stuInfoFreshFamily = stuInfoFreshIBLL.GetStuInfoFreshFamilyList(keyValue); //当前年度缴费记录 - var FeeOrderList = stuInfoFreshIBLL.GetFeeOrderList(StuInfoFreshData.StuNo, DateTime.Now.Year); + var FeeOrderList = stuInfoFreshIBLL.GetFeeOrderList(StuInfoFreshData.StuNo, jiaoFeiYear); var FinaChargesStandardList = new List(); if (!string.IsNullOrEmpty(StuInfoFreshData.ClassNo) && !string.IsNullOrEmpty(StuInfoFreshData.MajorNo)) { @@ -641,7 +646,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers if (ClassInfoEntity != null) { var academicAndYear = Common.GetSemesterAndYear(); - FinaChargesStandardList = finaChargesStandardIBLL.GetFinaChargesStandardListByMajorNoOfNotAll(StuInfoFreshData.MajorNo, academicAndYear.AcademicYearShort, academicAndYear.Semester, ClassInfoEntity.Grade).ToList(); + FinaChargesStandardList = finaChargesStandardIBLL.GetFinaChargesStandardListByYongYou(StuInfoFreshData.StuNo, jiaoFeiYear).ToList(); } } var PayFeeTotal = FinaChargesStandardList.Select(x => x.Standard).Sum(); @@ -649,6 +654,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { StuInfoFreshData = StuInfoFreshData, FinaChargesStandardList = FinaChargesStandardList, + StuInfoFreshFamilyList= stuInfoFreshFamily, PayFeeTotal = PayFeeTotal, YJAmount = FeeOrderList.Sum(x => x.SJAmount) }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml index 61a2ed876..dd4e5620d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml @@ -40,7 +40,7 @@
支付
- @*
查询
*@ +
查询
取消
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js index 3c1d87fcb..0d791aa4a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js @@ -17,6 +17,9 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + $('#searchPayFee').click(function() { + + }); //获取缴费二维码 $('#confirmPayFee').click(function () { if (parseFloat($('#PayMoney').html()) > PayFeeTotal) { @@ -62,8 +65,14 @@ var bootstrap = function ($, learun) { initData: function () { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetPayFeeDetail?keyValue=' + keyValue, function (data) { + if (data['StuInfoFreshFamilyList'].length == 0) { + learun.alert.warning("检测到还未完善新生信息!请先完善新生信息。"); + learun.layerClose(window.name); + return; + } if (data['FinaChargesStandardList'].length == 0) { learun.alert.warning("检测到还未维护该专业收费标准!请先维护该专业收费标准。"); + learun.layerClose(window.name); return; } var StuInfoFresh = data['StuInfoFreshData']; 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 4466ce061..b21289315 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs @@ -62,6 +62,11 @@ namespace Learun.Application.Web.Controllers private EmailSendIBLL emailSendIBLL = new EmailSendBLL(); #region 视图功能 + public ActionResult FirstChangePwd() + { + return View(); + } + public ActionResult ChangePwd() { return View(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UserCenterController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UserCenterController.cs index 2356688f9..20992133d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UserCenterController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UserCenterController.cs @@ -353,6 +353,17 @@ namespace Learun.Application.Web.Controllers OperatorHelper.Instance.EmptyCurrent(); return Success("密码修改成功,请牢记新密码。\r 将会自动安全退出。"); } + + [HttpPost] + [AjaxOnly] + public ActionResult FirstSubmitResetPasswordNoCode(string password) + { + userIBLL.FirstRevisePassword(password); + Session.Abandon(); + Session.Clear(); + OperatorHelper.Instance.EmptyCurrent(); + return Success("密码修改成功,请牢记新密码。\r 将会自动安全退出。"); + } #endregion } } \ No newline at end of file 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 f7f80607a..6c33fbead 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 @@ -4013,6 +4013,7 @@ + @@ -7831,6 +7832,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js index 9f2ebdff8..3b210bfd1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js @@ -226,6 +226,34 @@ var bootstrap = function ($, learun) { } }); } + if (pwd == "first") { + top.layer.open({ + id: 'pwdform', + title: '密码修改', + closeBtn: 0, + resize: false, + type: 2, + skin: 'lr-layer', + btn: ['确定'], + content: top.$.rootUrl + '/Home/FirstChangePwd', + area: ['500px', '300px'], + success: function (layero, index) { + top['layer_pwdform'] = learun.iframe($(layero).find('iframe').attr('id'), top.frames); + layero[0].learun_layerid = 'layer_pwdform'; + }, + yes: function (index, layero) { + var flag = top['layer_pwdform'].acceptClick(function () { + top.location.href = "/Login/Index"; + }); + if (!!flag) { + learun.layerClose('', index); + } + }, + end: function () { + top['layer_pwdform'] = null; + } + }); + } //30天未修改密码进行提示 if (pwdtip == "true") { layer.alert("您已30天未修改密码,请先修改!", {icon:7, title: "提示", yes: function (index) { layer.close(index) } }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/FirstChangePwd.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/FirstChangePwd.cshtml new file mode 100644 index 000000000..a5965d73a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/FirstChangePwd.cshtml @@ -0,0 +1,20 @@ +@{ + ViewBag.Title = "课程类型"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
新密码*
+ +
+
+
确认密码*
+ +
+
+
+ 您的密码不满足强度要求,请您先修改密码后再执行系统其他操作! + 新密码必须8-20位同时包含1.[大小写字母]、2[数字]、3[特殊符号!@@#$%^&*] +
+
+@Html.AppendJsFile("/Views/Home/FirstChangePwd.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/FirstChangePwd.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/FirstChangePwd.js new file mode 100644 index 000000000..7ed4933c2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/FirstChangePwd.js @@ -0,0 +1,51 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-07-18 15:18 + * 描 述:课程类型 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + }, + bind: function () { + $("#NewPwd2").blur(function () { + var $this = $(this); + if ($this.val() == "") { + return false; + } + if ($this.val() != $('#NewPwd').val()) { + learun.alert.error("两次密码输入不一样"); + } + }); + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + if ($("#NewPwd2").val() != $('#NewPwd').val()) { + learun.alert.error("两次密码输入不一样"); + return false; + } + var formData = $('body').lrGetFormData(); + var postData = { + password: $.md5(formData.NewPwd) + }; + $.lrSaveForm(top.$.rootUrl + '/UserCenter/FirstSubmitResetPasswordNoCode', postData, function (res) { + if (res.code == 200) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/FirstIndexWxLogin.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/FirstIndexWxLogin.js index e833664ea..8e7c830d3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/FirstIndexWxLogin.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/FirstIndexWxLogin.js @@ -150,13 +150,13 @@ success: function (res) { if (res.code == 200) { if (source == "noLogin") { - window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index"; + window.location.href = "/SSOSystem/Index"; } else { if (res.data.pwd == true) { - window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true"; + window.location.href = "/Home/Index?pwd=first"; } else { - window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index"; + window.location.href = "/Home/Index"; } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config index e6f6aa417..b0b763ac8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config @@ -1,46 +1,49 @@  - - + - - + - - + - - + - + + - - - + - - + - - - + + + \ No newline at end of file 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 26ba167ed..e17755adc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -154,7 +154,7 @@ - + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardBLL.cs index f5e3a6cba..4712358d5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardBLL.cs @@ -294,6 +294,26 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement } } } + + public IEnumerable GetFinaChargesStandardListByYongYou(string stuNo, int jiaoFeiYear) + { + try + { + return finaChargesStandardService.GetFinaChargesStandardListByYongYou(stuNo, jiaoFeiYear); + } + 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/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardIBLL.cs index 9edd7b84d..8081ab7c8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardIBLL.cs @@ -99,5 +99,6 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement bool IsChargeByMajorNo(string majorNo, string academicYearNo, string semester, string grade); #endregion + IEnumerable GetFinaChargesStandardListByYongYou(string stuNo, int jiaoFeiYear); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardService.cs index 93804a4fd..ca46b75f8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardService.cs @@ -420,5 +420,31 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement } #endregion + public IEnumerable GetFinaChargesStandardListByYongYou(string stuNo, int jiaoFeiYear) + { + try + { + IEnumerable yylist = BaseRepository("YongyouDb").FindList("select ISNULL(A.YJJE,0) as YJJE,s.*,s1.SFND,ISNULL(s1.YSJE,0) AS YSJE,ISNULL(s1.SFXMDM,'') AS SFXMDM,isnull(sf.SFXMMC,'-2') AS SFXMMC,s2.SFXMDM DAI,ISNULL(s2.JE,0) JE " + + "from SCS_XSXX s left join SCS_YSK s1 on s.XSID=s1.XSID and s1.SFND in (" + jiaoFeiYear + " ) " + + "left join SCS_SFXM sf on sf.SFXMDM=s1.SFXMDM and sf.KJND=" + DateTime.Now.Year + " and sf.SFXMMC is not null " + + "left join (select O.XSID,O1.SFXMDM,sum(O1.JE) as JE from SCS_ORDER o inner join SCS_ORDEL o1 on o1.OR_ID=o.OR_ID group by O.XSID,O1.SFXMDM) as s2 on s2.XSID=s1.XSID AND S1.SFXMDM=S2.SFXMDM " + + "LEFT JOIN (SELECT SUM(JE) YJJE,SFND,B.SFXMDM FROM SCS_SFD_MX A LEFT JOIN SCS_SFXM B ON A.SFND=B.KJND AND A.SFXMDM=B.SFXMDM " + + "INNER JOIN SCS_SFD_ML C ON C.DJNM = A.DJNM INNER JOIN SCS_XSXX D ON D.XSID = C.XSID " + + "WHERE D.XH='" + stuNo + "' AND SFND in (" + jiaoFeiYear + " ) AND (C.DJLY<>'订单' OR C.DJLY IS NULL) GROUP BY SFND, B.SFXMDM) A ON A.SFXMDM = sf.SFXMDM " + + "where s.XH='" + stuNo + "'"); + return yylist; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } } }