zqy
2024-09-23 b255f2a8bb78bb5197c8b839853682203c8a1ddc
修改导入判断
3个文件已修改
10 ■■■■ 已修改文件
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
            }
        }
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("导入数据成功");
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("导入数据成功");
    }