OWL ITS + 탐지시스템(인터넷 진흥원)
src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java
@@ -46,8 +46,10 @@
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.*;
import static kr.wisestone.owl.domain.enumType.CustomFieldType.DATETIME;
import static kr.wisestone.owl.domain.enumType.CustomFieldType.INPUT;
@Service
@@ -3338,6 +3340,15 @@
        }
    }
    /**
     * cell NULL 체크 함수
     * @param cell Cell
     * @return boolean
     */
    private Boolean cellNullCheck (Cell cell) {
        return cell != null && cell.getStringCellValue() != null && cell.getCellType() != Cell.CELL_TYPE_BLANK;
    }
    //  엑셀 필드에 있는 정보를 이슈 form 으로 옮긴다.
    private IssueForm setIssueFormToExcelField(Row row, int rowIndex, Map<String, Priority> priorityMaps,
                                               Map<String, Severity> severityMaps, Map<String, DepartmentVo> departmentMaps,
@@ -3356,7 +3367,7 @@
                    break;
                case 1:    //  내용
                    if (cell != null) {
                    if (cellNullCheck(cell)) {
                        issueForm.setDescription(CommonUtil.convertExcelStringToCell(cell));
                    } else {
                        //  null 입력 방지
@@ -3380,13 +3391,13 @@
                    break;*/
                case 4:
                    //  시작일을 IssueForm 에 저장한다.
                    if (cell != null && cell.getCellType() != Cell.CELL_TYPE_BLANK) {
                    if (cellNullCheck(cell)) {
                        this.setIssueFormPeriod(cell, issueForm, true, rowIndex);
                    }
                    break;
                case 5:
                    //  종료일을 IssueForm 에 저장한다.
                    if (cell != null && cell.getCellType() != Cell.CELL_TYPE_BLANK) {
                    if (cellNullCheck(cell)) {
                        this.setIssueFormPeriod(cell, issueForm, false, rowIndex);
                    }
                    break;
@@ -3557,11 +3568,16 @@
                case EMAIL:
                case SITE:
                case TEL:
                    if (customField.getCustomFieldType() != INPUT && cellValue.length() > 100) {
                    if (customField.getCustomFieldType() != INPUT && cellValue.length() > 100) { //INPUT 타입은 100자 제한 없음
                        throw new OwlRuntimeException(
                                this.messageAccessor.getMessage(MsgConstants.CUSTOM_FIELD_TEXT_TYPE_MAX_LENGTH_OUT));
                    }
                    if (customField.getCustomFieldType() == DATETIME) { //DATETIME일 경우 format 변경
                        Date date = cell.getDateCellValue();
                        cellValue = new SimpleDateFormat("yyyy-MM-dd H:mm:ss").format(date);
                    }
                    issueCustomFieldMap.put("customFieldId", customField.getId());
                    issueCustomFieldMap.put("useValue", cellValue);
                    issueForm.addIssueCustomFields(issueCustomFieldMap);