diff --git a/src/main/java/io/v/nutz/zhgh/activity/controller/school/ActivityApplyController.java b/src/main/java/io/v/nutz/zhgh/activity/controller/school/ActivityApplyController.java index b84b762..76155d6 100644 --- a/src/main/java/io/v/nutz/zhgh/activity/controller/school/ActivityApplyController.java +++ b/src/main/java/io/v/nutz/zhgh/activity/controller/school/ActivityApplyController.java @@ -302,7 +302,18 @@ public class ActivityApplyController { result.put("awardsModeT", awardsModeT); result.put("awardsModeG", awardsModeG); - result.put("team", activitySchoolTeamService.query(Cnd.where("eventId", "=", eventId).and("activityId", "=", activityId).asc("location"))); + Cnd cndTeam = Cnd.NEW(); + cndTeam.and("eventId", "=", eventId); + cndTeam.and("activityId", "=", activityId); + cnd.asc("location"); + List teamList = activitySchoolTeamService.query(cndTeam); + + if (activity.getApplyMultipleTeamsUnionIds().contains(Vi.getUnionId())) { + result.put("team", teamList); + } else { + result.put("team", Lang.isNotEmpty(teamList) ? List.of(teamList.get(0)) : teamList); + } + result.put("activity", activity); List events = (List) getEvents(activityId); @@ -557,15 +568,15 @@ public class ActivityApplyController { public Object findUserOne(String id) { try { Sql sql = Sqls.create("SELECT\n" + - "\tu.id,u.username,u.unitid,\n" + - "\tu.loginname,\n" + - "\tu.sex,\n" + - "\tu.mobile,\n" + - "\tu.position,\n" + - "\tun.`name` unitname \n" + - "FROM\n" + - "\tsys_user u\n" + - "\tLEFT JOIN sys_unit un ON u.unitid = un.id Where u.id = @id").setParam("id", id); + "\tu.id,u.username,u.unitid,\n" + + "\tu.loginname,\n" + + "\tu.sex,\n" + + "\tu.mobile,\n" + + "\tu.position,\n" + + "\tun.`name` unitname \n" + + "FROM\n" + + "\tsys_user u\n" + + "\tLEFT JOIN sys_unit un ON u.unitid = un.id Where u.id = @id").setParam("id", id); return Result.success().addData(activitySchoolService.list(sql).get(0)); } catch (Exception e) { @@ -708,7 +719,7 @@ public class ActivityApplyController { @Param(value = "CoachData", required = false) ActivitySchoolApply CoachData, @Param(value = "headData", required = false) ActivitySchoolApply headData, @Param(value = "activityId") String activityId) { - ActivityBasicUnit thisBasicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=",ShiroUtil.getUnitId())); + ActivityBasicUnit thisBasicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", ShiroUtil.getUnitId())); ActivityBasicUnion thisBasicUnion = activitySchoolService.dao().fetch(ActivityBasicUnion.class, Cnd.where("id", "=", thisBasicUnit.getUnionid())); Cnd cnd = Cnd.NEW(); cnd.and("activityId", "=", activityId); diff --git a/src/main/java/io/v/nutz/zhgh/activity/models/ActivitySchool.java b/src/main/java/io/v/nutz/zhgh/activity/models/ActivitySchool.java index 828126a..ff00460 100644 --- a/src/main/java/io/v/nutz/zhgh/activity/models/ActivitySchool.java +++ b/src/main/java/io/v/nutz/zhgh/activity/models/ActivitySchool.java @@ -206,4 +206,9 @@ public class ActivitySchool extends BaseModel implements Serializable { @Default("0") @ColDefine(type = ColType.BOOLEAN) private Boolean isSign; + + @Column + @Comment("可报多队的工会id") + @ColDefine(type = ColType.MYSQL_JSON) + private List applyMultipleTeamsUnionIds; } diff --git a/src/main/resources/static/components/activity/school/AddActivity.vue b/src/main/resources/static/components/activity/school/AddActivity.vue index 17c0454..fd0ad75 100644 --- a/src/main/resources/static/components/activity/school/AddActivity.vue +++ b/src/main/resources/static/components/activity/school/AddActivity.vue @@ -157,6 +157,15 @@ > + + + + + + + 领队:{{LeaderData.username | str}}   教练:{{CoachData.username | str}} - <!– 工作人员:{{staffData.username | str}}–> +
- 设置领队/教练
- --> + 设置替补 - + + 修改小队 + + + + + - + @@ -2101,20 +2102,20 @@ layout("/layouts/platform.html"){ }) //判断每一个选手填写的是否正确 for (let i = 0; i < appliedData.length; i++) { - /* if (!appliedData[i].position) { - this.$message.warning("请填写完整职称职务!") - return - } - if (!appliedData[i].mobile) { - this.$message.warning("请填写手机号!") - return - } else { - const phoneRegex = /^1[3-9]\d{9}$/; - if (!phoneRegex.test(appliedData[i].mobile)) { - this.$message.warning("手机号填写不正确!") - return - } - }*/ + /* if (!appliedData[i].position) { + this.$message.warning("请填写完整职称职务!") + return + } + if (!appliedData[i].mobile) { + this.$message.warning("请填写手机号!") + return + } else { + const phoneRegex = /^1[3-9]\d{9}$/; + if (!phoneRegex.test(appliedData[i].mobile)) { + this.$message.warning("手机号填写不正确!") + return + } + }*/ } if (this.appliedData3.length == 0 && this.appliedData.length == 0) { @@ -2481,18 +2482,6 @@ layout("/layouts/platform.html"){ this.rightChecked = v }, flushApplyed(applyed) { - if (this.activityData2.id === "6a2546b6df41457b871d590c0290eb07") { - if (["00dfa3b4f2ad4d238277b1345e6437f3", "6748ad4bd12c4af5b32c3ceace7fc694"].includes(this.team) - && "${@shiro.getPrincipalProperty('unit').getUnionid()}" !== "6234c0450ef0414f87a38794faac6c3d") { - this.$notify({ - title: "警告", - message: "您只能报一队暂时不能报两队!", - type: "warning" - }) - this.team = this.teams[0].id - return - } - } this.applyedTabLoading = true //如果项目等于单项 if (this.eventData.projectType === "1") {