Skip to content

Commit bfe8320

Browse files
committed
negative values fix in MA Subscriber report.
1 parent 9f6d8b4 commit bfe8320

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

NMSReportingSuite/src/main/java/com/beehyv/nmsreporting/controller/UserController.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,18 +1138,10 @@ public Object getReport(@RequestBody ReportRequest reportRequest/*,HttpServletRe
11381138
MAPerformanceCountsDto MAperformanceCounts = performanceCounts.get(cumulativesummaryReportEnd.get(i).getLocationId());
11391139
if (MAperformanceCounts != null) {
11401140
summaryDto1.setAshasFailed(MAperformanceCounts.getAshasFailed() != null ? MAperformanceCounts.getAshasFailed() : 0);
1141-
int ashasStartedDifference = a.getAshasStarted() - b.getAshasStarted();
1142-
int ashasCompletedDifference = a.getAshasCompleted() - b.getAshasCompleted();
1143-
long ashaDeactivatedStartedCourseInBetweenCount = MAperformanceCounts.getAshaDeactivatedStartedCourseInBetweenCount() != null ? MAperformanceCounts.getAshaDeactivatedStartedCourseInBetweenCount() : 0L;
1144-
long ashaDeactivatedCompletedCourseInBetweenCount = MAperformanceCounts.getAshaDeactivatedCompletedCourseInBetweenCount() != null ? MAperformanceCounts.getAshaDeactivatedCompletedCourseInBetweenCount() : 0L;
1145-
long totalashasDeactivated = MAperformanceCounts.getAshasDeactivatedInBetween() != null ? MAperformanceCounts.getAshasDeactivatedInBetween() : 0L;
1146-
LOGGER.debug("ashasStartedDifference: {}, ashasCompletedDifference: {}, totalashasDeactivated: {}, ashaDeactivatedStartedCourseInBetweenCount: {},ashaDeactivatedCompletedCourseInBetweenCount: {}",ashasStartedDifference,ashasCompletedDifference,totalashasDeactivated,ashaDeactivatedStartedCourseInBetweenCount,ashaDeactivatedCompletedCourseInBetweenCount);
11471141
summaryDto1.setAshasCompleted((int) (MAperformanceCounts.getAshasCompleted()!=null ? MAperformanceCounts.getAshasCompleted() : 0L));
11481142
summaryDto1.setAshasStarted((int) (MAperformanceCounts.getAshasStarted()!=null ? MAperformanceCounts.getAshasStarted() : 0L));
1149-
summaryDto1.setAshasRegistered((int) (a.getAshasRegistered() - b.getAshasRegistered() + totalashasDeactivated));
1150-
summaryDto1.setRecordsReceived((int) ((a.getAshasRegistered() + a.getAshasRejected()) - (b.getAshasRejected() + b.getAshasRegistered()) + totalashasDeactivated));
1151-
LOGGER.debug("this is recordes received value: {}",(a.getAshasRegistered() + a.getAshasRejected()) - (b.getAshasRejected() + b.getAshasRegistered()));
1152-
1143+
summaryDto1.setAshasRegistered((int)(MAperformanceCounts.getAshasActivatedInBetween()!=null ? MAperformanceCounts.getAshasActivatedInBetween() : 0L) );
1144+
summaryDto1.setRecordsReceived((int) (MAperformanceCounts.getAshasActivatedInBetween()!=null ? MAperformanceCounts.getAshasActivatedInBetween() : 0L) + a.getAshasRejected() - b.getAshasRejected());
11531145
}
11541146
else {
11551147
summaryDto1.setAshasCompleted(a.getAshasCompleted() - b.getAshasCompleted());

0 commit comments

Comments
 (0)