From 9f955be440cad5e6b868800ff0a0acd17c0a3004 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 목, 13 1월 2022 15:30:35 +0900
Subject: [PATCH] - issue_company 테이블에 컬럼 추가 및 'tel' 컬럼 사이즈 변경 - 이슈 추가,수정 시 업체 추가된 항목들 추가 - 하위이슈 페이징 오류 수정

---
 src/main/webapp/scripts/app/issue/issueAdd.controller.js |  125 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 123 insertions(+), 2 deletions(-)

diff --git a/src/main/webapp/scripts/app/issue/issueAdd.controller.js b/src/main/webapp/scripts/app/issue/issueAdd.controller.js
index 8efab6a..9789935 100644
--- a/src/main/webapp/scripts/app/issue/issueAdd.controller.js
+++ b/src/main/webapp/scripts/app/issue/issueAdd.controller.js
@@ -39,6 +39,11 @@
                     containsPartner : containsPartner,
                     getPartners : getPartners,
                     getDepartments : getDepartments,
+                    getCompanyTypeListCallBack : getCompanyTypeListCallBack,
+                    getParentSectorListCallBack : getParentSectorListCallBack,
+                    getChildSectorListCallBack : getChildSectorListCallBack,
+                    getRegionListCallBack : getRegionListCallBack,
+                    getStatusListCallBack : getStatusListCallBack,
                 };
 
                 $scope.vm = {
@@ -60,7 +65,17 @@
                         startCompleteDateRange : "", //  �떆�옉�씪 ~ 醫낅즺�씪
                         detectingDateRange : "", //  �깘吏��씪
                         issueCustomFields : [],  //  �씠�뒋�뿉�꽌 �궗�슜�릺�뒗 �궗�슜�옄 �젙�쓽 �븘�뱶
-                        issueStatusId: ""
+                        issueStatusId: "",
+                        companyTypeId : "",
+                        companyType : "", //湲곗뾽援щ텇
+                        parentSectorId : "",
+                        parentSector : "", //�뾽醫�(��遺꾨쪟)
+                        childSectorId : "",
+                        childSector : "", //�뾽醫�(以묐텇瑜�)
+                        regionId : "",
+                        region : "", //吏��뿭
+                        statusId : "",
+                        status : "", //�긽�깭
                     },
                     infiniteAdd : false,    //  �뿰�냽 �깮�꽦
                     projectName : "",   //  �봽濡쒖젥�듃 紐� 寃��깋
@@ -113,6 +128,26 @@
                         hostingField : {
                             page : 0,
                             totalPage : 0
+                        },
+                        companyType : {
+                            page : 0,
+                            totalPage : 0
+                        },
+                        parentSector : {
+                            page : 0,
+                            totalPage : 0
+                        },
+                        childSector : {
+                            page : 0,
+                            totalPage : 0
+                        },
+                        region : {
+                            page : 0,
+                            totalPage : 0
+                        },
+                        status : {
+                            page : 0,
+                            totalPage : 0
                         }
                     },
                     summerNote : {
@@ -123,6 +158,14 @@
                     priorities : [],    //  �슦�꽑�닚�쐞 �젙蹂�
                     severities : [],    //  以묒슂�룄 �젙蹂�
                     fileTableConfigs : [],   //  �뙆�씪 �뾽濡쒕뱶 �젙蹂� �뀒�씠釉�
+
+                    typeCategory : {
+                        companyType : "COMPANYTYPE",
+                        parentSector : "PARENTSECTOR",
+                        childSector : "CHILDSECTOR",
+                        region : "REGION",
+                        status : "STATUS"
+                    },
                 };
 
                 // �뿰愿� �씪媛� 愿��젴
@@ -380,6 +423,31 @@
                     $scope.vm.autoCompletePage.hostingField.totalPage = result.data.page.totalPage;
                 }
 
