| Line 980... |
Line 980... |
| 980 |
RbmCallTargetModel l2Model = new RbmCallTargetModel();
|
980 |
RbmCallTargetModel l2Model = new RbmCallTargetModel();
|
| 981 |
l2Model.setAuthId(l2AuthId);
|
981 |
l2Model.setAuthId(l2AuthId);
|
| 982 |
l2Model.setRbmName(authUser.getFullName() + " (L2)");
|
982 |
l2Model.setRbmName(authUser.getFullName() + " (L2)");
|
| 983 |
l2Model.setL2Position(true);
|
983 |
l2Model.setL2Position(true);
|
| 984 |
l2Model.setL2CallingList(l2TargetFofoIds.size());
|
984 |
l2Model.setL2CallingList(l2TargetFofoIds.size());
|
| 985 |
// Partner count = total assigned partners (same as L1 source)
|
985 |
// Partner count: if user is also L1, use L1 partner count (MTD targeted partners)
|
| - |
|
986 |
if (l1AuthIds.contains(l2AuthId)) {
|
| - |
|
987 |
Set<Integer> mtdFofoIds = mtdFofoIdsByAuthId.getOrDefault(l2AuthId, Collections.emptySet());
|
| - |
|
988 |
l2Model.setPartnerCount(mtdFofoIds.size());
|
| - |
|
989 |
} else {
|
| 986 |
List<Integer> l2AssignedFofoIds = rbmToFofoIdsMap.getOrDefault(l2AuthId, Collections.emptyList());
|
990 |
List<Integer> l2AssignedFofoIds = rbmToFofoIdsMap.getOrDefault(l2AuthId, Collections.emptyList());
|
| 987 |
l2Model.setPartnerCount(l2AssignedFofoIds.size());
|
991 |
l2Model.setPartnerCount(l2AssignedFofoIds.size());
|
| - |
|
992 |
}
|
| 988 |
|
993 |
|
| 989 |
// Calculate L1 own target if user is also L1
|
994 |
// Calculate L1 own target if user is also L1
|
| 990 |
long l1OwnTarget = 0;
|
995 |
long l1OwnTarget = 0;
|
| 991 |
if (l1AuthIds.contains(l2AuthId) && storeGuyMap.containsKey(authUser.getEmailId())) {
|
996 |
if (l1AuthIds.contains(l2AuthId) && storeGuyMap.containsKey(authUser.getEmailId())) {
|
| 992 |
List<Integer> fofoIdList = rbmToFofoIdsMap.getOrDefault(l2AuthId, Collections.emptyList());
|
997 |
List<Integer> fofoIdList = rbmToFofoIdsMap.getOrDefault(l2AuthId, Collections.emptyList());
|