server_commit
This commit is contained in:
+11
-1
@@ -1,6 +1,7 @@
|
|||||||
package com.budwk.app.client.module.activity.controller;
|
package com.budwk.app.client.module.activity.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.client.module.activity.service.ClientActivityService;
|
import com.budwk.app.client.module.activity.service.ClientActivityService;
|
||||||
import com.budwk.app.module.activity.models.ActGroup;
|
import com.budwk.app.module.activity.models.ActGroup;
|
||||||
@@ -89,6 +90,11 @@ public class ClientGroupController {
|
|||||||
Sql sql = Sqls.create("select * from act_group where id=@id and isOpen = 1").setParam("id", groupUser.getGroupId());
|
Sql sql = Sqls.create("select * from act_group where id=@id and isOpen = 1").setParam("id", groupUser.getGroupId());
|
||||||
sql.setCallback(Sqls.callback.map());
|
sql.setCallback(Sqls.callback.map());
|
||||||
NutMap map = (NutMap) dao.execute(sql).getResult();
|
NutMap map = (NutMap) dao.execute(sql).getResult();
|
||||||
|
|
||||||
|
if (Lang.isEmpty(map)) {
|
||||||
|
map = NutMap.NEW();
|
||||||
|
}
|
||||||
|
|
||||||
Sql sqlGroupUser = Sqls.create("""
|
Sql sqlGroupUser = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
t1.*,
|
t1.*,
|
||||||
@@ -120,7 +126,11 @@ public class ClientGroupController {
|
|||||||
@At("/apply-leader/?")
|
@At("/apply-leader/?")
|
||||||
@AdaptBy(type = JsonAdaptor.class)
|
@AdaptBy(type = JsonAdaptor.class)
|
||||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||||
public synchronized Result applyLeader(Long groupId) {
|
public synchronized Result applyLeader(String groupId) {
|
||||||
|
if (StrUtil.isNotBlank(groupId)) {
|
||||||
|
return Result.error("未获取到团队信息");
|
||||||
|
}
|
||||||
|
|
||||||
int count = clientActivityService.dao().count(ActGroupUser.class, Cnd.where(ActGroupUser::getGroupId, "=", groupId)
|
int count = clientActivityService.dao().count(ActGroupUser.class, Cnd.where(ActGroupUser::getGroupId, "=", groupId)
|
||||||
.and(ActGroupUser::getIsLeader, "=", 1));
|
.and(ActGroupUser::getIsLeader, "=", 1));
|
||||||
if (count > 0){
|
if (count > 0){
|
||||||
|
|||||||
@@ -290,4 +290,13 @@ public class ActGroupController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("activity.group")
|
||||||
|
@SLog(tag = "活动分组", msg = "发布分组结果")
|
||||||
|
public Result unReleaseGroupResult(@Valid String activityId){
|
||||||
|
dao.update(ActGroup.class, Chain.make("isOpen", false),
|
||||||
|
Cnd.where(ActGroup::getActivityId, "=", activityId));
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ layout("/layouts/platform_1.html"){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button type="primary" size="small" @click="releaseGroupResult" style="margin-left: 10px">发布分组结果</el-button>
|
<el-button type="primary" size="small" @click="releaseGroupResult" style="margin-left: 10px">发布分组结果</el-button>
|
||||||
|
<el-button type="warning" size="small" @click="unReleaseGroupResult" style="margin-left: 10px">取消分组结果</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table v-loading="tableLoading" show-overflow-tooltip :data="tableData">
|
<el-table v-loading="tableLoading" show-overflow-tooltip :data="tableData">
|
||||||
<el-table-column label="序号" type="index" header-align="center" align="center" width="50"></el-table-column>
|
<el-table-column label="序号" type="index" header-align="center" align="center" width="50"></el-table-column>
|
||||||
@@ -167,6 +168,23 @@ layout("/layouts/platform_1.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
unReleaseGroupResult() {
|
||||||
|
this.$confirm('确定要取消发布分组结果吗?', '提示', {
|
||||||
|
type: 'warning',
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消'
|
||||||
|
}).then(async ()=> {
|
||||||
|
const resp = await $.post('/platform/activity/group/unReleaseGroupResult', {
|
||||||
|
activityId: this.pageForm.activityId
|
||||||
|
})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
await this.pageData()
|
||||||
|
} else {
|
||||||
|
this.$message.error(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
async doRemove(row) {
|
async doRemove(row) {
|
||||||
this.$confirm('此操作将会删除与该小队相关的所有信息,确定要删除吗?', '提示', {
|
this.$confirm('此操作将会删除与该小队相关的所有信息,确定要删除吗?', '提示', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ layout("/layouts/platform_1.html"){
|
|||||||
<el-table-column label="性别" prop="sex" width="60px" fixed="left"></el-table-column>
|
<el-table-column label="性别" prop="sex" width="60px" fixed="left"></el-table-column>
|
||||||
<el-table-column label="体重(kg)" prop="weight" width="100px"></el-table-column>
|
<el-table-column label="体重(kg)" prop="weight" width="100px"></el-table-column>
|
||||||
<el-table-column label="职务" prop="position" width="150px"></el-table-column>
|
<el-table-column label="职务" prop="position" width="150px"></el-table-column>
|
||||||
<!-- <el-table-column label="身份证号码" prop="idCard" width="180px"></el-table-column>-->
|
<!-- <el-table-column label="身份证号码" prop="idCard" width="180px"></el-table-column>-->
|
||||||
<el-table-column label="联系方式" prop="phone" width="130px"></el-table-column>
|
<el-table-column label="联系方式" prop="phone" width="130px"></el-table-column>
|
||||||
<el-table-column label="单位" prop="unitName" width="150px"></el-table-column>
|
<el-table-column label="单位" prop="unitName" width="150px"></el-table-column>
|
||||||
<el-table-column label="报名时间" prop="signUpTime" width="150px"></el-table-column>
|
<el-table-column label="报名时间" prop="signUpTime" width="150px"></el-table-column>
|
||||||
@@ -102,11 +102,11 @@ layout("/layouts/platform_1.html"){
|
|||||||
<el-table-column label="自驾车牌号" prop="carNo"></el-table-column>
|
<el-table-column label="自驾车牌号" prop="carNo"></el-table-column>
|
||||||
<el-table-column label="是否接站" prop="isStationDesc"></el-table-column>
|
<el-table-column label="是否接站" prop="isStationDesc"></el-table-column>
|
||||||
<el-table-column label="接站地址" prop="stationAddress"></el-table-column>
|
<el-table-column label="接站地址" prop="stationAddress"></el-table-column>
|
||||||
<!-- <el-table-column label="所需器材" prop="equip">-->
|
<!-- <el-table-column label="所需器材" prop="equip">-->
|
||||||
<!-- <template slot-scope="{row}">-->
|
<!-- <template slot-scope="{row}">-->
|
||||||
<!-- <span>{{row.isShowEquip && row.equip?row.equip:'--'}}</span>-->
|
<!-- <span>{{row.isShowEquip && row.equip?row.equip:'--'}}</span>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="是否参加茶叙会" prop="isParty">
|
<el-table-column label="是否参加茶叙会" prop="isParty">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
{{row.isParty ? '是':''}}
|
{{row.isParty ? '是':''}}
|
||||||
@@ -182,12 +182,12 @@ layout("/layouts/platform_1.html"){
|
|||||||
<el-form-item label="体重(kg)" prop="weight">
|
<el-form-item label="体重(kg)" prop="weight">
|
||||||
<el-input-number v-model="modifyForm.weight"></el-input-number>
|
<el-input-number v-model="modifyForm.weight"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-table-column label="身份证件号" prop="idCard" width="250">-->
|
<!-- <el-table-column label="身份证件号" prop="idCard" width="250">-->
|
||||||
<!-- <template slot-scope="{row}">-->
|
<!-- <template slot-scope="{row}">-->
|
||||||
<!-- <el-input v-model="row.idCard" maxlength="18" type="text"-->
|
<!-- <el-input v-model="row.idCard" maxlength="18" type="text"-->
|
||||||
<!-- show-word-limit placeholder="请输入身份证件号"></el-input>-->
|
<!-- show-word-limit placeholder="请输入身份证件号"></el-input>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="职务" prop="position" width="200">
|
<el-table-column label="职务" prop="position" width="200">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-input v-model="row.position" maxlength="100"
|
<el-input v-model="row.position" maxlength="100"
|
||||||
@@ -226,27 +226,26 @@ layout("/layouts/platform_1.html"){
|
|||||||
|
|
||||||
<el-dialog title="修改报名信息" :visible.sync="modifyDialog" width="40%">
|
<el-dialog title="修改报名信息" :visible.sync="modifyDialog" width="40%">
|
||||||
<el-form :model="modifyForm" :rules="modifyRules" ref="modifyFormRef" label-width="100px">
|
<el-form :model="modifyForm" :rules="modifyRules" ref="modifyFormRef" label-width="100px">
|
||||||
<el-form-item label="姓名" prop="userName">
|
|
||||||
<el-input v-model="modifyForm.userName"></el-input>
|
<el-row :gutter="20">
|
||||||
</el-form-item>
|
<el-col :span="12">
|
||||||
<el-form-item label="性别" prop="sex">
|
<el-form-item label="姓名" prop="userName">
|
||||||
<el-radio-group v-model="modifyForm.sex">
|
<el-input v-model="modifyForm.userName"></el-input>
|
||||||
<el-radio label="男"></el-radio>
|
</el-form-item>
|
||||||
<el-radio label="女"></el-radio>
|
</el-col>
|
||||||
</el-radio-group>
|
<el-col :span="12">
|
||||||
</el-form-item>
|
<el-form-item label="性别" prop="sex">
|
||||||
|
<el-radio-group v-model="modifyForm.sex" size="small">
|
||||||
|
<el-radio label="男" border></el-radio>
|
||||||
|
<el-radio label="女" border></el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-form-item label="联系方式" prop="phone">
|
<el-form-item label="联系方式" prop="phone">
|
||||||
<el-input v-model="modifyForm.phone"></el-input>
|
<el-input v-model="modifyForm.phone"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="体重(kg)" prop="weight">
|
|
||||||
<el-input-number v-model="modifyForm.weight"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- <el-form-item label="身份证件号" prop="idCard">-->
|
|
||||||
<!-- <el-input v-model="modifyForm.idCard"></el-input>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<el-form-item label="职务" prop="position">
|
|
||||||
<el-input v-model="modifyForm.position"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属单位" prop="unitName">
|
<el-form-item label="所属单位" prop="unitName">
|
||||||
<el-select placeholder="请选择所属单位"
|
<el-select placeholder="请选择所属单位"
|
||||||
style="width: 100%;" clearable
|
style="width: 100%;" clearable
|
||||||
@@ -257,6 +256,62 @@ layout("/layouts/platform_1.html"){
|
|||||||
</el-select>
|
</el-select>
|
||||||
<!-- <el-input v-model="modifyForm.unitName"></el-input>-->
|
<!-- <el-input v-model="modifyForm.unitName"></el-input>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="职务" prop="position">
|
||||||
|
<el-input v-model="modifyForm.position" placeholder="请填写职务"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="体重KG" prop="weight">
|
||||||
|
<el-input-number v-model="modifyForm.weight" min="0" style="width: 100%" placeholder="请输入体重KG"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否住宿" prop="isStay">
|
||||||
|
<el-radio-group v-model="modifyForm.isStay" size="small">
|
||||||
|
<el-radio :label="true" border>住宿</el-radio>
|
||||||
|
<el-radio :label="false" border>不住宿</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="茶叙会" prop="isParty">
|
||||||
|
<el-radio-group v-model="modifyForm.isParty" size="small">
|
||||||
|
<el-radio :label="true" border>参加</el-radio>
|
||||||
|
<el-radio :label="false" border>不参加</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否联络人" prop="isContacts">
|
||||||
|
<el-radio-group v-model="modifyForm.isContacts" size="small">
|
||||||
|
<el-radio :label="true" border>是</el-radio>
|
||||||
|
<el-radio :label="false" border>否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否接站" prop="isStation">
|
||||||
|
<el-radio-group v-model="modifyForm.isStation" size="small">
|
||||||
|
<el-radio :label="true" border>是</el-radio>
|
||||||
|
<el-radio :label="false" border>否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<template v-if="modifyForm.isStation">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="接站地址" prop="stationAddress">
|
||||||
|
<el-input v-model="modifyForm.stationAddress" placeholder="请填写接站地址"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="modifyDialog = false">取消</el-button>
|
<el-button @click="modifyDialog = false">取消</el-button>
|
||||||
|
|||||||
Reference in New Issue
Block a user