This is an automated email from the ASF dual-hosted git repository.

ykinash pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/develop by this push:
     new 345c86b  Update BillingServiceImpl.java
345c86b is described below

commit 345c86bed6fd2c628df8acace9cf84d34625cc21
Author: Kinash Yurii <[email protected]>
AuthorDate: Tue Nov 16 11:47:42 2021 +0200

    Update BillingServiceImpl.java
    
    Fixed billing report ( removed test block)
---
 .../backendapi/service/impl/BillingServiceImpl.java | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/BillingServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/BillingServiceImpl.java
index 4b6152f..97dafb8 100644
--- 
a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/BillingServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/BillingServiceImpl.java
@@ -101,24 +101,7 @@ public class BillingServiceImpl implements BillingService {
                 .peek(this::appendStatuses)
                 .filter(bd -> CollectionUtils.isEmpty(filter.getStatuses()) || 
filter.getStatuses().contains(bd.getStatus()))
                 .collect(Collectors.toList());
-
-        //TEST
-        List<ProjectResources> collect = billingReportLines.stream()
-                .filter(x -> x.getShape().equals("0 x null"))
-                .map(x -> new ProjectResources(x.getResourceName(), 
x.getProject(), x))
-                .collect(Collectors.toList());
-
-        collect.stream()
-                .peek((
-                        x -> 
System.out.println(exploratoryService.getUserInstance(user.getName(), 
x.getProject(), x.getResName()))
-                ))
-                .peek(
-                        x -> System.out.println(
-                                
exploratoryService.getUserInstance(user.getName(), x.getProject(), 
x.getBillingReportLine().getExploratoryName()))
-
-                ).count();
-
-//TEST
+        
         final LocalDate min = 
billingReportLines.stream().min(Comparator.comparing(BillingReportLine::getUsageDateFrom)).map(BillingReportLine::getUsageDateFrom).orElse(null);
         final LocalDate max = 
billingReportLines.stream().max(Comparator.comparing(BillingReportLine::getUsageDateTo)).map(BillingReportLine::getUsageDateTo).orElse(null);
         final double sum = 
billingReportLines.stream().mapToDouble(BillingReportLine::getCost).sum();
@@ -405,4 +388,4 @@ public class BillingServiceImpl implements BillingService {
         private String project;
         private BillingReportLine billingReportLine;
     }
-}
\ No newline at end of file
+}

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to