团队赛队员积分计算配置

main
zhc077 3 months ago
parent d7e84844e5
commit 43a483ed64
  1. 4
      jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/common/aspect/AutoLogAspect.java
  2. 61
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  3. 69
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/entity/AnnualCompPoint.java
  4. 18
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java
  5. 5
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/entity/TeamManagement.java
  6. 162
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/controller/TeamSeqController.java
  7. 128
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/entity/TeamSeq.java
  8. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/mapper/TeamSeqMapper.java
  9. 16
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/ITeamSeqService.java
  10. 31
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/impl/TeamSeqServiceImpl.java
  11. 4
      jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue
  12. 85
      jeecgboot-vue3-master/src/views/annualCompPoint/committee/components/AnnualCompPointForm.vue

@ -2,6 +2,7 @@ package org.jeecg.common.aspect;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.PropertyFilter;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
@ -41,6 +42,7 @@ import java.util.Date;
*/
@Aspect
@Component
@Slf4j
public class AutoLogAspect {
@Resource
@ -111,6 +113,8 @@ public class AutoLogAspect {
dto.setCreateTime(new Date());
//保存系统日志
baseCommonService.addLog(dto);
log.info(className + "-" + methodName + "()" + ",用时:" + time + "ms");
}

@ -9,7 +9,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.subject.Subject;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
@ -39,8 +38,6 @@ import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.IAnnu
import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.IInstructorSheetService;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.ITeamManagementService;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersion;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersionMb;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersionOptions;
import org.jeecg.modules.demo.awardpersion.service.IAwardPersionService;
import org.jeecg.modules.demo.comp.entity.Comp;
import org.jeecg.modules.demo.comp.service.ICompService;
@ -50,12 +47,12 @@ import org.jeecg.modules.demo.expert.entity.Expert;
import org.jeecg.modules.demo.expert.service.IExpertService;
import org.jeecg.modules.demo.expscore.entity.ExpScore;
import org.jeecg.modules.demo.expscore.service.IExpScoreService;
import org.jeecg.modules.demo.score_management.entity.ScoreManagement;
import org.jeecg.modules.demo.scorepersion.entity.ScorePersion;
import org.jeecg.modules.demo.scorepersion.service.IScorePersionService;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import org.jeecg.modules.demo.teamseq.service.ITeamSeqService;
import org.jeecg.modules.demo.upfile_persion.entity.UpfilePersion;
import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService;
import org.jeecg.modules.system.entity.SysDict;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
@ -63,7 +60,9 @@ import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@ -74,9 +73,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.DecimalFormat;
import java.time.LocalDateTime;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
@ -139,6 +136,9 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
@Autowired
private IInstructorSheetService instructorSheetService;
@Autowired
private ITeamSeqService iTeamSeqService;
/**
* 分页列表查询
@ -184,12 +184,19 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
queryWrapper.eq("annual_comp_switch", "Y"); // 比赛必须是开启的
Page<AnnualCompPoint> page = new Page<AnnualCompPoint>(pageNo, pageSize);
IPage<AnnualCompPoint> pageList = annualCompPointService.page(page, queryWrapper);
List<AnnualCompPoint> records = pageList.getRecords();
Optional.ofNullable(records).orElse(new LinkedList<>()).stream().forEach(point -> {
TeamSeq teamSeq = iTeamSeqService.getOne(new LambdaQueryWrapper<TeamSeq>().eq(TeamSeq::getPointId, point.getId()));
if (!ObjectUtils.isEmpty(teamSeq)) {
BeanUtils.copyProperties(teamSeq, point);
}
});
return Result.OK(pageList);
}
/**
* 教务处 显示所有
*
* @param annualCompPoint
* @param pageNo
* @param pageSize
@ -210,6 +217,7 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
/**
* 组委会 待审核
*
* @param annualCompPoint
* @param pageNo
* @param pageSize
@ -231,6 +239,7 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
/**
* 组委会 已审核
*
* @param annualCompPoint
* @param pageNo
* @param pageSize
@ -252,8 +261,8 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
/**
*
* 组委会 带驳回
*
* @param annualCompPoint
* @param pageNo
* @param pageSize
@ -276,6 +285,7 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
/**
* 专家 显示所有
*
* @param annualCompPoint
* @param pageNo
* @param pageSize
@ -294,8 +304,7 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
QueryWrapper<Expert> exqueryWrapper = new QueryWrapper<>();
exqueryWrapper.eq("user_id", loginUser.getId());
Expert expert = expertService.getOne(exqueryWrapper);
if(expert==null)
{
if (expert == null) {
return Result.OK(null);
}
//开始获取exp-comp
@ -304,8 +313,7 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
List<CompExp> compExpList = compExpService.list(coexqueryWrapper);
List<String> compIdListss = new ArrayList<>();
List<Comp> compList = new ArrayList<>();
if(compExpList.size()>0)
{
if (compExpList.size() > 0) {
for (CompExp compExps : compExpList) {
compIdListss.add(compExps.getCompid());
}
@ -314,8 +322,7 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
compList = compService.list(coqueryWrapper);
}
List<AnnualComp> annualCompList = new ArrayList<>();
if(compList.size()>0)
{
if (compList.size() > 0) {
List<String> needlist = new ArrayList<>();
for (Comp comp : compList) {
needlist.add(comp.getId());
@ -325,8 +332,7 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
annualCompList = annualCompService.list(anncoqueryWrapper);
}
List<String> stringList = new ArrayList<>();
if(annualCompList.size()>0)
{
if (annualCompList.size() > 0) {
for (AnnualComp annualComp : annualCompList) {
stringList.add(annualComp.getId());
}
@ -335,14 +341,14 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
Page<AnnualCompPoint> page = new Page<AnnualCompPoint>(pageNo, pageSize);
IPage<AnnualCompPoint> pageList = annualCompPointService.page(page, queryWrapper);
return Result.OK(pageList);
}else
{
} else {
return Result.OK(null);
}
}
/**
* 学生端列表
*
* @param annualCompPoint
* @param pageNo
* @param pageSize
@ -392,14 +398,16 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody AnnualCompPoint annualCompPoint) {
boolean isUpdate;
if(annualCompPoint.getAnnualCompState().equals("0") && annualCompPoint.getAnnualCompState().equals("4") ){
if (annualCompPoint.getAnnualCompState().equals("0") || annualCompPoint.getAnnualCompState().equals("4")) {
isUpdate = annualCompPointService.updateById(annualCompPoint);
} else {
//更新团队赛队员积分计算配置 add by zhc 8.22
iTeamSeqService.saveOrUpdate4TeamSeq(annualCompPoint);
} /*else {
return Result.error("当前状态不可修改");
}
if (!isUpdate){
return Result.error("编辑失败!");
}
}*/
return Result.OK("编辑成功!");
}
@ -418,7 +426,6 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
boolean isUpdate = annualCompPointService.updateById(annualCompPoint);
if (!isUpdate) {
return Result.error("编辑失败!");
} else {
@ -446,6 +453,7 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
}
return Result.OK("删除成功!");
}
/**
* 成绩汇总数据生成
*
@ -529,6 +537,7 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
}
return Result.OK("成功!");
}
/**
* 成绩汇总数据生成
*
@ -816,6 +825,7 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
return Result.OK("成功!");
}
/**
* 评奖数据生成
*
@ -1040,7 +1050,6 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
/**
* 导出excel模板
*
*/
//@RequiresPermissions("awardpersion:award_persion:exportXls")
@RequestMapping(value = "/exportXlsMb")
@ -1295,12 +1304,14 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
/**
* 2.3生成全局唯一报名编号
*
* @param type
* @return
*/
public String getEnrollCode(String type) {
String enrollCode = type;
String uuid = IdUtil.randomUUID().replaceAll("-","");;
String uuid = IdUtil.randomUUID().replaceAll("-", "");
;
enrollCode += uuid.substring(0, 16);
List<AnnualCompetitionProjectRegistration> list = annualCompetitionProjectRegistrationService.query().eq("enroll_code", enrollCode).list();
if (list == null || list.size() == 0)

@ -1,6 +1,7 @@
package org.jeecg.modules.demo.annualCompPoint.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
@ -10,6 +11,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
@ -268,4 +270,71 @@ public class AnnualCompPoint implements Serializable {
@Excel(name = "是否评奖", width = 15)
@ApiModelProperty(value = "是否评奖")
private Integer isPj;
/**
* 第1序号
*/
@ApiModelProperty(value = "第1序号")
@TableField(exist = false)
private Integer teamSeqFirst;
/**
* 第1序号比值
*/
@TableField(exist = false)
@ApiModelProperty(value = "第1序号比值")
private Integer teamSeqFirstVal;
/**
* 第2序号
*/
@TableField(exist = false)
@ApiModelProperty(value = "第1序号")
private Integer teamSeqSecond;
/**
* 第2序号比值
*/
@ApiModelProperty(value = "第2序号比值")
@TableField(exist = false)
private Integer teamSeqSecondVal;
/**
* 第3序号
*/
@ApiModelProperty(value = "第3序号")
@TableField(exist = false)
private Integer teamSeqThird;
/**
* 第3序号比值
*/
@ApiModelProperty(value = "第3序号比值")
@TableField(exist = false)
private Integer teamSeqThirdVal;
/**
* 第4序号
*/
@ApiModelProperty(value = "第4序号")
@TableField(exist = false)
private Integer teamSeqFourth;
/**
* 第4序号比值
*/
@ApiModelProperty(value = "第4序号比值")
@TableField(exist = false)
private Integer teamSeqFourthVal;
/**
* 第5序号
*/
@ApiModelProperty(value = "第5序号")
@TableField(exist = false)
private Integer teamSeqFifth;
/**
* 第5序号比值
*/
@ApiModelProperty(value = "第5序号比值")
@TableField(exist = false)
private Integer teamSeqFifthVal;
}

@ -4,6 +4,7 @@ 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;
@ -13,15 +14,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;
@ -54,6 +55,9 @@ public class AnnualCompPointServiceImpl extends ServiceImpl<AnnualCompPointMappe
@Autowired
private AnnualCompAwardMapper annualCompAwardMapper;
@Autowired
private ITeamSeqService teamSeqService;
/**
* 年度比赛项目 添加
*/
@ -264,9 +268,17 @@ 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();

@ -60,4 +60,9 @@ public class TeamManagement implements Serializable {
@Excel(name = "是否队长", width = 15, dicCode = "captain_code")
@ApiModelProperty(value = "是否队长")
private java.lang.String captain;
/**团队赛队员序号*/
@Excel(name = "团队赛队员序号", width = 2)
@ApiModelProperty(value = "团队赛队员序号")
private String teamSeq;
}

@ -0,0 +1,162 @@
package org.jeecg.modules.demo.teamseq.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import org.jeecg.modules.demo.teamseq.service.ITeamSeqService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
/**
* @Description: 团队赛队员积分计算配置
* @Author: jeecg-boot
* @Date: 2024-08-22
* @Version: V1.0
*/
@Api(tags = "团队赛队员积分计算配置")
@RestController
@RequestMapping("/teamSeq")
@Slf4j
public class TeamSeqController extends JeecgController<TeamSeq, ITeamSeqService> {
@Autowired
private ITeamSeqService teamSeqService;
/**
* 分页列表查询
*
* @param teamSeq
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "团队赛队员积分计算配置-分页列表查询")
@ApiOperation(value = "团队赛队员积分计算配置-分页列表查询", notes = "团队赛队员积分计算配置-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TeamSeq>> queryPageList(TeamSeq teamSeq,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TeamSeq> queryWrapper = QueryGenerator.initQueryWrapper(teamSeq, req.getParameterMap());
Page<TeamSeq> page = new Page<TeamSeq>(pageNo, pageSize);
IPage<TeamSeq> pageList = teamSeqService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param teamSeq
* @return
*/
@AutoLog(value = "团队赛队员积分计算配置-添加")
@ApiOperation(value = "团队赛队员积分计算配置-添加", notes = "团队赛队员积分计算配置-添加")
// @RequiresPermissions("teamseq:team_seq:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TeamSeq teamSeq) {
teamSeqService.save(teamSeq);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param teamSeq
* @return
*/
@AutoLog(value = "团队赛队员积分计算配置-编辑")
@ApiOperation(value = "团队赛队员积分计算配置-编辑", notes = "团队赛队员积分计算配置-编辑")
// @RequiresPermissions("teamseq:team_seq:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.POST})
public Result<String> edit(@RequestBody TeamSeq teamSeq) {
teamSeqService.updateById(teamSeq);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "团队赛队员积分计算配置-通过id删除")
@ApiOperation(value = "团队赛队员积分计算配置-通过id删除", notes = "团队赛队员积分计算配置-通过id删除")
// @RequiresPermissions("teamseq:team_seq:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
teamSeqService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "团队赛队员积分计算配置-批量删除")
@ApiOperation(value = "团队赛队员积分计算配置-批量删除", notes = "团队赛队员积分计算配置-批量删除")
// @RequiresPermissions("teamseq:team_seq:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.teamSeqService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "团队赛队员积分计算配置-通过id查询")
@ApiOperation(value = "团队赛队员积分计算配置-通过id查询", notes = "团队赛队员积分计算配置-通过id查询")
@GetMapping(value = "/queryById")
public Result<TeamSeq> queryById(@RequestParam(name = "id", required = true) String id) {
TeamSeq teamSeq = teamSeqService.getById(id);
if (teamSeq == null) {
return Result.error("未找到对应数据");
}
return Result.OK(teamSeq);
}
/**
* 导出excel
*
* @param request
* @param teamSeq
*/
@RequiresPermissions("teamseq:team_seq:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TeamSeq teamSeq) {
return super.exportXls(request, teamSeq, TeamSeq.class, "团队赛队员积分计算配置");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("teamseq:team_seq:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TeamSeq.class);
}
}

@ -0,0 +1,128 @@
package org.jeecg.modules.demo.teamseq.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 团队赛队员积分计算配置
* @Author: jeecg-boot
* @Date: 2024-08-22
* @Version: V1.0
*/
@Data
@TableName("team_seq")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "team_seq对象", description = "团队赛队员积分计算配置")
public class TeamSeq implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**
* 年度比赛项目id
*/
@Excel(name = "年度比赛项目id", width = 15)
@ApiModelProperty(value = "年度比赛项目id")
private String pointId;
/**
* 第1序号
*/
@Excel(name = "第1序号", width = 15)
@ApiModelProperty(value = "第1序号")
private Integer teamSeqFirst;
/**
* 第1序号比值
*/
@Excel(name = "第1序号比值", width = 15)
@ApiModelProperty(value = "第1序号比值")
private Integer teamSeqFirstVal;
/**
* 第2序号
*/
@ApiModelProperty(value = "第1序号")
private Integer teamSeqSecond;
/**
* 第2序号比值
*/
@ApiModelProperty(value = "第2序号比值")
private Integer teamSeqSecondVal;
/**
* 第3序号
*/
@ApiModelProperty(value = "第3序号")
private Integer teamSeqThird;
/**
* 第3序号比值
*/
@ApiModelProperty(value = "第3序号比值")
private Integer teamSeqThirdVal;
/**
* 第4序号
*/
@ApiModelProperty(value = "第4序号")
private Integer teamSeqFourth;
/**
* 第4序号比值
*/
@ApiModelProperty(value = "第4序号比值")
private Integer teamSeqFourthVal;
/**
* 第5序号
*/
@ApiModelProperty(value = "第5序号")
private Integer teamSeqFifth;
/**
* 第5序号比值
*/
@ApiModelProperty(value = "第5序号比值")
private Integer teamSeqFifthVal;
}

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.teamseq.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 团队赛队员积分计算配置
* @Author: jeecg-boot
* @Date: 2024-08-22
* @Version: V1.0
*/
public interface TeamSeqMapper extends BaseMapper<TeamSeq> {
}

