| Line 369... |
Line 369... |
| 369 |
public int createOrder(CreateOrderRequest createOrderRequest, int fofoId, boolean accessoriesDeals) throws Exception {
|
369 |
public int createOrder(CreateOrderRequest createOrderRequest, int fofoId, boolean accessoriesDeals) throws Exception {
|
| 370 |
LOGGER.info("fofoId -- {} Order Request -- {}", fofoId, createOrderRequest);
|
370 |
LOGGER.info("fofoId -- {} Order Request -- {}", fofoId, createOrderRequest);
|
| 371 |
CustomCustomer customCustomer = createOrderRequest.getCustomer();
|
371 |
CustomCustomer customCustomer = createOrderRequest.getCustomer();
|
| 372 |
Customer customer = customerRepository.selectById(customCustomer.getCustomerId());
|
372 |
Customer customer = customerRepository.selectById(customCustomer.getCustomerId());
|
| 373 |
|
373 |
|
| - |
|
374 |
if ((createOrderRequest.getCustomer().getGender().equals("2"))) {
|
| - |
|
375 |
customer.setGender("Female");
|
| - |
|
376 |
} else {
|
| - |
|
377 |
|
| - |
|
378 |
customer.setGender("Male");
|
| - |
|
379 |
}
|
| - |
|
380 |
|
| 374 |
if (!StringUtils.isValidGstNumber(customCustomer.getGstNumber())) {
|
381 |
if (!StringUtils.isValidGstNumber(customCustomer.getGstNumber())) {
|
| 375 |
LOGGER.error("invalid customer gstNumber {} ", customCustomer.getGstNumber());
|
382 |
LOGGER.error("invalid customer gstNumber {} ", customCustomer.getGstNumber());
|
| 376 |
throw new ProfitMandiBusinessException(ProfitMandiConstants.CUSTOMER_GST_NUMBER, customCustomer.getGstNumber(), "VE_1072");
|
383 |
throw new ProfitMandiBusinessException(ProfitMandiConstants.CUSTOMER_GST_NUMBER, customCustomer.getGstNumber(), "VE_1072");
|
| 377 |
}
|
384 |
}
|
| 378 |
|
385 |
|