Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
35482 121 d 1 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ Default null partnerType to Rising Star (PartnerType.NEW) in getAllStatePartnerType  
35481 121 d 1 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ Fix NPE in getAllStatePartnerType - add null checks for PartnerDetailModel and partnerType  
35480 121 d 1 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Fix NPE in getWarehousePartners when warehouseId=0 and show all partner stats; add stack trace logging to GlobalExceptionHandler  
35479 121 d 14 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/ Optimize Aging.SoldAgingModel query and fix column mapping

- Changed DATEDIFF(NOW(), inv.invoiceDate) > 15 to sargable condition
- Fixed trailing spaces in column names (SLOWMOVING_Billed, RUNNING_Billed, etc.)
- Enables index usage on invoiceDate column

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
 
35478 121 d 14 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/ Fix Aging.15DaysOurStock query - remove invalid p.warehouseId column

- Removed po.warehouseId = p.warehouseId (purchase table has no warehouseId)
- The warehouseId match is already handled in ii2 join: ii2.physicalWarehouseId = po.warehouseId
- Verified results match original query exactly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
 
35477 121 d 14 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/ Fix FASTMOVING column name trailing space in SqlResultSetMapping

- Removed trailing space from "FASTMOVING " to "FASTMOVING"
- This was causing SQLGrammarException: could not extract ResultSet

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
 
35476 121 d 15 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/ Optimize Aging.15DaysOurStock query for better performance

- Restructured query to start from invoice table with sargable date filter
- Changed DATEDIFF(now(), inv.invoiceDate) > 15 to inv.invoiceDate < DATE_SUB(CURDATE(), INTERVAL 15 DAY)
- Reordered JOINs for better query execution plan
- Allows MySQL to use index on invoiceDate for initial filtering

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
 
35475 121 d 15 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/ Optimize selectTodayOrdersRBM: Replace derived table subquery with direct JOINs - 33x faster (78s -> 2.3s)  
35474 121 d 15 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ Optimize selectTodayOrders query: Replace OR with UNION ALL to avoid sort_union operation for today_po endpoint  
35473 121 d 15 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/ Optimize selectTodayOrdersRBM query: Replace OR with UNION ALL to avoid sort_union operation and improve query performance  
35472 121 d 17 h vikas /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/dtr/ Leads Follow ups  
35471 121 d 18 h vikas /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/dtr/ Leads Follow ups  
35470 121 d 20 h vikas /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/dtr/ Leads Follow ups  
35469 121 d 20 h vikas /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/ Leads Follow ups  
35468 121 d 20 h vikas /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/dtr/ Leads Follow ups  
35467 121 d 21 h amit /trunk/ Optimize /lead-description endpoint

- Add null check for authUser to prevent NPE
- Move visitRequests query inside followUp block
- Move Comparator outside loop
- Rewrite selectLeadsScheduledBetweenDate using Criteria API with Predicates
- Single query joins Lead + LeadActivity with filters in DB
- Remove in-memory filtering of assignTo
 
35466 122 d 3 h amit /trunk/ Optimize getActivatedImeiUpdationDate endpoint

- Add 30-day date filter to reduce table scan
- Replace LineItemImeiView with direct LineItemImei table
- Merge results with master brands/warehouses to show all combinations
- Display '-' for missing timestamps instead of hiding rows
 
35465 122 d 12 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/monitors/ Optimize today_po_rbm: single-pass iteration for warehouseWalletAmountModels

- Replace two separate stream operations with single loop
- Use EnumSet for efficient WalletReferenceType lookup
- Use Map.merge() for cleaner aggregation
 
35464 122 d 12 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ Optimize /getActivatedModelByBrand and related activation queries

- Add date range filtering in WHERE clause to use activation_timestamp index
- Replace concat(year,month) with direct date comparisons for better performance
- Optimize getAuthFofoIds to avoid unnecessary DB call when user found in cache
- Use anyMatch() instead of filter().count() for short-circuit evaluation
 
35463 122 d 12 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ Optimize /getMobileBrandWise and /getMobileLMSGraph queries

- Replace concat(year(), month()) pattern with date range comparisons
- Enables index usage on create_timestamp and activation_timestamp columns
- Update repository methods to pass date range parameters instead of string patterns
 

Show All