OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2022-01-10 e992e999b4de82ed5e727e5bf37bfc081c417ca5
src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java
@@ -11,6 +11,8 @@
import kr.wisestone.owl.domain.enumType.EmailType;
import kr.wisestone.owl.domain.enumType.IssueHistoryType;
import kr.wisestone.owl.domain.enumType.IssueStatusType;
import kr.wisestone.owl.exception.ApiAuthException;
import kr.wisestone.owl.exception.ApiParameterException;
import kr.wisestone.owl.exception.OwlRuntimeException;
import kr.wisestone.owl.mapper.DepartmentMapper;
import kr.wisestone.owl.mapper.IssueMapper;
@@ -235,14 +237,14 @@
    private IssueForm convertToIssueForm(IssueApiForm issueApiForm, User user) {
        if (issueApiForm.getIssueTypeId() == null) {
            throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.API_PARAMETER_ISSUE_TYPE_ERROR));
            throw new ApiParameterException(this.messageAccessor.getMessage(MsgConstants.API_PARAMETER_ISSUE_TYPE_ERROR));
        }
        IssueForm issueForm = ConvertUtil.copyProperties(issueApiForm, IssueForm.class);
//        issueForm.setFiles(issueApiForm.getFiles());
        IssueType issueType = this.issueTypeService.getIssueType(issueApiForm.getIssueTypeId());
        if (issueType == null){
            throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.API_PARAMETER_ISSUE_TYPE_ERROR));
            throw new ApiParameterException(this.messageAccessor.getMessage(MsgConstants.API_PARAMETER_ISSUE_TYPE_ERROR));
        }
        Workflow workflow = issueType.getWorkflow();
@@ -256,13 +258,13 @@
                }
            }
        } else if (issueApiForm.getIssueStatusId() == null){
            throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.API_ISSUE_STATUS_NOT_EXIST));
            throw new ApiParameterException(this.messageAccessor.getMessage(MsgConstants.API_ISSUE_STATUS_NOT_EXIST));
        }
        // 프로젝트 입력
        Project project = issueType.getProject();
        if (project == null){
            throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.API_PARAMETER_PROJECT_ERROR));
            throw new ApiParameterException(this.messageAccessor.getMessage(MsgConstants.API_PARAMETER_PROJECT_ERROR));
        }
        issueForm.setProjectId(project.getId());
@@ -321,7 +323,7 @@
            return issueForm;
        } else {
            throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.API_USER_ERROR));
            throw new ApiAuthException(this.messageAccessor.getMessage(MsgConstants.API_USER_ERROR));
        }
    }
@@ -367,6 +369,7 @@
                issueForm.setIssueHostingFields(issueHostingFields);
            }
        }
        return issueForm;
    }
@@ -1487,14 +1490,16 @@
            issueVo = ConvertUtil.copyProperties(issue, IssueVo.class);
            User user = this.webAppUtil.getLoginUserObject();
            issueVo.setRelPageNumber(relPageable.getPageNumber());
            issueVo.setRelPageSize(relPageable.getPageSize());
            issueVo.setRelPage(relPageable.getPageNumber() * relPageable.getPageSize());
            issueVo.setDownPageNumber(downPageable.getPageNumber());
            issueVo.setDownPage(downPageable.getPageNumber() * downPageable.getPageSize());
            issueVo.setDownPageSize(downPageable.getPageSize());
            if (relPageable != null) {
                issueVo.setRelPageNumber(relPageable.getPageNumber());
                issueVo.setRelPageSize(relPageable.getPageSize());
                issueVo.setRelPage(relPageable.getPageNumber() * relPageable.getPageSize());
            }
            if (downPageable != null) {
                issueVo.setDownPageNumber(downPageable.getPageNumber());
                issueVo.setDownPage(downPageable.getPageNumber() * downPageable.getPageSize());
                issueVo.setDownPageSize(downPageable.getPageSize());
            }
            switch (issueCondition.getDeep()) {
                case "01": //  프로젝트, 이슈 유형, 이슈 상태,  우선순위, 중요도, 담당부서, 첨부파일, 사용자 정의 필드 정보를 셋팅한다.