Merge branch 'master' of http://192.168.0.25:9001/r/owl-kisa
Conflicts:
src/main/webapp/scripts/app/issue/issueAdd.controller.js
src/main/webapp/scripts/app/issue/issueDetail.controller.js
src/main/webapp/scripts/app/issue/issueModify.controller.js
| | |
| | | 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 |
| | |
| | | ], |
| | | function (app, angular) { |
| | | app.controller('issueAddController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', '$uibModal', '$injector', |
| | | '$controller', '$tableProvider', 'SweetAlert', '$timeout', '$stateParams', '$q', 'Issue', 'User', 'AttachedFile', 'IssueType', 'HostingField','Priority', 'Severity', 'IssueTypeCustomField', '$filter', '$state', |
| | | '$controller', '$tableProvider', 'SweetAlert', '$timeout', '$stateParams', '$q', 'Issue', 'User', 'AttachedFile', 'IssueType', 'Priority', 'Severity', 'IssueTypeCustomField', '$filter', '$state', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, $uibModal, $injector, $controller, $tableProvider, SweetAlert, $timeout, |
| | | $stateParams, $q, Issue, User, AttachedFile, IssueType, HostingField, Priority, Severity, IssueTypeCustomField, $filter, $state) { |
| | | $stateParams, $q, Issue, User, AttachedFile, IssueType, Priority, Severity, IssueTypeCustomField, $filter, $state) { |
| | | |
| | | $scope.fn = { |
| | | cancel : cancel, // 팝업 창 닫기 |
| | |
| | | removeDepartment : removeDepartment, // 담당부서 삭제 |
| | | setIssueTypeTemplate : setIssueTypeTemplate, // 이슈 유형 템플릿 적용하기 |
| | | startExecute : startExecute, // 컨트롤 로딩시 처음으로 시작되는 함수 |
| | | containsPartner : containsPartner, |
| | | getPartners : getPartners |
| | | containsPartner : containsPartner |
| | | }; |
| | | |
| | | $scope.vm = { |
| | |
| | | $scope.$watch("vm.form.projects", function (newValue, oldValue) { |
| | | if (angular.isDefined(newValue)) { |
| | | if (newValue.length < 1) { |
| | | $scope.vm.form.departments = []; |
| | | $scope.vm.form.issueCustomFields = []; |
| | | $scope.vm.form.users = []; |
| | | } |
| | | else { |
| | | if ($rootScope.isDefined($scope.vm.issueTypeId)) { |
| | | $scope.fn.getIssueTypeCustomFields(); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | $scope.$watch("vm.form.issueTypeId", function (newValue, oldValue) { |
| | | $scope.vm.partnerVos = $scope.fn.getPartners(); |
| | | // 이슈 유형에 연결된 사용자 정의 필드 가져오기 |
| | | $scope.fn.getIssueTypeCustomFields(); |
| | | } |
| | | }); |
| | | |
| | | // 섬머노트 이미지 업로드 |
| | |
| | | function containsPartner(name) { |
| | | var result = false; |
| | | |
| | | if ($scope.vm.partnerVos != null) { |
| | | $scope.vm.partnerVos.forEach(function (partnerVo) { |
| | | if ($scope.vm.viewer.usePartnerVo != null) { |
| | | $scope.vm.viewer.usePartnerVo.forEach(function (partnerVo) { |
| | | if (name === partnerVo.name) { |
| | | result = true; |
| | | } |
| | | }); |
| | | } |
| | | return result; |
| | | |
| | | } |
| | | |
| | | // 담당자 autocomplete page 업데이트트 |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | function getPartners() { |
| | | |
| | | HostingField.getPartnerList($resourceProvider.getContent( |
| | | {}, |
| | | $resourceProvider.getPageContent(0, 1))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.partnerVos = result.data.content; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | | // 최초 실행 |
| | | function startExecute() { |
| | |
| | | ], |
| | | function (app, angular) { |
| | | app.controller('issueDetailController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$tableProvider', '$state', '$uibModal', '$q', |
| | | '$controller', '$injector', 'SweetAlert', '$timeout', 'Issue', 'IssueComment', 'IssueRelation', 'AttachedFile', 'Priority', 'Severity','IssueStatus', 'HostingField', 'IssueTableConfig', '$filter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $tableProvider, $state, $uibModal, $q, $controller, $injector, SweetAlert, $timeout, Issue, IssueComment, IssueRelation, AttachedFile, Priority, Severity, IssueStatus, HostingField, IssueTableConfig, $filter) { |
| | | '$controller', '$injector', 'SweetAlert', '$timeout', 'Issue', 'IssueComment', 'IssueRelation', 'AttachedFile', 'Priority', 'Severity','IssueStatus', 'IssueTableConfig', '$filter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $tableProvider, $state, $uibModal, $q, $controller, $injector, SweetAlert, $timeout, Issue, IssueComment, IssueRelation, AttachedFile, Priority, Severity, IssueStatus, IssueTableConfig, $filter) { |
| | | |
| | | // IssueListController vm, fn 변수 상속. |
| | | |
| | |
| | | $scope.fn.getRelTableConfigs = getRelTableConfigs; |
| | | $scope.fn.getDownTableConfigs = getDownTableConfigs; |
| | | $scope.fn.containsPartner = containsPartner; |
| | | $scope.fn.getPartners = getPartners; |
| | | |
| | | // 이슈 목록 컨트롤러 vm, fn 상속 중 |
| | | $scope.vm.viewer = []; |
| | | $scope.vm.viewer = {}; |
| | | $scope.vm.images = []; // 첨부된 파일 중 이미지 파일 |
| | | $scope.vm.activeTab = "ALL"; // 활동 내역 탭 |
| | | // 이슈 상태 변경 표시 여부 |
| | |
| | | }); |
| | | } |
| | | |
| | | // 업체/ISP/호스팅 이름이 포함 여부 확인 |
| | | function containsPartner(name) { |
| | | var result = false; |
| | | |
| | | if ($scope.vm.viewer.usePartnerVo != null) { |
| | | $scope.vm.viewer.usePartnerVo.forEach(function (partnerVo) { |
| | | if (name === partnerVo.name) { |
| | | result = true; |
| | | } |
| | | }); |
| | | } |
| | | return result; |
| | | |
| | | } |
| | | |
| | | // 이슈 상세 정보 조회 |
| | | function getIssueDetail() { |
| | | // 초기화 해야할 할목을 지정하여 다른 이슈를 클릭할 때 초기화해준다. |
| | |
| | | if (result.data.message.status === "success") { |
| | | if (angular.isDefined(result.data.data)) { |
| | | $scope.vm.viewer = angular.copy(result.data.data); |
| | | |
| | | // 이슈 이미지 미리 보기 만들기 |
| | | $scope.fn.makePreviewImages(result.data.data.attachedFileVos); |
| | | // 활동 이력 만들기 |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | // =================================================================================== |
| | | |
| | | // 업체/ISP/호스팅 이름이 포함 여부 확인 |
| | | function containsPartner(name) { |
| | | var result = false; |
| | | // 일단 viewer를 맨위에 선언해 {} 이렇게 선언해 두었는데 값들이 어떤식으로 변환이 됬는지는 |
| | | // 몰라서 배열로 넘어와서 초기값을 배열로 바꾸었더니 이슈 상세에서는 보인다 |
| | | // 이제 이슈 추가에서 값이 어떻게 넘어오는지 확인해보자! |
| | | if ($scope.vm.viewer.usePartnerVos != null) { |
| | | $scope.vm.viewer.usePartnerVos.forEach(function (partnerVo) { |
| | | if (name === partnerVo.name) { |
| | | result = true; |
| | | } |
| | | }); |
| | | } |
| | | return result; |
| | | |
| | | } |
| | | // 이슈 이미지 미리 보기 만들기 |
| | | function makePreviewImages(attachedFileVos) { |
| | | // 미리보기 이미지 초기화 |
| | |
| | | SweetAlert.error($filter("translate")("issue.failedToAttachmentList"), result.message.message); // "첨부 파일 목록 조회 실패" |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function getPartners() { |
| | | |
| | | HostingField.getPartnerList($resourceProvider.getContent( |
| | | {}, |
| | | $resourceProvider.getPageContent(0, 1))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.partnerVos = result.data.data.usePartnerVos; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | // 특정 사용자에게 이슈를 메일로 발송 |
| | |
| | | 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(); |
| | |
| | | priorityId : "", // 우선순위 아이디 |
| | | severityId : "", // 중요도 아이디 |
| | | issueStatusId : "", // 이슈 상태 아이디 |
| | | users : [], // 담당자 |
| | | // users : [], // 담당자 |
| | | departments : [], // 담당부서 |
| | | files : [], // 업로드 파일 |
| | | attachedFiles : [], // 섬머노트로 파일 업로드를 할 경우 서버에서 pk를 따고 issue id와 연동 작업이 필요하다. |
| | |
| | | {}, |
| | | $resourceProvider.getPageContent(0, 1))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.partnerVos = result.data.data.usePartnerVos; |
| | | $scope.vm.partnerVos = result.data.content; |
| | | } |
| | | }); |
| | | |
| | |
| | | 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) { |