Browse Source

feat(game): 修改运动员身份标识字段为编号

- 将PhysicalDeviceVo中注释"学号-映射运动员身份证号"修改为"学号-映射运动员编号"
- 在PhysicalTestServiceImpl中将查询条件由idCard改为athleteCode
- 更新创建新运动员时设置的字段从idCard改为athleteCode
- 调整stuNo映射关系从idCard改为athleteCode
zhou 2 weeks ago
parent
commit
1baa96aea8

+ 1 - 1
ruoyi-modules/ruoyi-game-event/src/main/java/org/dromara/system/domain/vo/app/PhysicalDeviceVo.java

@@ -15,7 +15,7 @@ public class PhysicalDeviceVo{
 
     @Data
     public static class Record{
-        //学号-映射运动员身份证
+        //学号-映射运动员
         private String stuNo;
         //学生姓名--运动员姓名
         private String name;

+ 4 - 4
ruoyi-modules/ruoyi-game-event/src/main/java/org/dromara/system/service/impl/app/PhysicalTestServiceImpl.java

@@ -154,7 +154,7 @@ public class PhysicalTestServiceImpl implements IPhysicalTestService {
         // 根据身份证号查找运动员
         LambdaQueryWrapper<GameAthlete> athleteWrapper = Wrappers.lambdaQuery(GameAthlete.class)
             .eq(GameAthlete::getEventId, eventId)
-            .eq(GameAthlete::getIdCard, result.getUserId())
+            .eq(GameAthlete::getAthleteCode, result.getUserId())
             .eq(GameAthlete::getDelFlag, "0");
 
         GameAthlete existingAthlete = athleteMapper.selectOne(athleteWrapper);
@@ -174,7 +174,7 @@ public class PhysicalTestServiceImpl implements IPhysicalTestService {
             log.info("创建新运动员: name={}, idCard={}", result.getName(), result.getUserId());
             GameAthleteBo newAthlete = new GameAthleteBo();
             newAthlete.setEventId(eventId);
-            newAthlete.setIdCard(result.getUserId());
+            newAthlete.setAthleteCode(result.getUserId());
             newAthlete.setName(result.getName());
             // 初始化项目列表并添加项目ID
             newAthlete.setProjectList(new ArrayList<>());
@@ -270,7 +270,7 @@ public class PhysicalTestServiceImpl implements IPhysicalTestService {
         // 根据stuNo作为身份证号查找运动员
         LambdaQueryWrapper<GameAthlete> athleteWrapper = Wrappers.lambdaQuery(GameAthlete.class)
             .eq(GameAthlete::getEventId, eventId)
-            .eq(GameAthlete::getIdCard, record.getStuNo())
+            .eq(GameAthlete::getAthleteCode, record.getStuNo())
             .eq(GameAthlete::getDelFlag, "0");
 
         GameAthlete existingAthlete = athleteMapper.selectOne(athleteWrapper);
@@ -290,7 +290,7 @@ public class PhysicalTestServiceImpl implements IPhysicalTestService {
             log.info("创建新运动员: name={}, stuNo={}", record.getName(), record.getStuNo());
             GameAthleteBo newAthlete = new GameAthleteBo();
             newAthlete.setEventId(eventId);
-            newAthlete.setIdCard(record.getStuNo()); // stuNo映射到IdCard
+            newAthlete.setAthleteCode(record.getStuNo()); // stuNo映射到编号
             newAthlete.setName(record.getName()); // name映射到name
             // 初始化项目列表并添加项目ID
             newAthlete.setProjectList(new ArrayList<>());