| | |
| | | return this.companyFieldMapper.find(condition); |
| | | } |
| | | |
| | | /** |
| | | * companyFieldCategory Name 설정 |
| | | * @param companyFieldVo CompanyFieldVo |
| | | * @param companyField CompanyField |
| | | */ |
| | | private CompanyFieldVo CreateCompanyFieldCategory(CompanyFieldVo companyFieldVo, CompanyField companyField) { |
| | | if (companyField.getCompanyTypeId() != null && companyField.getCompanyTypeId() != -1) { |
| | | CompanyFieldCategory companyType = this.companyFieldCategoryService.find(companyField.getCompanyTypeId()); |
| | | if (companyType != null) { |
| | | companyFieldVo.setCompanyTypeName(companyType.getUseValue()); |
| | | } |
| | | } |
| | | if (companyField.getParentSectorId() != null && companyField.getParentSectorId() != -1) { |
| | | CompanyFieldCategory parentSector = this.companyFieldCategoryService.find(companyField.getParentSectorId()); |
| | | if (parentSector != null) { |
| | | companyFieldVo.setParentSectorName(parentSector.getUseValue()); |
| | | } |
| | | } |
| | | if (companyField.getChildSectorId() != null && companyField.getChildSectorId() != -1) { |
| | | CompanyFieldCategory childSector = this.companyFieldCategoryService.find(companyField.getChildSectorId()); |
| | | if (childSector != null) { |
| | | companyFieldVo.setChildSectorName(childSector.getUseValue()); |
| | | } |
| | | } |
| | | if (companyField.getRegionId() != null && companyField.getRegionId() != -1) { |
| | | CompanyFieldCategory region = this.companyFieldCategoryService.find(companyField.getRegionId()); |
| | | if (region != null) { |
| | | companyFieldVo.setRegionName(region.getUseValue()); |
| | | } |
| | | } |
| | | return companyFieldVo; |
| | | } |
| | | |
| | | // 업체 상세 조회한다. |
| | | @Override |
| | | @Transactional |
| | |
| | | ispFieldVo = ConvertUtil.copyProperties(ispField, IspFieldVo.class); |
| | | hostingFieldVo = ConvertUtil.copyProperties(hostingField, HostingFieldVo.class); |
| | | |
| | | if (companyField.getCompanyTypeId() != null && companyField.getCompanyTypeId() != -1) { |
| | | CompanyFieldCategory companyType = this.companyFieldCategoryService.find(companyField.getCompanyTypeId()); |
| | | if (companyType != null) { |
| | | companyFieldVo.setCompanyTypeName(companyType.getUseValue()); |
| | | } |
| | | } |
| | | if (companyField.getParentSectorId() != null && companyField.getParentSectorId() != -1) { |
| | | CompanyFieldCategory parentSector = this.companyFieldCategoryService.find(companyField.getParentSectorId()); |
| | | if (parentSector != null) { |
| | | companyFieldVo.setParentSectorName(parentSector.getUseValue()); |
| | | } |
| | | } |
| | | if (companyField.getChildSectorId() != null && companyField.getChildSectorId() != -1) { |
| | | CompanyFieldCategory childSector = this.companyFieldCategoryService.find(companyField.getChildSectorId()); |
| | | if (childSector != null) { |
| | | companyFieldVo.setChildSectorName(childSector.getUseValue()); |
| | | } |
| | | } |
| | | if (companyField.getRegionId() != null && companyField.getRegionId() != -1) { |
| | | CompanyFieldCategory region = this.companyFieldCategoryService.find(companyField.getRegionId()); |
| | | if (region != null) { |
| | | companyFieldVo.setRegionName(region.getUseValue()); |
| | | } |
| | | } |
| | | /*if (companyField.getStatusId() != null && companyField.getStatusId() != -1) { |
| | | CompanyFieldCategory status = this.companyFieldCategoryService.find(companyField.getStatusId()); |
| | | if (status != null) { |
| | | companyFieldVo.setStatusName(status.getUseValue()); |
| | | } |
| | | }*/ |
| | | CreateCompanyFieldCategory(companyFieldVo, companyField); |
| | | |
| | | companyFieldVo.setIspFieldVo(ispFieldVo); |
| | | companyFieldVo.setHostingFieldVo(hostingFieldVo); |
| | |
| | | |
| | | CompanyFieldCondition companyFieldCondition = CompanyFieldCondition.make(conditions); |
| | | List<Map<String, Object>> results = this.companyFieldMapper.find(companyFieldCondition); |
| | | CompanyFieldVo companyFieldVo = new CompanyFieldVo(); |
| | | |
| | | if (results != null && results.size() > 0) { |
| | | for (Map<String, Object> result : results) { |
| | | CompanyField companyField = ConvertUtil.convertMapToClass(result, CompanyField.class); |
| | | CompanyFieldVo companyFieldVo2 = CreateCompanyFieldCategory(companyFieldVo, companyField); |
| | | |
| | | result.put("companyTypeName", companyFieldVo2.getCompanyTypeName()); |
| | | result.put("parentSectorName", companyFieldVo2.getParentSectorName()); |
| | | result.put("childSectorName", companyFieldVo2.getChildSectorName()); |
| | | result.put("regionName", companyFieldVo2.getRegionName()); |
| | | } |
| | | } |
| | | List<CompanyFieldVo> companyFieldVos = ConvertUtil.convertListToListClass(results, CompanyFieldVo.class); |
| | | |
| | | // code_ko_KR 에 code명 설정 |