From 41b60f3df5f3054aad44307c13a26b14f3b32ac0 Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期二, 21 十一月 2023 09:46:03 +0800
Subject: [PATCH] 11.21

---
 cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java |   53 ++++++++++++++++++++++++++++-------------------------
 1 files changed, 28 insertions(+), 25 deletions(-)

diff --git a/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java b/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java
index 051c02a..2d1d64e 100644
--- a/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java
+++ b/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java
@@ -102,31 +102,6 @@
         //利用HashMap去重身份证
         LinkedHashMap<String,ParticipantVo> linkedHashMap =new LinkedHashMap<>();
         SimpleDateFormat sdf_year = new SimpleDateFormat("yyyy");
-        for (TStudent tStudent : tStudents) {
-            ParticipantVo participantVo = new ParticipantVo();
-            participantVo.setId(tStudent.getId());
-            participantVo.setName(tStudent.getName());
-            participantVo.setIdcard(tStudent.getIdCard());
-            Integer age = Integer.valueOf(sdf_year.format(new Date())) - Integer.valueOf(sdf_year.format(tStudent.getBirthday()));
-            participantVo.setAge(age);
-            Integer integer = coursePackagePaymentClient.queryResidueClassHour(tStudent.getId());
-            participantVo.setResidueClassHour(integer);
-            participantVo.setPhone(tStudent.getPhone());
-            participantVo.setHeight(tStudent.getHeight().intValue());
-            participantVo.setWeight(tStudent.getWeight());
-            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-            if(null != tStudent.getBirthday()){
-                String format = sdf.format(tStudent.getBirthday());
-                participantVo.setBirthday(format);
-            }
-            participantVo.setGender(tStudent.getSex());
-            participantVo.setIsStudent(1);
-            if (tStudent.getIdCard()==null|| tStudent.getIdCard().isEmpty()){
-                listVo1.add(participantVo);
-                continue;
-            }
-            linkedHashMap.put(tStudent.getIdCard(),participantVo);
-        }
 
 
 
@@ -172,6 +147,34 @@
 
         }
 
+        for (TStudent tStudent : tStudents) {
+            ParticipantVo participantVo = new ParticipantVo();
+            participantVo.setId(tStudent.getId());
+            participantVo.setName(tStudent.getName());
+            participantVo.setIdcard(tStudent.getIdCard());
+            Integer age = Integer.valueOf(sdf_year.format(new Date())) - Integer.valueOf(sdf_year.format(tStudent.getBirthday()));
+            participantVo.setAge(age);
+            Integer integer = coursePackagePaymentClient.queryResidueClassHour(tStudent.getId());
+            participantVo.setResidueClassHour(integer);
+            participantVo.setPhone(tStudent.getPhone());
+            participantVo.setHeight(tStudent.getHeight().intValue());
+            participantVo.setWeight(tStudent.getWeight());
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            if(null != tStudent.getBirthday()){
+                String format = sdf.format(tStudent.getBirthday());
+                participantVo.setBirthday(format);
+            }
+            participantVo.setGender(tStudent.getSex());
+            participantVo.setIsStudent(1);
+            if (tStudent.getIdCard()==null|| tStudent.getIdCard().isEmpty()){
+                listVo1.add(participantVo);
+                continue;
+            }
+            linkedHashMap.put(tStudent.getIdCard(),participantVo);
+        }
+
+
+
         listVo1.addAll(linkedHashMap.values());
 
 

--
Gitblit v1.7.1