报名增加联系方式
This commit is contained in:
@@ -833,6 +833,7 @@ public class ActivityApplyController {
|
|||||||
asa.username,
|
asa.username,
|
||||||
asa.loginname,
|
asa.loginname,
|
||||||
asa.sex,
|
asa.sex,
|
||||||
|
asa.mobile,
|
||||||
asa.identity,
|
asa.identity,
|
||||||
asa.`status`,
|
asa.`status`,
|
||||||
asa.applyUserSign,
|
asa.applyUserSign,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package io.v.nutz.zhgh.activity.models;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@@ -17,6 +18,14 @@ public class ActivityMobileSignUpParam {
|
|||||||
|
|
||||||
private List<String> userIds;
|
private List<String> userIds;
|
||||||
|
|
||||||
|
private List<teamUserInfo> teamUserInfos;
|
||||||
|
|
||||||
private String applyUserSign;
|
private String applyUserSign;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class teamUserInfo implements Serializable {
|
||||||
|
private String userId;
|
||||||
|
private String mobile;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -66,6 +66,7 @@ public class mobileActivityListController {
|
|||||||
@Param(value = "eventId", required = false) String eventId,
|
@Param(value = "eventId", required = false) String eventId,
|
||||||
@Param(value = "applyUserSign", required = false) String applyUserSign,
|
@Param(value = "applyUserSign", required = false) String applyUserSign,
|
||||||
@Param(value = "teamId", required = false) String teamId,
|
@Param(value = "teamId", required = false) String teamId,
|
||||||
|
@Param(value = "mobile", required = false) String mobile,
|
||||||
@Param(value = "teamName", required = false) String teamName) {
|
@Param(value = "teamName", required = false) String teamName) {
|
||||||
|
|
||||||
User user = baseService.dao().fetch(User.class, Cnd.where("id", "=", ShiroUtil.getUserId()));
|
User user = baseService.dao().fetch(User.class, Cnd.where("id", "=", ShiroUtil.getUserId()));
|
||||||
@@ -84,7 +85,7 @@ public class mobileActivityListController {
|
|||||||
schoolApply.setTeam(teamName);
|
schoolApply.setTeam(teamName);
|
||||||
schoolApply.setApplyUser(user.getId());
|
schoolApply.setApplyUser(user.getId());
|
||||||
schoolApply.setUserId(user.getId());
|
schoolApply.setUserId(user.getId());
|
||||||
schoolApply.setMobile(user.getMobile());
|
schoolApply.setMobile(mobile);
|
||||||
schoolApply.setSex(user.getSex());
|
schoolApply.setSex(user.getSex());
|
||||||
schoolApply.setUnitId(user.getUnitid());
|
schoolApply.setUnitId(user.getUnitid());
|
||||||
schoolApply.setUnionId(user.getUnionid());
|
schoolApply.setUnionId(user.getUnionid());
|
||||||
@@ -268,7 +269,7 @@ public class mobileActivityListController {
|
|||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresAuthentication
|
@RequiresAuthentication
|
||||||
public Object doTeamSignUp(ActivityMobileSignUpParam param) {
|
public Object doTeamSignUp(ActivityMobileSignUpParam param) {
|
||||||
mobileActivityApplyService.doTeamSignUp(param.getActivityId(), param.getUserIds(), param.getEventId(), param.getTeamId(), param.getTeamName(),param.getApplyUserSign());
|
mobileActivityApplyService.doTeamSignUp(param.getActivityId(), param.getUserIds(), param.getEventId(), param.getTeamId(), param.getTeamName(),param.getApplyUserSign(), param.getTeamUserInfos());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-1
@@ -1,11 +1,24 @@
|
|||||||
package io.v.nutz.zhgh.mobile.activity.Sports.service;
|
package io.v.nutz.zhgh.mobile.activity.Sports.service;
|
||||||
|
|
||||||
import io.v.nutz.base.service.BaseService;
|
import io.v.nutz.base.service.BaseService;
|
||||||
|
import io.v.nutz.zhgh.activity.models.ActivityMobileSignUpParam;
|
||||||
import io.v.nutz.zhgh.activity.models.ActivitySchoolApply;
|
import io.v.nutz.zhgh.activity.models.ActivitySchoolApply;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface MobileActivityApplyService extends BaseService<ActivitySchoolApply> {
|
public interface MobileActivityApplyService extends BaseService<ActivitySchoolApply> {
|
||||||
void doDeleteApply(String activityId, String eventId);
|
void doDeleteApply(String activityId, String eventId);
|
||||||
void doTeamSignUp(String activityId, List<String> userIds, String eventId, String teamId, String teamName,String applyUserSign);
|
|
||||||
|
/**
|
||||||
|
* 组队报名
|
||||||
|
* @param activityId
|
||||||
|
* @param userIds
|
||||||
|
* @param eventId
|
||||||
|
* @param teamId
|
||||||
|
* @param teamName
|
||||||
|
* @param applyUserSign
|
||||||
|
* @param teamUserInfos
|
||||||
|
*/
|
||||||
|
void doTeamSignUp(String activityId, List<String> userIds, String eventId, String teamId, String teamName,
|
||||||
|
String applyUserSign, List<ActivityMobileSignUpParam.teamUserInfo> teamUserInfos);
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-10
@@ -7,19 +7,14 @@ import io.v.nutz.web.commons.utils.ShiroUtil;
|
|||||||
import io.v.nutz.zhgh.activity.models.*;
|
import io.v.nutz.zhgh.activity.models.*;
|
||||||
import io.v.nutz.zhgh.mobile.activity.Sports.service.MobileActivityApplyService;
|
import io.v.nutz.zhgh.mobile.activity.Sports.service.MobileActivityApplyService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.shiro.web.filter.mgt.DefaultFilter;
|
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.Lang;
|
import org.nutz.lang.Lang;
|
||||||
import org.nutz.lang.util.NutMap;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.apache.shiro.web.filter.mgt.DefaultFilter.user;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName ActivitySchoolApplyServiceImpl
|
* @ClassName ActivitySchoolApplyServiceImpl
|
||||||
* @Description TODO
|
* @Description TODO
|
||||||
@@ -39,16 +34,24 @@ public class MobileActivityApplyServiceImpl extends BaseServiceImpl<ActivityScho
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doTeamSignUp(String activityId, List<String> userIds, String eventId, String teamId, String teamName, String applyUserSign) {
|
public void doTeamSignUp(String activityId, List<String> userIds, String eventId, String teamId,
|
||||||
|
String teamName, String applyUserSign, List<ActivityMobileSignUpParam.teamUserInfo> teamUserInfos) {
|
||||||
List<ActivitySchoolApply> schoolApplyArrayList = new ArrayList<>();
|
List<ActivitySchoolApply> schoolApplyArrayList = new ArrayList<>();
|
||||||
userIds.forEach(i -> {
|
|
||||||
ActivitySchoolApply schoolApply = getApply(activityId, eventId, i, teamId, teamName, applyUserSign);
|
// userIds.forEach(i -> {
|
||||||
|
// ActivitySchoolApply schoolApply = getApply(activityId, eventId, i, teamId, teamName, applyUserSign);
|
||||||
|
// schoolApplyArrayList.add(schoolApply);
|
||||||
|
// });
|
||||||
|
|
||||||
|
teamUserInfos.forEach( v -> {
|
||||||
|
ActivitySchoolApply schoolApply = getApply(activityId, eventId, v.getUserId(), teamId, teamName, applyUserSign, v.getMobile());
|
||||||
schoolApplyArrayList.add(schoolApply);
|
schoolApplyArrayList.add(schoolApply);
|
||||||
});
|
});
|
||||||
|
|
||||||
insert(schoolApplyArrayList);
|
insert(schoolApplyArrayList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActivitySchoolApply getApply(String activityId, String eventId, String userId, String teamId, String teamName, String applyUserSign) {
|
public ActivitySchoolApply getApply(String activityId, String eventId, String userId, String teamId, String teamName, String applyUserSign, String mobile) {
|
||||||
ActivitySchool activitySchool = dao().fetch(ActivitySchool.class, activityId);
|
ActivitySchool activitySchool = dao().fetch(ActivitySchool.class, activityId);
|
||||||
User user = dao().fetch(User.class, Cnd.where("id", "=", userId));
|
User user = dao().fetch(User.class, Cnd.where("id", "=", userId));
|
||||||
ActivityBasicUnit basicUnit = dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", user.getUnitid()));
|
ActivityBasicUnit basicUnit = dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", user.getUnitid()));
|
||||||
@@ -70,7 +73,7 @@ public class MobileActivityApplyServiceImpl extends BaseServiceImpl<ActivityScho
|
|||||||
schoolApply.setTeam(teamName);
|
schoolApply.setTeam(teamName);
|
||||||
schoolApply.setApplyUser(ShiroUtil.getUserId());
|
schoolApply.setApplyUser(ShiroUtil.getUserId());
|
||||||
schoolApply.setUserId(userId);
|
schoolApply.setUserId(userId);
|
||||||
schoolApply.setMobile(user.getMobile());
|
schoolApply.setMobile(mobile);
|
||||||
schoolApply.setSex(user.getSex());
|
schoolApply.setSex(user.getSex());
|
||||||
schoolApply.setUnitId(user.getUnitid());
|
schoolApply.setUnitId(user.getUnitid());
|
||||||
schoolApply.setUnionId(user.getUnionid());
|
schoolApply.setUnionId(user.getUnionid());
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ layout("/mobile/platform.html"){
|
|||||||
<van-field label="姓名" readonly v-model="userName"></van-field>
|
<van-field label="姓名" readonly v-model="userName"></van-field>
|
||||||
<van-field label="工号" readonly v-model="loginName"></van-field>
|
<van-field label="工号" readonly v-model="loginName"></van-field>
|
||||||
<van-field label="性别" readonly v-model="sex"></van-field>
|
<van-field label="性别" readonly v-model="sex"></van-field>
|
||||||
|
<van-field label="联系方式" v-model="formData.mobile" placeholder="请输入联系方式" type="tel" maxlength="11"></van-field>
|
||||||
<van-field label="所在单位" readonly v-model="unitName"></van-field>
|
<van-field label="所在单位" readonly v-model="unitName"></van-field>
|
||||||
<van-field label="所属工会" readonly v-model="unionName"></van-field>
|
<van-field label="所属工会" readonly v-model="unionName"></van-field>
|
||||||
<van-field label="签字" readonly v-if="activityData.isSign&&isView">
|
<van-field label="签字" readonly v-if="activityData.isSign&&isView">
|
||||||
@@ -200,6 +201,7 @@ layout("/mobile/platform.html"){
|
|||||||
<van-field label="姓名" readonly v-model="item.userName"></van-field>
|
<van-field label="姓名" readonly v-model="item.userName"></van-field>
|
||||||
<van-field label="工号" readonly v-model="item.loginName"></van-field>
|
<van-field label="工号" readonly v-model="item.loginName"></van-field>
|
||||||
<van-field label="性别" readonly v-model="item.sex"></van-field>
|
<van-field label="性别" readonly v-model="item.sex"></van-field>
|
||||||
|
<van-field label="联系方式" v-model="item.mobile" placeholder="请输入联系方式" type="tel" maxlength="11"></van-field>
|
||||||
<van-field label="所在单位" readonly v-model="item.unitName"></van-field>
|
<van-field label="所在单位" readonly v-model="item.unitName"></van-field>
|
||||||
<van-field label="所属工会" readonly v-model="item.unionName"></van-field>
|
<van-field label="所属工会" readonly v-model="item.unionName"></van-field>
|
||||||
<van-field label="签字" readonly v-if="activityData.isSign&&isView">
|
<van-field label="签字" readonly v-if="activityData.isSign&&isView">
|
||||||
@@ -302,6 +304,7 @@ layout("/mobile/platform.html"){
|
|||||||
<van-field label="姓名" readonly v-model="userName"></van-field>
|
<van-field label="姓名" readonly v-model="userName"></van-field>
|
||||||
<van-field label="工号" readonly v-model="loginName"></van-field>
|
<van-field label="工号" readonly v-model="loginName"></van-field>
|
||||||
<van-field label="性别" readonly v-model="sex"></van-field>
|
<van-field label="性别" readonly v-model="sex"></van-field>
|
||||||
|
<van-field label="联系方式" v-model="formData.mobile" placeholder="请输入联系方式" type="tel" maxlength="11"></van-field>
|
||||||
<van-field label="所在单位" readonly v-model="unitName"></van-field>
|
<van-field label="所在单位" readonly v-model="unitName"></van-field>
|
||||||
<van-field label="所属工会" readonly v-model="unionName"></van-field>
|
<van-field label="所属工会" readonly v-model="unionName"></van-field>
|
||||||
<van-radio-group v-model="formData.teamId" v-if="projectType==2">
|
<van-radio-group v-model="formData.teamId" v-if="projectType==2">
|
||||||
@@ -323,7 +326,7 @@ layout("/mobile/platform.html"){
|
|||||||
<div style="display: flex; justify-content: center; padding-bottom: 10px">
|
<div style="display: flex; justify-content: center; padding-bottom: 10px">
|
||||||
<van-radio-group v-model="formData.isCy" direction="horizontal">
|
<van-radio-group v-model="formData.isCy" direction="horizontal">
|
||||||
<van-radio name="1"></van-radio>
|
<van-radio name="1"></van-radio>
|
||||||
<span style="color: red" @click="fxgzsActionPopup=true">自愿参赛责任及风险告知书</span>
|
<span style="color: red" @click="fxgzsActionPopup=true">我已阅读参赛责任及风险告知书</span>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<van-row gutter="20">
|
<van-row gutter="20">
|
||||||
@@ -364,7 +367,8 @@ layout("/mobile/platform.html"){
|
|||||||
teamId: null,
|
teamId: null,
|
||||||
teamName: null,
|
teamName: null,
|
||||||
activityId: "",
|
activityId: "",
|
||||||
eventId: ""
|
eventId: "",
|
||||||
|
mobile: null
|
||||||
},
|
},
|
||||||
title: "活动报名",
|
title: "活动报名",
|
||||||
projectType: "",
|
projectType: "",
|
||||||
@@ -479,6 +483,30 @@ layout("/mobile/platform.html"){
|
|||||||
return resp.data
|
return resp.data
|
||||||
},
|
},
|
||||||
async doTeamSignUp() {
|
async doTeamSignUp() {
|
||||||
|
if (!this.formData.mobile || !this.formData.mobile.match(/^1[3-9]\d{9}$/)) {
|
||||||
|
this.$dialog.alert({
|
||||||
|
title: "温馨提示",
|
||||||
|
message: "请正确填写本人的联系方式!"
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const _this = this
|
||||||
|
this.registerList.forEach((item) => {
|
||||||
|
if (item.id === "${@shiro.getPrincipalProperty('id')}") {
|
||||||
|
item.mobile = _this.formData.mobile
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log(this.registerList)
|
||||||
|
const hasEmptyPhone = this.registerList.some((item) => !item.mobile || !item.mobile.match(/^1[3-9]\d{9}$/))
|
||||||
|
if (hasEmptyPhone) {
|
||||||
|
this.$dialog.alert({
|
||||||
|
title: "温馨提示",
|
||||||
|
message: "请正确填写参赛队友的联系方式!"
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (this.activityData.isSign && !this.formData.applyUserSign) {
|
if (this.activityData.isSign && !this.formData.applyUserSign) {
|
||||||
this.$dialog
|
this.$dialog
|
||||||
.alert({
|
.alert({
|
||||||
@@ -546,18 +574,24 @@ layout("/mobile/platform.html"){
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$modal.confirm("您确定要提交吗?").then(async () => {
|
this.$modal.confirm("请确保手机号填写正确,您确定要提交吗?").then(async () => {
|
||||||
if (this.formData.teamId) {
|
if (this.formData.teamId) {
|
||||||
this.$set(this.formData, "teamName", this.teams.find((v) => v.id === this.formData.teamId).name)
|
this.$set(this.formData, "teamName", this.teams.find((v) => v.id === this.formData.teamId).name)
|
||||||
}
|
}
|
||||||
const userIds = this.registerList.map((v) => v.id)
|
const userIds = this.registerList.map((v) => v.id)
|
||||||
|
|
||||||
|
const teamUserInfos = this.registerList.map((v) => {
|
||||||
|
return { userId: v.id, mobile: v.mobile }
|
||||||
|
})
|
||||||
|
|
||||||
await $.post("/mobile/activity/Sports/list/doTeamSignUp", {
|
await $.post("/mobile/activity/Sports/list/doTeamSignUp", {
|
||||||
activityId: this.formData.activityId,
|
activityId: this.formData.activityId,
|
||||||
eventId: this.formData.eventId,
|
eventId: this.formData.eventId,
|
||||||
teamId: this.formData.teamId,
|
teamId: this.formData.teamId,
|
||||||
teamName: this.formData.teamName,
|
teamName: this.formData.teamName,
|
||||||
userIds: JSON.stringify(userIds),
|
userIds: JSON.stringify(userIds),
|
||||||
applyUserSign: this.formData.applyUserSign
|
applyUserSign: this.formData.applyUserSign,
|
||||||
|
teamUserInfos: JSON.stringify(teamUserInfos)
|
||||||
})
|
})
|
||||||
await this.onRefresh()
|
await this.onRefresh()
|
||||||
this.teamSignUpShow = false
|
this.teamSignUpShow = false
|
||||||
@@ -639,6 +673,14 @@ layout("/mobile/platform.html"){
|
|||||||
return done(false)
|
return done(false)
|
||||||
},
|
},
|
||||||
async doActivityConfirm() {
|
async doActivityConfirm() {
|
||||||
|
if (!this.formData.mobile || !this.formData.mobile.match(/^1[3-9]\d{9}$/)) {
|
||||||
|
this.$dialog.alert({
|
||||||
|
title: "温馨提示",
|
||||||
|
message: "请正确填写参赛人员联系方式!"
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (this.activityData.isSign && !this.formData.applyUserSign) {
|
if (this.activityData.isSign && !this.formData.applyUserSign) {
|
||||||
this.$dialog
|
this.$dialog
|
||||||
.alert({
|
.alert({
|
||||||
@@ -675,10 +717,12 @@ layout("/mobile/platform.html"){
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.formData.teamId != null) this.$set(this.formData, "teamName", this.teams.find((v) => v.id == this.formData.teamId).name)
|
if (this.formData.teamId != null) this.$set(this.formData, "teamName", this.teams.find((v) => v.id == this.formData.teamId).name)
|
||||||
await $.post("/mobile/activity/Sports/list/doActivity", this.formData)
|
|
||||||
|
|
||||||
await this.onRefresh()
|
this.$modal.confirm("请确保手机号填写正确,您确定要提交吗?").then(async () => {
|
||||||
this.activityDialog = false
|
await $.post("/mobile/activity/Sports/list/doActivity", this.formData)
|
||||||
|
await this.onRefresh()
|
||||||
|
this.activityDialog = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async openActivity(o) {
|
async openActivity(o) {
|
||||||
|
|||||||
@@ -370,14 +370,15 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template scope="{row}" v-else-if="column.prop=='applyNum'">
|
<template scope="{row}" v-else-if="column.prop=='applyNum'">
|
||||||
<span v-if="row.successUserApply>0&&row.applyType !== 3">
|
{{ row.totalApplyNum }}
|
||||||
{{row.successUserApply}}人</span>
|
<!-- <span v-if="row.successUserApply>0&&row.applyType !== 3">-->
|
||||||
<span
|
<!-- {{row.successUserApply}}人</span>-->
|
||||||
v-else-if="JSON.parse(row.applyWay).length===2&&row.applyWay.includes(1)">
|
<!-- <span-->
|
||||||
{{row.totalApplyNum}}人</span>
|
<!-- v-else-if="JSON.parse(row.applyWay).length===2&&row.applyWay.includes(1)">-->
|
||||||
<span v-else-if="row.totalApplyNum>0&&row.applyType === 3">
|
<!-- {{row.totalApplyNum}}人</span>-->
|
||||||
{{ row.totalApplyNum }}人</span>
|
<!-- <span v-else-if="row.totalApplyNum>0&&row.applyType === 3">-->
|
||||||
<span v-else>0人</span>
|
<!-- {{ row.totalApplyNum }}人</span>-->
|
||||||
|
<!-- <span v-else>0人</span>-->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@@ -839,6 +840,7 @@ layout("/layouts/platform.html"){
|
|||||||
label="性别"
|
label="性别"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" prop="mobile" label="联系方式"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
|
|||||||
Reference in New Issue
Block a user