From f09a2faf1f81c64bd1515e0ff233a723ba802065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E8=AF=9A?= <1009578407@qq.com> Date: Tue, 20 Oct 2026 14:02:47 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A1=E3=80=81=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E6=A0=A1=E9=AA=8C=E6=B3=A8=E9=87=8A=EF=BC=9B?= =?UTF-8?q?2=E3=80=81=E5=B7=A5=E4=BC=9A=E6=8A=A5=E9=94=80-=E6=88=91?= =?UTF-8?q?=E7=9A=84=E6=8A=A5=E9=94=80=E6=9F=A5=E8=AF=A2=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E4=BF=AE=E5=A4=8D=EF=BC=9B3=E3=80=81?= =?UTF-8?q?=E5=B7=A5=E4=BC=9A=E6=8A=A5=E9=94=80=E6=95=B0=E6=8D=AE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9D=83=E9=99=90=E8=8C=83=E5=9B=B4=E5=92=8C=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=9D=83=E9=99=90=E8=8C=83=E5=9B=B4=E4=BF=9D=E6=8C=81?= =?UTF-8?q?=E4=B8=80=E8=87=B4=EF=BC=9B4=E3=80=81=E5=B7=A5=E4=BC=9A?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E8=A1=A8=E6=A0=BC=E9=AB=98=E5=BA=A6=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E5=86=85=E9=83=A8=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/services/impl/SysUserServiceImpl.java | 6 +-- .../UnionReimburseMineController.java | 2 +- .../impl/UnionReimburseServiceImpl.java | 24 +-------- .../platform/sys/union/branchUnionManage.js | 10 ++-- .../views/platform/sys/union/index.html | 53 ++++++++++++++++++- .../unionReimburse/apply/index.html | 13 ++--- 6 files changed, 69 insertions(+), 39 deletions(-) diff --git a/src/main/java/com/budwk/app/sys/services/impl/SysUserServiceImpl.java b/src/main/java/com/budwk/app/sys/services/impl/SysUserServiceImpl.java index 5a4e176d..da109bb8 100644 --- a/src/main/java/com/budwk/app/sys/services/impl/SysUserServiceImpl.java +++ b/src/main/java/com/budwk/app/sys/services/impl/SysUserServiceImpl.java @@ -360,9 +360,9 @@ public class SysUserServiceImpl extends BaseServiceImpl implements Sys String decodePwd = Base64Decoder.decodeStr(passowrd); String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt()); if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) { - if (Globals.sso) { - throw new BaseException("用户名或者密码不正确"); - } +// if (Globals.sso) { +// throw new BaseException("用户名或者密码不正确"); +// } } user = this.fetchLinks(user, "unit"); if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) { diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseMineController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseMineController.java index ead27b9b..58e737c0 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseMineController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseMineController.java @@ -127,7 +127,7 @@ public class UnionReimburseMineController { cnd.and(seg); } applyListSort(cnd, pageForm); -// cnd.and("info.userId", "=", SecurityUtil.getUserId()); + cnd.and("info.userId", "=", SecurityUtil.getUserId()); sql.setCondition(cnd); Pagination pagination = unionReimburseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); return Result.success(pagination); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/impl/UnionReimburseServiceImpl.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/impl/UnionReimburseServiceImpl.java index 2137e618..9b95fff6 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/impl/UnionReimburseServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/impl/UnionReimburseServiceImpl.java @@ -502,13 +502,10 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl i } /** - * 按经费来源统一查询当前可用余额,未分配或权限不匹配时直接拦截。 + * 按经费来源统一查询当前可用余额,经费来源权限由前端按钮控制。 */ @Override public Result getBudgetBalance(String reimburseFundSource, String clubId, String unionId) { - if (!canApplyFundSource(reimburseFundSource)) { - return Result.error("当前角色无权使用该经费来源"); - } if ("UNION_REIMBURSE_FUND_SOURCE_3".equals(reimburseFundSource) && listReimburseClubs().stream().noneMatch(club -> Objects.equals(clubId, club.getString("id")))) { return Result.error("请选择有效的社团"); @@ -1321,26 +1318,7 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl i return listMap(sql); } - // 社团经费按菜单权限授权,其他经费保留原申请角色判断。 - private boolean canApplyFundSource(String source) { - if (StrUtil.isBlank(source)) { - return false; - } - boolean branchRole = AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_ADMIN.name()); - boolean clubRole = AuthUtil.hasRoleOr(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_PRESIDENT.name()); - return switch (source) { - case "UNION_REIMBURSE_FUND_SOURCE_1" -> isAdmin() - || (!branchRole && !clubRole && AuthUtil.hasRoleOr(RoleConstant.SCHOOL_OUTLAY_ADMIN.name())); - case "UNION_REIMBURSE_FUND_SOURCE_2" -> isAdmin() || branchRole; - case "UNION_REIMBURSE_FUND_SOURCE_3" -> AuthUtil.hasPermission("unionReimburse.club"); - default -> false; - }; - } - private Result validateApplicantFundSource(UnionReimburse form) { - if (!canApplyFundSource(form.getReimburseFundSource())) { - return Result.error("当前角色无权使用该经费来源"); - } if ("UNION_REIMBURSE_FUND_SOURCE_3".equals(form.getReimburseFundSource())) { if (!"UNION_REIMBURSE_PROJECT_5".equals(form.getReimburseProject())) { return Result.error("社团经费请选择社团活动"); diff --git a/src/main/resources/views/platform/sys/union/branchUnionManage.js b/src/main/resources/views/platform/sys/union/branchUnionManage.js index a39abcd9..03b4bbbc 100644 --- a/src/main/resources/views/platform/sys/union/branchUnionManage.js +++ b/src/main/resources/views/platform/sys/union/branchUnionManage.js @@ -1,7 +1,7 @@ const branchUnionManage = { template: ` -
- +
+ @@ -10,8 +10,9 @@ const branchUnionManage = { 新建分工会 - - + +
+ @@ -25,6 +26,7 @@ const branchUnionManage = { +
+ +