e4bb0d83 by xiaojie

【数据资产】

1、查询附件信息和领域信息
1 parent 05230f48
...@@ -615,15 +615,9 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris ...@@ -615,15 +615,9 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
615 // 查询附件信息 615 // 查询附件信息
616 String guid = enterpriseRSVO.getGuid(); 616 String guid = enterpriseRSVO.getGuid();
617 Map<String, List<EnterpriseAttachmentRSVO>> attachmentByEnterpriseGuids = enterpriseAttachmentService.getMapByEnterpriseGuids(Collections.singletonList(guid)); 617 Map<String, List<EnterpriseAttachmentRSVO>> attachmentByEnterpriseGuids = enterpriseAttachmentService.getMapByEnterpriseGuids(Collections.singletonList(guid));
618 if (ObjectUtils.isNotEmpty(attachmentByEnterpriseGuids) && attachmentByEnterpriseGuids.containsKey(guid)) {
619 enterpriseRSVO.setAttachmentRSVOS(attachmentByEnterpriseGuids.get(guid));
620 }
621 618
622 // 查询领域信息 619 // 查询领域信息
623 Map<String, List<EnterpriseDomainRSVO>> domainByEnterpriseGuids = enterpriseDomainService.getMapByEnterpriseGuids(Collections.singletonList(guid)); 620 Map<String, List<EnterpriseDomainRSVO>> domainByEnterpriseGuids = enterpriseDomainService.getMapByEnterpriseGuids(Collections.singletonList(guid));
624 if (ObjectUtils.isNotEmpty(domainByEnterpriseGuids) && domainByEnterpriseGuids.containsKey(guid)) {
625 enterpriseRSVO.setDomainRSVOS(domainByEnterpriseGuids.get(guid));
626 }
627 621
628 // 查询变更历史 622 // 查询变更历史
629 LambdaQueryWrapper<MfEnterpriseChangeApprove> lambdaQueryWrapper = new LambdaQueryWrapper<>(); 623 LambdaQueryWrapper<MfEnterpriseChangeApprove> lambdaQueryWrapper = new LambdaQueryWrapper<>();
...@@ -631,6 +625,12 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris ...@@ -631,6 +625,12 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
631 lambdaQueryWrapper.orderByDesc(MfEnterpriseChangeApprove::getCreateTime); 625 lambdaQueryWrapper.orderByDesc(MfEnterpriseChangeApprove::getCreateTime);
632 List<MfEnterpriseChangeApprove> approveList = mfEnterpriseChangeApproveService.list(lambdaQueryWrapper); 626 List<MfEnterpriseChangeApprove> approveList = mfEnterpriseChangeApproveService.list(lambdaQueryWrapper);
633 if(CollectionUtils.isEmpty(approveList)){ 627 if(CollectionUtils.isEmpty(approveList)){
628 if (ObjectUtils.isNotEmpty(attachmentByEnterpriseGuids) && attachmentByEnterpriseGuids.containsKey(guid)) {
629 enterpriseRSVO.setAttachmentRSVOS(attachmentByEnterpriseGuids.get(guid));
630 }
631 if (ObjectUtils.isNotEmpty(domainByEnterpriseGuids) && domainByEnterpriseGuids.containsKey(guid)) {
632 enterpriseRSVO.setDomainRSVOS(domainByEnterpriseGuids.get(guid));
633 }
634 return enterpriseRSVO; 634 return enterpriseRSVO;
635 } 635 }
636 636
...@@ -638,8 +638,15 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris ...@@ -638,8 +638,15 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
638 if ("B".equals(enterpriseRSVO.getBizApproveState())) { 638 if ("B".equals(enterpriseRSVO.getBizApproveState())) {
639 Optional<MfEnterpriseChangeApprove> changeApproveOptFirst = approveList.stream().filter(item -> "2".equals(item.getDataType())).findFirst(); 639 Optional<MfEnterpriseChangeApprove> changeApproveOptFirst = approveList.stream().filter(item -> "2".equals(item.getDataType())).findFirst();
640 if (changeApproveOptFirst.isPresent()) { 640 if (changeApproveOptFirst.isPresent()) {
641 enterpriseRSVO = csbrBeanUtil.convert(changeApproveOptFirst.get(), EnterpriseRSVO.class); 641 MfEnterpriseChangeApprove mfEnterpriseChangeApprove = changeApproveOptFirst.get();
642 enterpriseRSVO = csbrBeanUtil.convert(mfEnterpriseChangeApprove, EnterpriseRSVO.class);
642 enterpriseRSVO.setBizApproveState(mfEnterprise.getBizApproveState()); 643 enterpriseRSVO.setBizApproveState(mfEnterprise.getBizApproveState());
644 if (ObjectUtils.isNotEmpty(attachmentByEnterpriseGuids) && attachmentByEnterpriseGuids.containsKey(mfEnterpriseChangeApprove.getSourceGuid())) {
645 enterpriseRSVO.setAttachmentRSVOS(attachmentByEnterpriseGuids.get(mfEnterpriseChangeApprove.getSourceGuid()));
646 }
647 if (ObjectUtils.isNotEmpty(domainByEnterpriseGuids) && domainByEnterpriseGuids.containsKey(mfEnterpriseChangeApprove.getSourceGuid())) {
648 enterpriseRSVO.setDomainRSVOS(domainByEnterpriseGuids.get(mfEnterpriseChangeApprove.getSourceGuid()));
649 }
643 } 650 }
644 } 651 }
645 652
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!