adding workflow apis for dashboard , added short bill api for dashboard and updation done in aggregated service - #1818
Conversation
Signed-off-by: goutam-niua <goutam@niua.org>
Signed-off-by: goutam-niua <goutam@niua.org>
…rd and updation done in aggregated service
|
Blockers Local dev config committed in application-dev.yaml Short bill API loads full bills then maps in controller Inline comments (copy per file/line on GitHub) Blocker — revert before merge redis.host changed from redis-headless.dev to localhost. This is a local-dev override and should not ship in shared config. Revert or move to an untracked local profile. File: municipal-services/upyog-aggregation-service/configs/application-dev.yaml · Line 30 Blocker — revert before merge auth.enabled: false disables authentication for the aggregation service in dev config. Please revert — this must not land in the repo default. File: municipal-services/upyog-aggregation-service/test_client.go · Line 1 Blocker — remove before merge This looks like local debug scaffolding (package main hitting localhost:9999). Same for test_server.go and test_url.go. Please delete these files from the PR. File: core-services/egov-workflow-v2/src/main/java/org/egov/wf/repository/querybuilder/WorkflowQueryBuilder.java · Line 603 Blocker — count/search semantics mismatch _count uses getDashboardProcessInstanceSearchQueryWithoutPagination() (flat join query, no latest-per-businessId dedup). _search uses getDashboardProcessInstanceIds() (WITH clause + latest instance per business). For a citizen dashboard, totalCount and the returned list can disagree. Both endpoints should share the same base filter logic. File: core-services/egov-workflow-v2/src/main/java/org/egov/wf/repository/querybuilder/WorkflowQueryBuilder.java · Line 624 Blocker — verify status field Dashboard queries filter on pi.action / pi_outer.action, but existing workflow search uses pi_outer.status (state UUID). Aggregation sends human-readable values like APPLIED, APPROVED, which may map to state.applicationStatus, not pi.action. Please validate against real data. If needed, join eg_wf_state_v2 and filter on applicationStatus instead. File: core-services/egov-workflow-v2/src/main/java/org/egov/wf/web/controllers/WorkflowController.java · Line 164 Major — redundant DB work Search already returns totalCount in the response contract, but this endpoint runs a separate count query after fetching the list (3 DB round-trips total: IDs → full rows → count). Consider returning count from the search path or reusing the count query result. File: business-services/billing-service/src/main/java/org/egov/demand/web/controller/BillControllerv2.java · Line 77 Major — inefficient short search short/_search calls billService.searchBill() (full bill graph from DB) and strips fields in the controller. For a dashboard endpoint, consider a repository-level projection query that selects only the six short fields. File: municipal-services/upyog-aggregation-service/internal/dto/request.go · Line 10 Blocker — breaking API contract requestInfo is now required on every aggregate call. Existing mobile clients that omit it will get 400. Please update: resources/upyog-aggregation-service-contract.yml Blocker — possible JSON key regression Changed from DraftSearchCriteria (PascalCase) to draftSearchCriteria. If the draft service expects the original key, search will silently fail or return empty results. Confirm against the draft service contract. File: municipal-services/upyog-aggregation-service/internal/providers/due_renewals.go · Line 66 Blocker — product semantics change Due renewals previously called TL/BPAREG search for licences nearing expiry. This now returns active bills from billing short search. That is a different domain concept still exposed as due-renewals. Confirm with product/mobile that this is intended, and update provider docs accordingly. File: municipal-services/upyog-aggregation-service/internal/providers/recent_applications.go · Line 126 Blocker — breaking provider response shape Previously returned []Application. Now returns { ProcessInstances, totalCount }. Confirm the mobile app handles this new shape, or map to the existing consumer contract before returning. File: municipal-services/upyog-aggregation-service/internal/providers/recent_applications.go · Line 86 Major — typo in status list ASSING_DSO looks like a typo for ASSIGN_DSO. Hardcoded status lists will also drift from workflow MDMS — consider centralizing or sourcing from config/MDMS. File: municipal-services/upyog-aggregation-service/internal/providers/quick_summary.go · Line 152 Major — count via full search payload Pending payments count is derived from len(searchResult.Bill) after calling short search. This works only if billing search returns all matches (no pagination cap). Prefer a dedicated count endpoint or confirm bill search has no implicit limit for mobile-number queries. File: municipal-services/upyog-aggregation-service/internal/providers/quick_summary.go · Line 255 Minor — dead code? fetchWorkflowCount appears unused after switching to fetchApplicationCount / fetchCompletedServicesCount. Please remove if not needed. |
|
Blocker Comments Re: redis.host and baseUrls in application-dev.yaml: Re: auth.enabled: false in application-dev.yaml: Re: Scaffolding files (test_client.go, test_server.go, test_url.go): Re: _count vs _search mismatch in WorkflowQueryBuilder.java: Re: Action vs Status filter on dashboard queries: Re: requestInfo marked mandatory (AggregateRequest): Re: draftSearchCriteria JSON key regression: Re: Product Semantics Change for Due Renewals: Re: recent-applications Response Shape Change: Major/Minor Comments Re: Redundant DB queries in dashboard search (3 round-trips): Re: Inefficient Short Bill Search: Re: Hardcoded status lists (including typo ASSING_DSO): Re: Count via Full Search Payload (Pending Payments): Re: Missing tests for new Java endpoints: Re: Unused code fetchWorkflowCount: |
Signed-off-by: goutam-niua <goutam@niua.org>
…ing , PwC PR feedback , SFTP implementation
…tor changes for SFTP & PR , removing reconcilliation service
| @Override | ||
| public List<ShortBillV2> extractData(ResultSet rs) throws SQLException { | ||
| Map<String, ShortBillV2> billMap = new java.util.LinkedHashMap<>(); | ||
| while (rs.next()) { |
There was a problem hiding this comment.
move this to separate row mapper
|
|
||
| /** | ||
| * Compact API response envelope wrapping the search results from the | ||
| * `/bill/v2/short/_search` endpoint. |
There was a problem hiding this comment.
add comment why we have added it on controller and to
| */ | ||
| @PostMapping("short/_search") | ||
| @ResponseBody | ||
| public ResponseEntity<?> shortSearch(@RequestBody @Valid final RequestInfoWrapper requestInfoWrapper, |
There was a problem hiding this comment.
change the endpoint and function name
| @PostMapping("short/_search") | ||
| @ResponseBody | ||
| public ResponseEntity<?> shortSearch(@RequestBody @Valid final RequestInfoWrapper requestInfoWrapper, | ||
| @ModelAttribute @Valid final BillSearchCriteria billCriteria) { |
There was a problem hiding this comment.
why we have used modelattribute here why not request body
There was a problem hiding this comment.
this is happenning in search API so the same thing is used in this as well
|
|
||
| } | ||
|
|
||
| private IngestionResult processViaS3(DashboardPayload payload, String moduleName) { |
There was a problem hiding this comment.
add comment why have done this
| * @param tenantId state tenant ID | ||
| * @return IngestionResult response from downstream ingestion engine | ||
| */ | ||
| public IngestionResult uploadLegacyExcelFile(File excelFile, String moduleName, String tenantId) { |
There was a problem hiding this comment.
remove legacy and rename upload file
| } | ||
|
|
||
| try { | ||
| String key = properties.getAwsS3Folder() + "/" + tenantId + "/" + moduleName + "/" + UUID.randomUUID().toString() + "_" + file.getName(); |
There was a problem hiding this comment.
move this to util that anyone can use
| * @see org.upyog.dashboard.entity.LegacyIngestionData | ||
| */ | ||
| public static final String UPDATE_LEGACY_INGESTION_DETAIL = "update-adapter-module-ingestion-detail"; | ||
| public static final String UPDATE_LEGACY_INGESTION_DETAIL = "update-dashboard-data-module-ingestion-detail"; |
There was a problem hiding this comment.
remove this topics will come from props only
| "module_ingestion_id, tenant_id, module_name, push_date, request_data, " + | ||
| "response_data, ingestion_status, exception_code, created_by, created_time, last_modified_by, last_modified_time) " + | ||
| "VALUES (?, ?, ?, TO_DATE(?, 'DD-MM-YYYY'), ?::jsonb, ?::jsonb, ?, ?, ?, ?, ?, ?)"; | ||
| "VALUES (:moduleIngestionId, :tenantId, :moduleName, TO_DATE(:pushDate, 'DD-MM-YYYY'), :requestData::jsonb, :responseData::jsonb, :ingestionStatus, :exceptionCode, :createdBy, :createdTime, :lastModifiedBy, :lastModifiedTime)"; |
There was a problem hiding this comment.
move date format in util
Signed-off-by: goutam-niua <goutam@niua.org>
No description provided.