福利权限

This commit is contained in:
=
2025-12-18 10:08:52 +08:00
parent c223c4be67
commit 276fbae2ed
4 changed files with 6 additions and 5 deletions
@@ -46,6 +46,7 @@ RoleConstant {
BRANCH_UNION_WENTI_WY("分工会文体委员"),
BRANCH_UNION_SHENGGHUO_WY("分工会生活委员"),
BRANCH_UNION_TIAOJIE_WY("分工会调解委员"),
BRANCH_UNION_WENTI_SPORTS("分工会文体福利委员"),
UNIT_PARTY_SECRETARY("单位党委书记"),
@@ -409,7 +409,7 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
if (pageForm.getBirthMonths() != null && pageForm.getBirthMonths().length > 0) {
cnd.andEX("MONTH(t2.birthday)", "in", pageForm.getBirthMonths());
}
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name()) && AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_ADMIN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_WENTI_SPORTS.name())) {
cnd.and("t2.unionId", "=", SecurityUtil.getUnionId());
}
cnd.andEX("t1.welfareUnitId", "in", pageForm.getUnitIds());
@@ -77,7 +77,7 @@ public class WelfareSelectionSituationServiceImpl extends BaseServiceImpl<Welfar
""");
Cnd cnd = Cnd.NEW();
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_OPERATOR.name())) {
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_ADMIN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_WENTI_SPORTS.name())) {
cnd.and("t1.welfareUnionId", "=", SecurityUtil.getUnionId());
}
@@ -136,7 +136,7 @@ public class WelfareSelectionSituationServiceImpl extends BaseServiceImpl<Welfar
""");
Cnd cnd = Cnd.NEW();
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_OPERATOR.name())) {
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_ADMIN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_WENTI_SPORTS.name())) {
cnd.and("t1.welfareUnionId", "=", SecurityUtil.getUnionId());
}
@@ -221,7 +221,7 @@ public class WelfareSelectionSituationServiceImpl extends BaseServiceImpl<Welfar
Cnd cnd = Cnd.NEW();
cnd.and("t1.projectId", "=", pageForm.getProjectId());
cnd.groupBy("t1.id");
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_ADMIN.name())) {
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_ADMIN.name())|| AuthUtil.hasRole(RoleConstant.BRANCH_UNION_WENTI_SPORTS.name())) {
cnd.and("t1.welfareUnionId", "=", SecurityUtil.getUnionId());
}
cnd.asc("t1.welfareUnitId");
@@ -48,7 +48,7 @@ public class WelfareStatisticsServiceImpl extends BaseServiceImpl<WelfareProject
public NutMap pageData(String projectId, String unionId) {
// 分工会数据
List<Sys_union> unions;
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_ADMIN.name())) {
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()) || AuthUtil.hasRole(RoleConstant.BRANCH_UNION_ADMIN.name())|| AuthUtil.hasRole(RoleConstant.BRANCH_UNION_WENTI_SPORTS.name())) {
unions = dao().query(Sys_union.class, Cnd.NEW().andEX(Sys_union::getId, "=", SecurityUtil.getUnionId()).asc(Sys_union::getUnionCode));
}else {
unions = dao().query(Sys_union.class, Cnd.NEW().andEX(Sys_union::getId, "=", unionId).asc(Sys_union::getUnionCode));