Bladeren bron

feat(game-event): 扩展赛事项目实体字段

- 删除了 JsonFormat 注解依赖
- 移除了 ExcelProperty 注解相关配置
- 在 GameEventProject 中新增计时格式、距离模式、计数单位、成绩数量字段
- 在 GameEventProjectBo 中新增计时格式、距离模式、计数单位、成绩数量字段
- 在 GameEventProjectVo 中新增参赛性别、参赛组别、比赛阶段、比赛轮次、成绩类型、排名方式字段
- 在 GameEventProjectVo 中将比赛轮次和比赛阶段改为录取名次和积分分值
- 在 GameEventProjectVo 中新增实时统计数据字段包括参赛人数、代表队数、分组数
- 在 GameEventProjectVo 中调整了多个字段的 ExcelProperty 配置
- 移除了部分不再使用的字段映射关系
zhou 1 week geleden
bovenliggende
commit
1074804e83

+ 20 - 1
ruoyi-modules/ruoyi-game-event/src/main/java/org/dromara/system/domain/GameEventProject.java

@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.annotation.*;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
 
 import java.io.Serial;
 
@@ -99,6 +98,26 @@ public class GameEventProject extends TenantEntity {
      */
     private String scoreRule;
 
+    /**
+     * 计时格式
+     */
+    private String timingFormat;
+
+    /**
+     * 距离模式
+     */
+    private String distanceMode;
+
+    /**
+     * 计数单位
+     */
+    private String countUnit;
+
+    /**
+     * 成绩数量
+     */
+    private Integer scoreCount;
+
     /**
      * 积分分值
      */

+ 20 - 2
ruoyi-modules/ruoyi-game-event/src/main/java/org/dromara/system/domain/bo/GameEventProjectBo.java

@@ -1,6 +1,5 @@
 package org.dromara.system.domain.bo;
 
-import cn.idev.excel.annotation.ExcelProperty;
 import org.dromara.system.domain.GameEventProject;
 import org.dromara.common.mybatis.core.domain.BaseEntity;
 import org.dromara.common.core.validate.AddGroup;
@@ -13,7 +12,6 @@ import jakarta.validation.constraints.*;
 import java.util.Date;
 import java.util.List;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 
 /**
  * 赛事项目业务对象 game_event_project
@@ -121,6 +119,26 @@ public class GameEventProjectBo extends BaseEntity {
      */
     private String scoreRule;
 
+    /**
+     * 计时格式
+     */
+    private String timingFormat;
+
+    /**
+     * 距离模式
+     */
+    private String distanceMode;
+
+    /**
+     * 计数单位
+     */
+    private String countUnit;
+
+    /**
+     * 成绩数量
+     */
+    private Integer scoreCount;
+
     /**
      * 积分分值
      */

+ 80 - 56
ruoyi-modules/ruoyi-game-event/src/main/java/org/dromara/system/domain/vo/GameEventProjectVo.java

@@ -3,9 +3,7 @@ package org.dromara.system.domain.vo;
 import java.util.Date;
 
 import cn.idev.excel.annotation.format.DateTimeFormat;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import org.dromara.system.domain.GameEventProject;
-import org.dromara.system.domain.bo.GameEventProjectBo;
 import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
 import cn.idev.excel.annotation.ExcelProperty;
 import org.dromara.common.excel.annotation.ExcelDictFormat;
@@ -15,7 +13,6 @@ import lombok.Data;
 
 import java.io.Serial;
 import java.io.Serializable;
-import java.util.Date;
 import java.util.List;
 
 
@@ -87,6 +84,47 @@ public class GameEventProjectVo implements Serializable {
     @ExcelProperty(value = "比赛场地")
     private String location;
 
+    /**
+     * 参赛性别
+     */
+    @ExcelProperty(value = "参赛性别", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "sys_group_sex")
+    private String gender;
+
+    /**
+     * 参赛组别
+     */
+//    @ExcelProperty(value = "参赛组别")
+    private String groups;
+
+    /**
+     * 比赛阶段
+     */
+    @ExcelProperty(value = "比赛阶段", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "game_stage")
+    private String gameStage;
+
+    /**
+     * 比赛轮次
+     */
+    @ExcelProperty(value = "比赛轮次", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "game_round")
+    private String gameRound;
+
+    /**
+     * 成绩类型
+     */
+    @ExcelProperty(value = "成绩类型", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "game_score_type")
+    private String scoreRule;
+
+    /**
+     * 排名方式
+     */
+    @ExcelProperty(value = "排名方式", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "game_order_type")
+    private String orderType;
+
     /**
      * 开始时间
      */
@@ -102,18 +140,34 @@ public class GameEventProjectVo implements Serializable {
     private Date endTime;
 
     /**
-     * 比赛轮
+     * 录取名
      */
-    @ExcelProperty(value = "比赛轮次", converter = ExcelDictConvert.class)
-    @ExcelDictFormat(dictType = "game_round")
-    private String gameRound;
+    @ExcelProperty(value = "录取名次")
+    private String roundType;
 
     /**
-     * 比赛阶段
+     * 积分分值
      */
-    @ExcelProperty(value = "比赛阶段", converter = ExcelDictConvert.class)
-    @ExcelDictFormat(dictType = "game_stage")
-    private String gameStage;
+    @ExcelProperty(value = "积分分值")
+    private String scoreValue;
+
+    /**
+     * 实时统计:参赛人数
+     */
+    @ExcelProperty(value = "参赛人数")
+    private Long athleteCount;
+
+    /**
+     * 实时统计:代表队数
+     */
+    @ExcelProperty(value = "代表队数")
+    private Long teamCount;
+
+    /**
+     * 实时统计:分组数
+     */
+    @ExcelProperty(value = "分组数")
+    private Long groupCount;
 
     /**
      * 更新时间
@@ -125,7 +179,7 @@ public class GameEventProjectVo implements Serializable {
     /**
      * 项目限报人数
      */
-    @ExcelProperty(value = "项目限报人数")
+//    @ExcelProperty(value = "项目限报人数")
     private Integer limitPerson;
 
     /**
@@ -141,30 +195,28 @@ public class GameEventProjectVo implements Serializable {
     private Long participateNum;
 
     /**
-     * 录取名次
+     * 计时格式
      */
-    @ExcelProperty(value = "录取名次")
-    private String roundType;
+//    @ExcelProperty(value = "计时格式")
+    private String timingFormat;
 
     /**
-     * 排序方
+     * 距离模
      */
-    @ExcelProperty(value = "排序方式", converter = ExcelDictConvert.class)
-    @ExcelDictFormat(readConverterExp = "0=升序,1=降序")
-    private String orderType;
+//    @ExcelProperty(value = "距离模式")
+    private String distanceMode;
 
     /**
-     * 计算规则
+     * 计数单位
      */
-    @ExcelProperty(value = "计算规则", converter = ExcelDictConvert.class)
-    @ExcelDictFormat(dictType = "game_score_type")
-    private String scoreRule;
+//    @ExcelProperty(value = "计数单位")
+    private String countUnit;
 
     /**
-     * 积分分值
+     * 成绩数量
      */
-    @ExcelProperty(value = "积分分值")
-    private String scoreValue;
+//    @ExcelProperty(value = "成绩数量")
+    private Integer scoreCount;
 
     /**
      * 奖项
@@ -175,29 +227,16 @@ public class GameEventProjectVo implements Serializable {
     /**
      * 状态(0正常 1停用)
      */
-    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
+//    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
     @ExcelDictFormat(dictType = "game_event_status")
     private String status;
 
     /**
      * 备注
      */
-    @ExcelProperty(value = "备注")
+//    @ExcelProperty(value = "备注")
     private String remark;
 
-    /**
-     * 参赛性别
-     */
-    @ExcelProperty(value = "参赛性别", converter = ExcelDictConvert.class)
-    @ExcelDictFormat(dictType = "sys_user_sex")
-    private String gender;
-
-    /**
-     * 参赛组别
-     */
-    @ExcelProperty(value = "参赛组别")
-    private String groups;
-
     /**
      * 参赛总人/队数
      */
@@ -213,19 +252,4 @@ public class GameEventProjectVo implements Serializable {
      */
     private Integer incompleteParticipants;
 
-    /**
-     * 实时统计:参赛人数
-     */
-    private Long athleteCount;
-
-    /**
-     * 实时统计:代表队数
-     */
-    private Long teamCount;
-
-    /**
-     * 实时统计:分组数
-     */
-    private Long groupCount;
-
 }