| | |
| | | import com.dsh.competition.model.ParticipantVo; |
| | | import com.dsh.competition.model.SaveParticipant; |
| | | import com.dsh.competition.service.IParticipantService; |
| | | import com.dsh.competition.util.CodeGenerateUtils; |
| | | import com.dsh.competition.util.JuHeUtil; |
| | | import com.dsh.competition.util.ResultUtil; |
| | | import com.dsh.competition.util.ToolUtil; |
| | |
| | | Date parse = sdf.parse(addParticipant.getBirthday()); |
| | | participant.setBirthday(parse); |
| | | } |
| | | String s = CodeGenerateUtils.generateOrderSn(); |
| | | String substring = s.substring(1); |
| | | participant.setId(Integer.valueOf(substring)); |
| | | participant.setAppUserId(uid); |
| | | participant.setState(1); |
| | | participant.setInsertTime(new Date()); |
| | |
| | | public List<ParticipantVo> queryParticipantList(Integer uid) throws Exception { |
| | | //拿到学员列表 |
| | | List<TStudent> tStudents = studentClient.queryStudentList(uid); |
| | | |
| | | List<ParticipantVo> listVo1 = new ArrayList<>(); |
| | | |
| | | //利用HashMap去重身份证 |
| | | LinkedHashMap<String,ParticipantVo> linkedHashMap =new LinkedHashMap<>(); |
| | | SimpleDateFormat sdf_year = new SimpleDateFormat("yyyy"); |
| | |
| | | } |
| | | participantVo.setGender(tStudent.getSex()); |
| | | participantVo.setIsStudent(1); |
| | | if (tStudent.getIdCard()==null|| tStudent.getIdCard().isEmpty()){ |
| | | listVo1.add(participantVo); |
| | | continue; |
| | | } |
| | | linkedHashMap.put(tStudent.getIdCard(),participantVo); |
| | | } |
| | | |
| | |
| | | participantVo.setBirthday(format); |
| | | } |
| | | participantVo.setGender(participant.getGender()); |
| | | |
| | | if (participant.getIdcard()==null|| participant.getIdcard().isEmpty()){ |
| | | listVo1.add(participantVo); |
| | | continue; |
| | | } |
| | | linkedHashMap.put(participant.getIdcard(),participantVo); |
| | | listVo.add(participantVo); |
| | | // listVo.add(participantVo); |
| | | |
| | | } |
| | | |
| | | listVo1.addAll(linkedHashMap.values()); |
| | | |
| | | |
| | | |
| | | List<ParticipantVo> listVo1 = new ArrayList<>(linkedHashMap.values()); |
| | | // List<ParticipantVo> listVo1 = new ArrayList<>(linkedHashMap.values()); |
| | | |
| | | |
| | | return listVo1; |
| | |
| | | public Page<CompetitionUser> getPeopleFromId(Page<UserCompetition> participantPage, Integer id, Integer state) { |
| | | return this.baseMapper.getPeopleFromId(participantPage,id,state); |
| | | } |
| | | |
| | | @Override |
| | | public List<CompetitionUser> getPeoples(Integer id, Integer state) { |
| | | return this.baseMapper.getPeoples(id,state); |
| | | } |
| | | } |