From 22e5c683aaccddfda3b8d0f55e912d41f7c461f1 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Thu, 19 Dec 2024 11:18:09 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E7=AB=AF=EF=BC=9A=E5=AD=A6=E7=94=9F=E6=AC=A0=E8=B4=B9?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=8F=90=E7=A4=BA=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinaChargeStuYearApi.cs | 15 +++++++++--- .../Modules/UserApi.cs | 13 +++++++++- .../FinaChargeStudent/FinaChargeStudentBLL.cs | 24 +++++++++++++++++++ .../FinaChargeStudentIBLL.cs | 6 +++++ .../FinaChargeStudentService.cs | 24 +++++++++++++++++++ .../PayFee/single.vue | 10 ++++++++ .../LearunApp-2.2.0/pages/home.vue | 7 ++++++ .../LearunApp-2.2.0/pages/login.vue | 1 + .../LearunApp-2.2.0/pages/my.vue | 1 + 9 files changed, 97 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/ReceiveSendFeeManagement/FinaChargeStuYearApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/ReceiveSendFeeManagement/FinaChargeStuYearApi.cs index 4353bdbdf..4d3aaf2e2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/ReceiveSendFeeManagement/FinaChargeStuYearApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/ReceiveSendFeeManagement/FinaChargeStuYearApi.cs @@ -33,6 +33,7 @@ namespace Learun.Application.WebApi.Modules private FinaChargeStuYearIBLL finaChargeStuYearIBLL = new FinaChargeStuYearBLL(); private FinaChargeStuOrderIBLL finaChargeStuOrderIbll = new FinaChargeStuOrderBLL(); private TeachSwitchIBLL teachSwitchIbll = new TeachSwitchBLL(); + private FinaChargeStudentIBLL finaChargeStudentIBLL = new FinaChargeStudentBLL(); public FinaChargeStuYearApi() : base("/ReceiveSendFeeManagement/FinaChargeStuYearApi") @@ -80,12 +81,20 @@ namespace Learun.Application.WebApi.Modules var FinaChargeStuYearData = finaChargeStuYearIBLL.GetFinaChargeStuYearEntity(keyValue); //学生缴费明细 var FinaChargeStuItemList = finaChargeStuYearIBLL.GetFinaChargeStuItemList(keyValue); + //是否存在欠费 + bool isOwe = false; + var finachargestudententity = finaChargeStudentIBLL.GetFinaChargeStudentEntityByNo(FinaChargeStuYearData?.StuNo); + if (finachargestudententity != null && finachargestudententity.NeedToPay > 0) + { + isOwe = true; + } var jsonData = new { StuInfoFreshData = FinaChargeStuYearData, FinaChargesStandardList = FinaChargeStuItemList, - PayFeeTotal =FinaChargeStuYearData.NeedToPay, - SJAmount = FinaChargeStuYearData.SJAmount + PayFeeTotal = FinaChargeStuYearData.NeedToPay, + SJAmount = FinaChargeStuYearData.SJAmount, + isOwe = isOwe }; return Success(jsonData); } @@ -211,7 +220,7 @@ namespace Learun.Application.WebApi.Modules logEntity.WriteLog(); return Fail("缴费机器暂停缴费!"); } - + var backimgUrl = new { imgUrl }; return Success(backimgUrl); } 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 b968717f3..021b1a4ce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs @@ -1,6 +1,7 @@ using Learun.Application.Base.SystemModule; using Learun.Application.Organization; using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; using Learun.Cache.Base; using Learun.Cache.Factory; using Learun.Util; @@ -53,6 +54,7 @@ namespace Learun.Application.WebApi CdMajorIBLL majorIbll = new CdMajorBLL(); private readonly ISms aliyunSms = new AliyunSms(); private ICache redisCache = CacheFactory.CaChe(); + private FinaChargeStudentIBLL finaChargeStudentIBLL = new FinaChargeStudentBLL(); @@ -200,6 +202,9 @@ namespace Learun.Application.WebApi OperatorResult res = OperatorHelper.Instance.IsOnLine(token, this.loginMark); res.userInfo.password = null; res.userInfo.secretkey = null; + + //是否存在欠费 + bool isOwe = false; var studententity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(userEntity.F_Account); if (studententity != null) { @@ -209,6 +214,11 @@ namespace Learun.Application.WebApi { res.userInfo.majorno = majorinfo.ID ?? ""; } + var finachargestudententity = finaChargeStudentIBLL.GetFinaChargeStudentEntityByNo(studententity.StuNo); + if (finachargestudententity != null && finachargestudententity.NeedToPay > 0) + { + isOwe = true; + } } //是否强密码验证 bool pwd = false; @@ -221,7 +231,8 @@ namespace Learun.Application.WebApi baseinfo = res.userInfo, post = postIBLL.GetListByPostIds(res.userInfo.postIds), role = roleIBLL.GetListByRoleIds(res.userInfo.roleIds), - pwd = pwd + pwd = pwd, + isOwe = isOwe }; return Success(jsonData); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentBLL.cs index 0ff245c4a..c3515d9ed 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentBLL.cs @@ -67,6 +67,30 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement } } + /// + /// 获取FinaChargeStudent表实体数据 + /// + /// 主键 + /// + public FinaChargeStudentEntity GetFinaChargeStudentEntityByNo(string stuno) + { + try + { + return finaChargeStudentService.GetFinaChargeStudentEntityByNo(stuno); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentIBLL.cs index 10221ff72..bc5108115 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentIBLL.cs @@ -27,6 +27,12 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement /// 主键 /// FinaChargeStudentEntity GetFinaChargeStudentEntity(string keyValue); + /// + /// 获取FinaChargeStudent表实体数据 + /// + /// 主键 + /// + FinaChargeStudentEntity GetFinaChargeStudentEntityByNo(string stuno); #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentService.cs index 5aff925b9..e5e600625 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentService.cs @@ -120,6 +120,30 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement } } + /// + /// 获取FinaChargeStudent表实体数据 + /// + /// 主键 + /// + public FinaChargeStudentEntity GetFinaChargeStudentEntityByNo(string stuno) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(x => x.StuNo == stuno); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/ReceiveSendFeeManagement/PayFee/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/ReceiveSendFeeManagement/PayFee/single.vue index 7a57d54a5..329b7d75a 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/ReceiveSendFeeManagement/PayFee/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/ReceiveSendFeeManagement/PayFee/single.vue @@ -177,6 +177,16 @@ export default{ } this.SJAmount = res.SJAmount this.ready = true + if (this.GET_STORAGE('isOwe')) { + if (!res.isOwe) { + this.TOAST("已缴清欠费,请重新登陆!") + setTimeout(() => { + this.CLEAR_GLOBAL() + this.CLEAR_STORAGE() + this.RELAUNCH_TO('/pages/login') + }, 500) + } + } }) }, // 显示列表中的标题项 diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue index 67f5dc9e2..8c53f1ae2 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue @@ -197,6 +197,13 @@ export default { location.href = "http://" + window.location.host + "/#/pages/my/newpassword"; return } + if(this.GET_STORAGE('isOwe')){ + this.CONFIRM('数字化校园提示', '您当前存在欠费,请点击下方【确定】进入页面,缴清欠款后重新尝试登陆!', false).then(res=>{ + if (res) { + this.JUMP_TO('/pages/ReceiveSendFeeManagement/PayFee/list',{},true) + } + }) + } await this.init(param); }, diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue index d6ef825c5..e229abf95 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue @@ -184,6 +184,7 @@ export default { this.SET_STORAGE('token', token) this.HIDE_LOADING() + this.SET_STORAGE('isOwe', loginResult.isOwe) this.TAB_TO('/pages/home') }, diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my.vue index b475f554b..c85a00bd8 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my.vue @@ -97,6 +97,7 @@ export default { } this.CLEAR_GLOBAL() + this.CLEAR_STORAGE() this.RELAUNCH_TO('/pages/login') },