| | |
| | | import kr.wisestone.owl.util.MapUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 이슈 사용자 정의 필드 값 검색 조건 클래스 |
| | | * Created by wisestone on 2018-06-07. |
| | | */ |
| | | public class IssueCustomFieldValueCondition { |
| | |
| | | private Long workspaceId; |
| | | private Long customFieldId; |
| | | private String customFieldType; |
| | | private List<String> useValues = Lists.newArrayList(); // 단일, 다중 일때 검색 값 |
| | | private String useValue; // 텍스트 필드일 때 검색 값 |
| | | /** |
| | | * 사용자 정의 필드 사용 값 |
| | | */ |
| | | private List<String> useValues = Lists.newArrayList(); |
| | | /** |
| | | * 텍스트 필드일 때 검색 값 |
| | | */ |
| | | private String useValue; |
| | | private String useStartDateValue; |
| | | private String useEndDateValue; |
| | | |
| | | private boolean useParentIssueId = true; |
| | | /** |
| | | * 이슈 상태 유형(READY / OPEN / CLOSE) |
| | | */ |
| | | private String issueStatusType; |
| | | |
| | | private Long companyFieldId; // IP에 속해있는 업체 찾을 때 사용 |
| | | |
| | | public IssueCustomFieldValueCondition(){} |
| | | |
| | |
| | | switch(customFieldType) { |
| | | case INPUT: |
| | | case NUMBER: |
| | | case DATETIME: |
| | | case IP_ADDRESS: |
| | | case EMAIL: |
| | | case SITE: |
| | |
| | | // 텍스트 필드는 1개밖에 안들어온다. |
| | | if (!StringUtils.isEmpty(useValue)) { |
| | | condition.setUseValue(useValue); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | case DATETIME: |
| | | if (MapUtil.getStrings(conditions, "useValues") != null) { |
| | | for (String useValue : MapUtil.getStrings(conditions, "useValues")) { |
| | | if (!StringUtils.isEmpty(useValue)) { |
| | | condition.setUseValue(useValue); |
| | | List<String> customDateRange = Arrays.asList(useValue.split("~")); |
| | | condition.setUseStartDateValue(customDateRange.get(0)); |
| | | condition.setUseEndDateValue(customDateRange.get(1)); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | return condition; |
| | | } |
| | | |
| | | public String getIssueStatusType() { |
| | | return issueStatusType; |
| | | } |
| | | |
| | | public void setIssueStatusType(String issueStatusType) { |
| | | this.issueStatusType = issueStatusType; |
| | | } |
| | | |
| | | public Long getIssueTypeId() { |
| | |
| | | this.useValue = useValue; |
| | | } |
| | | |
| | | public String getUseStartDateValue() { |
| | | return useStartDateValue; |
| | | } |
| | | |
| | | public void setUseStartDateValue(String useStartDateValue) { |
| | | this.useStartDateValue = useStartDateValue; |
| | | } |
| | | |
| | | public String getUseEndDateValue() { |
| | | return useEndDateValue; |
| | | } |
| | | |
| | | public void setUseEndDateValue(String useEndDateValue) { |
| | | this.useEndDateValue = useEndDateValue; |
| | | } |
| | | |
| | | public String getCustomFieldType() { |
| | | return customFieldType; |
| | | } |
| | |
| | | this.useParentIssueId = useParentIssueId; |
| | | } |
| | | |
| | | public Long getCompanyFieldId() { |
| | | return companyFieldId; |
| | | } |
| | | |
| | | public void setCompanyFieldId(Long companyFieldId) { |
| | | this.companyFieldId = companyFieldId; |
| | | } |
| | | } |