团队赛队员配置修改

main
zhc077 3 months ago
parent b48bddcc24
commit 67ed396f1c
  1. 528
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  2. 18
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java
  3. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/controller/TeamSeqController.java
  4. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/ITeamSeqService.java
  5. 21
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/impl/TeamSeqServiceImpl.java
  6. 182
      jeecgboot-vue3-master/src/views/annualCompPoint/committee/components/AnnualCompPointForm.vue

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
@ -14,15 +13,15 @@ import org.jeecg.modules.demo.annualcomp.entity.AnnualComp;
import org.jeecg.modules.demo.annualcomp.service.impl.AnnualCompServiceImpl;
import org.jeecg.modules.demo.annualcompaward.entity.AnnualCompAward;
import org.jeecg.modules.demo.annualcompaward.mapper.AnnualCompAwardMapper;
import org.jeecg.modules.demo.objLevel.entity.ObjLevel;
import org.jeecg.modules.demo.objLevel.service.impl.ObjLevelServiceImpl;
import org.jeecg.modules.demo.projectlevel.entity.Projectlevel;
import org.jeecg.modules.demo.projectlevel.service.IProjectlevelService;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import org.jeecg.modules.demo.teamseq.service.ITeamSeqService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.servlet.http.HttpServletRequest;
import java.time.LocalDate;
import java.util.List;
@ -55,9 +54,6 @@ public class AnnualCompPointServiceImpl extends ServiceImpl<AnnualCompPointMappe
@Autowired
private AnnualCompAwardMapper annualCompAwardMapper;
@Autowired
private ITeamSeqService teamSeqService;
/**
* 年度比赛项目 添加
*/
@ -268,17 +264,9 @@ public class AnnualCompPointServiceImpl extends ServiceImpl<AnnualCompPointMappe
AnnualCompAward annualCompAward=new AnnualCompAward();
annualCompAward.setAnnucompid(annualCompPoint.getId());
annualCompAwardMapper.insert(annualCompAward);
//保存团队赛队员积分计算配置 add by zhc 8.22
teamSeqService.saveOrUpdate4TeamSeq(annualCompPoint);
return Result.OK("新增成功");
}
@Override
public Result<IPage<AnnualCompPoint>> pageList(AnnualCompPoint annualCompPoint, Integer pageNo, Integer pageSize, HttpServletRequest req) {
List<Projectlevel> levelList = projectlevelService.list();

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.teamseq.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -20,6 +21,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
/**
* @Description: 团队赛队员积分计算配置
@ -57,6 +59,12 @@ public class TeamSeqController extends JeecgController<TeamSeq, ITeamSeqService>
return Result.OK(pageList);
}
@ApiOperation(value = "团队赛队员积分计算配置-分页列表查询", notes = "团队赛队员积分计算配置-分页列表查询")
@GetMapping(value = "/listByPointId")
public Result<List<TeamSeq>> queryPageList(String pointId) {
return Result.OK(teamSeqService.list(new LambdaQueryWrapper<TeamSeq>().eq(TeamSeq::getPointId,pointId)));
}
/**
* 添加
*
@ -72,6 +80,15 @@ public class TeamSeqController extends JeecgController<TeamSeq, ITeamSeqService>
return Result.OK("添加成功!");
}
@AutoLog(value = "团队赛队员积分计算配置-添加")
@ApiOperation(value = "团队赛队员积分计算配置-添加", notes = "团队赛队员积分计算配置-添加")
// @RequiresPermissions("teamseq:team_seq:add")
@PostMapping(value = "/saveOrUpdate4TeamSeq")
public Result<String> saveOrUpdate4TeamSeq(@RequestBody List<TeamSeq> seqList) {
teamSeqService.saveOrUpdate4TeamSeq(seqList);
return Result.OK("添加成功!");
}
/**
* 编辑
*

@ -4,6 +4,8 @@ import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 团队赛队员积分计算配置
* @Author: jeecg-boot
@ -12,5 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface ITeamSeqService extends IService<TeamSeq> {
void saveOrUpdate4TeamSeq(AnnualCompPoint point);
void saveOrUpdate4TeamSeq(List<TeamSeq> list);
}

@ -1,7 +1,7 @@
package org.jeecg.modules.demo.teamseq.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import org.jeecg.modules.demo.teamseq.mapper.TeamSeqMapper;
import org.jeecg.modules.demo.teamseq.service.ITeamSeqService;
@ -9,7 +9,7 @@ import org.jeecg.modules.demo.teamseq.vo.TeamSeqVo;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: 团队赛队员积分计算配置
@ -21,13 +21,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
public class TeamSeqServiceImpl extends ServiceImpl<TeamSeqMapper, TeamSeq> implements ITeamSeqService {
@Override
public void saveOrUpdate4TeamSeq(AnnualCompPoint point) {
this.remove(new LambdaQueryWrapper<TeamSeq>().eq(TeamSeq::getPointId,point.getId()));
TeamSeqVo vo = new TeamSeqVo();
BeanUtils.copyProperties(point,vo);
vo.setPointId(point.getId());
TeamSeq teamSeq = new TeamSeq();
BeanUtils.copyProperties(vo,teamSeq);
this.save(teamSeq);
public void saveOrUpdate4TeamSeq(List<TeamSeq> list) {
String pointId = list.get(0).getPointId();
this.remove(new LambdaQueryWrapper<TeamSeq>().eq(TeamSeq::getPointId, pointId));
// TeamSeqVo vo = new TeamSeqVo();
// BeanUtils.copyProperties(point, vo);
// vo.setPointId(point.getId());
// TeamSeq teamSeq = new TeamSeq();
// BeanUtils.copyProperties(vo, teamSeq);
this.saveBatch(list);
}
}

@ -44,9 +44,13 @@
</a-form-item>
</a-col>
<a-col :span="16">
<a-form-item label="项目(赛道)层次" v-bind="validateInfos.objLevel" :labelCol="labelCol" :wrapperCol="wrapperCol7">
<a-form-item label="项目(赛道)层次" v-bind="validateInfos.objLevel" :labelCol="labelCol"
:wrapperCol="wrapperCol7">
<a-radio-group v-model:value="formData.objLevel">
<a-radio v-for="item in objLevelll" :key="item.id" :value="item.id">{{ item.name }}</a-radio>
<a-radio v-for="item in objLevelll" :key="item.id" :value="item.id">{{
item.name
}}
</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
@ -66,18 +70,21 @@
<a-col :span="11">
<a-form-item label="参与形式" v-bind="validateInfos.entryForm" :labelCol="labelCol"
:wrapperCol="wrapperCol8">
<j-dict-select-tag type="radio" v-model:value="formData.entryForm" placeholder="请选择参与形式" dict-code="joinType" />
<j-dict-select-tag type="radio" v-model:value="formData.entryForm"
placeholder="请选择参与形式" dict-code="joinType"/>
</a-form-item>
</a-col>
<a-col :span="6" v-if="formData.entryForm==='Y'">
<a-form-item label="是否需要领队" v-bind="validateInfos.requireLeader" :labelCol="labelCol3"
<a-form-item label="是否需要领队" v-bind="validateInfos.requireLeader"
:labelCol="labelCol3"
:wrapperCol="wrapperCol3">
<j-switch v-model:value="formData.requireLeader" :disabled="disabled"></j-switch>
</a-form-item>
</a-col>
<a-col :span="7" v-if="formData.entryForm==='Y'">
<a-form-item label="是否需要队伍名称" v-bind="validateInfos.requireTeamName" :labelCol="labelCol3"
:wrapperCol="wrapperCol3" >
<a-form-item label="是否需要队伍名称" v-bind="validateInfos.requireTeamName"
:labelCol="labelCol3"
:wrapperCol="wrapperCol3">
<j-switch type='radio' v-model:value="formData.requireTeamName" dictCode=""
placeholder="请选择是否需要队伍名称" :disabled="disabled"/>
</a-form-item>
@ -101,7 +108,7 @@
</a-col>
</a-row>
<!--
<!--
<a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12">
<a-form-item label="队伍第1编号" >
@ -173,7 +180,7 @@
-->
-->
<a-row>
@ -186,7 +193,8 @@
<a-col :span="9" v-if="formData.requireApply==='Y'">
<a-form-item label="开始时间" v-bind="validateInfos.applyStartTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择报名开始时间" v-model:value="formData.applyStartTime" showTime
<a-date-picker placeholder="请选择报名开始时间" v-model:value="formData.applyStartTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -194,7 +202,8 @@
<a-col :span="9" v-if="formData.requireApply==='Y'">
<a-form-item label="结束时间" v-bind="validateInfos.applyEndTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择报名结束时间" v-model:value="formData.applyEndTime" showTime
<a-date-picker placeholder="请选择报名结束时间" v-model:value="formData.applyEndTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -212,7 +221,8 @@
<a-col :span="9" v-if="formData.requireTopic==='Y'">
<a-form-item label="开始时间" v-bind="validateInfos.topicStartTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择选题开始时间" v-model:value="formData.topicStartTime" showTime
<a-date-picker placeholder="请选择选题开始时间" v-model:value="formData.topicStartTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -220,7 +230,8 @@
<a-col :span="9" v-if="formData.requireTopic==='Y'">
<a-form-item label="结束时间" v-bind="validateInfos.topicEndTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择选题结束时间" v-model:value="formData.topicEndTime" showTime
<a-date-picker placeholder="请选择选题结束时间" v-model:value="formData.topicEndTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -229,7 +240,8 @@
<a-row>
<a-col :span="5">
<a-form-item label="上传作品" v-bind="validateInfos.requireUploadWorks" :labelCol="labelCol4"
<a-form-item label="上传作品" v-bind="validateInfos.requireUploadWorks"
:labelCol="labelCol4"
:wrapperCol="wrapperCol4">
<j-switch v-model:value="formData.requireUploadWorks" :disabled="disabled"></j-switch>
</a-form-item>
@ -238,7 +250,8 @@
<a-col :span="9" v-if="formData.requireUploadWorks==='Y'">
<a-form-item label="开始时间" v-bind="validateInfos.uploadStartTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择上传作品开始时间" v-model:value="formData.uploadStartTime"
<a-date-picker placeholder="请选择上传作品开始时间"
v-model:value="formData.uploadStartTime"
showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -246,16 +259,19 @@
<a-col :span="9" v-if="formData.requireUploadWorks==='Y'">
<a-form-item label="结束时间" v-bind="validateInfos.uploadEndTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择上传作品结束时间" v-model:value="formData.uploadEndTime" showTime
<a-date-picker placeholder="请选择上传作品结束时间"
v-model:value="formData.uploadEndTime" showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24" v-if="formData.requireUploadWorks==='Y'">
<a-form-item label="上传作品类型" v-bind="validateInfos.uploadWorksType" :labelCol="labelCol6"
<a-form-item label="上传作品类型" v-bind="validateInfos.uploadWorksType"
:labelCol="labelCol6"
:wrapperCol="wrapperCol6">
<j-select-multiple type="list_multi" v-model:value="formData.uploadWorksType"
dictCode="updateWorksType" placeholder="请选择上传作品类型" :disabled="disabled"
dictCode="updateWorksType" placeholder="请选择上传作品类型"
:disabled="disabled"
:triggerChange="false"/>
</a-form-item>
</a-col>
@ -270,7 +286,8 @@
<a-col :span="9" v-if="formData.requireScore==='Y'">
<a-form-item label="开始时间" v-bind="validateInfos.scoreStartTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择评分开始时间" v-model:value="formData.scoreStartTime" showTime
<a-date-picker placeholder="请选择评分开始时间" v-model:value="formData.scoreStartTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -278,7 +295,8 @@
<a-col :span="9" v-if="formData.requireScore==='Y'">
<a-form-item label="结束时间" v-bind="validateInfos.scoreEndTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择评分结束时间" v-model:value="formData.scoreEndTime" showTime
<a-date-picker placeholder="请选择评分结束时间" v-model:value="formData.scoreEndTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -299,16 +317,18 @@
<BasicModal
v-bind="$attrs"
@register="register"
title="Modal Title"
title="比值配置"
:height="800"
@ok="handleOk"
>
<!-- <div v-for="(item,index) in num" :key="index">-->
<!-- <a-input-number v-model="item.index"></a-input-number>-->
<!-- <a-input-number v-model="item.value"></a-input-number>-->
<!-- <a-button @click="delNum(index)">删除</a-button>-->
<!-- </div>-->
<!-- <a-button type="primary" @click="addNum" class="mr-2">从内部关闭弹窗</a-button>-->
<!-- <a-button type="primary" @click="setModalProps">从内部修改title</a-button>-->
<!-- <div v-for="(item,index) in num" :key="index">-->
<!-- <a-input-number v-model="item.index"></a-input-number>-->
<!-- <a-input-number v-model="item.value"></a-input-number>-->
<!-- <a-button @click="delNum(index)">删除</a-button>-->
<!-- </div>-->
<!-- <a-button type="primary" @click="addNum" class="mr-2">从内部关闭弹窗</a-button>-->
<!-- <a-button type="primary" @click="setModalProps">从内部修改title</a-button>-->
<JVxeTable
ref="tableRef"
stripe
@ -326,8 +346,8 @@
</template>
<script lang="ts" setup>
import { BasicModal, useModalInner,useModal } from '/@/components/Modal';
import {ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted} from 'vue';
import {BasicModal, useModal} from '/@/components/Modal';
import {computed, defineExpose, defineProps, nextTick, onMounted, reactive, ref} from 'vue';
import {defHttp} from '/@/utils/http/axios';
import {useMessage} from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
@ -335,17 +355,39 @@ import JSwitch from '/@/components/Form/src/jeecg/components/JSwitch.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue';
import {getValueType} from '/@/utils';
import {saveOrUpdate, getProjectlevel} from '../AnnualCompPoint.api';
import {getProjectlevel, saveOrUpdate} from '../AnnualCompPoint.api';
import {Form} from 'ant-design-vue';
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
import { JVxeTypes, JVxeColumn} from '/@/components/jeecg/JVxeTable/types';
const dataSource = ref([])
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const realForm = ref();
import {JVxeTable} from '/@/components/jeecg/JVxeTable';
import {JVxeColumn, JVxeTypes} from '/@/components/jeecg/JVxeTable/types';
//
const loading = ref(false);
//
const pagination = reactive({
//
current: 1,
//
pageSize: 200,
//
pageSizeOptions: ['10', '20', '30', '100', '200'],
// 0
total: 0,
});
//
const selectedRows = ref<Recordable[]>([]);
//
const dataSource = ref<Recordable[]>([]);
//
const columns = ref<JVxeColumn[]>([
// { key: 'num', title: '', width: 80, type: JVxeTypes.normal },
{ key: 'teamSeqFirst', title: '序号1', width: 80, type: JVxeTypes.normal },
{
title: '比值',
key: 'raito',
key: 'teamSeqFirstVal',
type: JVxeTypes.input,
width: 180,
defaultValue: '',
@ -364,7 +406,7 @@ const columns = ref<JVxeColumn[]>([
// message: '${title}',
// },
{
handler({ cellValue, row, column }, callback, target) {
handler({cellValue, row, column}, callback, target) {
// cellValue
// callback(flag, message)
// flag = null
@ -381,7 +423,51 @@ const columns = ref<JVxeColumn[]>([
],
},
])
function handleTableSave({ $table, target }) {
// url
enum Api {
getData = '/teamSeq/listByPointId',
//
saveRow = '/mock/vxe/immediateSaveRow',
//
saveAll = '/teamSeq/saveOrUpdate4TeamSeq',
}
//
async function loadData() {
alert(formData.id)
// loading.value = true;
//
await defHttp
.get({
//
url: Api.getData,
// //
params: {
pointId: formData.id
// pageNo: pagination.current,
// pageSize: pagination.pageSize,
},
})
.then((result) => {
// total
// pagination.total = result.total;
// dataSource
dataSource.value = result.records;
//
selectedRows.value = [];
})
.finally(() => {
// loading
loading.value = false;
});
}
function handleOk() {
alert("handleOk")
}
function handleTableSave({$table, target}) {
//
$table.validate().then((errMap) => {
//
@ -411,6 +497,7 @@ function handleTableSave({ $table, target }) {
}
});
}
const props = defineProps({
// objLevelll: { type: Array, default: () => [] },
formDisabled: {type: Boolean, default: false},
@ -420,30 +507,33 @@ const props = defineProps({
},
formBpm: {type: Boolean, default: true}
});
const [register, { openModal }] = useModal();
const [register, {openModal}] = useModal();
// const [register, { closeModal, setModalProps,openModal }] = useModalInner();
const showModel = () => {
// console.log(1111)
loadData();
openModal()
// console.log(1111)
}
let num = ref([
{
value:'',
index:1
value: '',
index: 1
}
])
const addNum = () => {
num.value.push({value:'',index:num.value.length})
num.value.push({value: '', index: num.value.length})
}
const delNum = (index) => {
num.value.splice(index,1)
num.value.splice(index, 1)
}
const objLevelll = ref([])
const getProjectlevelEvent = async() => {
const getProjectlevelEvent = async () => {
const res = await getProjectlevel()
objLevelll.value = res
console.log(res,'2222')
console.log(res, '2222')
}
getProjectlevelEvent()
const formRef = ref();
@ -542,7 +632,7 @@ function add() {
if (props.objLevelll.length !== 0) {
formData.objLevel = props.objLevelll[0].id;
}
edit({ ...formData });
edit({...formData});
}
/**

Loading…
Cancel
Save