|
@@ -16,7 +16,7 @@ public class IssueWordUtil {
|
|
|
|
|
|
public static List<IssueWord> importIssueWord(Long subjectId, byte[] data) throws Exception {
|
|
|
XSSFWorkbook book = new XSSFWorkbook(new ByteArrayInputStream(data));
|
|
|
- XSSFSheet sheet = book.getSheet("Sheet1");
|
|
|
+ XSSFSheet sheet = book.getSheet("词汇列表");
|
|
|
List<IssueWord> result = new ArrayList<>();
|
|
|
|
|
|
|
|
@@ -26,12 +26,13 @@ public class IssueWordUtil {
|
|
|
XSSFRow row = sheet.getRow(i);
|
|
|
|
|
|
String code = row.getCell(0).getStringCellValue();
|
|
|
- String chapterCode = row.getCell(1).getStringCellValue();
|
|
|
+ System.out.println("i=" + i + ",code=" + code);
|
|
|
+ String chapterCode = String.valueOf((int) row.getCell(1).getNumericCellValue());
|
|
|
String content = row.getCell(2).getStringCellValue();
|
|
|
- String central = row.getCell(3).getStringCellValue();
|
|
|
- String concept = row.getCell(4).getStringCellValue();
|
|
|
- String tool = row.getCell(5).getStringCellValue();
|
|
|
- String model = row.getCell(6).getStringCellValue();
|
|
|
+ String central = row.getCell(3).getRawValue();
|
|
|
+ String concept = row.getCell(4).getRawValue();
|
|
|
+ String tool = row.getCell(5).getRawValue();
|
|
|
+ String model = row.getCell(6).getRawValue();
|
|
|
IssueWord word = new IssueWord();
|
|
|
word.setSubjectId(subjectId);
|
|
|
|
|
@@ -64,7 +65,7 @@ public class IssueWordUtil {
|
|
|
for (int i = 1; i < sheet.getLastRowNum(); i++) {
|
|
|
XSSFRow row = sheet.getRow(i);
|
|
|
String grade = row.getCell(0).getStringCellValue();
|
|
|
- String code = row.getCell(1).getStringCellValue();
|
|
|
+ String code = String.valueOf((int) row.getCell(1).getNumericCellValue());
|
|
|
String index = row.getCell(2).getStringCellValue();
|
|
|
String content = row.getCell(3).getStringCellValue();
|
|
|
IssueChapter chapter = new IssueChapter();
|