| Line 553... |
Line 553... |
| 553 |
@RequestBody CreateFranchiseeRequest createFranchiseeRequest) throws Exception {
|
553 |
@RequestBody CreateFranchiseeRequest createFranchiseeRequest) throws Exception {
|
| 554 |
|
554 |
|
| 555 |
int rbmL1 = csService.getAuthUserId(ProfitMandiConstants.TICKET_CATEGORY_RBM, EscalationType.L1, createFranchiseeRequest.getFofoId());
|
555 |
int rbmL1 = csService.getAuthUserId(ProfitMandiConstants.TICKET_CATEGORY_RBM, EscalationType.L1, createFranchiseeRequest.getFofoId());
|
| 556 |
|
556 |
|
| 557 |
FranchiseeVisit franchiseeVisit = franchiseeVisitRepository.selectById(createFranchiseeRequest.getId());
|
557 |
FranchiseeVisit franchiseeVisit = franchiseeVisitRepository.selectById(createFranchiseeRequest.getId());
|
| - |
|
558 |
if (franchiseeVisit == null) {
|
| - |
|
559 |
throw new ProfitMandiBusinessException("id", createFranchiseeRequest.getId(), "Franchisee visit not found for id: " + createFranchiseeRequest.getId());
|
| - |
|
560 |
}
|
| 558 |
franchiseeVisit.setFofoId(createFranchiseeRequest.getFofoId());
|
561 |
franchiseeVisit.setFofoId(createFranchiseeRequest.getFofoId());
|
| 559 |
CustomRetailer customRetailer = retailerService.getFofoRetailer(createFranchiseeRequest.getFofoId());
|
562 |
CustomRetailer customRetailer = retailerService.getFofoRetailer(createFranchiseeRequest.getFofoId());
|
| 560 |
LOGGER.info("rbmL1 {}", rbmL1);
|
563 |
LOGGER.info("rbmL1 {}", rbmL1);
|
| 561 |
franchiseeVisit.setPartnerName(customRetailer.getBusinessName());
|
564 |
franchiseeVisit.setPartnerName(customRetailer.getBusinessName());
|
| 562 |
franchiseeVisit.setAgenda(createFranchiseeRequest.getAgenda());
|
565 |
franchiseeVisit.setAgenda(createFranchiseeRequest.getAgenda());
|