| | |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.constant.ElasticSearchConstants; |
| | | import kr.wisestone.owl.constant.MsgConstants; |
| | | import kr.wisestone.owl.constant.UsePartner; |
| | | import kr.wisestone.owl.domain.*; |
| | | import kr.wisestone.owl.domain.enumType.CustomFieldType; |
| | | import kr.wisestone.owl.domain.enumType.EmailType; |
| | |
| | | import kr.wisestone.owl.util.DateUtil; |
| | | import kr.wisestone.owl.vo.*; |
| | | import kr.wisestone.owl.web.condition.IssueCondition; |
| | | import kr.wisestone.owl.web.condition.IssueCustomFieldValueCondition; |
| | | import kr.wisestone.owl.web.condition.IssueTypeCustomFieldCondition; |
| | | import kr.wisestone.owl.web.condition.ProjectCondition; |
| | | import kr.wisestone.owl.web.form.IssueCommentForm; |
| | | import kr.wisestone.owl.web.form.IssueForm; |
| | | import kr.wisestone.owl.web.form.*; |
| | | import kr.wisestone.owl.web.view.ExcelView; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.commons.lang3.time.StopWatch; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.concurrent.locks.Condition; |
| | | |
| | | @Service |
| | | public class IssueServiceImpl extends AbstractServiceImpl<Issue, Long, JpaRepository<Issue, Long>> implements IssueService { |
| | |
| | | |
| | | @Autowired |
| | | private IssueRepository issueRepository; |
| | | |
| | | @Autowired |
| | | private IssueTableConfigService issueTableConfigService; |
| | | |
| | | @Autowired |
| | | private ProjectService projectService; |
| | |
| | | |
| | | @Autowired |
| | | private SeverityService severityService; |
| | | |
| | | @Autowired |
| | | private CustomFieldApiOverlapService customFieldApiOverlapService; |
| | | |
| | | @Autowired |
| | | private IssueApiDefaultService issueApiDefaultService; |
| | | |
| | | @Autowired |
| | | private ApiTokenService apiTokenService; |
| | | |
| | | @Autowired |
| | | private CompanyFieldService companyFieldService; |
| | |
| | | private IssueCustomFieldValueService issueCustomFieldValueService; |
| | | |
| | | @Autowired |
| | | private IssueCompanyService issueCompanyService; |
| | | |
| | | @Autowired |
| | | private IssueIspService issueIspService; |
| | | |
| | | @Autowired |
| | | private IssueHostingService issueHostingService; |
| | | |
| | | @Autowired |
| | | private IssueUserService issueUserService; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | private UserService userService; |
| | | |
| | | @Autowired |
| | | private DepartmentService departmentService; |
| | | |
| | | @Autowired |
| | | private IssueCommentService issueCommentService; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | // API 를 통해 이슈 추가. |
| | | @Override |
| | | @Transactional |
| | | public Issue addApiIssue(IssueApiForm issueApiForm) { |
| | | if (issueApiForm.getIssueTypeId() == null) { |
| | | throw new OwlRuntimeException(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)); |
| | | } |
| | | |
| | | // 프로젝트 입력 |
| | | Project project = issueType.getProject(); |
| | | if (project == null){ |
| | | throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.API_PARAMETER_PROJECT_ERROR)); |
| | | } |
| | | issueForm.setProjectId(project.getId()); |
| | | |
| | | // 토큰으로 유저 정보 가져오기 |
| | | String token = issueApiForm.getToken(); |
| | | UserVo userVo = this.apiTokenService.certification(token); |
| | | |
| | | // 해당 유저 정보가 현재 db에 있는지 확인 |
| | | User user = this.userService.getUser(userVo.getId()); |
| | | if (user != null) { |
| | | |
| | | // 기본값 입력하기 |
| | | IssueApiDefaultForm issueApiDefaultForm = new IssueApiDefaultForm(); |
| | | issueApiDefaultForm.setUserId(user.getId()); |
| | | issueApiDefaultForm.setIssueTypeId(issueForm.getIssueTypeId()); |
| | | IssueApiDefault issueApiDefault = this.issueApiDefaultService.find(issueApiDefaultForm); |
| | | if (issueApiDefault != null) { |
| | | ConvertUtil.copyProperties(issueApiDefault, issueForm); |
| | | issueForm.setPriorityId(issueApiDefault.getPriority().getId()); |
| | | issueForm.setSeverityId(issueApiDefault.getSeverity().getId()); |
| | | } |
| | | |
| | | // 중복 값 하위 이슈로 처리하기 |
| | | CustomFieldApiOverlapForm customFieldApiOverlapForm = new CustomFieldApiOverlapForm(); |
| | | customFieldApiOverlapForm.setUserId(user.getId()); |
| | | customFieldApiOverlapForm.setIssueTypeId(issueForm.getIssueTypeId()); |
| | | |
| | | IssueVo issueVo = this.findIssue(issueApiForm, user.getId()); |
| | | if (issueVo != null) { |
| | | issueForm.setParentIssueId(issueVo.getId()); |
| | | } |
| | | |
| | | issueForm.setIsApi(Issue.IS_API_YES); |
| | | |
| | | // 사용자 정의 필드 설정 |
| | | issueForm.setIssueCustomFields(issueApiForm.getCustomFieldValues()); |
| | | |
| | | // api 입력값 적용 |
| | | ConvertUtil.copyProperties(issueApiForm, issueForm); |
| | | |
| | | return addIssue(user, issueForm, issueApiForm.getMultipartFiles()); |
| | | } else { |
| | | throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.API_USER_ERROR)); |
| | | } |
| | | } |
| | | |
| | | // 중복된 상위 이슈 검색 |
| | | private IssueVo findIssue(IssueApiForm issueApiForm, Long userId) { |
| | | IssueCustomFieldValueCondition issueCustomFieldValueCondition = new IssueCustomFieldValueCondition(); |
| | | |
| | | List<CustomFieldApiOverlap> customFieldApiOverlaps = this.customFieldApiOverlapService.find(userId, issueApiForm.getIssueTypeId()); |
| | | if (customFieldApiOverlaps != null && customFieldApiOverlaps.size() > 0) { |
| | | for (CustomFieldApiOverlap customFieldApiOverlap : customFieldApiOverlaps) { |
| | | for (IssueCustomFieldValueForm issueCustomFieldValue : issueApiForm.getIssueCustomFieldValues()) { |
| | | if (customFieldApiOverlap.getCustomField().getId().equals(issueCustomFieldValue.getCustomFieldId())) { |
| | | issueCustomFieldValueCondition.addUseValues(issueCustomFieldValue.getUseValue()); |
| | | } |
| | | } |
| | | } |
| | | List<Map<String, Object>> results = this.issueMapper.findByCustomFieldValue(issueCustomFieldValueCondition); |
| | | if (results != null && results.size() > 0) { |
| | | IssueVo issueVo = new IssueVo(); |
| | | ConvertUtil.convertMapToObject(results.get(0), issueVo); |
| | | return issueVo; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // 이슈를 생성한다. |
| | | @Override |
| | | @Transactional |
| | | public Issue addIssue(IssueForm issueForm, List<MultipartFile> multipartFiles) { |
| | | User user = this.webAppUtil.getLoginUserObject(); |
| | | return addIssue(user, issueForm, multipartFiles); |
| | | } |
| | | |
| | | // 이슈를 생성한다. |
| | | @Override |
| | | @Transactional |
| | | public Issue addIssue(User user, IssueForm issueForm, List<MultipartFile> multipartFiles) { |
| | | // 사용하고 있는 업무 공간이 활성 상태인지 확인한다. 사용 공간에서 로그인한 사용자가 비활성인지 확인한다. |
| | | this.workspaceService.checkUseWorkspace(); |
| | | Workspace workspace = this.workspaceService.checkUseWorkspace(user, user.getLastWorkspaceId()); |
| | | // 프로젝트 유효성 체크 |
| | | Project project = this.projectService.getProject(issueForm.getProjectId()); |
| | | // 이슈 유형 유효성 체크 |
| | |
| | | this.verifyTitle(issueForm.getTitle()); |
| | | // 날짜 유효성 체크 |
| | | this.checkStartCompleteDate(issueForm.getStartDate(), issueForm.getCompleteDate()); |
| | | // 담당 부서 유효성 체크 |
| | | this.verifyIssueDepartment(project, issueForm); |
| | | |
| | | // 이슈 상태 유형이 '대기' 인 이슈 상태 가져오기 |
| | | IssueStatus issueStatus = this.issueStatusService.findByIssueStatusTypeIsReady(issueType.getWorkflow()); |
| | |
| | | issue.setPriority(priority); |
| | | issue.setSeverity(severity); |
| | | |
| | | // 업체 필드 유효성 체크 |
| | | if(issueForm.getCompanyId() != null){ |
| | | CompanyField companyField = this.companyFieldService.getCompany(issueForm.getCompanyId()); |
| | | issue.setCompanyField(companyField); |
| | | } |
| | | // ISP 필드 유효성 체크 |
| | | if(issueForm.getIspId() != null) { |
| | | IspField ispField = this.ispFieldService.getIsp(issueForm.getIspId()); |
| | | issue.setIspFieldId(ispField); |
| | | } |
| | | // HOSTING 필드 유효성 체크 |
| | | if (issueForm.getHostingId() != null){ |
| | | HostingField hostingField = this.hostingFieldService.getHosting(issueForm.getHostingId()); |
| | | issue.setHostingFieldId(hostingField); |
| | | } |
| | | |
| | | issue.setIssueNumber(this.issueNumberGeneratorService.generateIssueNumber(project)); // 각 프로젝트의 고유 이슈 번호 생성 |
| | | |
| | | this.issueRepository.saveAndFlush(issue); |
| | | issue = this.issueRepository.saveAndFlush(issue); |
| | | |
| | | issue.setReverseIndex(issue.getId() * -1); // 쿼리 속도 개선을 위해 리버스 인덱스 생성 |
| | | // 담당자 지정 |
| | | //this.issueUserService.modifyIssueUser(issue, project.getWorkspace(), issueForm.getUserIds()); |
| | | // 담당부서 지정 |
| | | this.issueDepartmentService.modifyIssueDepartment(issue, project.getWorkspace(), issueForm.getDepartmentIds()); |
| | | // 업체 정보 저장 |
| | | this.issueCompanyService.modifyIssueCompanyField(issue, issueForm.getIssueCompanyFields()); |
| | | // ISP 정보 저장 |
| | | this.issueIspService.modifyIssueIspField(issue, issueForm.getIssueIspFields()); |
| | | // HOSTING 정보 저장 |
| | | this.issueHostingService.modifyIssueHostingField(issue, issueForm.getIssueHostingFields()); |
| | | |
| | | |
| | | // 첨부 파일 저장 |
| | | // multipartFile 을 file Map List 객체로 변경한다. |
| | | List<Map<String, Object>> convertFileMaps = this.convertMultipartFileToFile(multipartFiles); |
| | | // 첨부 파일 저장 |
| | | this.attachedFileService.addAttachedFile(convertFileMaps, issue, this.webAppUtil.getLoginUser().getAccount()); |
| | | this.attachedFileService.addAttachedFile(convertFileMaps, issue, user.getAccount()); |
| | | |
| | | // 텍스트 에디터에 첨부한 파일을 이슈와 연결 |
| | | this.checkNotHaveIssueIdAttachedFile(issue, issueForm); |
| | | // 사용자 정의 필드 저장 |
| | | this.issueCustomFieldValueService.modifyIssueCustomFieldValue(issue, issueForm.getIssueCustomFields()); |
| | | // 이슈 이력 생성 |
| | | this.issueHistoryService.addIssueHistory(issue, IssueHistoryType.ADD, null); |
| | | this.issueHistoryService.addIssueHistory(issue, user, IssueHistoryType.ADD, null); |
| | | // 이슈 위험 관리 생성 |
| | | this.issueRiskService.addIssueRisk(issue, project.getWorkspace()); |
| | | // 영속성 컨텍스트 비우기 |
| | | this.clear(); |
| | | // 이슈 생성, 삭제시 예약 이메일에 등록해놓는다. |
| | | this.reservationIssueEmail(issue.getId(), EmailType.ISSUE_ADD); |
| | | this.reservationIssueEmail(issue, EmailType.ISSUE_ADD); |
| | | // 사용자 시스템 기능 사용 정보 수집 |
| | | log.info(ElasticSearchUtil.makeUserActiveHistoryMessage(this.webAppUtil.getLoginUser(), ElasticSearchConstants.ISSUE_ADD)); |
| | | |
| | | UserVo userVo = ConvertUtil.copyProperties(user, UserVo.class); |
| | | log.info(ElasticSearchUtil.makeUserActiveHistoryMessage(userVo, ElasticSearchConstants.ISSUE_ADD)); |
| | | |
| | | return issue; |
| | | } |
| | | |
| | | // 이슈 생성, 삭제시 예약 이메일에 등록해놓는다. |
| | | private void reservationIssueEmail(Long id, EmailType emailType) { |
| | | Issue issue = this.getIssue(id); |
| | | |
| | | private void reservationIssueEmail(Issue issue, EmailType emailType) { |
| | | Map<String, Object> issueMap = new HashMap<>(); |
| | | // 이슈 정보를 이메일 전송에 사용하기 위해 Map 형태로 변환한다. |
| | | this.makeIssueMapToIssue(issue, issueMap); |
| | |
| | | if (projectRoleUsers != null && !projectRoleUsers.isEmpty()) { |
| | | for (Map<String, Object> projectRoleUser : projectRoleUsers) { |
| | | UserVo userVo = ConvertUtil.convertMapToClass(projectRoleUser, UserVo.class); |
| | | |
| | | // 이슈 생성 알림 메일 전송 |
| | | this.systemEmailService.reservationEmail(new String[]{userVo.getAccount()}, emailType, issueMap); |
| | | } |
| | |
| | | issueMap.put("customFields", customFields); |
| | | issueMap.put("description", issue.getDescription()); |
| | | |
| | | //업체,ISP,HOSTING 추가 |
| | | |
| | | |
| | | StringBuilder attachedFileBuilder = new StringBuilder(); |
| | | |
| | | List<AttachedFile> attachedFiles = this.attachedFileService.findByIssueId(issue.getId()); |
| | |
| | | List<Map<String, Object>> results = this.issueMapper.find(issueCondition); |
| | | |
| | | // 튜닝 전 - 0.8, 0.9, 0.9, 0.9, 0.9 |
| | | StopWatch serviceStart = new StopWatch(); |
| | | serviceStart.start(); |
| | | /*StopWatch serviceStart = new StopWatch(); |
| | | serviceStart.start();*/ |
| | | Long totalCount = this.issueMapper.count(issueCondition); |
| | | // 튜닝 전 - 1.1, 1.1, 1.3, 1.2 |
| | | |
| | | serviceStart.stop(); |
| | | log.debug("serviceENd1 : " + serviceStart.getTime()); |
| | | /*serviceStart.stop(); |
| | | log.debug("serviceENd1 : " + serviceStart.getTime());*/ |
| | | |
| | | int totalPage = (int) Math.ceil((totalCount - 1) / pageable.getPageSize()) + 1; |
| | | // 이슈 아이디 초기화 |
| | |
| | | return issueVos; |
| | | } |
| | | |
| | | |
| | | // 이슈 목록을 조회한다(차트용 - 연관일감포함) |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public void findApiIssue(ApiMonitorCondition apiMonitorCondition, Map<String, Object> resJsonData) { |
| | | |
| | | IssueTypeCondition issueTypeCondition = new IssueTypeCondition(); |
| | | List<IssueTypeVo> issueTypes = this.issueTypeService.findIssueType(issueTypeCondition); |
| | | |
| | | // 값이 없을 경우 초기값 입력 |
| | | if (StringUtils.isEmpty(apiMonitorCondition.getSearchPeriod())) { |
| | | apiMonitorCondition.setSearchPeriod(DateUtil.LAST_SEVEN_DAYS); |
| | | } |
| | | |
| | | // 검색 일자를 구한다. |
| | | List<Date> searchDates = CommonUtil.findSearchPeriod(apiMonitorCondition.getSearchPeriod()); |
| | | |
| | | // 날짜가 검색되지 않았으면 오류 |
| | | if (searchDates.size() < 1) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.WIDGET_SEARCH_DATE_NOT_FOUND)); |
| | | } |
| | | |
| | | Long index = 1L; |
| | | List<ApiMonitorVo> apiMonitorVos = Lists.newArrayList(); |
| | | for (Date date : searchDates) { |
| | | |
| | | String onlyDate = DateUtil.convertDateToYYYYMMDD(date); |
| | | issueTypeCondition.setStartDate(onlyDate + " 00:00:00"); |
| | | issueTypeCondition.setEndDate(onlyDate + " 23:59:59"); |
| | | |
| | | ApiMonitorVo apiMonitorVo = new ApiMonitorVo(); |
| | | apiMonitorVo.setId(index); |
| | | for (IssueTypeVo issueTypeVo : issueTypes) { |
| | | issueTypeCondition.setId(issueTypeVo.getId()); |
| | | apiMonitorVo.addIssueTypeCount(this.issueMapper.countByIssueTypeIdAndDate(issueTypeCondition)); |
| | | apiMonitorVo.setIsApi(Issue.IS_API_YES); |
| | | |
| | | apiMonitorVos.add(apiMonitorVo); |
| | | } |
| | | index++; |
| | | } |
| | | Map<String, Object> data = new HashMap<>(); |
| | | data.put("issueTypeVos", issueTypes); |
| | | data.put("apiMonitorVos", apiMonitorVos); |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, data); |
| | | } |
| | | |
| | | |
| | | // 이슈 목록을 조회한다(차트용 - 연관일감포함) |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public List<IssueVo> findChartIssue(Map<String, Object> resJsonData, |
| | | IssueCondition issueCondition, Pageable pageable) { |
| | | IssueCondition issueCondition, Pageable pageable) { |
| | | |
| | | // 검색 조건을 만든다 |
| | | if (!this.makeIssueSearchCondition(issueCondition,Lists.newArrayList("01", "02", "03"), pageable)) { |
| | |
| | | this.setIssueCustomFieldValue(issueVos, issueCondition); |
| | | } |
| | | |
| | | // 검색 조건을 만든다 |
| | | // 검색 조건을 만든다 |
| | | private boolean makeIssueSearchCondition(IssueCondition condition, List<String> projectStatues, Pageable pageable) { |
| | | if (pageable != null) { |
| | | condition.setPage(pageable.getPageNumber() * pageable.getPageSize()); |
| | |
| | | this.setAttachedFiles(issue, issueVo); // 첨부 파일 정보 셋팅 |
| | | this.setIssueCustomFields(issue, issueVo); // 사용자 정의 필드 값 정보 셋팅 |
| | | this.setRelationIssue(issue, issueVo); //연관 일감 셋팅 |
| | | this.setDownIssues(issue, issueVo); |
| | | this.setDownIssues(issue, issueVo); //하위 이슈 세팅 |
| | | |
| | | break; |
| | | |
| | | case "02": // 프로젝트, 이슈 유형, 이슈 상태, 우선순위, 중요도, 담당자, 첨부파일, 사용자 정의 필드 정보, 댓글, 기록을 셋팅한다. |
| | | this.setIssueDetail(issueVo, issue); // 이슈 상세 정보를 셋팅한다. |
| | | issueVo.setProjectVo(ConvertUtil.copyProperties(issue.getProject(), ProjectVo.class)); |
| | | break; |
| | | } |
| | | } |
| | |
| | | // 하위 이슈 정보를 셋팅한다 |
| | | private void setDownIssues(Issue issue, IssueVo issueVo) { |
| | | List<Issue> downIssues = this.issueRepository.findByParentIssueId(issue.getId()); |
| | | List<IssueVo> issueVos = ConvertUtil.convertObjectsToClasses(downIssues, IssueVo.class); |
| | | issueVo.setIssueDownVos(issueVos); |
| | | List<IssueVo> downIssueVos = ConvertUtil.convertObjectsToClasses(downIssues, IssueVo.class); |
| | | List<IssueVo> resultList = new ArrayList<>(); |
| | | if(downIssues != null && downIssueVos.size()>0){ |
| | | for(IssueVo downIssueVo : downIssueVos){ |
| | | for(Issue downIssue : downIssues){ |
| | | downIssueVo.setTitle(downIssue.getTitle()); |
| | | downIssueVo.setIssueTypeVo(ConvertUtil.copyProperties(downIssue.getIssueType(), IssueTypeVo.class)); |
| | | downIssueVo.setPriorityVo(ConvertUtil.copyProperties(downIssue.getPriority(), PriorityVo.class)); |
| | | downIssueVo.setSeverityVo(ConvertUtil.copyProperties(downIssue.getSeverity(), SeverityVo.class)); |
| | | this.setRegister(downIssue, downIssueVo); // 등록자 |
| | | this.setIssueDepartment(downIssue, downIssueVo); // 담당부서 정보 셋팅 |
| | | this.setIssueCustomFields(downIssue, downIssueVo); // 사용자정의필드 정보 세팅 |
| | | } |
| | | resultList.add(downIssueVo); |
| | | } |
| | | issueVo.setIssueDownVos(resultList); //프론트에서 List형태로 받아줘서 리스트 형식으로 보내줌 |
| | | }else{ |
| | | issueVo.setIssueDownVos(null); |
| | | } |
| | | } |
| | | |
| | | // 이슈 상세 정보를 셋팅한다. |
| | |
| | | this.setIssueComments(issue, issueVo); // 댓글 정보 셋팅 |
| | | this.setIssueHistory(issue, issueVo); // 이슈 기록 정보 셋팅 |
| | | this.setRelationIssue(issue, issueVo); //연관 일감 셋팅 |
| | | this.setDownIssues(issue, issueVo); |
| | | this.setDownIssues(issue, issueVo); //하위 일감 세팅 |
| | | |
| | | IssueType issueType = this.issueTypeService.getIssueType(issueVo.getIssueTypeVo().getId()); // 이슈의 이슈유형 객체 |
| | | Integer using = issueType.getUsePartner() != null ? issueType.getUsePartner().intValue() : 0; // 이슈유형별로 사용중인 업체/ISP/호스팅 값 |
| | | |
| | | List<UsePartnerVo> usePartnerVos = Lists.newArrayList(); |
| | | for (Integer usePartner : UsePartner.partners) { //1(업체), 2(ISP), 4(호스팅) |
| | | UsePartnerVo usePartnerVo = UsePartner.checkUsePartner(using, usePartner); |
| | | |
| | | if (usePartnerVo != null) { |
| | | usePartnerVos.add(usePartnerVo); |
| | | //useCompanyVo.setValues(); |
| | | } |
| | | issueVo.setUsePartnerVos(usePartnerVos); |
| | | } |
| | | |
| | | this.setIssueCompanyField(issue, issueVo); //업체 정보 세팅 |
| | | this.setIssueIspField(issue, issueVo); //ISP 정보 세팅 |
| | | this.setIssueHostingField(issue, issueVo); //HOSTING 정보 세팅 |
| | | |
| | | this.setParentIssue(issue,issueVo); //상위 이슈 정보 세팅 |
| | | } |
| | | |
| | | // 상위일감 정보 추가 |
| | | private void setParentIssue(Issue issue, IssueVo issueVo) { |
| | | if(issue.getParentIssue() != null){ |
| | | issueVo.setParentIssueVo(ConvertUtil.copyProperties(issue.getParentIssue(), IssueVo.class)); |
| | | } |
| | | } |
| | | |
| | | // 등록자 정보 추가 |
| | |
| | | |
| | | issueRelationVo.setIssueRelation(relIssueVo); |
| | | issueRelationVo.setTitle(relationIssue.getTitle()); |
| | | issueRelationVo.setIssueTypeVo(ConvertUtil.copyProperties(relationIssue.getIssueType(), IssueTypeVo.class)); |
| | | issueRelationVo.setPriorityVo(ConvertUtil.copyProperties(relationIssue.getPriority(), PriorityVo.class)); |
| | | issueRelationVo.setSeverityVo(ConvertUtil.copyProperties(relationIssue.getSeverity(), SeverityVo.class)); |
| | | this.setRegister(relationIssue, relIssueVo); // 등록자 |
| | | this.setIssueDepartment(relationIssue, relIssueVo); // 담당부서 정보 셋팅 |
| | | this.setIssueCustomFields(relationIssue, relIssueVo); // 사용자정의필드 정보 세팅 |
| | | issueVo.addIssueRelationVo(issueRelationVo); |
| | | } |
| | | } else { |
| | |
| | | |
| | | for (IssueDepartment issueDepartment : issue.getIssueDepartments()) { |
| | | DepartmentVo departmentVo = ConvertUtil.copyProperties(issueDepartment.getDepartment(), DepartmentVo.class); |
| | | departmentVo.setByName(departmentVo.getByName()); |
| | | departmentVo.setByName(departmentVo.getDepartmentName()); |
| | | departmentVos.add(departmentVo); |
| | | } |
| | | issueVo.setDepartmentVos(departmentVos); |
| | |
| | | if (!StringUtils.isEmpty(detectIssueChange.toString())) { |
| | | this.issueHistoryService.addIssueHistory(issue, IssueHistoryType.MODIFY, detectIssueChange.toString()); |
| | | } |
| | | |
| | | // 사용자 시스템 기능 사용 정보 수집 |
| | | log.info(ElasticSearchUtil.makeUserActiveHistoryMessage(this.webAppUtil.getLoginUser(), ElasticSearchConstants.ISSUE_MODIFY)); |
| | | |
| | | // 업체 정보 저장 |
| | | this.issueCompanyService.modifyIssueCompanyField(issue, issueForm.getIssueCompanyFields()); |
| | | // ISP 정보 저장 |
| | | this.issueIspService.modifyIssueIspField(issue, issueForm.getIssueIspFields()); |
| | | // HOSTING 정보 저장 |
| | | this.issueHostingService.modifyIssueHostingField(issue, issueForm.getIssueHostingFields()); |
| | | |
| | | return issue; |
| | | } |
| | |
| | | private List<Map<String, Object>> convertMultipartFileToFile(List<MultipartFile> multipartFiles) { |
| | | List<Map<String, Object>> convertFileMaps = Lists.newArrayList(); |
| | | |
| | | for (MultipartFile multipartFile : multipartFiles) { |
| | | try { |
| | | Map<String, Object> fileMap = CommonUtil.makeFileMap(multipartFile); |
| | | convertFileMaps.add(fileMap); |
| | | } catch (Exception e) { |
| | | log.debug("multipartFile -> file 변환 오류" + e.getMessage()); |
| | | if (multipartFiles != null && multipartFiles.size() > 0) { |
| | | for (MultipartFile multipartFile : multipartFiles) { |
| | | try { |
| | | Map<String, Object> fileMap = CommonUtil.makeFileMap(multipartFile); |
| | | convertFileMaps.add(fileMap); |
| | | } catch (Exception e) { |
| | | log.debug("multipartFile -> file 변환 오류" + e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | // 데이터 보정 작업 - 프로젝트에서 제외된 사용자는 담당자에서 제외 될 수 있도록 처리 |
| | | if (!includeProject) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.PROJECT_NOT_INCLUDE_USER)); |
| | | this.messageAccessor.getMessage(MsgConstants.PROJECT_NOT_INCLUDE_DEPARTMENT)); |
| | | } |
| | | } |
| | | // 참여 확인된 부서로 담당부서 변경 |
| | |
| | | boolean hasPermission = false; |
| | | |
| | | // 업무 공간 관리자일 경우 수정 권한을 갖는다. |
| | | hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.WORKSPACE_MANAGER, issueVo, null); |
| | | hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.WORKSPACE_MANAGER, issueVo, null, null); |
| | | // 프로젝트 관리자일 경우 해당 프로젝트에 등록된 이슈는 수정 권한을 갖는다. |
| | | hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.PROJECT_MANAGER, issueVo, null); |
| | | hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.PROJECT_MANAGER, issueVo, null, null); |
| | | // 이슈 등록자일 경우 수정 권한을 갖는다. |
| | | hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.REGISTER, issueVo, null); |
| | | hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.REGISTER, issueVo, null, null); |
| | | // 이슈 담당자일 경우 수정 권한을 갖는다. => 담당부서로 수정 - 체크 |
| | | //hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.ASSIGNEE, issueVo, issueUserVos); |
| | | // 담당자가 없으면 모든 사용자가 수정 권한을 갖는다. |
| | |
| | | } |
| | | |
| | | // 이슈 수정 권한을 확인한다. |
| | | private boolean checkIssueModifyPermission(Boolean hasPermission, String checkType, IssueVo issueVo, List<UserVo> issueUserVos) { |
| | | private boolean checkIssueModifyPermission(Boolean hasPermission, String checkType, IssueVo issueVo, List<UserVo> issueUserVos, List<DepartmentVo> issueDepartmentVos) { |
| | | if (!hasPermission) { |
| | | switch (checkType) { |
| | | case Issue.WORKSPACE_MANAGER: // 업무 공간 관리자 |
| | |
| | | hasPermission = true; |
| | | break; |
| | | } |
| | | |
| | | // 이슈 담당자 여부 확인 => 담당부서로 수정 - 체크 |
| | | /*for (UserVo issueUserVo : issueUserVos) { |
| | | // 이슈 담당자 여부 확인 |
| | | for (UserVo issueUserVo : issueUserVos) { |
| | | if (issueUserVo.getId().equals(this.webAppUtil.getLoginId())) { |
| | | hasPermission = true; |
| | | break; |
| | | } |
| | | }*/ |
| | | } |
| | | break; |
| | | |
| | | case Issue.DEPARTMENT: |
| | | // 담당부서가 없으면 모든 사용자가 수정 권한을 갖는다. |
| | | if (issueDepartmentVos.size() < 1) { |
| | | hasPermission = true; |
| | | break; |
| | | } |
| | | // 이슈 담당부서 여부 확인 |
| | | /*for (DepartmentVo issueDepartmentVo : issueDepartmentVos) { |
| | | if (issueDepartmentVo.getId().equals()) { |
| | | hasPermission = true; |
| | | break; |
| | | } |
| | | }*/ |
| | | break; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | // 이슈 담당자 변경 |
| | | /*@Override |
| | | @Override |
| | | @Transactional |
| | | public void modifyIssueUser(IssueForm issueForm) { |
| | | // 사용하고 있는 업무 공간이 활성 상태인지 확인한다. 사용 공간에서 로그인한 사용자가 비활성인지 확인한다. |
| | |
| | | |
| | | // 사용자 시스템 기능 사용 정보 수집 |
| | | log.info(ElasticSearchUtil.makeUserActiveHistoryMessage(this.webAppUtil.getLoginUser(), ElasticSearchConstants.ISSUE_USER_CHANGE)); |
| | | }*/ |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | issue.setProject(this.projectService.getProject(issueForm.getProjectId())); |
| | | |
| | | // 변경 이력 정보 추출 |
| | | this.issueHistoryService.detectIssueManager(issue, issueForm, detectIssueChange); |
| | | this.issueHistoryService.detectIssueDepartment(issue, issueForm, detectIssueChange); |
| | | |
| | | //this.issueUserService.modifyIssueUser(issue, issue.getProject().getWorkspace(), issueForm.getUserIds()); |
| | | this.issueDepartmentService.modifyIssueDepartment(issue, issue.getProject().getWorkspace(), issueForm.getDepartmentIds()); |
| | |
| | | } |
| | | |
| | | // 이슈 생성, 삭제시 예약 이메일에 등록해놓는다. |
| | | this.reservationIssueEmail(issue.getId(), EmailType.ISSUE_REMOVE); |
| | | this.reservationIssueEmail(issue, EmailType.ISSUE_REMOVE); |
| | | // 이슈 삭제 |
| | | this.issueRepository.delete(issue); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | // 업체 정보 추가 |
| | | private void setIssueCompanyField(Issue issue, IssueVo issueVo) { |
| | | List<IssueCompanyVo> issueCompanyVos = Lists.newArrayList(); |
| | | |
| | | for(IssueCompany issueCompany : issue.getIssueCompanies()){ |
| | | IssueCompanyVo issueCompanyVo = ConvertUtil.copyProperties(issueCompany, IssueCompanyVo.class); |
| | | issueCompanyVo.setId(issueCompany.getId()); |
| | | CompanyField companyField = issueCompany.getCompanyField(); |
| | | if (companyField != null) { |
| | | issueCompanyVo.setCompanyId(issueCompany.getCompanyField().getId()); |
| | | } |
| | | issueCompanyVos.add(issueCompanyVo); |
| | | } |
| | | issueVo.setIssueCompanyVos(issueCompanyVos); |
| | | } |
| | | |
| | | // Isp 정보 추가 |
| | | private void setIssueIspField(Issue issue, IssueVo issueVo) { |
| | | List<IssueIspVo> issueIspVos = Lists.newArrayList(); |
| | | |
| | | for(IssueIsp issueIsp : issue.getIssueIspFields()){ |
| | | IssueIspVo issueIspVo = ConvertUtil.copyProperties(issueIsp, IssueIspVo.class); |
| | | issueIspVo.setId(issueIsp.getId()); |
| | | IspField ispField = issueIsp.getIspField(); |
| | | if (ispField != null) { |
| | | issueIspVo.setIspId(ispField.getId()); |
| | | } |
| | | issueIspVos.add(issueIspVo); |
| | | } |
| | | issueVo.setIssueIspVos(issueIspVos); |
| | | } |
| | | |
| | | // Hosting 정보 추가 |
| | | private void setIssueHostingField(Issue issue, IssueVo issueVo) { |
| | | List<IssueHostingVo> issueHostingVos = Lists.newArrayList(); |
| | | |
| | | for(IssueHosting issueHosting : issue.getIssueHostingFields()){ |
| | | IssueHostingVo issueHostingVo = ConvertUtil.copyProperties(issueHosting, IssueHostingVo.class); |
| | | issueHostingVo.setId(issueHosting.getId()); |
| | | HostingField hostingField = issueHosting.getHostingField(); |
| | | if (hostingField != null) { |
| | | issueHostingVo.setHostingId(hostingField.getId()); |
| | | } |
| | | |
| | | issueHostingVos.add(issueHostingVo); |
| | | } |
| | | issueVo.setIssueHostingVos(issueHostingVos); |
| | | } |
| | | |
| | | // 연관일감 정보 추가 |
| | | private void setRelationIssue(IssueVo issueVo, Long issueId) { |
| | | List<IssueVo> relationIssues = this.issueRelationService.findRelationIssue(issueId); |
| | |
| | | } |
| | | } |
| | | |
| | | //업체, ISP, 호스팅 추가 |
| | | |
| | | results.add(result); |
| | | } catch (Exception e) { |
| | | log.error("엑셀 다운로드 오류 발생"); |
| | |
| | | issueForm.setId(issueId); |
| | | // 이슈 상태 변경 |
| | | this.modifyIssueStatus(issueForm); |
| | | } |
| | | |
| | | // 담당 부서 수정 |
| | | if (issueForm.getDepartmentIds().size() > 0) { |
| | | Issue issue = this.getIssue(issueForm.getId()); |
| | | Project project = this.projectService.getProject(issueForm.getProjectId()); |
| | | |
| | | this.issueDepartmentService.modifyIssueDepartment(issue, project.getWorkspace(), issueForm.getDepartmentIds()); |
| | | } |
| | | } |
| | | |
| | |
| | | Map<String, Priority> priorityMaps = new HashMap<>(); // 우선 순위 모음 |
| | | Map<String, Severity> severityMaps = new HashMap<>(); // 중요도 모음 |
| | | Map<String, Object> userMaps = new HashMap<>(); // 사용자 모음 |
| | | Map<String, Object> departmentMaps = new HashMap<>(); // 부서 모음 |
| | | Map<String, CustomField> customFieldMaps = new HashMap<>(); |
| | | Map<String, IssueStatus> issueStatusReadyMaps = new HashMap<>(); // 상태 속성 '대기'인 이슈 상태 |
| | | Map<Long, Long> issueNumberMaps = new HashMap<>(); // 이슈 번호 모음 |
| | | Map<String, Long> issueTypeCustomFieldMaps = new HashMap<>(); // 이슈 타입 + 사용자 정의 필드 연결 정보 |
| | | Workspace workspace = this.workspaceService.getWorkspace(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId()); // 이슈를 넣으려는 업무 공간 |
| | | // 이슈의 주요 속성을 map 에 저장하여 엑셀 import 에서 지정한 대상(이슈 속성)을 빠르게 찾을 수 있게 한다. |
| | | this.IssueAttributeMapToList(projectMaps, issueTypeMaps, priorityMaps, severityMaps, userMaps, customFieldMaps, issueNumberMaps, issueTypeCustomFieldMaps, issueStatusReadyMaps); |
| | | this.IssueAttributeMapToList(projectMaps, issueTypeMaps, priorityMaps, severityMaps, userMaps, departmentMaps, customFieldMaps, issueNumberMaps, issueTypeCustomFieldMaps, issueStatusReadyMaps); |
| | | // 0.237 - 0.230 |
| | | |
| | | List<IssueForm> issueForms = Lists.newArrayList(); |
| | |
| | | // 이슈 사용자 정의 값 필드 벌크 등록 |
| | | this.bulkInsertIssueCustomFieldValue(issueForms, issueTypeCustomFieldMaps); |
| | | // 3.628 - 3.445 |
| | | |
| | | // 업체,ISP,호스팅 추가 |
| | | |
| | | /*serviceStart.stop(); |
| | | log.debug("2차 저장 시간 : " + serviceStart.getTime());*/ |
| | |
| | | Map<String, Long> issueRiskMap = new HashMap<>(); |
| | | issueRiskMap.put("issueId", issueForm.getId()); |
| | | issueRiskMap.put("changeAssigneeCount", 0L); |
| | | issueRiskMap.put("changeDepartmentCount", 0L); |
| | | issueRiskMap.put("changeIssueStatusCount", 0L); |
| | | issueRiskMap.put("workspaceId", workspace.getId()); |
| | | issueRiskMap.put("issueStatusIds", issueForm.getIssueStatusId()); |
| | |
| | | |
| | | // 이슈의 주요 속성을 map 에 저장하여 엑셀 import 에서 지정한 대상(이슈 속성)을 빠르게 찾을 수 있게 한다. |
| | | private void IssueAttributeMapToList(Map<String, Project> projectMaps, Map<String, IssueType> issueTypeMaps, Map<String, Priority> priorityMaps, Map<String, Severity> severityMaps, |
| | | Map<String, Object> userMaps, Map<String, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, Map<String, Long> issueTypeCustomFieldMaps, Map<String, IssueStatus> issueStatusReadyMaps) { |
| | | Map<String, Object> userMaps, Map<String, Object> departmentMaps, Map<String, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, Map<String, Long> issueTypeCustomFieldMaps, Map<String, IssueStatus> issueStatusReadyMaps) { |
| | | // 프로젝트 키로 바로 찾을 수 있게 준비 |
| | | List<Project> projects = this.projectService.findByWorkspaceId(); |
| | | List<Long> projectIds = Lists.newArrayList(); |
| | |
| | | } |
| | | |
| | | userMaps.put(project.getProjectKey(), userMap); |
| | | |
| | | // 프로젝트에 참여하는 부서 정보 |
| | | List<Map<String, Object>> departments = this.departmentService.findProjectDepartment(project); |
| | | List<Long> departmentList = Lists.newArrayList(); |
| | | // 부서 정보를 저장 |
| | | for (Map<String, Object> department : departments) { |
| | | departmentList.add(MapUtil.getLong(department, "departmentId")); |
| | | } |
| | | } |
| | | |
| | | // 이슈 유형을 바로 찾을 수 있게 준비 |
| | |
| | | |
| | | switch (customField.getCustomFieldType()) { |
| | | case INPUT: |
| | | case NUMBER: |
| | | case DATETIME: |
| | | case IP_ADDRESS: |
| | | case EMAIL: |
| | | case SITE: |
| | | case TEL: |
| | | if (cellValue.length() > 100) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.CUSTOM_FIELD_TEXT_TYPE_MAX_LENGTH_OUT)); |
| | |
| | | if (issueForm.getSendEmails().size() < 1) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.ISSUE_NOT_SEND_USER)); |
| | | }else if (issueForm.getTemplate() != null){ |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.ISSUE_NOT_SELECT_TEMPLATE)); |
| | | } |
| | | |
| | | Issue issue = this.getIssue(issueForm.getId()); |
| | |
| | | |
| | | // 사용자 시스템 기능 사용 정보 수집 |
| | | log.info(ElasticSearchUtil.makeUserActiveHistoryMessage(this.webAppUtil.getLoginUser(), ElasticSearchConstants.ISSUE_ANOTHER_USER_SEND_EMAIL)); |
| | | |
| | | this.systemEmailService.directEmail(issueForm.getSendEmails().toArray(new String[issueForm.getSendEmails().size()]), EmailType.ISSUE_SEND, issueMap, null); |
| | | } |
| | | |
| | | // 이슈를 템플릿에 따라 파트너 담당자에게 메일로 발송한다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public void sendIssueEmailPartners(IssueForm issueForm) { |
| | | if (issueForm.getSendEmails().size() < 1) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.ISSUE_NOT_SEND_USER)); |
| | | }else if (issueForm.getTemplate() == null){ |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.ISSUE_NOT_SELECT_TEMPLATE)); |
| | | } |
| | | |
| | | Issue issue = this.getIssue(issueForm.getId()); |
| | | |
| | | Map<String, Object> issueMap = new HashMap<>(); |
| | | // 이슈 정보를 이메일 전송에 사용하기 위해 Map 형태로 변환한다. |
| | | this.makeIssueMapToIssue(issue, issueMap); |
| | | // 발신자 표시 |
| | | UserVo toUser = this.webAppUtil.getLoginUser(); |
| | | issueMap.put("toUser", toUser.getName() + "(" + CommonUtil.decryptAES128(toUser.getAccount()) + ")"); |
| | | |
| | | // 이슈 링크 |
| | | String projectKey = issue.getProject().getProjectKey(); |
| | | Long IssueNumber = issue.getIssueNumber(); |
| | | String link = this.configuration.getEmailSendUrl() + "/#/issues/issueList?projectKey=" + projectKey + "&issueNumber=" + IssueNumber.toString(); |
| | | |
| | | issueMap.put("issueLink", link); |
| | | issueMap.put("projectLink", link); |
| | | |
| | | // 사용자 시스템 기능 사용 정보 수집 |
| | | log.info(ElasticSearchUtil.makeUserActiveHistoryMessage(this.webAppUtil.getLoginUser(), ElasticSearchConstants.ISSUE_ANOTHER_USER_SEND_EMAIL)); |
| | | StringBuilder sb = new StringBuilder(); |
| | | |
| | | if(issueForm.getTemplate().equals(EmailType.ISSUE_SEND_1.toString())){ |
| | | this.systemEmailService.directEmail(ConvertUtil.ToArray(issueForm.getSendEmails()), EmailType.ISSUE_SEND_1, issueMap, null); |
| | | }else if(issueForm.getTemplate().equals(EmailType.ISSUE_SEND_2.toString())){ |
| | | this.systemEmailService.directEmail(ConvertUtil.ToArray(issueForm.getSendEmails()), EmailType.ISSUE_SEND_2, issueMap, null); |
| | | }else if(issueForm.getTemplate().equals(EmailType.ISSUE_SEND_3.toString())){ |
| | | this.systemEmailService.directEmail(ConvertUtil.ToArray(issueForm.getSendEmails()), EmailType.ISSUE_SEND_3, issueMap, null); |
| | | } |
| | | //메일 전송 이력 남기기 |
| | | this.issueHistoryService.detectSendIssueMail(IssueHistoryType.SEND, issueForm, sb); |
| | | this.issueHistoryService.addIssueHistory(issue, IssueHistoryType.SEND, sb.toString()); |
| | | } |
| | | |
| | | // 예약 발생 이슈를 실행한다 |
| | |
| | | |
| | | @Transactional |
| | | @Override |
| | | public void modifyParentIssue(IssueForm issueForm) { |
| | | Issue issue = this.issueRepository.getOne(issueForm.getId()); |
| | | Long parentIssueId = issueForm.getParentIssueId(); |
| | | if (parentIssueId != null) { |
| | | Issue parentIssue = this.issueRepository.getOne(parentIssueId); |
| | | issue.setParentIssue(parentIssue); |
| | | } else { |
| | | issue.setParentIssue(null); |
| | | public void modifyParentIssue(IssueForm issueDownForm) { |
| | | Issue issue = this.getIssue(issueDownForm.getId()); //하위 이슈 |
| | | Long newParentIssueId = issueDownForm.getParentIssueId(); //변경할 하위이슈의 상위이슈 |
| | | |
| | | StringBuilder sb = new StringBuilder(); |
| | | |
| | | Issue parentIssue = issue.getParentIssue(); //변경 전 하위이슈의 상위이슈 |
| | | if(parentIssue != null){ //변경 전 하위이슈의 상위이슈가 존재 할 경우 |
| | | this.issueHistoryService.detectDownIssues(IssueHistoryType.DELETE, issue, sb); |
| | | this.issueHistoryService.addIssueHistory(parentIssue, IssueHistoryType.MODIFY, sb.toString()); |
| | | } |
| | | |
| | | if (newParentIssueId != null) { // 추가 할 경우 |
| | | parentIssue = this.getIssue(newParentIssueId); //상위이슈(myIssue) |
| | | issue.setParentIssue(parentIssue); //myIssue를 하위이슈의 상위이슈로 set |
| | | this.issueHistoryService.detectDownIssues(IssueHistoryType.ADD, issue, sb); //issue = 하위이슈 |
| | | } else { |
| | | // 삭제 할 경우 |
| | | this.issueHistoryService.detectDownIssues(IssueHistoryType.DELETE, issue, sb); |
| | | issue.setParentIssue(null); |
| | | } |
| | | this.issueHistoryService.addIssueHistory(parentIssue, IssueHistoryType.MODIFY, sb.toString()); //parentIssue = myIssue(기록은 현재 상세페이지에 해야하니까) |
| | | this.issueRepository.saveAndFlush(issue); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void findPartner(Map<String, Object> resJsonData, Map<String, Object> params) { |
| | | Long issueTypeId = MapUtil.getLong(params, "issueTypeId"); |
| | | IssueType issueType = this.issueTypeService.getIssueType(issueTypeId); // 이슈의 이슈유형 객체 |
| | | Integer using = issueType.getUsePartner() != null ? issueType.getUsePartner().intValue() : 0; // 이슈유형별로 사용중인 업체/ISP/호스팅 값 |
| | | |
| | | List<UsePartnerVo> usePartnerVos = Lists.newArrayList(); |
| | | for (Integer usePartner : UsePartner.partners) { //1(업체), 2(ISP), 4(호스팅) |
| | | UsePartnerVo usePartnerVo = UsePartner.checkUsePartner(using, usePartner); |
| | | if (usePartnerVo != null) { |
| | | usePartnerVos.add(usePartnerVo); |
| | | } |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, usePartnerVos); |
| | | } |
| | | } |
| | | } |