| | |
| | | PatArchiveImport patArchiveImport = new PatArchiveImport(); |
| | | Row row = sheet.getRow(i); |
| | | //如果行为空,进行下一次循环 |
| | | if (ObjectUtils.isEmpty(row.getCell(0)) && ObjectUtils.isEmpty(row.getCell(1)) && ObjectUtils.isEmpty(row.getCell(2))) { |
| | | if (ObjectUtils.isEmpty(row.getCell(0)) && StringUtils.isNotEmpty(row.getCell(0) + "") && ObjectUtils.isEmpty(row.getCell(1)) && StringUtils.isNotEmpty(row.getCell(1) + "") && ObjectUtils.isEmpty(row.getCell(2)) && StringUtils.isNotEmpty(row.getCell(2) + "")) { |
| | | continue; |
| | | } |
| | | //判断数据是否有问题 |
| | | |
| | | |
| | | if (ObjectUtils.isNotEmpty(row.getCell(0))) { |
| | | if (ObjectUtils.isNotEmpty(row.getCell(0)) && StringUtils.isNotEmpty(row.getCell(0) + "")) { |
| | | patArchiveImport.setName(row.getCell(0).toString()); |
| | | } else { |
| | | continue; |
| | | } |
| | | if (ObjectUtils.isNotEmpty(row.getCell(1))) { |
| | | if (ObjectUtils.isNotEmpty(row.getCell(1)) && StringUtils.isNotEmpty(row.getCell(1) + "")) { |
| | | Cell cell = row.getCell(1); |
| | | if (row.getCell(1).toString().contains("X") || row.getCell(1).toString().contains("x")) { |
| | | patArchiveImport.setIdcardno(row.getCell(1).toString()); |
| | |
| | | if (contains) continue; |
| | | } |
| | | |
| | | if (ObjectUtils.isNotEmpty(row.getCell(2))) { |
| | | if (ObjectUtils.isNotEmpty(row.getCell(2)) && StringUtils.isNotEmpty(row.getCell(2) + "")) { |
| | | Cell cell = row.getCell(2); |
| | | double numericCellValue = cell.getNumericCellValue(); |
| | | DecimalFormat decimalFormat = new DecimalFormat("#"); |
| | | String formattedValue = decimalFormat.format(numericCellValue); |
| | | patArchiveImport.setTelcode(formattedValue); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(row.getCell(3))) { |
| | | if (ObjectUtils.isNotEmpty(row.getCell(3)) && StringUtils.isNotEmpty(row.getCell(3) + "")) { |
| | | patArchiveImport.setBatchName(row.getCell(3).toString()); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(row.getCell(4))) { |
| | | if (ObjectUtils.isNotEmpty(row.getCell(4)) && StringUtils.isNotEmpty(row.getCell(4) + "")) { |
| | | patArchiveImport.setPatientno(row.getCell(4).toString()); |
| | | } |
| | | |
| | | if (ObjectUtils.isNotEmpty(row.getCell(5))) { |
| | | if (ObjectUtils.isNotEmpty(row.getCell(5)) && StringUtils.isNotEmpty(row.getCell(5) + "")) { |
| | | patArchiveImport.setPattype(row.getCell(5).toString()); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(row.getCell(6))) { |
| | | if (ObjectUtils.isNotEmpty(row.getCell(6)) && StringUtils.isNotEmpty(row.getCell(6) + "")) { |
| | | patArchiveImport.setSex(Long.valueOf(row.getCell(6).toString())); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(row.getCell(7))) { |
| | | if (ObjectUtils.isNotEmpty(row.getCell(7)) && StringUtils.isNotEmpty(row.getCell(7) + "")) { |
| | | patArchiveImport.setAge(Long.valueOf(row.getCell(7).toString())); |
| | | } |
| | | |