+                // 湲곗뾽援щ텇 autocomplete page �뾽�뜲�씠�듃
+                function getCompanyTypeListCallBack(result) {
+                    $scope.vm.autoCompletePage.companyType.totalPage = result.data.page.totalPage;
+                }
+
+                // �뾽醫�(��遺꾨쪟) autocomplete page �뾽�뜲�씠�듃
+                function getParentSectorListCallBack(result) {
+                    $scope.vm.autoCompletePage.parentSector.totalPage = result.data.page.totalPage;
+                }
+
+                // �뾽醫�(以묐텇瑜�) 移댄뀒怨좊━ autocomplete page �뾽�뜲�씠�듃
+                function getChildSectorListCallBack(result) {
+                    $scope.vm.autoCompletePage.childSector.totalPage = result.data.page.totalPage;
+                }
+
+                // 吏��뿭 移댄뀒怨좊━ autocomplete page �뾽�뜲�씠�듃
+                function getRegionListCallBack(result) {
+                    $scope.vm.autoCompletePage.region.totalPage = result.data.page.totalPage;
+                }
+
+                // �긽�깭 移댄뀒怨좊━ autocomplete page �뾽�뜲�씠�듃
+                function getStatusListCallBack(result) {
+                    $scope.vm.autoCompletePage.status.totalPage = result.data.page.totalPage;
+                }
+
                 // �뤌 泥댄겕
                 function formCheck(formInvalid) {
                     if (formInvalid) {
@@ -400,6 +468,16 @@
                     $scope.vm.companyEmail = result[0].email;
                     $scope.vm.companyUrl = result[0].url;
                     $scope.vm.companyMemo = result[0].memo;
+                    $scope.vm.form.companyTypeId = result[0].companyTypeId;
+                    $scope.vm.form.parentSectorId = result[0].parentSectorId;
+                    $scope.vm.form.childSectorId = result[0].childSectorId;
+                    $scope.vm.form.regionId = result[0].regionId;
+                    $scope.vm.form.statusId = result[0].statusId;
+                    $scope.vm.form.companyType = result[0].companyTypeName;
+                    $scope.vm.form.parentSector = result[0].parentSectorName;
+                    $scope.vm.form.childSector = result[0].childSectorName;
+                    $scope.vm.form.region = result[0].regionName;
+                    $scope.vm.form.status = result[0].statusName;
 
                     $scope.vm.ispId = "";
                     $scope.vm.ispName = "";
@@ -561,7 +639,12 @@
                                     tel : $scope.vm.companyTel,
                                     email :$scope.vm.companyEmail,
                                     url :$scope.vm.companyUrl,
-                                    memo : $scope.vm.companyMemo
+                                    memo : $scope.vm.companyMemo,
+                                    companyTypeId : companyField.companyTypeId,
+                                    parentSectorId : companyField.parentSectorId,
+                                    childSectorId : companyField.childSectorId,
+                                    regionId : companyField.regionId,
+                                    statusId : companyField.statusId
                                 });
                             }
                             return issueCompanyFields;
@@ -572,6 +655,44 @@
                         companyEmail :$scope.vm.companyEmail,
                         companyUrl :$scope.vm.companyUrl,
                         companyMemo : $scope.vm.companyMemo,
+                        companyTypeId : (function () {
+                            var companyTypeId = -1;
+                            if ($scope.vm.form.companyTypes != null) {
+                                companyTypeId = $scope.vm.form.companyTypes[0].id;
+                            }
+                            return companyTypeId;
+                        })(),
+                        parentSectorId : (function () {
+                            var parentSectorId = -1;
+                            if ($scope.vm.form.parentSectors != null) {
+                                parentSectorId = $scope.vm.form.parentSectors[0].id;
+                            }
+                            return parentSectorId;
+                        })(),
+                        childSectorId : (function () {
+                            var childSectorId = -1;
+                            if ($scope.vm.form.childSectors != null) {
+                                childSectorId = $scope.vm.form.childSectors[0].id;
+                            }
+                            return childSectorId;
+                        })(),
+                        regionId : (function () {
+                            var regionId = -1;
+                            if ($scope.vm.form.regions != null) {
+                                regionId = $scope.vm.form.regions[0].id;
+                            }
+                            return regionId;
+                        })(),
+                        statusId : (function () {
+                            var statusId = -1;
+                            if ($scope.vm.form.statuses != null) {
+                                statusId = $scope.vm.form.statuses[0].id;
+                            } else if ($scope.vm.form.status !== ""){
+                                statusId = 120; //吏곸젒�엯�젰 �씪 寃쎌슦
+                            }
+                            return statusId;
+                        })(),
+                        statusName : $scope.vm.form.status,
 
                         issueIspFields : (function () {
                             var issueIspFields = [];

--
Gitblit v1.8.0