| | |
| | | public static final String EXCEL_IMPORT_SEVERITY_IS_NULL = "EXCEL_IMPORT_SEVERITY_IS_NULL"; // 다음 엑셀 라인에서 중요도 명이 입력되지 않았습니다. |
| | | public static final String EXCEL_IMPORT_SEVERITY_NOT_EXIST = "EXCEL_IMPORT_SEVERITY_NOT_EXIST"; // 다음 엑셀 라인에서 입력된 중요도 명으로 검색되는 우선순위가 없습니다. |
| | | public static final String EXCEL_IMPORT_PERIOD_NOT_VALIDITY = "EXCEL_IMPORT_PERIOD_NOT_VALIDITY"; // 다음 엑셀 라인에서 입력한 시작일, 종료일에 문제가 있습니다. 시작일은 종료일보다 빨라야 합니다. |
| | | public static final String EXCEL_IMPORT_PERIOD_NOT_VALIDITY_EMPTY_START = "EXCEL_IMPORT_PERIOD_NOT_VALIDITY_EMPTY_START"; // 다음 엑셀 라인에서 종료일은 입력 되어있으나, 시작일은 입력되지 않았습니다. |
| | | public static final String EXCEL_IMPORT_PERIOD_NOT_VALIDITY_EMPTY = "EXCEL_IMPORT_PERIOD_NOT_VALIDITY_EMPTY"; // 다음 엑셀 라인에서 입력한 시작일, 종료일에 문제가 있습니다. 공백이 포함되어 있는지 확인 후 공백을 제거하세요. |
| | | public static final String EXCEL_IMPORT_PERIOD_NOT_DASH = "EXCEL_IMPORT_PERIOD_NOT_DASH"; // 다음 엑셀 라인에서 입력한 시작일, 종료일에 문제가 있습니다. '-'이 포함되어 있는지 확인 후 '-'를 포함 시켜주세요. ex) 2022-01-01 |
| | | public static final String EXCEL_IMPORT_DATETIME_NOT_DASH = "EXCEL_IMPORT_DATETIME_NOT_DASH"; // 다음 엑셀 라인에서 입력한 사용자 정의 필드에 문제가 있습니다. '-'이 포함되어 있는지 확인 후 '-'를 포함 시켜주세요. ex) 2022-01-01 |
| | |
| | | * @param cell Cell |
| | | * @return boolean |
| | | */ |
| | | private Boolean cellNullCheck (Cell cell) { |
| | | if (cell != null && cell.getStringCellValue() != null) { |
| | | cell.setCellValue(cell.getStringCellValue().trim());//셀 값 공백 제거 |
| | | private Boolean cellNullCheck (Cell cell, int rowIndex) { |
| | | boolean result = false; |
| | | |
| | | // 문자형식인지 체크 |
| | | if (cell != null && cell.getCellType() != Cell.CELL_TYPE_BLANK && cell.getCellType() != cell.CELL_TYPE_STRING) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.EXCEL_IMPORT_NOT_STRING_TYPE, rowIndex)); |
| | | } |
| | | return cell != null && cell.getStringCellValue() != null && !cell.getStringCellValue().equals("") && cell.getCellType() != Cell.CELL_TYPE_BLANK; |
| | | |
| | | // 공백 제거 |
| | | if (cell != null && cell.getCellType() == cell.CELL_TYPE_STRING && cell.getStringCellValue() != null) { |
| | | cell.setCellValue(cell.getStringCellValue().trim()); |
| | | } |
| | | |
| | | if (cell != null && cell.getCellType() != Cell.CELL_TYPE_BLANK && cell.getCellType() == cell.CELL_TYPE_STRING |
| | | && cell.getStringCellValue() != null && !cell.getStringCellValue().equals("")) { |
| | | result = true; |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | private void telTypeCheck (Cell cell, int rowIndex) { |
| | | if (cell.getCellType() != cell.CELL_TYPE_STRING) { |
| | | /*private void telTypeCheck (Cell cell, int rowIndex) { |
| | | if (cell != null && cell.getCellType() != cell.CELL_TYPE_STRING) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.EXCEL_IMPORT_TEL_NOT_STRING_TYPE, rowIndex)); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | // 엑셀 필드에 있는 정보를 업체 form 으로 옮긴다. |
| | | private CompanyFieldForm setCompanyFieldFormToExcelField(Row row, int rowIndex, Map<String, IspField> ispFieldMaps, Map<String, HostingField> hostingFieldMaps, |
| | |
| | | |
| | | case 1: |
| | | // url |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setCompanyFormUrl(cell, companyFieldForm, rowIndex); |
| | | } |
| | | break; |
| | | |
| | | case 2: |
| | | // isp명 |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setCompanyFormIspName(cell, ispFieldMaps, companyFieldForm, rowIndex); |
| | | } |
| | | break; |
| | | |
| | | case 3: |
| | | // 호스팅명 |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setCompanyFormHostingName(cell, hostingFieldMaps, companyFieldForm, rowIndex); |
| | | } |
| | | break; |
| | | |
| | | case 4: |
| | | // 연락처 |
| | | if (cellNullCheck(cell)) { |
| | | this.telTypeCheck(cell, rowIndex); // 텍스트 형식 체크 |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | //this.telTypeCheck(cell, rowIndex); |
| | | this.setCompanyFormTel(cell, companyFieldForm, rowIndex); |
| | | } |
| | | break; |
| | | |
| | | case 5: |
| | | // 이메일 |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setCompanyFormEmail(cell, companyFieldForm, rowIndex); |
| | | } |
| | | break; |
| | | |
| | | case 6: |
| | | // 담당자 |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setCompanyFormManager(cell, companyFieldForm, rowIndex); |
| | | } |
| | | break; |
| | | |
| | | case 7: |
| | | // 기업구분 |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setCompanyFormCompanyType(cell, companyTypeMaps, companyFieldForm, rowIndex); |
| | | } |
| | | break; |
| | | |
| | | case 8: |
| | | // 업종(대분류) |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setCompanyFormParentSector(cell, parentSectorMaps, companyFieldForm, rowIndex); |
| | | } |
| | | break; |
| | | |
| | | case 9: |
| | | // 업종(중분류) |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setCompanyFormChildSector(cell, childSectorMaps, companyFieldForm, rowIndex); |
| | | } |
| | | break; |
| | | |
| | | case 10: |
| | | // 지역 |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setCompanyFormRegion(cell, regionMaps, companyFieldForm, rowIndex); |
| | | } |
| | | break; |
| | | |
| | | case 11: |
| | | // 상태 |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setCompanyFormStatus(cell, statusMaps, companyFieldForm, rowIndex); |
| | | } |
| | | break; |
| | | |
| | | case 12: |
| | | // 비고 |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setCompanyFormMemo(cell, companyFieldForm, rowIndex); |
| | | } |
| | | break; |
| | |
| | | } |
| | | |
| | | private void setCompanyFormName(Cell cell, CompanyFieldForm companyFieldForm, int rowIndex) { |
| | | if (!cellNullCheck(cell)) { |
| | | if (!cellNullCheck(cell, rowIndex)) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.EXCEL_IMPORT_COMPANY_NAME_IS_NULL, rowIndex)); |
| | | } |
| | |
| | | * @param cell Cell |
| | | * @return boolean |
| | | */ |
| | | private Boolean cellNullCheck (Cell cell) { |
| | | private Boolean cellNullCheck (Cell cell, int rowIndex) { |
| | | boolean result = false; |
| | | |
| | | // 문자형식인지 체크 |
| | | if (cell != null && cell.getCellType() != Cell.CELL_TYPE_BLANK && cell.getCellType() != Cell.CELL_TYPE_STRING) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.EXCEL_IMPORT_NOT_STRING_TYPE)); |
| | | this.messageAccessor.getMessage(MsgConstants.EXCEL_IMPORT_NOT_STRING_TYPE, rowIndex)); |
| | | } |
| | | // 공백 제거 |
| | | if (cell != null && cell.getStringCellValue() != null) { |
| | | cell.setCellValue(cell.getStringCellValue().trim());//셀 값 공백 제거 |
| | | cell.setCellValue(cell.getStringCellValue().trim()); |
| | | } |
| | | return cell != null && cell.getStringCellValue() != null && !cell.getStringCellValue().equals("") && cell.getCellType() != Cell.CELL_TYPE_BLANK; |
| | | |
| | | if (cell != null && cell.getCellType() != Cell.CELL_TYPE_BLANK && cell.getCellType() == cell.CELL_TYPE_STRING |
| | | && cell.getStringCellValue() != null && !cell.getStringCellValue().equals("")) { |
| | | result = true; |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | // 엑셀 필드에 있는 정보를 이슈 form 으로 옮긴다. |
| | |
| | | break; |
| | | |
| | | case 1: // 내용 |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | issueForm.setDescription(CommonUtil.convertExcelStringToCell(cell)); |
| | | } else { |
| | | // null 입력 방지 |
| | |
| | | break; |
| | | case 6: |
| | | // 업체를 IssueForm 에 저장한다. |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setIssueFormCompanyField(cell, companyFieldMaps, issueForm, rowIndex); |
| | | } |
| | | break; |
| | | case 7: |
| | | // ISP를 IssueForm 에 저장한다. |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setIssueFormIspField(cell, ispFieldMaps, issueForm, rowIndex); |
| | | } |
| | | break; |
| | | case 8: |
| | | // 호스팅을 IssueForm 에 저장한다. |
| | | if (cellNullCheck(cell)) { |
| | | if (cellNullCheck(cell, rowIndex)) { |
| | | this.setIssueFormHostingField(cell, hostingFieldMaps, issueForm, rowIndex); |
| | | } |
| | | break; |
| | |
| | | |
| | | // 이슈 제목을 IssueForm 에 저장한다. |
| | | private void setIssueFormTitle(Cell cell, IssueForm issueForm, int rowIndex) { |
| | | if (!cellNullCheck(cell)) { |
| | | if (!cellNullCheck(cell, rowIndex)) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.EXCEL_IMPORT_ISSUE_TITLE_IS_NULL, rowIndex)); |
| | | } |
| | |
| | | |
| | | // 우선순위를 IssueForm 에 저장한다. |
| | | private void setIssueFormPriority(Cell cell, Map<String, Priority> priorityMaps, IssueForm issueForm, int rowIndex) { |
| | | if (!cellNullCheck(cell)) { |
| | | if (!cellNullCheck(cell, rowIndex)) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.EXCEL_IMPORT_PRIORITY_IS_NULL, rowIndex)); |
| | | } |
| | |
| | | |
| | | // 중요도를 IssueForm 에 저장한다. |
| | | private void setIssueFormSeverity(Cell cell, Map<String, Severity> severityMaps, IssueForm issueForm, int rowIndex) { |
| | | if (!cellNullCheck(cell)) { |
| | | if (!cellNullCheck(cell, rowIndex)) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.EXCEL_IMPORT_SEVERITY_IS_NULL, rowIndex)); |
| | | } |
| | |
| | | issueForm.setStartDate(DateUtil.convertDateToStr(startDate, "yyyy-MM-dd")); |
| | | } else { |
| | | issueForm.setCompleteDate(DateUtil.convertDateToStr(startDate, "yyyy-MM-dd")); |
| | | |
| | | // 종료일만 입력 했을 경우 |
| | | if (issueForm.getCompleteDate() != null && issueForm.getStartDate() == null) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.EXCEL_IMPORT_PERIOD_NOT_VALIDITY_EMPTY_START, rowIndex)); |
| | | } |
| | | |
| | | try { |
| | | // 날짜 유효성 체크 |
| | |
| | | EXCEL_IMPORT_HEADER_CUSTOM_FIELD_NOT_EXIST=\uB4F1\uB85D\uD558\uB824\uB294 \uC0AC\uC6A9\uC790 \uC815\uC758 \uD544\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD574\uB2F9 \uC0AC\uC6A9\uC790 \uC815\uC758\uD544\uB4DC\uC758 \uC774\uB984\uC774 \uBCC0\uACBD\uB418\uC5C8\uAC70\uB098 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \n \uB77C\uC778 \uC815\uBCF4 : {0} |
| | | EXCEL_IMPORT_PERIOD_NOT_VALIDITY= \uB2E4\uC74C \uC5D1\uC140 \uB77C\uC778\uC5D0\uC11C \uC785\uB825\uD55C \uC2DC\uC791\uC77C, \uC885\uB8CC\uC77C\uC5D0 \uBB38\uC81C\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uC2DC\uC791\uC77C\uC740 \uC885\uB8CC\uC77C\uBCF4\uB2E4 \uBE68\uB77C\uC57C \uD569\uB2C8\uB2E4. \n \uB77C\uC778 \uC815\uBCF4 : {0} |
| | | EXCEL_IMPORT_PERIOD_NOT_VALIDITY_EMPTY=\uB2E4\uC74C \uC5D1\uC140 \uB77C\uC778\uC5D0\uC11C \uC785\uB825\uD55C \uC2DC\uC791\uC77C, \uC885\uB8CC\uC77C\uC5D0 \uBB38\uC81C\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uACF5\uBC31\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778 \uD6C4 \uACF5\uBC31\uC744 \uC81C\uAC70\uD558\uC138\uC694. \n \uB77C\uC778 \uC815\uBCF4 : {0} |
| | | EXCEL_IMPORT_PERIOD_NOT_VALIDITY_EMPTY_START=\uB2E4\uC74C \uC5D1\uC140 \uB77C\uC778\uC5D0\uC11C \uC885\uB8CC\uC77C\uC740 \uC785\uB825 \uB418\uC5B4\uC788\uC73C\uB098, \n \uC2DC\uC791\uC77C\uC740 \uC785\uB825\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \n \uB77C\uC778 \uC815\uBCF4 : {0} |
| | | EXCEL_IMPORT_PERIOD_NOT_DASH=\uB2E4\uC74C \uC5D1\uC140 \uB77C\uC778\uC5D0\uC11C \uC785\uB825\uD55C \uC2DC\uC791\uC77C, \uC885\uB8CC\uC77C\uC5D0 \uBB38\uC81C\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uB0A0\uC9DC \uD615\uC2DD\uC73C\uB85C \uC785\uB825 \uD574\uC8FC\uC138\uC694. ex) 2022-01-01 \n \uB77C\uC778 \uC815\uBCF4 : {0} |
| | | EXCEL_IMPORT_DATETIME_NOT_DASH=\uB2E4\uC74C \uC5D1\uC140 \uB77C\uC778\uC5D0\uC11C \uC785\uB825\uD55C \uC0AC\uC6A9\uC790 \uC815\uC758 \uD544\uB4DC\uC5D0 \uBB38\uC81C\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uB0A0\uC9DC \uD615\uC2DD\uC73C\uB85C \uC785\uB825 \uD574\uC8FC\uC138\uC694. ex) 2022-01-01 00:00:00 \n \uB77C\uC778 \uC815\uBCF4 : {0} |
| | | EXCEL_IMPORT_MAX_ROWS_OVER = \uC5D1\uC140 \uC5C5\uB85C\uB4DC\uB85C \uC774\uC288 \uB4F1\uB85D\uC740 \uCD5C\uB300 1,000 \uAC74\uAE4C\uC9C0\uB9CC \uAC00\uB2A5\uD569\uB2C8\uB2E4. \uB9CC\uC57D \uC791\uC131\uB41C \uC5D1\uC140\uC774 1,000 \uAC74 \uC774\uD558\uC77C \uACBD\uC6B0 \uC774 \uBA54\uC2DC\uC9C0\uAC00 \uD45C\uC2DC\uB418\uBA74 \uB9C8\uC9C0\uB9C9 \uC791\uC131\uB41C \uD589\uC774\uD6C4\uC758 \uBAA8\uB4E0 \uD589\uC744 \uC0AD\uC81C\uD55C \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694. |
| | |
| | | EXCEL_IMPORT_REGION_NOT_EXIST=\uB2E4\uC74C \uC5D1\uC140 \uB77C\uC778\uC5D0\uC11C \uC785\uB825\uB41C \uC9C0\uC5ED\uBA85\uC73C\uB85C \uAC80\uC0C9\uB418\uB294 \uC9C0\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \n \uB77C\uC778 \uC815\uBCF4 : {0} |
| | | EXCEL_IMPORT_PARENT_SECTOR_IS_NULL=\uB2E4\uC74C \uC5D1\uC140 \uB77C\uC778\uC5D0\uC11C \uC5C5\uC885(\uC911\uBD84\uB958)\uB9CC \uC785\uB825 \uD588\uC2B5\uB2C8\uB2E4. \n \uC5C5\uC885(\uB300\uBD84\uB958)\uB3C4 \uC785\uB825\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. \n \uB77C\uC778 \uC815\uBCF4 : {0} |
| | | EXCEL_IMPORT_TEL_NOT_STRING_TYPE=\uB2E4\uC74C \uC5D1\uC140 \uB77C\uC778\uC5D0\uC11C \uC785\uB825\uB41C \uC5F0\uB77D\uCC98\uC758 \uD615\uC2DD\uC774 \uC798\uBABB \uB418\uC5C8\uC2B5\uB2C8\uB2E4. \n \uB77C\uC778 \uC815\uBCF4 : {0} |
| | | EXCEL_IMPORT_NOT_STRING_TYPE=\uC140 \uC11C\uC2DD\uC758 \uD615\uC2DD\uC774 \uBB38\uC790 \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4. |
| | | EXCEL_IMPORT_NOT_STRING_TYPE=\uB2E4\uC74C \uC5D1\uC140 \uB77C\uC778\uC5D0\uC11C \uC785\uB825\uB41C \uC140 \uC11C\uC2DD\uC758 \uD615\uC2DD\uC774 \uBB38\uC790 \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4. \n \uB77C\uC778 \uC815\uBCF4 : {0} |
| | | |
| | | ISSUE_RESERVATION_VALUE_INVALID=\uC774\uC288 \uBC1C\uC0DD \uC608\uC57D\uC77C\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. |
| | | ISSUE_RESERVATION_NOT_EXIST=\uC774\uC288 \uBC1C\uC0DD \uC608\uC57D \uC815\uBCF4\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. |