【数据资产】
查询企业认证附件和领域
Showing
6 changed files
with
64 additions
and
5 deletions
| ... | @@ -50,7 +50,7 @@ public class EnterpriseAttachmentRSVO { | ... | @@ -50,7 +50,7 @@ public class EnterpriseAttachmentRSVO { |
| 50 | * 文件类型名称 | 50 | * 文件类型名称 |
| 51 | */ | 51 | */ |
| 52 | @Schema(description = "文件类型名称") | 52 | @Schema(description = "文件类型名称") |
| 53 | @SystemParamsDict(dictTypeName = "文件类型", codeFieldName = "fileType") | 53 | @SystemParamsDict(dictTypeName = "开发主体附件类型", codeFieldName = "fileType") |
| 54 | private String fileTypeName; | 54 | private String fileTypeName; |
| 55 | 55 | ||
| 56 | /** | 56 | /** | ... | ... |
| ... | @@ -7,6 +7,7 @@ import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRQVO; | ... | @@ -7,6 +7,7 @@ import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRQVO; |
| 7 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO; | 7 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO; |
| 8 | 8 | ||
| 9 | import java.util.List; | 9 | import java.util.List; |
| 10 | import java.util.Map; | ||
| 10 | 11 | ||
| 11 | /** | 12 | /** |
| 12 | * @program: | 13 | * @program: |
| ... | @@ -106,4 +107,11 @@ public interface EnterpriseAttachmentService { | ... | @@ -106,4 +107,11 @@ public interface EnterpriseAttachmentService { |
| 106 | */ | 107 | */ |
| 107 | void batchUpdate(List<EnterpriseAttachmentRQVO> attachmentRQVOS, String guid, Boolean isRequired); | 108 | void batchUpdate(List<EnterpriseAttachmentRQVO> attachmentRQVOS, String guid, Boolean isRequired); |
| 108 | 109 | ||
| 110 | /** | ||
| 111 | * 根据企业认证guid查询附件信息 | ||
| 112 | * @param enterpriseGuids | ||
| 113 | * @return | ||
| 114 | */ | ||
| 115 | Map<String, List<EnterpriseAttachmentRSVO>> getMapByEnterpriseGuids(List<String> enterpriseGuids); | ||
| 116 | |||
| 109 | } | 117 | } | ... | ... |
| ... | @@ -6,6 +6,7 @@ import com.csbr.qingcloud.portal.domain.vo.EnterpriseDomainRSVO; | ... | @@ -6,6 +6,7 @@ import com.csbr.qingcloud.portal.domain.vo.EnterpriseDomainRSVO; |
| 6 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 6 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
| 7 | 7 | ||
| 8 | import java.util.List; | 8 | import java.util.List; |
| 9 | import java.util.Map; | ||
| 9 | 10 | ||
| 10 | /** | 11 | /** |
| 11 | * @program: | 12 | * @program: |
| ... | @@ -88,4 +89,11 @@ public interface EnterpriseDomainService { | ... | @@ -88,4 +89,11 @@ public interface EnterpriseDomainService { |
| 88 | * @param guid | 89 | * @param guid |
| 89 | */ | 90 | */ |
| 90 | void batchUpdate(List<EnterpriseDomainRQVO> domainRQVOS, String guid); | 91 | void batchUpdate(List<EnterpriseDomainRQVO> domainRQVOS, String guid); |
| 92 | |||
| 93 | /** | ||
| 94 | * 根据企业认证guid查询企业领域信息 | ||
| 95 | * @param enterpriseGuids | ||
| 96 | * @return | ||
| 97 | */ | ||
| 98 | Map<String, List<EnterpriseDomainRSVO>> getMapByEnterpriseGuids(List<String> enterpriseGuids); | ||
| 91 | } | 99 | } | ... | ... |
| ... | @@ -36,10 +36,8 @@ import org.springframework.web.multipart.MultipartFile; | ... | @@ -36,10 +36,8 @@ import org.springframework.web.multipart.MultipartFile; |
| 36 | import java.math.BigDecimal; | 36 | import java.math.BigDecimal; |
| 37 | import java.net.URLDecoder; | 37 | import java.net.URLDecoder; |
| 38 | import java.nio.charset.StandardCharsets; | 38 | import java.nio.charset.StandardCharsets; |
| 39 | import java.util.ArrayList; | 39 | import java.util.*; |
| 40 | import java.util.Collections; | 40 | import java.util.stream.Collectors; |
| 41 | import java.util.List; | ||
| 42 | import java.util.Locale; | ||
| 43 | 41 | ||
| 44 | /** | 42 | /** |
| 45 | * @program: | 43 | * @program: |
| ... | @@ -333,6 +331,21 @@ public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentServ | ... | @@ -333,6 +331,21 @@ public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentServ |
| 333 | batchSave(attachmentRQVOS, guid, isRequired); | 331 | batchSave(attachmentRQVOS, guid, isRequired); |
| 334 | } | 332 | } |
| 335 | 333 | ||
| 334 | @Override | ||
| 335 | public Map<String, List<EnterpriseAttachmentRSVO>> getMapByEnterpriseGuids(List<String> enterpriseGuids) { | ||
| 336 | if (ObjectUtils.isEmpty(enterpriseGuids)) { | ||
| 337 | return null; | ||
| 338 | } | ||
| 339 | LambdaQueryWrapper<MfEnterpriseAttachment> queryWrapper = Wrappers.lambdaQuery(MfEnterpriseAttachment.class); | ||
| 340 | queryWrapper.in(MfEnterpriseAttachment::getEnterpriseGuid, enterpriseGuids); | ||
| 341 | queryWrapper.orderByAsc(MfEnterpriseAttachment::getCreateTime); | ||
| 342 | List<MfEnterpriseAttachment> enterpriseAttachments = mfEnterpriseAttachmentService.list(queryWrapper); | ||
| 343 | if (ObjectUtils.isEmpty(enterpriseAttachments)) { | ||
| 344 | return null; | ||
| 345 | } | ||
| 346 | return convertToVO(enterpriseAttachments).stream().collect(Collectors.groupingBy(EnterpriseAttachmentRSVO::getEnterpriseGuid)); | ||
| 347 | } | ||
| 348 | |||
| 336 | /** | 349 | /** |
| 337 | * 开发主体附件信息新新增前置处理 | 350 | * 开发主体附件信息新新增前置处理 |
| 338 | * @author makejava | 351 | * @author makejava | ... | ... |
| ... | @@ -26,6 +26,8 @@ import org.springframework.transaction.annotation.Transactional; | ... | @@ -26,6 +26,8 @@ import org.springframework.transaction.annotation.Transactional; |
| 26 | import java.util.ArrayList; | 26 | import java.util.ArrayList; |
| 27 | import java.util.Collections; | 27 | import java.util.Collections; |
| 28 | import java.util.List; | 28 | import java.util.List; |
| 29 | import java.util.Map; | ||
| 30 | import java.util.stream.Collectors; | ||
| 29 | 31 | ||
| 30 | /** | 32 | /** |
| 31 | * @program: | 33 | * @program: |
| ... | @@ -219,6 +221,21 @@ public class EnterpriseDomainServiceImpl implements EnterpriseDomainService { | ... | @@ -219,6 +221,21 @@ public class EnterpriseDomainServiceImpl implements EnterpriseDomainService { |
| 219 | batchSave(domainRQVOS, guid); | 221 | batchSave(domainRQVOS, guid); |
| 220 | } | 222 | } |
| 221 | 223 | ||
| 224 | @Override | ||
| 225 | public Map<String, List<EnterpriseDomainRSVO>> getMapByEnterpriseGuids(List<String> enterpriseGuids) { | ||
| 226 | if (ObjectUtils.isEmpty(enterpriseGuids)) { | ||
| 227 | return null; | ||
| 228 | } | ||
| 229 | LambdaQueryWrapper<MfEnterpriseDomain> queryWrapper = Wrappers.lambdaQuery(MfEnterpriseDomain.class); | ||
| 230 | queryWrapper.in(MfEnterpriseDomain::getEnterpriseGuid, enterpriseGuids); | ||
| 231 | queryWrapper.orderByAsc(MfEnterpriseDomain::getCreateTime); | ||
| 232 | List<MfEnterpriseDomain> mfEnterpriseDomains = mfEnterpriseDomainService.list(queryWrapper); | ||
| 233 | if (ObjectUtils.isEmpty(mfEnterpriseDomains)) { | ||
| 234 | return null; | ||
| 235 | } | ||
| 236 | return convertToVO(mfEnterpriseDomains).stream().collect(Collectors.groupingBy(EnterpriseDomainRSVO::getEnterpriseGuid)); | ||
| 237 | } | ||
| 238 | |||
| 222 | /** | 239 | /** |
| 223 | * 开发主体领域信息新新增前置处理 | 240 | * 开发主体领域信息新新增前置处理 |
| 224 | * @author makejava | 241 | * @author makejava | ... | ... |
| ... | @@ -642,6 +642,19 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -642,6 +642,19 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 642 | } | 642 | } |
| 643 | } | 643 | } |
| 644 | 644 | ||
| 645 | // 查询附件信息 | ||
| 646 | String guid = enterpriseRSVO.getGuid(); | ||
| 647 | Map<String, List<EnterpriseAttachmentRSVO>> attachmentByEnterpriseGuids = enterpriseAttachmentService.getMapByEnterpriseGuids(Collections.singletonList(guid)); | ||
| 648 | if (ObjectUtils.isNotEmpty(attachmentByEnterpriseGuids) && attachmentByEnterpriseGuids.containsKey(guid)) { | ||
| 649 | enterpriseRSVO.setAttachmentRSVOS(attachmentByEnterpriseGuids.get(guid)); | ||
| 650 | } | ||
| 651 | |||
| 652 | // 查询领域信息 | ||
| 653 | Map<String, List<EnterpriseDomainRSVO>> domainByEnterpriseGuids = enterpriseDomainService.getMapByEnterpriseGuids(Collections.singletonList(guid)); | ||
| 654 | if (ObjectUtils.isNotEmpty(domainByEnterpriseGuids) && domainByEnterpriseGuids.containsKey(guid)) { | ||
| 655 | enterpriseRSVO.setDomainRSVOS(domainByEnterpriseGuids.get(guid)); | ||
| 656 | } | ||
| 657 | |||
| 645 | return enterpriseRSVO; | 658 | return enterpriseRSVO; |
| 646 | } | 659 | } |
| 647 | 660 | ... | ... |
-
Please register or sign in to post a comment