이슈 추가,수정 페이지에서 이슈유형별로 적용한 파트너 목록 보이기 수정 완료
| | |
| | | Map<String, Object> findTask(IssueCondition taskCondition); |
| | | |
| | | void modifyParentIssue(IssueForm issueForm); |
| | | |
| | | void findPartner(Map<String, Object> resJsonData, Map<String, Object> params); |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 이슈 조회 |
| | | @RequestMapping(value = "/issue/findPartner", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> findPartner(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | |
| | | this.issueService.findPartner(resJsonData, params.get(Constants.REQ_KEY_CONTENT)); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 이슈 상세 조회 |
| | | @RequestMapping(value = "/issue/detail", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | |
| | | removeDepartment : removeDepartment, // 담당부서 삭제 |
| | | setIssueTypeTemplate : setIssueTypeTemplate, // 이슈 유형 템플릿 적용하기 |
| | | startExecute : startExecute, // 컨트롤 로딩시 처음으로 시작되는 함수 |
| | | containsPartner : containsPartner |
| | | containsPartner : containsPartner, |
| | | getPartners : getPartners |
| | | }; |
| | | |
| | | $scope.vm = { |
| | | partnerVos : "", |
| | | form : { |
| | | title : "", // 제목 |
| | | description : "", // 내용 |
| | |
| | | // 이슈 유형에 연결된 사용자 정의 필드 가져오기 |
| | | $scope.fn.getIssueTypeCustomFields(); |
| | | } |
| | | }); |
| | | |
| | | $scope.$watch("vm.form.issueTypeId", function (newValue, oldValue) { |
| | | $scope.vm.partnerVos = $scope.fn.getPartners(); |
| | | }); |
| | | |
| | | // 섬머노트 이미지 업로드 |
| | |
| | | function containsPartner(name) { |
| | | var result = false; |
| | | |
| | | if ($scope.vm.viewer.usePartnerVo != null) { |
| | | $scope.vm.viewer.usePartnerVo.forEach(function (partnerVo) { |
| | | if ($scope.vm.partnerVos != null) { |
| | | $scope.vm.partnerVos.forEach(function (partnerVo) { |
| | | if (name === partnerVo.name) { |
| | | result = true; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | function getPartners() { |
| | | var content = { |
| | | issueTypeId : $scope.vm.form.issueTypeId |
| | | }; |
| | | Issue.findPartners($resourceProvider.getContent( |
| | | content, |
| | | $resourceProvider.getPageContent(0, 1))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.partnerVos = result.data.data; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | // 최초 실행 |
| | | function startExecute() { |
| | | |
| | | var promises = { |
| | | getIssueTypes : $scope.fn.getIssueTypes(), |
| | | getPriorities : $scope.fn.getPriorities(), |
| | | getSeverities : $scope.fn.getSeverities() |
| | | getSeverities : $scope.fn.getSeverities(), |
| | | getPartners : $scope.fn.getPartners() |
| | | }; |
| | | $q.all(promises).then(function (results) { |
| | | // 현재 프로젝트 설정 |
| | |
| | | function containsPartner(name) { |
| | | var result = false; |
| | | |
| | | if ($scope.vm.viewer.usePartnerVo != null) { |
| | | $scope.vm.viewer.usePartnerVo.forEach(function (partnerVo) { |
| | | if ($scope.vm.viewer.usePartnerVos != null) { |
| | | $scope.vm.viewer.usePartnerVos.forEach(function (partnerVo) { |
| | | if (name === partnerVo.name) { |
| | | result = true; |
| | | } |
| | |
| | | listView : listView, // 목록 화면으로 변경 |
| | | importExcel : importExcel, // 엑셀 import 기능 팝업 호출 |
| | | getIssueTypes : getIssueTypes, // 이슈 유형 목록을 가져온다. |
| | | getUsePartner : getUsePartner, // 이슈 유형 별 사용하는 파트너 목록을 가져온다. |
| | | getPriorities : getPriorities, // 우선순위 목록을 가져온다. |
| | | getSeverities : getSeverities, // 중요도 목록을 가져온다. |
| | | getIssueStatuses : getIssueStatuses, // 이슈 상태 목록을 가져온다. |
| | |
| | | // 변수 |
| | | $scope.vm = { |
| | | issueTypeId : "", |
| | | partnerVos : "", |
| | | search : { |
| | | title : "", // 제목 |
| | | description : "", // 내용 |
| | |
| | | projects : [], // 프로젝트 |
| | | issueStatuses : [], // 이슈 상태 |
| | | issueTypes : [], // 이슈 유형 |
| | | partners : [], // 이슈 유형 |
| | | priorities : [], // 우선 순위 |
| | | severities : [], // 중요도 |
| | | users : [], // 담당자 |
| | |
| | | return deferred.promise; |
| | | } |
| | | |
| | | // 이슈유형 별 파트너 목록 |
| | | function getUsePartner() { |
| | | var deferred = $q.defer(); |
| | | $scope.vm.partners = []; |
| | | |
| | | Issue.findPartners($resourceProvider.getContent({}, |
| | | $resourceProvider.getPageContent(0, 1))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.partnerVos = result.data.content; |
| | | } |
| | | else { |
| | | SweetAlert.swal($filter("translate")("issue.failedToPriorityListLookup"), result.data.message.message, "error"); // 우선순위 목록 조회 실패 |
| | | } |
| | | |
| | | deferred.resolve(result.data.data); |
| | | }); |
| | | |
| | | return deferred.promise; |
| | | } |
| | | |
| | | // 우선순위 목록 |
| | | function getPriorities() { |
| | | var deferred = $q.defer(); |
| | |
| | | } |
| | | |
| | | function getPartners() { |
| | | |
| | | HostingField.getPartnerList($resourceProvider.getContent( |
| | | {}, |
| | | var content = { |
| | | issueTypeId : $scope.vm.form.issueTypeId |
| | | }; |
| | | Issue.findPartners($resourceProvider.getContent( |
| | | content, |
| | | $resourceProvider.getPageContent(0, 1))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.partnerVos = result.data.content; |
| | | $scope.vm.partnerVos = result.data.data; |
| | | } |
| | | }); |
| | | |
| | |
| | | var promises = { |
| | | detail : $scope.fn.detail(), |
| | | getIssueTypes : $scope.fn.getIssueTypes(), |
| | | getPriorities : $scope.fn.getPriorities(), |
| | | getSeverities : $scope.fn.getSeverities(), |
| | | getPartners : $scope.fn.getPartners() |
| | | }; |
| | |
| | | return response; |
| | | }); |
| | | }, |
| | | findPartners : function (conditions) { |
| | | return $http.post("issue/findPartner", conditions).then(function (response) { |
| | | $log.debug("사용하는 파트너 목록 데이터 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | add : function (conditions) { |
| | | conditions.url = "issue/add"; |
| | | return $upload.upload(conditions).progress(function (evt) { |
| | |
| | | |
| | | var deferred = $q.defer(); |
| | | |
| | | HostingField.getCompanyList($resourceProvider.getContent( // 페이징 업데이트가 필요한 컴포넌트 일경우, page 업데이트가 있을 경우 기본 10개씩 가져오고 아닐경우 25개씩 가져온다. |
| | | HostingField.getPartnerList($resourceProvider.getContent( // 페이징 업데이트가 필요한 컴포넌트 일경우, page 업데이트가 있을 경우 기본 10개씩 가져오고 아닐경우 25개씩 가져온다. |
| | | conditions, $resourceProvider.getPageContent($rootScope.isDefined(page) ? page : 0, $rootScope.isDefined(page) ? 10 : 25))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | if ($rootScope.isDefined(callBack)) { |
| | |
| | | <js-autocomplete-multi data-input-name="departments" |
| | | selected-model="vm.form.companies" |
| | | search="vm.companyName" |
| | | source="fn.getCompanyList(vm.companyName, vm.form.companies)" |
| | | source="fn.getPartnerList(vm.companyName, vm.form.companies)" |
| | | input-disabled="false" |
| | | translation-texts="{ count : 'common.userNum', empty : 'common.emptyUser' }" |
| | | extra-settings="{ displayProp : 'byName' , idProp : 'id', imageable : false, maxlength : 100, autoResize : true }"></js-autocomplete-multi> |
| | |
| | | <js-autocomplete-multi data-input-name="departments" |
| | | selected-model="vm.form.companies" |
| | | search="vm.companyName" |
| | | source="fn.getCompanyList(vm.companyName, vm.form.companies)" |
| | | source="fn.getPartnerList(vm.companyName, vm.form.companies)" |
| | | input-disabled="false" |
| | | translation-texts="{ count : 'common.userNum', empty : 'common.emptyUser' }" |
| | | extra-settings="{ displayProp : 'byName' , idProp : 'id', imageable : false, maxlength : 100, autoResize : true }"></js-autocomplete-multi> |