OWL ITS + 탐지시스템(인터넷 진흥원)
wyu
2021-12-28 fed164fcc7b782f1d773cdfc10a3d9f44264c8cd
src/main/webapp/scripts/app/issue/issueAddRelation.controller.js
@@ -39,6 +39,7 @@
                    containsPartner : containsPartner,
                    getPartners : getPartners,
                    addRelationIssue : addRelationIssue,
                    getDepartments : getDepartments
                };
                $scope.vm = {
@@ -168,6 +169,8 @@
                $scope.$watch("vm.form.issueTypeId", function (newValue, oldValue) {
                    $scope.vm.partnerVos = $scope.fn.getPartners();
                    $scope.vm.form.departments = [];
                    getDepartments(Number(newValue));
                });
                //  섬머노트 이미지 업로드
@@ -395,6 +398,9 @@
                // 업체정보 결과 값 Event 처리(set)
                $scope.$on("companyFieldEvent", function (event, result) {
                    var ispFieldVo = result[0].ispFieldVo;
                    var hostingFieldVo = result[0].hostingFieldVo;
                    $scope.vm.companyId = result[0].id;
                    $scope.vm.companyName = result[0].name;
                    $scope.vm.companyManager = result[0].manager;
@@ -403,6 +409,44 @@
                    $scope.vm.companyUrl = result[0].url;
                    $scope.vm.companyMemo = result[0].memo;
                    $scope.vm.ispId = "";
                    $scope.vm.ispName = "";
                    $scope.vm.ispCode = "";
                    $scope.vm.ispManager = "";
                    $scope.vm.ispTel = "";
                    $scope.vm.ispEmail = "";
                    $scope.vm.ispUrl = "";
                    $scope.vm.ispMemo = "";
                    $scope.vm.hostingId = "";
                    $scope.vm.hostingName = "";
                    $scope.vm.hostingCode = "";
                    $scope.vm.hostingManager = "";
                    $scope.vm.hostingTel = "";
                    $scope.vm.hostingEmail = "";
                    $scope.vm.hostingUrl = "";
                    $scope.vm.hostingMemo = "";
                    if (ispFieldVo != null){
                        $scope.vm.ispId = ispFieldVo.id;
                        $scope.vm.ispName = ispFieldVo.name;
                        $scope.vm.ispCode = ispFieldVo.code;
                        $scope.vm.ispManager = ispFieldVo.manager;
                        $scope.vm.ispTel = ispFieldVo.tel;
                        $scope.vm.ispEmail = ispFieldVo.email;
                        $scope.vm.ispUrl = ispFieldVo.url;
                        $scope.vm.ispMemo = ispFieldVo.memo;
                    }
                    if (hostingFieldVo != null){
                        $scope.vm.hostingId = hostingFieldVo.id;
                        $scope.vm.hostingName = hostingFieldVo.name;
                        $scope.vm.hostingCode = hostingFieldVo.code;
                        $scope.vm.hostingManager = hostingFieldVo.manager;
                        $scope.vm.hostingTel = hostingFieldVo.tel;
                        $scope.vm.hostingEmail = hostingFieldVo.email;
                        $scope.vm.hostingUrl = hostingFieldVo.url;
                        $scope.vm.hostingMemo = hostingFieldVo.memo;
                    }
                });
                // ISP정보 결과 값 Event 처리(set)
@@ -496,7 +540,7 @@
                        hostingId : (function () {
                            var hostingId = -1;
                            if ($scope.vm.form.issueHostingFields.length > 0) {
                            if ($scope.vm.form.issueHostingFields != null && $scope.vm.form.issueHostingFields.length > 0) {
                                hostingId = $scope.vm.form.issueHostingFields[0].id;
                            }
@@ -656,7 +700,6 @@
                                id : parameter.id
                            });
                            $rootScope.$broadcast("getIssueList");
                        }
                        else {
                            SweetAlert.error($filter("translate")("issue.failedIssueModify"), result.data.message.message); // 이슈 수정 실패
@@ -688,7 +731,10 @@
                        $resourceProvider.getPageContent(0, 10))).then(function (result) {
                        if (result.data.message.status === "success") {
                            $scope.fn.getIssueDetail();
                            //  이슈 상세 화면 요청
                            $rootScope.$broadcast("getIssueDetail", {
                                id : parameter.id
                            });
                        }
                        else {
                            SweetAlert.error($filter("translate")("issue.failedToIssueAddIssueRelation"), result.data.message.message); // "연관일감 생성 실패"
@@ -880,6 +926,27 @@
                }
                function getDepartments(issueTypeId) {
                    if($rootScope.isDefined(issueTypeId) && $scope.vm.form.issueTypeId === ""){
                        $scope.vm.form.issueTypeId = $rootScope.issueTypeMenu.id
                    }
                    var content = {
                        issueTypeId : $scope.vm.form.issueTypeId,
                    };
                    Issue.findReadyDepartments($resourceProvider.getContent(
                        content,
                        $resourceProvider.getPageContent(0, 1))).then(function (result) {
                        if (result.data.message.status === "success") {
                            $scope.vm.form.departments = [];
                            angular.forEach(result.data.data, function (department) {
                                department.byName = department.departmentName;
                                $scope.vm.form.departments.push(department);
                            });
                        }
                    });
                }
                //  최초 실행
                function startExecute() {
@@ -887,7 +954,8 @@
                        getIssueTypes : $scope.fn.getIssueTypes(),
                        getPriorities : $scope.fn.getPriorities(),
                        getSeverities : $scope.fn.getSeverities(),
                        getPartners : $scope.fn.getPartners()
                        getPartners : $scope.fn.getPartners(),
                        //getDepartments : $scope.fn.getDepartments()
                    };
                    $q.all(promises).then(function (results) {
                        // 현재 프로젝트 설정