From b255f2a8bb78bb5197c8b839853682203c8a1ddc Mon Sep 17 00:00:00 2001 From: zqy <2522236926@qq.com> Date: 星期一, 23 九月 2024 22:20:10 +0800 Subject: [PATCH] 修改导入判断 --- ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java | 4 +++- zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java | 2 -- zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index 37ea80f..81c0188 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -1576,8 +1576,10 @@ for (int i = row.getFirstCellNum(); i < row.getLastCellNum(); i++) { Cell cell = row.getCell(i); - if (cell != null && cell.getCellType() != CellType.BLANK) +// System.out.println("11111111111111:/"+(cell != null)+"\n2222222222:/"+cell+"\n333333:/"+String.valueOf(cell).length()); + if (cell != null && cell.getCellType() != CellType.BLANK && !cell.toString().equals("")) { +// System.out.println("444444+/"+(cell.getCellType())); return false; } } diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java index ec47aab..429131d 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java @@ -450,9 +450,7 @@ log.info("鏁版嵁鍒楄〃涓猴細{}", dataList); for (ZfContact zfContact : dataList) { - if (zfContact.getNickName().length() != 0 && zfContact.getName().length() != 0 && zfContact.getMyName().length() != 0 ) { zfContactService.addData(zfContact); - } } return AjaxResult.success("瀵煎叆鏁版嵁鎴愬姛"); diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java index 3367b37..b55db11 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java @@ -158,7 +158,7 @@ for (ZfDoctor zfDoctor : dataList) { - if (zfDoctor.getSuitable().length() != 0 || zfDoctor.getType().length() != 0 || zfDoctor.getEffect().length() != 0 ) { +// if (zfDoctor.getSuitable().length() != 0 || zfDoctor.getType().length() != 0 || zfDoctor.getEffect().length() != 0 ) { if(zfDoctor.getSymptom().length() == 0 || zfDoctor.getSymptom() == null){ throw new RuntimeException("鐥囩姸涓虹┖锛屽鍏ユ暟鎹け璐�"); } @@ -166,7 +166,7 @@ zfDoctorService.addData(zfDoctor); } } - } +// } return AjaxResult.success("瀵煎叆鏁版嵁鎴愬姛"); } -- Gitblit v1.9.1