2b12a2c3 by xiaojie

【数据资产】

1、查询附件信息和领域信息
1 parent e4bb0d83
......@@ -612,19 +612,18 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
MfEnterprise mfEnterprise = enterpriseOptional.get();
EnterpriseRSVO enterpriseRSVO = convertToVO(mfEnterprise);
// 查询附件信息
String guid = enterpriseRSVO.getGuid();
Map<String, List<EnterpriseAttachmentRSVO>> attachmentByEnterpriseGuids = enterpriseAttachmentService.getMapByEnterpriseGuids(Collections.singletonList(guid));
// 查询领域信息
Map<String, List<EnterpriseDomainRSVO>> domainByEnterpriseGuids = enterpriseDomainService.getMapByEnterpriseGuids(Collections.singletonList(guid));
// 查询变更历史
LambdaQueryWrapper<MfEnterpriseChangeApprove> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(MfEnterpriseChangeApprove::getSourceGuid, mfEnterprise.getGuid());
lambdaQueryWrapper.orderByDesc(MfEnterpriseChangeApprove::getCreateTime);
List<MfEnterpriseChangeApprove> approveList = mfEnterpriseChangeApproveService.list(lambdaQueryWrapper);
if(CollectionUtils.isEmpty(approveList)){
// 查询附件信息
String guid = enterpriseRSVO.getGuid();
Map<String, List<EnterpriseAttachmentRSVO>> attachmentByEnterpriseGuids = enterpriseAttachmentService.getMapByEnterpriseGuids(Collections.singletonList(guid));
// 查询领域信息
Map<String, List<EnterpriseDomainRSVO>> domainByEnterpriseGuids = enterpriseDomainService.getMapByEnterpriseGuids(Collections.singletonList(guid));
if (ObjectUtils.isNotEmpty(attachmentByEnterpriseGuids) && attachmentByEnterpriseGuids.containsKey(guid)) {
enterpriseRSVO.setAttachmentRSVOS(attachmentByEnterpriseGuids.get(guid));
}
......@@ -641,6 +640,13 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
MfEnterpriseChangeApprove mfEnterpriseChangeApprove = changeApproveOptFirst.get();
enterpriseRSVO = csbrBeanUtil.convert(mfEnterpriseChangeApprove, EnterpriseRSVO.class);
enterpriseRSVO.setBizApproveState(mfEnterprise.getBizApproveState());
// 查询附件信息
Map<String, List<EnterpriseAttachmentRSVO>> attachmentByEnterpriseGuids = enterpriseAttachmentService.getMapByEnterpriseGuids(Collections.singletonList(mfEnterpriseChangeApprove.getSourceGuid()));
// 查询领域信息
Map<String, List<EnterpriseDomainRSVO>> domainByEnterpriseGuids = enterpriseDomainService.getMapByEnterpriseGuids(Collections.singletonList(mfEnterpriseChangeApprove.getSourceGuid()));
if (ObjectUtils.isNotEmpty(attachmentByEnterpriseGuids) && attachmentByEnterpriseGuids.containsKey(mfEnterpriseChangeApprove.getSourceGuid())) {
enterpriseRSVO.setAttachmentRSVOS(attachmentByEnterpriseGuids.get(mfEnterpriseChangeApprove.getSourceGuid()));
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!