| | |
| | | |
| | | CustomField customField; |
| | | Long workspaceId = this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId(); |
| | | |
| | | String useFlag = "Y"; |
| | | if (id == null) { |
| | | customField = this.customFieldRepository.findByNameAndWorkspaceId(name, workspaceId); |
| | | customField = this.customFieldRepository.findByNameAndWorkspaceIdAndUseFlag(name, workspaceId, useFlag); |
| | | } |
| | | else { |
| | | customField = this.customFieldRepository.findByNameAndWorkspaceIdAndIdNot(name, workspaceId, id); |
| | | customField = this.customFieldRepository.findByNameAndWorkspaceIdAndIdNotAndUseFlag(name, workspaceId, id, useFlag); |
| | | } |
| | | |
| | | if (customField != null) { |
| | |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public CustomField findByName(String name) { |
| | | return this.customFieldRepository.findByNameAndWorkspaceId(name, this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId()); |
| | | String useFlag = "Y"; |
| | | return this.customFieldRepository.findByNameAndWorkspaceIdAndUseFlag(name, this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId(), useFlag); |
| | | } |
| | | |
| | | // 사용자 정의 필드 목록을 엑셀로 다운로드 한다. |