Skip to content

Commit

Permalink
Report changes fixed (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahil-tarento authored Feb 19, 2024
1 parent ba4c494 commit c785065
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,12 @@ public ResponseEntity<Map<String, Map<String, Object>>> getFileInfo(String orgId
logger.error("Failed to read the downloaded file for url: " + objectKey);
LocalDateTime yesterday = now.minusDays(1);
String yesterdayFormattedDate = yesterday.format(dateFormat);
objectKey = serverProperties.getReportDownloadFolderName() + "/" + reportType + "/" + yesterdayFormattedDate + "/" + mdoId + "/" + fileName;
if (serverProperties.getReportPropertyFileAllMdo().contains(fileName)) {
String reportSubFolderName = fileName.replace(".csv", "");
objectKey = serverProperties.getReportDownloadFolderName() + "/" + reportType + "/" + yesterdayFormattedDate + "/" + reportSubFolderName + "/" + fileName;
} else {
objectKey = serverProperties.getReportDownloadFolderName() + "/" + reportType + "/" + yesterdayFormattedDate + "/" + mdoId + "/" + fileName;
}
try {
Model.Blob blob = storageService.getObject(serverProperties.getReportDownloadContainerName(), objectKey, Option.apply(Boolean.FALSE));
if (blob != null) {
Expand Down

0 comments on commit c785065

Please sign in to comment.