|
|
@ -113,7 +113,7 @@ public class ImportService implements IImportService{ |
|
|
|
groupMap.put(competeGroup.getGroupName(),competeGroup); |
|
|
|
} |
|
|
|
} |
|
|
|
for (int i = 1; i < sheet.getLastRowNum(); i++) { |
|
|
|
for (int i = 1; i <= sheet.getLastRowNum(); i++) { |
|
|
|
//参赛单位
|
|
|
|
String companyCell = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(sheet.getRow(i).getCell(0))); |
|
|
|
//参赛项目
|
|
|
@ -150,6 +150,8 @@ public class ImportService implements IImportService{ |
|
|
|
BeanUtil.copyProperties(competeCoach,newCoach); |
|
|
|
newCoach.setId(snowflake.nextId()); |
|
|
|
newCoach.setCompanyId(newCompany.getId()); |
|
|
|
newCoach.setCreatedAt(null); |
|
|
|
newCoach.setUpdatedAt(null); |
|
|
|
coachMapper.insertSelective(newCoach); |
|
|
|
} |
|
|
|
} |
|
|
@ -200,8 +202,13 @@ public class ImportService implements IImportService{ |
|
|
|
|
|
|
|
CompeteProject project = projectMap.get(projectCell); |
|
|
|
if (ObjectUtil.isNotNull(project)){ |
|
|
|
if(i == 276 || i == 277 || i == 207){ |
|
|
|
System.out.println(playerCell); |
|
|
|
} |
|
|
|
log.info("第{}行",i); |
|
|
|
//个人项目
|
|
|
|
if (0 == project.getTeam()){ |
|
|
|
|
|
|
|
CompeteProjectPlayer projectPlayer = new CompeteProjectPlayer(); |
|
|
|
projectPlayer.setId(snowflake.nextId()); |
|
|
|
projectPlayer.setPlayerId(playerMap.get(playerCell).getId()); |
|
|
@ -212,7 +219,7 @@ public class ImportService implements IImportService{ |
|
|
|
} |
|
|
|
//团队项目
|
|
|
|
if (1 == project.getTeam()){ |
|
|
|
if (groupCell.contains("男子") || groupCell.contains("女子")){ |
|
|
|
if (groupCell.contains("男子") || groupCell.contains("女子") || groupCell.contains("混合")){ |
|
|
|
CompeteTeam newTeam = new CompeteTeam(); |
|
|
|
newTeam.setId(snowflake.nextId()); |
|
|
|
newTeam.setProjectId(projectMap.get(projectCell).getId()); |
|
|
|