1b270ca4 by xiaojie

【数据资产】

查询企业认证附件和领域
1 parent 09771348
......@@ -50,7 +50,7 @@ public class EnterpriseAttachmentRSVO {
* 文件类型名称
*/
@Schema(description = "文件类型名称")
@SystemParamsDict(dictTypeName = "件类型", codeFieldName = "fileType")
@SystemParamsDict(dictTypeName = "开发主体附件类型", codeFieldName = "fileType")
private String fileTypeName;
/**
......
......@@ -7,6 +7,7 @@ import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRQVO;
import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO;
import java.util.List;
import java.util.Map;
/**
* @program:
......@@ -106,4 +107,11 @@ public interface EnterpriseAttachmentService {
*/
void batchUpdate(List<EnterpriseAttachmentRQVO> attachmentRQVOS, String guid, Boolean isRequired);
/**
* 根据企业认证guid查询附件信息
* @param enterpriseGuids
* @return
*/
Map<String, List<EnterpriseAttachmentRSVO>> getMapByEnterpriseGuids(List<String> enterpriseGuids);
}
......
......@@ -6,6 +6,7 @@ import com.csbr.qingcloud.portal.domain.vo.EnterpriseDomainRSVO;
import csbr.cloud.entity.domain.base.vo.PageListVO;
import java.util.List;
import java.util.Map;
/**
* @program:
......@@ -88,4 +89,11 @@ public interface EnterpriseDomainService {
* @param guid
*/
void batchUpdate(List<EnterpriseDomainRQVO> domainRQVOS, String guid);
/**
* 根据企业认证guid查询企业领域信息
* @param enterpriseGuids
* @return
*/
Map<String, List<EnterpriseDomainRSVO>> getMapByEnterpriseGuids(List<String> enterpriseGuids);
}
......
......@@ -36,10 +36,8 @@ import org.springframework.web.multipart.MultipartFile;
import java.math.BigDecimal;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.*;
import java.util.stream.Collectors;
/**
* @program:
......@@ -333,6 +331,21 @@ public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentServ
batchSave(attachmentRQVOS, guid, isRequired);
}
@Override
public Map<String, List<EnterpriseAttachmentRSVO>> getMapByEnterpriseGuids(List<String> enterpriseGuids) {
if (ObjectUtils.isEmpty(enterpriseGuids)) {
return null;
}
LambdaQueryWrapper<MfEnterpriseAttachment> queryWrapper = Wrappers.lambdaQuery(MfEnterpriseAttachment.class);
queryWrapper.in(MfEnterpriseAttachment::getEnterpriseGuid, enterpriseGuids);
queryWrapper.orderByAsc(MfEnterpriseAttachment::getCreateTime);
List<MfEnterpriseAttachment> enterpriseAttachments = mfEnterpriseAttachmentService.list(queryWrapper);
if (ObjectUtils.isEmpty(enterpriseAttachments)) {
return null;
}
return convertToVO(enterpriseAttachments).stream().collect(Collectors.groupingBy(EnterpriseAttachmentRSVO::getEnterpriseGuid));
}
/**
* 开发主体附件信息新新增前置处理
* @author makejava
......
......@@ -26,6 +26,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @program:
......@@ -219,6 +221,21 @@ public class EnterpriseDomainServiceImpl implements EnterpriseDomainService {
batchSave(domainRQVOS, guid);
}
@Override
public Map<String, List<EnterpriseDomainRSVO>> getMapByEnterpriseGuids(List<String> enterpriseGuids) {
if (ObjectUtils.isEmpty(enterpriseGuids)) {
return null;
}
LambdaQueryWrapper<MfEnterpriseDomain> queryWrapper = Wrappers.lambdaQuery(MfEnterpriseDomain.class);
queryWrapper.in(MfEnterpriseDomain::getEnterpriseGuid, enterpriseGuids);
queryWrapper.orderByAsc(MfEnterpriseDomain::getCreateTime);
List<MfEnterpriseDomain> mfEnterpriseDomains = mfEnterpriseDomainService.list(queryWrapper);
if (ObjectUtils.isEmpty(mfEnterpriseDomains)) {
return null;
}
return convertToVO(mfEnterpriseDomains).stream().collect(Collectors.groupingBy(EnterpriseDomainRSVO::getEnterpriseGuid));
}
/**
* 开发主体领域信息新新增前置处理
* @author makejava
......
......@@ -642,6 +642,19 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
}
}
// 查询附件信息
String guid = enterpriseRSVO.getGuid();
Map<String, List<EnterpriseAttachmentRSVO>> attachmentByEnterpriseGuids = enterpriseAttachmentService.getMapByEnterpriseGuids(Collections.singletonList(guid));
if (ObjectUtils.isNotEmpty(attachmentByEnterpriseGuids) && attachmentByEnterpriseGuids.containsKey(guid)) {
enterpriseRSVO.setAttachmentRSVOS(attachmentByEnterpriseGuids.get(guid));
}
// 查询领域信息
Map<String, List<EnterpriseDomainRSVO>> domainByEnterpriseGuids = enterpriseDomainService.getMapByEnterpriseGuids(Collections.singletonList(guid));
if (ObjectUtils.isNotEmpty(domainByEnterpriseGuids) && domainByEnterpriseGuids.containsKey(guid)) {
enterpriseRSVO.setDomainRSVOS(domainByEnterpriseGuids.get(guid));
}
return enterpriseRSVO;
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!