| | |
| | | private Long id; |
| | | private String issueTableConfigs; |
| | | private int issueTableType; |
| | | private Long issueId; |
| | | private Long issueTypeId; |
| | | |
| | | @ManyToOne(fetch = FetchType.LAZY) |
| | | @JoinColumn(name = "workspace_id") |
| | |
| | | this.issueTableType = issueTableType; |
| | | } |
| | | |
| | | public Long getIssueId() { |
| | | return issueId; |
| | | public Long getIssueTypeId() { |
| | | return issueTypeId; |
| | | } |
| | | |
| | | public void setIssueId(Long issueId) { |
| | | this.issueId = issueId; |
| | | public void setIssueTypeId(Long issueTypeId) { |
| | | this.issueTypeId = issueTypeId; |
| | | } |
| | | } |
| | |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | public interface IssueTableConfigRepository extends JpaRepository<IssueTableConfig, Long> { |
| | | IssueTableConfig findByUserIdAndWorkspaceIdAndIssueIdAndIssueTableType(@Param("userId") Long userId, @Param("workspaceId") Long workspaceId, @Param("issueId") Long issueId, @Param("issueTableType") int issueTableType); |
| | | IssueTableConfig findByUserIdAndWorkspaceIdAndIssueTypeIdAndIssueTableType(@Param("userId") Long userId, @Param("workspaceId") Long workspaceId, @Param("issueTypeId") Long issueTypeId, @Param("issueTableType") int issueTableType); |
| | | |
| | | IssueTableConfig findByIssueIdAndIssueTableType(@Param("issueId") Long issueId, @Param("issueTableType") int issueTableType); |
| | | IssueTableConfig findByIssueTypeIdAndIssueTableType(@Param("issueTypeId") Long issueTypeId, @Param("issueTableType") int issueTableType); |
| | | |
| | | } |
| | |
| | | |
| | | IssueTableConfig addDownIssueTableConfig(Map<String, Object> params); |
| | | |
| | | void detailIssueTableConfig(Map<String, Object> resJsonData); |
| | | void detailIssueTableConfig(Map<String, Object> params, Map<String, Object> resJsonData); |
| | | |
| | | void detailRelationIssueTableConfig(Map<String, Object> params, Map<String, Object> resJsonData); |
| | | |
| | | void detailDownIssueTableConfig(Map<String, Object> params, Map<String, Object> resJsonData); |
| | | |
| | | IssueTableConfig findByUserIdAndWorkspaceIdAndIssueIdAndIssueTableType(Long issueId, int issueTableType); |
| | | IssueTableConfig findByUserIdAndWorkspaceIdAndIssueTypeIdAndIssueTableType(Long issueId, int issueTableType); |
| | | |
| | | IssueTableConfig findByIssueIdAndIssueTableType(Long issueId, int issueTableType); |
| | | IssueTableConfig findByIssueTypeIdAndIssueTableType(Long issueTypeId, int issueTableType); |
| | | |
| | | } |
| | |
| | | return this.issueTableConfigRepository; |
| | | } |
| | | |
| | | Long issueId; |
| | | Long issueTypeId; |
| | | int issueTableType = 0; //issueTableType 초기값 설정 |
| | | |
| | | // add 중복코드 제거 |
| | | public IssueTableConfig addMultipleCode(Map<String, Object> params, Long issueId, int issueTableType) { |
| | | public IssueTableConfig addIssueTableConfig(Map<String, Object> params, Long issueTypeId, int issueTableType) { |
| | | String issueTableConfigs = MapUtil.getString(params, "issueTableConfigs"); |
| | | IssueTableConfig issueTableConfig = this.findByUserIdAndWorkspaceIdAndIssueIdAndIssueTableType(issueId, issueTableType); |
| | | //IssueTableConfig saveIssueTableType = this.findByIssueIdAndIssueTableType(issueId,issueTableType); |
| | | IssueTableConfig issueTableConfig = this.findByUserIdAndWorkspaceIdAndIssueTypeIdAndIssueTableType(issueTypeId, issueTableType); |
| | | |
| | | // 아직 테이블 컬럼 설정을 하지 않았을 경우 |
| | | if (issueTableConfig == null) { |
| | |
| | | User user = this.userService.getUser(this.webAppUtil.getLoginId()); |
| | | issueTableConfig.setWorkspace(workspace); |
| | | issueTableConfig.setUser(user); |
| | | issueTableConfig.setIssueId(issueId); |
| | | issueTableConfig.setIssueTypeId(issueTypeId); |
| | | issueTableConfig.setIssueTableType(issueTableType); |
| | | issueTableConfig.setIssueTableConfigs(issueTableConfigs); |
| | | /*}else if(saveIssueTableType == null){ |
| | | issueTableConfig = new IssueTableConfig(); |
| | | Workspace workspace = this.workspaceService.getWorkspace(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId()); |
| | | User user = this.userService.getUser(this.webAppUtil.getLoginId()); |
| | | issueTableConfig.setWorkspace(workspace); |
| | | issueTableConfig.setUser(user); |
| | | issueTableConfig.setIssueId(issueId); |
| | | issueTableConfig.setIssueTableType(issueTableType); |
| | | issueTableConfig.setIssueTableConfigs(issueTableConfigs);*/ |
| | | }else { |
| | | issueTableConfig.setIssueTableConfigs(issueTableConfigs); |
| | | } |
| | |
| | | @Override |
| | | @Transactional |
| | | public IssueTableConfig addIssueTableConfig(Map<String, Object> params) { |
| | | issueId = (long) -1; |
| | | issueTableType = 1; |
| | | return this.addMultipleCode(params, issueId, issueTableType); |
| | | issueTypeId = MapUtil.getLong(params, "issueTypeId"); |
| | | issueTableType = 1; //메인 |
| | | return this.addIssueTableConfig(params, issueTypeId, issueTableType); |
| | | } |
| | | // 연관 이슈 테이블 설정 정보 저장 |
| | | @Override |
| | | public IssueTableConfig addRelationIssueTableConfig(Map<String, Object> params) { |
| | | issueId = MapUtil.getLong(params, "issueId"); |
| | | issueTableType = 2; |
| | | return this.addMultipleCode(params, issueId, issueTableType); |
| | | issueTypeId = MapUtil.getLong(params, "issueTypeId"); |
| | | issueTableType = 2; //연관 |
| | | return this.addIssueTableConfig(params, issueTypeId, issueTableType); |
| | | } |
| | | // 하위 이슈 테이블 설정 정보 저장 |
| | | @Override |
| | | public IssueTableConfig addDownIssueTableConfig(Map<String, Object> params) { |
| | | issueId = MapUtil.getLong(params, "issueId"); |
| | | issueTableType = 3; |
| | | return this.addMultipleCode(params, issueId, issueTableType); |
| | | issueTypeId = MapUtil.getLong(params, "issueTypeId"); |
| | | issueTableType = 3; //하위 |
| | | return this.addIssueTableConfig(params, issueTypeId, issueTableType); |
| | | } |
| | | |
| | | // 해당 업무 공간에서 사용자의 이슈 테이블 설정을 조회한다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public IssueTableConfig findByUserIdAndWorkspaceIdAndIssueIdAndIssueTableType(Long issueId, int issueTableType) { |
| | | return this.issueTableConfigRepository.findByUserIdAndWorkspaceIdAndIssueIdAndIssueTableType(this.webAppUtil.getLoginId(), |
| | | this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId(), issueId, issueTableType); |
| | | public IssueTableConfig findByUserIdAndWorkspaceIdAndIssueTypeIdAndIssueTableType(Long issueTypeId, int issueTableType) { |
| | | return this.issueTableConfigRepository.findByUserIdAndWorkspaceIdAndIssueTypeIdAndIssueTableType(this.webAppUtil.getLoginId(), |
| | | this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId(), issueTypeId, issueTableType); |
| | | } |
| | | |
| | | //이슈 Id와 IssueTableType 조회 |
| | | //이슈타입 Id와 IssueTableType 조회 |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public IssueTableConfig findByIssueIdAndIssueTableType(Long issueId, int issueTableType) { |
| | | return this.issueTableConfigRepository.findByIssueIdAndIssueTableType(issueId, issueTableType); |
| | | public IssueTableConfig findByIssueTypeIdAndIssueTableType(Long issueTypeId, int issueTableType) { |
| | | return this.issueTableConfigRepository.findByIssueTypeIdAndIssueTableType(issueTypeId, issueTableType); |
| | | } |
| | | |
| | | // detail 중복 코드 제거 |
| | | private void detailMultipleCode(Map<String, Object> resJsonData, Long issueId, int issueTableType) { |
| | | private void detailIssueTableConfig(Map<String, Object> resJsonData, Long issueTypeId, int issueTableType) { |
| | | // 해당 업무 공간에서 사용자의 이슈 검색 조건을 조회한다. |
| | | IssueTableConfig issueTableConfig = this.findByUserIdAndWorkspaceIdAndIssueIdAndIssueTableType(issueId, issueTableType); |
| | | IssueTableConfig issueTableConfig = this.findByUserIdAndWorkspaceIdAndIssueTypeIdAndIssueTableType(issueTypeId, issueTableType); |
| | | |
| | | if (issueTableConfig != null) { |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, issueTableConfig.getIssueTableConfigs()); |
| | |
| | | // 저장된 이슈 테이블 설정을 조회한다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public void detailIssueTableConfig(Map<String, Object> resJsonData) { |
| | | issueId = (long) -1; |
| | | public void detailIssueTableConfig(Map<String, Object> params, Map<String, Object> resJsonData) { |
| | | issueTypeId = MapUtil.getLong(params, "issueTypeId"); |
| | | |
| | | issueTableType = 1; |
| | | // 해당 업무 공간에서 사용자의 이슈 검색 조건을 조회한다. |
| | | IssueTableConfig issueTableConfig = this.findByUserIdAndWorkspaceIdAndIssueIdAndIssueTableType(issueId, issueTableType); |
| | | IssueTableConfig issueTableConfig = this.findByUserIdAndWorkspaceIdAndIssueTypeIdAndIssueTableType(issueTypeId, issueTableType); |
| | | |
| | | if (issueTableConfig != null) { |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, issueTableConfig.getIssueTableConfigs()); |
| | |
| | | @Override |
| | | public void detailRelationIssueTableConfig(Map<String, Object> params, Map<String, Object> resJsonData) { |
| | | issueTableType = 2; |
| | | issueId = MapUtil.getLong(params, "issueId"); |
| | | this.detailMultipleCode(resJsonData, issueId, issueTableType); |
| | | issueTypeId = MapUtil.getLong(params, "issueTypeId"); |
| | | this.detailIssueTableConfig(resJsonData, issueTypeId, issueTableType); |
| | | } |
| | | // 저장된 하위 이슈 테이블 설정 조회 |
| | | @Override |
| | | public void detailDownIssueTableConfig(Map<String, Object> params, Map<String, Object> resJsonData) { |
| | | issueTableType = 3; |
| | | issueId = MapUtil.getLong(params, "issueId"); |
| | | this.detailMultipleCode(resJsonData, issueId, issueTableType); |
| | | issueTypeId = MapUtil.getLong(params, "issueTypeId"); |
| | | this.detailIssueTableConfig(resJsonData, issueTypeId, issueTableType); |
| | | } |
| | | |
| | | |
| | |
| | | @RequestMapping(value = "/issueTableConfig/detail", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> detail() { |
| | | Map<String, Object> detail(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | |
| | | this.issueTableConfigService.detailIssueTableConfig(resJsonData); |
| | | this.issueTableConfigService.detailIssueTableConfig(params.get(Constants.REQ_KEY_CONTENT), resJsonData); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
| | | |
| | | -- 이슈 테이블 타입 설정(1: 메인, 2: 연관, 3: 하위) |
| | | ALTER TABLE `issue_table_config` ADD COLUMN `issue_id` BIGINT(20) NOT NULL; |
| | | ALTER TABLE `issue_table_config` ADD COLUMN `issue_type_id` BIGINT(20) NOT NULL; |
| | | ALTER TABLE `issue_table_config` ADD COLUMN `issue_table_type` INT(11) NOT NULL; |
| | | ALTER TABLE `issue_table_config` ADD INDEX `issueTableTypeIndex`(`issue_table_type`); |
| | | |
| | |
| | | 'angular' |
| | | ], |
| | | function (app, angular) { |
| | | app.controller('issueAddDownTableConfigController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'SweetAlert', '$timeout', 'IssueTableConfig', 'CustomField', '$q', '$filter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, SweetAlert, $timeout, IssueTableConfig, CustomField, $q, $filter) { |
| | | app.controller('issueAddDownTableConfigController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'SweetAlert', '$timeout', 'IssueTableConfig', 'CustomField', '$q', '$filter', 'parameter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, SweetAlert, $timeout, IssueTableConfig, CustomField, $q, $filter, parameter) { |
| | | |
| | | // 함수 모음 |
| | | $scope.fn = { |
| | |
| | | $rootScope.spinner = true; |
| | | |
| | | var content = { |
| | | issueId : $rootScope.currentDetailIssueId, |
| | | issueTypeId : parameter.issueTypeId, |
| | | issueTableConfigs : JSON.stringify($scope.vm.issueDownTableConfigs) |
| | | }; |
| | | |
| | |
| | | 'angular' |
| | | ], |
| | | function (app, angular) { |
| | | app.controller('issueAddRelationTableConfigController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'SweetAlert', '$timeout', 'IssueTableConfig', 'CustomField', '$q', '$filter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, SweetAlert, $timeout, IssueTableConfig, CustomField, $q, $filter) { |
| | | app.controller('issueAddRelationTableConfigController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'SweetAlert', '$timeout', 'IssueTableConfig', 'CustomField', '$q', '$filter', 'parameter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, SweetAlert, $timeout, IssueTableConfig, CustomField, $q, $filter, parameter) { |
| | | |
| | | |
| | | // 함수 모음 |
| | |
| | | |
| | | // 변수 모음 |
| | | $scope.vm = { |
| | | issueId: "", |
| | | issueTypeId: "", |
| | | issueRelTableConfigs : [{ |
| | | name : $filter("translate")("common.priority"), // 우선순위 |
| | | key : "PRIORITY", |
| | |
| | | $rootScope.spinner = true; |
| | | |
| | | var content = { |
| | | issueId : $rootScope.currentDetailIssueId, |
| | | issueTypeId : parameter.issueTypeId, |
| | | issueTableConfigs : JSON.stringify($scope.vm.issueRelTableConfigs) |
| | | }; |
| | | |
| | |
| | | 'angular' |
| | | ], |
| | | function (app, angular) { |
| | | app.controller('issueAddTableConfigController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'SweetAlert', '$timeout', 'IssueTableConfig', 'CustomField', '$q', '$filter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, SweetAlert, $timeout, IssueTableConfig, CustomField, $q, $filter) { |
| | | app.controller('issueAddTableConfigController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'SweetAlert', '$timeout', 'IssueTableConfig', 'CustomField', '$q', '$filter', 'parameter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, SweetAlert, $timeout, IssueTableConfig, CustomField, $q, $filter, parameter) { |
| | | |
| | | // 함수 모음 |
| | | $scope.fn = { |
| | |
| | | $rootScope.spinner = true; |
| | | |
| | | var content = { |
| | | issueTypeId : parameter.issueTypeId, |
| | | issueTableConfigs : JSON.stringify($scope.vm.issueTableConfigs) |
| | | }; |
| | | |
| | |
| | | size : "lg", |
| | | controller : 'issueAddRelationTableConfigController', |
| | | backdrop : 'static', |
| | | resolve : {} |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | issueTypeId : $scope.vm.viewer.issueTypeVo.id |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | size : "lg", |
| | | controller : 'issueAddDownTableConfigController', |
| | | backdrop : 'static', |
| | | resolve : {} |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | issueTypeId : $scope.vm.viewer.issueTypeVo.id |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | |
| | | // 변수 |
| | | $scope.vm = { |
| | | issueTypeId : "", |
| | | search : { |
| | | title : "", // 제목 |
| | | description : "", // 내용 |
| | |
| | | $resourceProvider.getPageContent(currentPage, $scope.vm.page.selectedPageRowCount))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.issueTypeId = result.data.data[0].issueTypeId; |
| | | $scope.vm.page.selectedPage = currentPage + 1; |
| | | $scope.vm.responseData = result.data; |
| | | if (detail) { |
| | |
| | | size : "lg", |
| | | controller : 'issueAddTableConfigController', |
| | | backdrop : 'static', |
| | | resolve : {} |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | issueTypeId : $scope.vm.issueTypeId |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |