2b12a2c3 by xiaojie

【数据资产】

1、查询附件信息和领域信息
1 parent e4bb0d83
...@@ -612,19 +612,18 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris ...@@ -612,19 +612,18 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
612 MfEnterprise mfEnterprise = enterpriseOptional.get(); 612 MfEnterprise mfEnterprise = enterpriseOptional.get();
613 EnterpriseRSVO enterpriseRSVO = convertToVO(mfEnterprise); 613 EnterpriseRSVO enterpriseRSVO = convertToVO(mfEnterprise);
614 614
615 // 查询附件信息
616 String guid = enterpriseRSVO.getGuid();
617 Map<String, List<EnterpriseAttachmentRSVO>> attachmentByEnterpriseGuids = enterpriseAttachmentService.getMapByEnterpriseGuids(Collections.singletonList(guid));
618
619 // 查询领域信息
620 Map<String, List<EnterpriseDomainRSVO>> domainByEnterpriseGuids = enterpriseDomainService.getMapByEnterpriseGuids(Collections.singletonList(guid));
621
622 // 查询变更历史 615 // 查询变更历史
623 LambdaQueryWrapper<MfEnterpriseChangeApprove> lambdaQueryWrapper = new LambdaQueryWrapper<>(); 616 LambdaQueryWrapper<MfEnterpriseChangeApprove> lambdaQueryWrapper = new LambdaQueryWrapper<>();
624 lambdaQueryWrapper.eq(MfEnterpriseChangeApprove::getSourceGuid, mfEnterprise.getGuid()); 617 lambdaQueryWrapper.eq(MfEnterpriseChangeApprove::getSourceGuid, mfEnterprise.getGuid());
625 lambdaQueryWrapper.orderByDesc(MfEnterpriseChangeApprove::getCreateTime); 618 lambdaQueryWrapper.orderByDesc(MfEnterpriseChangeApprove::getCreateTime);
626 List<MfEnterpriseChangeApprove> approveList = mfEnterpriseChangeApproveService.list(lambdaQueryWrapper); 619 List<MfEnterpriseChangeApprove> approveList = mfEnterpriseChangeApproveService.list(lambdaQueryWrapper);
627 if(CollectionUtils.isEmpty(approveList)){ 620 if(CollectionUtils.isEmpty(approveList)){
621 // 查询附件信息
622 String guid = enterpriseRSVO.getGuid();
623 Map<String, List<EnterpriseAttachmentRSVO>> attachmentByEnterpriseGuids = enterpriseAttachmentService.getMapByEnterpriseGuids(Collections.singletonList(guid));
624
625 // 查询领域信息
626 Map<String, List<EnterpriseDomainRSVO>> domainByEnterpriseGuids = enterpriseDomainService.getMapByEnterpriseGuids(Collections.singletonList(guid));
628 if (ObjectUtils.isNotEmpty(attachmentByEnterpriseGuids) && attachmentByEnterpriseGuids.containsKey(guid)) { 627 if (ObjectUtils.isNotEmpty(attachmentByEnterpriseGuids) && attachmentByEnterpriseGuids.containsKey(guid)) {
629 enterpriseRSVO.setAttachmentRSVOS(attachmentByEnterpriseGuids.get(guid)); 628 enterpriseRSVO.setAttachmentRSVOS(attachmentByEnterpriseGuids.get(guid));
630 } 629 }
...@@ -641,6 +640,13 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris ...@@ -641,6 +640,13 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
641 MfEnterpriseChangeApprove mfEnterpriseChangeApprove = changeApproveOptFirst.get(); 640 MfEnterpriseChangeApprove mfEnterpriseChangeApprove = changeApproveOptFirst.get();
642 enterpriseRSVO = csbrBeanUtil.convert(mfEnterpriseChangeApprove, EnterpriseRSVO.class); 641 enterpriseRSVO = csbrBeanUtil.convert(mfEnterpriseChangeApprove, EnterpriseRSVO.class);
643 enterpriseRSVO.setBizApproveState(mfEnterprise.getBizApproveState()); 642 enterpriseRSVO.setBizApproveState(mfEnterprise.getBizApproveState());
643
644 // 查询附件信息
645 Map<String, List<EnterpriseAttachmentRSVO>> attachmentByEnterpriseGuids = enterpriseAttachmentService.getMapByEnterpriseGuids(Collections.singletonList(mfEnterpriseChangeApprove.getSourceGuid()));
646
647 // 查询领域信息
648 Map<String, List<EnterpriseDomainRSVO>> domainByEnterpriseGuids = enterpriseDomainService.getMapByEnterpriseGuids(Collections.singletonList(mfEnterpriseChangeApprove.getSourceGuid()));
649
644 if (ObjectUtils.isNotEmpty(attachmentByEnterpriseGuids) && attachmentByEnterpriseGuids.containsKey(mfEnterpriseChangeApprove.getSourceGuid())) { 650 if (ObjectUtils.isNotEmpty(attachmentByEnterpriseGuids) && attachmentByEnterpriseGuids.containsKey(mfEnterpriseChangeApprove.getSourceGuid())) {
645 enterpriseRSVO.setAttachmentRSVOS(attachmentByEnterpriseGuids.get(mfEnterpriseChangeApprove.getSourceGuid())); 651 enterpriseRSVO.setAttachmentRSVOS(attachmentByEnterpriseGuids.get(mfEnterpriseChangeApprove.getSourceGuid()));
646 } 652 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!