@ -0,0 +1,16 @@
package org.jeecg.modules.demo.teamseq.service;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 团队赛队员积分计算配置
* @Author: jeecg-boot
* @Date: 2024-08-22
* @Version: V1.0
*/
public interface ITeamSeqService extends IService<TeamSeq> {
void saveOrUpdate4TeamSeq(AnnualCompPoint point);
}

@ -0,0 +1,31 @@
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 org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import org.jeecg.modules.demo.teamseq.mapper.TeamSeqMapper;
import org.jeecg.modules.demo.teamseq.service.ITeamSeqService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 团队赛队员积分计算配置
* @Author: jeecg-boot
* @Date: 2024-08-22
* @Version: V1.0
*/
@Service
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()));
TeamSeq teamSeq = new TeamSeq();
BeanUtils.copyProperties(point,teamSeq);
teamSeq.setId(null);
teamSeq.setPointId(point.getId());
this.save(teamSeq);
}
}

@ -155,7 +155,9 @@
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
registerModal.value.edit({...record,teamSeqFirst:1,teamSeqSecond: 2, teamSeqThird: 3,
teamSeqFourth: 4,
teamSeqFifth: 5,});
}
/**
* 项目赛程管理事件

@ -100,6 +100,81 @@
</a-col>
</a-row>
<a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12">
<a-form-item label="队伍第1编号" >
<a-input-number v-model:value="formData.teamSeqFirst" placeholder="请输入队伍第1编号" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="第1编号比值" v-bind="formData.teamSeqFirstVal">
<a-input-number v-model:value="formData.teamSeqFirstVal" placeholder="请输入第1编号比值"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12">
<a-form-item label="队伍第2编号" v-bind="formData.teamSeqSecond">
<a-input-number v-model:value="formData.teamSeqSecond" placeholder="请输入队伍第2编号" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="第2编号比值" v-bind="formData.teamSeqSecondVal">
<a-input-number v-model:value="formData.teamSeqSecondVal" placeholder="请输入第2编号比值"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12">
<a-form-item label="队伍第3编号" v-bind="formData.teamSeqThird">
<a-input-number v-model:value="formData.teamSeqThird" placeholder="请输入队伍第3编号" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="第3编号比值" v-bind="formData.teamSeqThirdVal">
<a-input-number v-model:value="formData.teamSeqThirdVal" placeholder="请输入第3编号比值"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12">
<a-form-item label="队伍第4编号" v-bind="formData.teamSeqFourth">
<a-input-number v-model:value="formData.teamSeqFourth" placeholder="请输入队伍第4编号" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="第4编号比值" v-bind="formData.teamSeqFourthVal">
<a-input-number v-model:value="formData.teamSeqFourthVal" placeholder="请输入第4编号比值"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12">
<a-form-item label="队伍第5编号" v-bind="formData.teamSeqFifth">
<a-input-number v-model:value="formData.teamSeqFifth" placeholder="请输入队伍第5编号" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="第5编号比值" v-bind="formData.teamSeqFifthVal">
<a-input-number v-model:value="formData.teamSeqFifthVal" placeholder="请输入第5编号比值"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="5">
@ -281,6 +356,16 @@ const formData = reactive<Record<string, any>>({
uploadEndTime: '',
scoreStartTime: '',
scoreEndTime: '',
teamSeqFirst: 1,
teamSeqSecond: 2,
teamSeqThird: 3,
teamSeqFourth: 4,
teamSeqFifth: 5,
teamSeqFifthVal: '',
teamSeqFourthVal: '',
teamSeqThirdVal: '',
teamSeqSecondVal: '',
teamSeqFirstVal: '',
});
const {createMessage} = useMessage();
const labelCol = ref<any>({xs: {span: 24}, sm: {span: 6}});

Loading…
Cancel
Save