| | |
| | | |
| | | /** |
| | | * cell NULL 체크 함수 |
| | | * 문자형식 cell 체크 |
| | | * 빈 값이 아닌 cell 체크 |
| | | * @param cell Cell |
| | | * @return boolean |
| | | */ |
| | | 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; |
| | | } |
| | | } |
| | |
| | | boolean isNull = cellNullCheck(cell); |
| | | |
| | | String cellStr = ""; |
| | | |
| | | if (!isNull) { |
| | | cellStr = CommonUtil.convertExcelStringToCell(cell); |
| | | |
| | |
| | | } |
| | | |
| | | if (checkStartDate) { |
| | | issueForm.setStartDate(periodDate); |
| | | issueForm.setStartDate(DateUtil.convertDateToStr(startDate, "yyyy-MM-dd")); |
| | | } else { |
| | | issueForm.setCompleteDate(periodDate); |
| | | issueForm.setCompleteDate(DateUtil.convertDateToStr(startDate, "yyyy-MM-dd")); |
| | | |
| | | // 종료일만 입력 했을 경우 |
| | | if (issueForm.getCompleteDate() != null && issueForm.getStartDate() == null) { |
| | |
| | | this.checkStartCompleteDate(issueForm.getStartDate(), issueForm.getCompleteDate()); |
| | | } catch (OwlRuntimeException e) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.EXCEL_IMPORT_PERIOD_NOT_VALIDITY, rowIndex)); |
| | | this.messageAccessor.getMessage(MsgConstants.EXCEL_IMPORT_PERIOD_NOT_VALID, rowIndex)); |
| | | } |
| | | } |
| | | } |