| Line 19... |
Line 19... |
| 19 |
import com.spice.profitmandi.dao.repository.cs.RetailerBrandsLimitService;
|
19 |
import com.spice.profitmandi.dao.repository.cs.RetailerBrandsLimitService;
|
| 20 |
import com.spice.profitmandi.dao.repository.dtr.*;
|
20 |
import com.spice.profitmandi.dao.repository.dtr.*;
|
| 21 |
import com.spice.profitmandi.dao.repository.fofo.PartnerTypeChangeRepository;
|
21 |
import com.spice.profitmandi.dao.repository.fofo.PartnerTypeChangeRepository;
|
| 22 |
import com.spice.profitmandi.dao.repository.fofo.PartnerTypeChangeService;
|
22 |
import com.spice.profitmandi.dao.repository.fofo.PartnerTypeChangeService;
|
| 23 |
import com.spice.profitmandi.dao.repository.fofo.PincodePartnerRepository;
|
23 |
import com.spice.profitmandi.dao.repository.fofo.PincodePartnerRepository;
|
| - |
|
24 |
import com.spice.profitmandi.dao.repository.trialOnboarding.TrialFormRepository;
|
| 24 |
import com.spice.profitmandi.dao.repository.user.LocationRepository;
|
25 |
import com.spice.profitmandi.dao.repository.user.LocationRepository;
|
| 25 |
import com.spice.profitmandi.dao.repository.user.LoiFormRepository;
|
26 |
import com.spice.profitmandi.dao.repository.user.LoiFormRepository;
|
| 26 |
import com.spice.profitmandi.dao.repository.user.PromoterRepository;
|
27 |
import com.spice.profitmandi.dao.repository.user.PromoterRepository;
|
| 27 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
28 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
| 28 |
import com.spice.profitmandi.dao.repository.warehouse.WarehouseSupplierInvoiceRepository;
|
29 |
import com.spice.profitmandi.dao.repository.warehouse.WarehouseSupplierInvoiceRepository;
|
| Line 122... |
Line 123... |
| 122 |
@Autowired
|
123 |
@Autowired
|
| 123 |
private RetailerContactRepository retailerContactRepository;
|
124 |
private RetailerContactRepository retailerContactRepository;
|
| 124 |
@Autowired
|
125 |
@Autowired
|
| 125 |
private WarehouseSupplierInvoiceRepository warehouseSupplierInvoiceRepository;
|
126 |
private WarehouseSupplierInvoiceRepository warehouseSupplierInvoiceRepository;
|
| 126 |
|
127 |
|
| - |
|
128 |
@Autowired
|
| - |
|
129 |
TrialFormRepository trialFormRepository;
|
| - |
|
130 |
|
| 127 |
@RequestMapping(value = "/retailerDetails", method = RequestMethod.GET)
|
131 |
@RequestMapping(value = "/retailerDetails", method = RequestMethod.GET)
|
| 128 |
public String retailerInfoByEmailIdOrMobileNumber(HttpServletRequest request,
|
132 |
public String retailerInfoByEmailIdOrMobileNumber(HttpServletRequest request,
|
| 129 |
@RequestParam(name = ProfitMandiConstants.EMAIL_ID_OR_MOBILE_NUMBER) String emailIdOrMobileNumber,
|
133 |
@RequestParam(name = ProfitMandiConstants.EMAIL_ID_OR_MOBILE_NUMBER) String emailIdOrMobileNumber,
|
| 130 |
Model model) throws ProfitMandiBusinessException {
|
134 |
Model model) throws ProfitMandiBusinessException {
|
| 131 |
LOGGER.info("Request Received at url {} with emailIdOrMobileNumber {}", request.getRequestURI(),
|
135 |
LOGGER.info("Request Received at url {} with emailIdOrMobileNumber {}", request.getRequestURI(),
|
| Line 177... |
Line 181... |
| 177 |
model.addAttribute("fofoTypes", FofoType.values());
|
181 |
model.addAttribute("fofoTypes", FofoType.values());
|
| 178 |
return "retailer-details";
|
182 |
return "retailer-details";
|
| 179 |
}
|
183 |
}
|
| 180 |
|
184 |
|
| 181 |
private void checkLoiCompletion(UpdateRetailerRequest updateRetailerRequest) throws ProfitMandiBusinessException {
|
185 |
private void checkLoiCompletion(UpdateRetailerRequest updateRetailerRequest) throws ProfitMandiBusinessException {
|
| - |
|
186 |
TrialForm trialForm = trialFormRepository.selectByEmailOrMobile(updateRetailerRequest.getUserMobileNumber());
|
| 182 |
if (updateRetailerRequest.getFofoType().equals(FofoType.INTERNAL)) {
|
187 |
if (updateRetailerRequest.getFofoType().equals(FofoType.INTERNAL) || trialForm != null) {
|
| 183 |
return; // Early return for internal type
|
188 |
return; // Early return for internal type
|
| 184 |
}
|
189 |
}
|
| 185 |
String userMobile = updateRetailerRequest.getUserMobileNumber();
|
190 |
String userMobile = updateRetailerRequest.getUserMobileNumber();
|
| 186 |
String gstNumber = updateRetailerRequest.getGstNumber();
|
191 |
String gstNumber = updateRetailerRequest.getGstNumber();
|
| 187 |
LoiForm loiForm = findLoiForm(userMobile, gstNumber);
|
192 |
LoiForm loiForm = findLoiForm(userMobile, gstNumber);
|