From c8dc6aaff54718beddec16c88422aae9625df472 Mon Sep 17 00:00:00 2001 From: sunyugang Date: Wed, 24 Sep 2025 08:36:20 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dw/controller/XyCheckController.java | 1 + .../service/impl/DwQuestionServiceImpl.java | 30 +++++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/XyCheckController.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/XyCheckController.java index 9900663..cb97247 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/XyCheckController.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/XyCheckController.java @@ -7,6 +7,7 @@ import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.dw.domain.CheckQuery; +import com.ruoyi.dw.domain.CjOption; import com.ruoyi.dw.domain.DataCheckStatus; import com.ruoyi.dw.domain.vo.*; import com.ruoyi.dw.mapper.DataCheckMapper; diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/DwQuestionServiceImpl.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/DwQuestionServiceImpl.java index 11d31c3..cb0723c 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/DwQuestionServiceImpl.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/DwQuestionServiceImpl.java @@ -147,8 +147,10 @@ public class DwQuestionServiceImpl implements IDwQuestionService default: id = ""; } + }else { + break; } - if (redisCache.hasKey(id)){ + if (redisCache.hasKey(id)){ continue; } if (dwInfo.getId().intValue() == 1) { @@ -183,11 +185,13 @@ public class DwQuestionServiceImpl implements IDwQuestionService answers.add(answer2); DwAnswer answer3 = new DwAnswer(); Cell cell19 = row.getCell(19); - answer3.setAnswer(cell19.getStringCellValue()); - answer3.setInfoId(dwInfo.getId()); - answer3.setQuestionId(3L); - answer3.setCreateTime(answerDate); - answers.add(answer3); + if (cell19 != null && StringUtils.isNotEmpty(cell19.getStringCellValue())){ + answer3.setAnswer(cell19.getStringCellValue()); + answer3.setInfoId(dwInfo.getId()); + answer3.setQuestionId(3L); + answer3.setCreateTime(answerDate); + answers.add(answer3); + } DwAnswer answer4 = new DwAnswer(); Cell cell20 = row.getCell(20); answer4.setAnswer(cell20.getStringCellValue()); @@ -1045,13 +1049,15 @@ public class DwQuestionServiceImpl implements IDwQuestionService answer1.setQuestionId(42L); answer1.setCreateTime(answerDate); answers.add(answer1); - DwAnswer answer2 = new DwAnswer(); Cell cell19 = row.getCell(19); - answer2.setAnswer(cell19.getStringCellValue()); - answer2.setInfoId(dwInfo.getId()); - answer2.setQuestionId(43L); - answer2.setCreateTime(answerDate); - answers.add(answer2); + if (cell19 != null && StringUtils.isNotEmpty(cell19.getStringCellValue())){ + DwAnswer answer2 = new DwAnswer(); + answer2.setAnswer(cell19.getStringCellValue()); + answer2.setInfoId(dwInfo.getId()); + answer2.setQuestionId(43L); + answer2.setCreateTime(answerDate); + answers.add(answer2); + } DwAnswer answer3 = new DwAnswer(); Cell cell20 = row.getCell(20); Cell cell21 = row.getCell(21);