| Line 70... |
Line 70... |
| 70 |
|
70 |
|
| 71 |
List<Lead> selectAllByColorStatusAndBetweenCreatedDateAndAuthIds(List<LeadStatus> status, List<Integer> authIds, List<String> color, LocalDateTime startDate, LocalDateTime endDate);
|
71 |
List<Lead> selectAllByColorStatusAndBetweenCreatedDateAndAuthIds(List<LeadStatus> status, List<Integer> authIds, List<String> color, LocalDateTime startDate, LocalDateTime endDate);
|
| 72 |
|
72 |
|
| 73 |
public void persistLeadDetail(LeadDetailModel leadDetailModel, AuthUser authUser) throws ProfitMandiBusinessException;
|
73 |
public void persistLeadDetail(LeadDetailModel leadDetailModel, AuthUser authUser) throws ProfitMandiBusinessException;
|
| 74 |
|
74 |
|
| - |
|
75 |
/**
|
| - |
|
76 |
* Same as {@link #persistLeadDetail(LeadDetailModel, AuthUser)} but with {@code requirePhotos}
|
| - |
|
77 |
* false the five store photos are optional: whatever ids are present are stored, none are demanded.
|
| - |
|
78 |
* The LMS Create Lead form captures the shop on a call, before anyone has been to it.
|
| - |
|
79 |
*/
|
| - |
|
80 |
public void persistLeadDetail(LeadDetailModel leadDetailModel, AuthUser authUser, boolean requirePhotos)
|
| - |
|
81 |
throws ProfitMandiBusinessException;
|
| - |
|
82 |
|
| 75 |
Lead selectByMobileNumber(String mobileNumber);
|
83 |
Lead selectByMobileNumber(String mobileNumber);
|
| 76 |
|
84 |
|
| 77 |
/**
|
85 |
/**
|
| 78 |
* Every lead on this mobile that is OPEN and actually workable, newest activity first.
|
86 |
* Every lead on this mobile that is OPEN and actually workable, newest activity first.
|
| 79 |
*
|
87 |
*
|
| Line 134... |
Line 142... |
| 134 |
|
142 |
|
| 135 |
/** (derivedStage, count) of OPEN leads not touched since {@code olderThan} — the ageing widget. */
|
143 |
/** (derivedStage, count) of OPEN leads not touched since {@code olderThan} — the ageing widget. */
|
| 136 |
java.util.List<Object[]> ageingByDerivedStage(LocalDateTime olderThan);
|
144 |
java.util.List<Object[]> ageingByDerivedStage(LocalDateTime olderThan);
|
| 137 |
|
145 |
|
| 138 |
/** Single row of conditional-sum attention counts (see impl) for the optional region. */
|
146 |
/** Single row of conditional-sum attention counts (see impl) for the optional region. */
|
| - |
|
147 |
/** Attention-queue counts for the region and created-date window (same scope as the funnel). */
|
| 139 |
Object[] attentionCounts(Integer regionId, LocalDateTime now, LocalDateTime nowPlus1h);
|
148 |
Object[] attentionCounts(Integer regionId, LocalDateTime now, LocalDateTime nowPlus1h,
|
| - |
|
149 |
LocalDateTime from, LocalDateTime to);
|
| 140 |
|
150 |
|
| 141 |
/**
|
151 |
/**
|
| 142 |
* Per-owner lead counters for the live board: {@code [authId, assigned, slaBreached]}.
|
152 |
* Per-owner lead counters for the live board: {@code [authId, assigned, slaBreached]}.
|
| 143 |
* Breached = open, past its first-contact deadline, never contacted.
|
153 |
* Breached = open, past its first-contact deadline, never contacted.
|
| 144 |
*/
|
154 |
*/
|
| 145 |
List<Object[]> selectAgentLeadCounters(LocalDateTime now);
|
155 |
List<Object[]> selectAgentLeadCounters(LocalDateTime now);
|
| 146 |
|
156 |
|
| 147 |
/** Lead ids for a drill-down bucket (STAGE / ATTENTION / REGION), newest first, capped at {@code limit}. */
|
157 |
/** Lead ids for a drill-down bucket (STAGE / ATTENTION / REGION), newest first, capped at {@code limit}. */
|
| 148 |
java.util.List<Integer> selectLeadIdsForBucket(String bucketType, String bucketKey, Integer regionId,
|
158 |
java.util.List<Integer> selectLeadIdsForBucket(String bucketType, String bucketKey, Integer regionId,
|
| 149 |
LocalDateTime now, LocalDateTime nowPlus1h,
|
159 |
LocalDateTime now, LocalDateTime nowPlus1h,
|
| 150 |
LocalDateTime from, LocalDateTime to, int limit);
|
160 |
LocalDateTime from, LocalDateTime to, int offset, int limit);
|
| - |
|
161 |
|
| - |
|
162 |
/** Total leads in the same drill bucket, so the drawer can page through all of them. */
|
| - |
|
163 |
long countLeadsForBucket(String bucketType, String bucketKey, Integer regionId,
|
| - |
|
164 |
LocalDateTime now, LocalDateTime nowPlus1h,
|
| - |
|
165 |
LocalDateTime from, LocalDateTime to);
|
| - |
|
166 |
|
| - |
|
167 |
/**
|
| - |
|
168 |
* Effective LMS stage per lead id, computed with the same evidence-aware expression the dashboard
|
| - |
|
169 |
* aggregates use (beat stops, check-ins, LOI + stock payment). Lead.getEffectiveStage() reads only
|
| - |
|
170 |
* the column and will disagree for the funnel's tail.
|
| - |
|
171 |
*/
|
| - |
|
172 |
java.util.Map<Integer, String> selectEffectiveStages(java.util.List<Integer> ids);
|
| 151 |
}
|
173 |
}
|