Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37357 49 d 6 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/cs/ Add CsService.getAuthUsersByPartnerIdAndCategory for partner+category+escalation lookup

sendMailForActionOnDispatch mailed every L1 position on the partner, which on live data
means the DESIGN (17), SALES (4) and WAREHOUSE (11) owners as well as the RBM (18). It
also hand-rolled the partner_position -> position -> auth_user walk against repositories.

Add a single reusable resolver on CsService: active auth users holding one position
category against a partner, optionally narrowed to escalation levels. It follows the
house resolver shape - the partner's own regions plus ALL_PARTNERS_REGION, partner_id in
(0, fofoId) - so region-wide mappings are honoured, and it short-circuits on empty id
lists because selectByIds builds an IN () predicate that breaks on an empty list.

The call site in TransactionServiceImpl went in with r37356; without this commit trunk
does not compile.
 
37351 49 d 13 h ranu /trunk/ code committed for sales l3 added in bi and other model  
37145 72 d 11 h ranu /trunk/ level l1 to l9 commited  
36972 98 d 11 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ changeList  
36802 121 d 5 h ranu /trunk/ some enhancement and bug fixes  
36399 163 d 9 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Replace mailSender (SendGrid) with gmailRelaySender - SendGrid API key expired/revoked  
36212 183 d 5 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ rbm l1,l2,l3 layer introduce  
36210 183 d 6 h ranu /trunk/ rbm l1,l2,l3 layer introduce  
35963 214 d 10 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Migrate mail sending to MailOutboxService (CsService, BidService, OtpProcessor, StoreTimelineTat); add date range query for TransactionApproval  
35920 219 d 8 h ranu /trunk/ now inactive partners also showing on target page  
35683 242 d 6 h ranu /trunk/ web deploye for active category  
35647 247 d 5 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/cs/ call target related changes  
35639 249 d 7 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/cs/ Skip escalations in ticket overview Message column, compact escalation styling in detail dialog

- Add getLastMessageActivitiesForTickets to CsService to fetch most recent
communication activity (COMMUNICATION_IN/OUT/INTERNAL, OPENED) per ticket
- Ticket overview Message column now shows last communication, not escalation
- Ticket detail dialog renders escalation activities (ESCALATED, ASSIGNED,
CATEGORY_CHANGED, ESCALATED_FINAL) as compact centered system messages
instead of chat bubbles
 
35635 249 d 11 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/cs/ code commit for calling target  
35631 249 d 11 h ranu /trunk/ code commit for calling target  
35626 250 d 6 h amit /trunk/ Ticket system: add unread tracking, pagination, search, and partner notifications  
35592 253 d 11 h amit /trunk/ Ticket system improvements: N+1 query fixes, authorization checks, CRM access, UI fixes

- Fix N+1 queries in getSubCategoryIdAndCategoryMap and getAuthUserAndEsclationByPartnerId
- Add authorization checks to ticket endpoints (getActivities, closeTicket, createActivity, editTicket, editPartnerTicket, createLastActivity)
- CRM users can now see all tickets to handle partner communications
- Only CRM team members can mark tickets as resolved
- Fix duplicate HTML IDs in ticket templates (changed to classes)
- Fix getSubCategoryId() bug in edit-ticket modals
- Add message field to create-ticket form
- Update cs.js to use class selectors
 
35563 265 d 6 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/cs/ tickets updated  
35562 265 d 6 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/cs/ tickets updated  
35454 291 d 8 h amit /trunk/ perf: Optimize N+1 queries and reduce stream iterations in today_po and today_po_rbm endpoints

MonitorController.java:
- Consolidate 12 stream ops on rbmArrViewModels into single loop
- Consolidate 6 stream ops on sold15daysOldAgingModels into single loop
- Consolidate 6 stream ops on weeklyBillingData into single loop
- Merge double iteration loops into single pass operations
- Replace containsKey+get patterns with computeIfAbsent/getOrDefault
- Add extractRbmNames() helper to eliminate duplicated stream operations

CsServiceImpl.java:
- Fix N+1 in getAuthUserIdAndAuthUserMap using batch selectByIds
- Fix N+1 in getTicketIdAndAuthUserMapUsingTickets using batch selectByIds
- Fix N+1 in getAuthUserIdAndAuthUserMapUsingPositions using batch selectByIds
- Fix N+1 in getCategoryIdAndCategoryUsingPositions using batch selectAll
- Fix N+1 in getRegionIdAndRegionMap using batch selectAll
- Fix N+1 in getAuthUserByPartnerId using batch selectByIds
- Fix double N+1 in getAuthUserAndEsclationTypeByPartnerId
- Fix N+1 in authUserpartnerIdMap using selectByPositionIds
- Fix N+1 in getAuthUserIdPartnerIdMappingByCatIds
- Fix N+1 in getAuthUserIdPartnerIdMapping

RbmTargetServiceImpl.java:
- Fix O(n*m) stream filter in getRbmTodayArr using pre-built lookup maps
- Fix O(n*m) stream filter in setMovementWiseRbmTargets using pre-built maps

today_po.vm:
- Optimize template lookups with single get instead of containsKey+get
 

Show All