Compare commits
2
Commits
f3802de0ac
...
76d39865e8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76d39865e8 | ||
|
|
4b67eb8b78 |
+4
-2
@@ -131,8 +131,9 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
||||
""").setParam("unionId", pageParam.getUnionId()).setParam("userId", SecurityUtil.getUserId());
|
||||
|
||||
|
||||
// 分工会委员作为代报操作人,查看项目时不要求其本人在活动报名范围内。
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),
|
||||
RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||
RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_WY.name())) {
|
||||
// cnd.where().andLike("school.applyWay ", "1");
|
||||
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=school.activityGroupId AND userId='%s') >0".formatted(SecurityUtil.getUserId())));
|
||||
|
||||
@@ -209,8 +210,9 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
||||
cnd.and(new Static("(SELECT COUNT(1) FROM activity_school_apply WHERE activityId=school.id AND userId='%s')>0".formatted(SecurityUtil.getUserId())));
|
||||
}
|
||||
|
||||
// 活动入口与项目列表保持一致,避免代报人能打开活动却看不到报名项目。
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),
|
||||
RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||
RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_WY.name())) {
|
||||
// cnd.and(new Static("JSON_CONTAINS(school.applyWay,JSON_ARRAY( 1))>0"));
|
||||
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=school.activityGroupId AND userId='%s') >0".formatted(SecurityUtil.getUserId())));
|
||||
}
|
||||
|
||||
@@ -703,9 +703,12 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
const groupData = groupBy(aa, (v) => {
|
||||
return v.userId
|
||||
})
|
||||
const cc = groupData.filter((v) => {
|
||||
if (v.length >= this.eventData.restrictRegNumber) return v
|
||||
})
|
||||
// 未配置限报数时不限制单项报名,避免 null 被 JavaScript 当作 0 比较。
|
||||
const hasSingleEventLimit = this.activityTableData.eveProjectType === '1' &&
|
||||
Number.isInteger(this.eventData.restrictRegNumber) && this.eventData.restrictRegNumber >= 0
|
||||
const cc = hasSingleEventLimit ? groupData.filter((v) => {
|
||||
return v.length >= this.eventData.restrictRegNumber
|
||||
}) : []
|
||||
|
||||
//从全部人员里找出右边框选择的人
|
||||
const arr = this.userList.filter((v) => {
|
||||
@@ -738,7 +741,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
this.applyUserList.push(data)
|
||||
|
||||
//如果是单项判断每个人可以报几项
|
||||
if (this.eventData.restrictRegNumber >= 0 && this.activityTableData.eveProjectType === '1') {
|
||||
if (hasSingleEventLimit) {
|
||||
cc.forEach((z) => {
|
||||
if (z[0]) {
|
||||
const index = this.applyUserList.findIndex((x) => x.userId === z[0].userId && x.id === null)
|
||||
@@ -751,7 +754,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
})
|
||||
|
||||
//如果是单项判断每个人可以报几项
|
||||
if (this.eventData.restrictRegNumber >= 0 && this.activityTableData.eveProjectType === '1') {
|
||||
if (hasSingleEventLimit) {
|
||||
const usernames = cc.map((v) => v[0].username).join(",")
|
||||
if (usernames) {
|
||||
this.$notify({
|
||||
|
||||
Reference in New Issue
Block a user