| Line 33... |
Line 33... |
| 33 |
import com.spice.profitmandi.dao.repository.transaction.OrderRepository;
|
33 |
import com.spice.profitmandi.dao.repository.transaction.OrderRepository;
|
| 34 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
34 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
| 35 |
import com.spice.profitmandi.service.AuthService;
|
35 |
import com.spice.profitmandi.service.AuthService;
|
| 36 |
import com.spice.profitmandi.service.NotificationService;
|
36 |
import com.spice.profitmandi.service.NotificationService;
|
| 37 |
import com.spice.profitmandi.service.PartnerCollectionService;
|
37 |
import com.spice.profitmandi.service.PartnerCollectionService;
|
| - |
|
38 |
import com.spice.profitmandi.service.integrations.kommuno.RecordingService;
|
| 38 |
import com.spice.profitmandi.service.user.RetailerService;
|
39 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 39 |
import com.spice.profitmandi.service.user.StoreTimelineTatService;
|
40 |
import com.spice.profitmandi.service.user.StoreTimelineTatService;
|
| 40 |
import com.spice.profitmandi.web.req.CreateFranchiseeRequest;
|
41 |
import com.spice.profitmandi.web.req.CreateFranchiseeRequest;
|
| 41 |
import com.spice.profitmandi.web.req.RbmSalesRatingRequest;
|
42 |
import com.spice.profitmandi.web.req.RbmSalesRatingRequest;
|
| 42 |
import com.spice.profitmandi.web.res.Partner;
|
43 |
import com.spice.profitmandi.web.res.Partner;
|
| Line 187... |
Line 188... |
| 187 |
PurchaseRepository purchaseRepository;
|
188 |
PurchaseRepository purchaseRepository;
|
| 188 |
|
189 |
|
| 189 |
@Autowired
|
190 |
@Autowired
|
| 190 |
private LoanRepository loanRepository;
|
191 |
private LoanRepository loanRepository;
|
| 191 |
|
192 |
|
| - |
|
193 |
@Autowired
|
| - |
|
194 |
private RecordingService recordingService;
|
| - |
|
195 |
|
| 192 |
@RequestMapping(value = "/lead", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
196 |
@RequestMapping(value = "/lead", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 193 |
@ApiImplicitParams({
|
197 |
@ApiImplicitParams({
|
| 194 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header")})
|
198 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header")})
|
| 195 |
|
199 |
|
| 196 |
public ResponseEntity<?> LeadUser(@RequestBody CreateRefferalRequest createRefferalRequest) throws Exception {
|
200 |
public ResponseEntity<?> LeadUser(@RequestBody CreateRefferalRequest createRefferalRequest) throws Exception {
|
| Line 1324... |
Line 1328... |
| 1324 |
partnerCollectionPlan.setUpdatedTimestamp(LocalDateTime.now());
|
1328 |
partnerCollectionPlan.setUpdatedTimestamp(LocalDateTime.now());
|
| 1325 |
}
|
1329 |
}
|
| 1326 |
|
1330 |
|
| 1327 |
}
|
1331 |
}
|
| 1328 |
|
1332 |
|
| - |
|
1333 |
long callLogId = recordingService.getLatestAgentCallLog(ptam.getFofoId(),authUser.getId());
|
| - |
|
1334 |
|
| 1329 |
PartnerCollectionRemark pcr = new PartnerCollectionRemark();
|
1335 |
PartnerCollectionRemark pcr = new PartnerCollectionRemark();
|
| 1330 |
pcr.setFofoId(ptam.getFofoId());
|
1336 |
pcr.setFofoId(ptam.getFofoId());
|
| 1331 |
pcr.setAuthId(authUser.getId());
|
1337 |
pcr.setAuthId(authUser.getId());
|
| 1332 |
pcr.setMessage("Collection plan for" + ptam.getCollectionCommitmentDate());
|
1338 |
pcr.setMessage("Collection plan for" + ptam.getCollectionCommitmentDate());
|
| 1333 |
pcr.setRemark(CollectionRemark.COLLECTION_PLAN);
|
1339 |
pcr.setRemark(CollectionRemark.COLLECTION_PLAN);
|
| 1334 |
pcr.setAgentCallLogId(0);
|
1340 |
pcr.setAgentCallLogId(callLogId);
|
| 1335 |
pcr.setCreateTimestamp(LocalDateTime.now());
|
1341 |
pcr.setCreateTimestamp(LocalDateTime.now());
|
| 1336 |
partnerCollectionRemarkRepository.persist(pcr);
|
1342 |
partnerCollectionRemarkRepository.persist(pcr);
|
| 1337 |
} else {
|
1343 |
} else {
|
| 1338 |
throw new ProfitMandiBusinessException("Date", "",
|
1344 |
throw new ProfitMandiBusinessException("Date", "",
|
| 1339 |
"you can't select the back date " + ptam.getCollectionCommitmentDate());
|
1345 |
"you can't select the back date " + ptam.getCollectionCommitmentDate());
|