Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added noOfProjects fields in ReportJob object #1833

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
public class ReportQueryBuilder {
private static final String REPORT_JOB_QUERY = "SELECT id AS reportId, tenant_id AS reportTenantId, " +
"report_number AS reportNumber, report_name AS reportName, " +
"no_of_projects AS noOfProjects, " +
"status AS reportStatus, request_payload AS reportRequestPayload, " +
"additional_details AS reportAdditionalDetails, " +
"file_store_id AS reportFileStoreId," +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public List<ReportJob> extractData(ResultSet rs) throws SQLException, DataAccess
.tenantId(rs.getString("reportTenantId"))
.reportNumber(rs.getString("reportNumber"))
.reportName(rs.getString("reportName"))
.noOfProjects(rs.getInt("noOfProjects"))
.status(JobStatus.fromValue(rs.getString("reportStatus")))
.fileStoreId(rs.getString("reportFileStoreId"))
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public void processReportGenerationAfterConsumptionFromTopic(ReportRequest repor

try {
AggsResponse aggregationResponse = getAggregationResponse(reportRequest);
reportJob.setNoOfProjects(aggregationResponse.getProjectPaymentDetails().size());
ByteArrayResource excelFile = generateExcelFromObject(aggregationResponse);
String fileStoreId = fileStoreUtil.uploadFileAndGetFileStoreId(tenantId, excelFile);
reportJob.setFileStoreId(fileStoreId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public class ReportJob {
@JsonProperty("reportName")
private String reportName;

@JsonProperty("noOfProjects")
private Integer noOfProjects;

@JsonProperty("status")
private JobStatus status;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ CREATE TABLE IF Not Exists job_report (
tenant_id character varying(64) NOT NULL, -- Corresponds to "tenantId"
report_number character varying(128), -- Corresponds to "reportNumber"
report_name character varying(140), -- Corresponds to "reportName"
no_of_projects integer, -- Corresponds to "noOfProjects"
status character varying(64), -- Corresponds to "status" (enum stored as string)
request_payload JSONB, -- Corresponds to "requestPayload"
additional_details JSONB, -- Corresponds to "additionalDetails"
Expand Down