src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java | ●●●●● 패치 | 보기 | raw | blame | 히스토리 | |
src/main/java/kr/wisestone/owl/util/CommonUtil.java | ●●●●● 패치 | 보기 | raw | blame | 히스토리 | |
src/main/java/kr/wisestone/owl/util/DateUtil.java | ●●●●● 패치 | 보기 | raw | blame | 히스토리 |
src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java
@@ -3471,8 +3471,13 @@ */ private Boolean cellNullCheck (Cell cell) { if (cell != null ) { if (cell.getCellType() != Cell.CELL_TYPE_BLANK) { if (cell.getCellType() == Cell.CELL_TYPE_STRING && cell.getStringCellValue() != null) { int cellType = cell.getCellType(); if (cellType < Cell.CELL_TYPE_BLANK) { if (cellType == Cell.CELL_TYPE_STRING) { if (cell.getStringCellValue() != null) return false; } else { return false; } } @@ -3499,6 +3504,7 @@ boolean isNull = cellNullCheck(cell); String cellStr = ""; if (!isNull) { cellStr = CommonUtil.convertExcelStringToCell(cell); src/main/java/kr/wisestone/owl/util/CommonUtil.java
@@ -12,6 +12,7 @@ import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.StringUtils; import org.apache.poi.hssf.usermodel.HSSFDateUtil; import org.apache.poi.ss.usermodel.Cell; import org.jsoup.Jsoup; import org.slf4j.Logger; @@ -960,17 +961,22 @@ switch (cell.getCellType()) { case Cell.CELL_TYPE_NUMERIC : double doubleValue = cell.getNumericCellValue(); int intValue; if (HSSFDateUtil.isCellDateFormatted(cell)) { Date date = cell.getDateCellValue(); cellValue = DateUtil.convertDateToStr(date, "yyyy-MM-dd hh:mm:ss"); if (doubleValue % 1 == 0) { intValue = (int)doubleValue; cellValue = intValue + ""; } else { cellValue = doubleValue + ""; } } else { double doubleValue = cell.getNumericCellValue(); int intValue; if (doubleValue % 1 == 0) { intValue = (int)doubleValue; cellValue = intValue + ""; } else { cellValue = doubleValue + ""; } } break; case Cell.CELL_TYPE_STRING : src/main/java/kr/wisestone/owl/util/DateUtil.java
@@ -62,6 +62,7 @@ public static String convertDateToStr(Date source, String pattern, Locale locale) { String date = null; SimpleDateFormat sdf = new SimpleDateFormat(pattern, locale); date = sdf.format(source);