解决用人单位问卷,同时上传多个的原因

This commit is contained in:
2025-09-16 16:36:12 +08:00
parent 4aeb96339c
commit 0fa07d8907

View File

@@ -130,7 +130,7 @@ public class DwQuestionServiceImpl implements IDwQuestionService
//第一个调查问卷问题 //第一个调查问卷问题
Row row = sheet.getRow(i); Row row = sheet.getRow(i);
Cell idCell = row.getCell(0); Cell idCell = row.getCell(0);
String dateTime = row.getCell(6).getStringCellValue(); String dateTime = row.getCell(4).getStringCellValue();
Date answerDate = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, dateTime); Date answerDate = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, dateTime);
String id = ""; String id = "";
if (idCell != null) { if (idCell != null) {
@@ -928,6 +928,7 @@ public class DwQuestionServiceImpl implements IDwQuestionService
+","+cell129.getStringCellValue() +","+cell130.getStringCellValue() ); +","+cell129.getStringCellValue() +","+cell130.getStringCellValue() );
answer37.setInfoId(dwInfo.getId()); answer37.setInfoId(dwInfo.getId());
answer37.setQuestionId(37L); answer37.setQuestionId(37L);
answer37.setCreateTime(answerDate);
answers.add(answer37); answers.add(answer37);
Cell cell132 = row.getCell(132); Cell cell132 = row.getCell(132);
if (cell132 != null && StringUtils.isNotEmpty(cell132.getStringCellValue())){ if (cell132 != null && StringUtils.isNotEmpty(cell132.getStringCellValue())){
@@ -1276,6 +1277,7 @@ public class DwQuestionServiceImpl implements IDwQuestionService
+ "," +cell53.getStringCellValue()); + "," +cell53.getStringCellValue());
answer17.setInfoId(dwInfo.getId()); answer17.setInfoId(dwInfo.getId());
answer17.setQuestionId(58L); answer17.setQuestionId(58L);
answer17.setCreateTime(answerDate);
answers.add(answer17); answers.add(answer17);
Cell cell55 = row.getCell(55); Cell cell55 = row.getCell(55);
if (cell55 != null && StringUtils.isNotEmpty(cell55.getStringCellValue())) { if (cell55 != null && StringUtils.isNotEmpty(cell55.getStringCellValue())) {
@@ -1972,6 +1974,7 @@ public class DwQuestionServiceImpl implements IDwQuestionService
} }
Cell cell20 = row.getCell(20); Cell cell20 = row.getCell(20);
if (cell20 != null && StringUtils.isNotEmpty(cell20.getStringCellValue())){ if (cell20 != null && StringUtils.isNotEmpty(cell20.getStringCellValue())){
if (cell19 != null && !cell19.getStringCellValue().equals(cell20.getStringCellValue())){
DwAnswer answer42 = new DwAnswer(); DwAnswer answer42 = new DwAnswer();
answer42.setAnswer(cell20.getStringCellValue()); answer42.setAnswer(cell20.getStringCellValue());
answer42.setInfoId(dwInfo.getId()); answer42.setInfoId(dwInfo.getId());
@@ -1979,8 +1982,10 @@ public class DwQuestionServiceImpl implements IDwQuestionService
answer42.setCreateTime(answerDate); answer42.setCreateTime(answerDate);
answers.add(answer42); answers.add(answer42);
} }
}
Cell cell21 = row.getCell(21); Cell cell21 = row.getCell(21);
if (cell21 != null && StringUtils.isNotEmpty(cell21.getStringCellValue())){ if (cell21 != null && StringUtils.isNotEmpty(cell21.getStringCellValue())){
if (cell19 != null && !cell19.getStringCellValue().equals(cell21.getStringCellValue())) {
DwAnswer answer43 = new DwAnswer(); DwAnswer answer43 = new DwAnswer();
answer43.setAnswer(cell21.getStringCellValue()); answer43.setAnswer(cell21.getStringCellValue());
answer43.setInfoId(dwInfo.getId()); answer43.setInfoId(dwInfo.getId());
@@ -1988,8 +1993,10 @@ public class DwQuestionServiceImpl implements IDwQuestionService
answer43.setCreateTime(answerDate); answer43.setCreateTime(answerDate);
answers.add(answer43); answers.add(answer43);
} }
}
Cell cell22 = row.getCell(22); Cell cell22 = row.getCell(22);
if (cell22 != null && StringUtils.isNotEmpty(cell22.getStringCellValue())) { if (cell22 != null && StringUtils.isNotEmpty(cell22.getStringCellValue())) {
if (cell19 != null && !cell19.getStringCellValue().equals(cell22.getStringCellValue())) {
DwAnswer answer44 = new DwAnswer(); DwAnswer answer44 = new DwAnswer();
answer44.setAnswer(cell22.getStringCellValue()); answer44.setAnswer(cell22.getStringCellValue());
answer44.setInfoId(dwInfo.getId()); answer44.setInfoId(dwInfo.getId());
@@ -1997,6 +2004,7 @@ public class DwQuestionServiceImpl implements IDwQuestionService
answer44.setCreateTime(answerDate); answer44.setCreateTime(answerDate);
answers.add(answer44); answers.add(answer44);
} }
}
Cell cell24 = row.getCell(24); Cell cell24 = row.getCell(24);
if (cell24 != null && StringUtils.isNotEmpty(cell24.getStringCellValue())){ if (cell24 != null && StringUtils.isNotEmpty(cell24.getStringCellValue())){
DwAnswer answer201 = new DwAnswer(); DwAnswer answer201 = new DwAnswer();