| Line 9... |
Line 9... |
| 9 |
import com.spice.profitmandi.common.util.Utils;
|
9 |
import com.spice.profitmandi.common.util.Utils;
|
| 10 |
import com.spice.profitmandi.dao.entity.dtr.User;
|
10 |
import com.spice.profitmandi.dao.entity.dtr.User;
|
| 11 |
import com.spice.profitmandi.dao.entity.dtr.*;
|
11 |
import com.spice.profitmandi.dao.entity.dtr.*;
|
| 12 |
import com.spice.profitmandi.dao.entity.fofo.*;
|
12 |
import com.spice.profitmandi.dao.entity.fofo.*;
|
| 13 |
import com.spice.profitmandi.dao.entity.inventory.State;
|
13 |
import com.spice.profitmandi.dao.entity.inventory.State;
|
| - |
|
14 |
import com.spice.profitmandi.dao.entity.logistics.AST;
|
| - |
|
15 |
import com.spice.profitmandi.dao.entity.logistics.ASTRepository;
|
| 14 |
import com.spice.profitmandi.dao.entity.user.*;
|
16 |
import com.spice.profitmandi.dao.entity.user.*;
|
| 15 |
import com.spice.profitmandi.dao.enumuration.dtr.AccountType;
|
17 |
import com.spice.profitmandi.dao.enumuration.dtr.AccountType;
|
| 16 |
import com.spice.profitmandi.dao.enumuration.dtr.RetailerType;
|
18 |
import com.spice.profitmandi.dao.enumuration.dtr.RetailerType;
|
| 17 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
19 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
| 18 |
import com.spice.profitmandi.dao.enumuration.fofo.PaymentOptionType;
|
20 |
import com.spice.profitmandi.dao.enumuration.fofo.PaymentOptionType;
|
| Line 22... |
Line 24... |
| 22 |
import com.spice.profitmandi.dao.repository.fofo.FofoPartnerPaymentOptionRepository;
|
24 |
import com.spice.profitmandi.dao.repository.fofo.FofoPartnerPaymentOptionRepository;
|
| 23 |
import com.spice.profitmandi.dao.repository.fofo.PaymentOptionRepository;
|
25 |
import com.spice.profitmandi.dao.repository.fofo.PaymentOptionRepository;
|
| 24 |
import com.spice.profitmandi.dao.repository.fofo.PincodePartnerRepository;
|
26 |
import com.spice.profitmandi.dao.repository.fofo.PincodePartnerRepository;
|
| 25 |
import com.spice.profitmandi.dao.repository.inventory.StateRepository;
|
27 |
import com.spice.profitmandi.dao.repository.inventory.StateRepository;
|
| 26 |
import com.spice.profitmandi.dao.repository.user.*;
|
28 |
import com.spice.profitmandi.dao.repository.user.*;
|
| 27 |
import com.spice.profitmandi.service.offers.PartnerCriteria;
|
29 |
import com.spice.profitmandi.service.PostOfficeService;
|
| 28 |
import in.shop2020.model.v1.user.CartStatus;
|
30 |
import in.shop2020.model.v1.user.CartStatus;
|
| 29 |
import org.apache.logging.log4j.LogManager;
|
31 |
import org.apache.logging.log4j.LogManager;
|
| 30 |
import org.apache.logging.log4j.Logger;
|
32 |
import org.apache.logging.log4j.Logger;
|
| 31 |
import org.springframework.beans.factory.annotation.Autowired;
|
33 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 32 |
import org.springframework.beans.factory.annotation.Qualifier;
|
34 |
import org.springframework.beans.factory.annotation.Qualifier;
|
| Line 105... |
Line 107... |
| 105 |
|
107 |
|
| 106 |
@Autowired
|
108 |
@Autowired
|
| 107 |
private FofoStoreRepository fofoStoreRepository;
|
109 |
private FofoStoreRepository fofoStoreRepository;
|
| 108 |
|
110 |
|
| 109 |
@Autowired
|
111 |
@Autowired
|
| - |
|
112 |
private ASTRepository aSTRepository;
|
| - |
|
113 |
|
| - |
|
114 |
@Autowired
|
| - |
|
115 |
private PostOfficeService postOfficeService;
|
| - |
|
116 |
|
| - |
|
117 |
@Autowired
|
| 110 |
private PaymentOptionRepository paymentOptionRepository;
|
118 |
private PaymentOptionRepository paymentOptionRepository;
|
| 111 |
|
119 |
|
| 112 |
@Autowired
|
120 |
@Autowired
|
| 113 |
private FofoPartnerPaymentOptionRepository fofoPartnerPaymentOptionRepository;
|
121 |
private FofoPartnerPaymentOptionRepository fofoPartnerPaymentOptionRepository;
|
| 114 |
|
122 |
|
| Line 187... |
Line 195... |
| 187 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
195 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
| 188 |
LOGGER.error("FofoStore code not found");
|
196 |
LOGGER.error("FofoStore code not found");
|
| 189 |
}
|
197 |
}
|
| 190 |
}
|
198 |
}
|
| 191 |
|
199 |
|
| - |
|
200 |
if (this.containsRoleType(userRoles, role.getId())) {
|
| - |
|
201 |
try {
|
| - |
|
202 |
FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(retailerId);
|
| - |
|
203 |
AST ast = aSTRepository.selectById(fofoStore.getAstId()).get(0);
|
| - |
|
204 |
Map<String, Object> astDetail = postOfficeService.getAreasAndTerritoriesByAstId(ast.getId());
|
| - |
|
205 |
LOGGER.info("astDetail {}", astDetail);
|
| - |
|
206 |
map.put("astDetail", astDetail);
|
| - |
|
207 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
| - |
|
208 |
LOGGER.error("AST Detail not found");
|
| - |
|
209 |
}
|
| - |
|
210 |
}
|
| - |
|
211 |
|
| 192 |
try {
|
212 |
try {
|
| 193 |
PrivateDealUser privateDealUser = privateDealUserRepository.selectById(retailer.getId());
|
213 |
PrivateDealUser privateDealUser = privateDealUserRepository.selectById(retailer.getId());
|
| 194 |
if (privateDealUser.getCounterId() != null) {
|
214 |
if (privateDealUser.getCounterId() != null) {
|
| 195 |
Counter counter = counterRepository.selectById(privateDealUser.getCounterId());
|
215 |
Counter counter = counterRepository.selectById(privateDealUser.getCounterId());
|
| 196 |
map.put("gstNumber", counter.getGstin());
|
216 |
map.put("gstNumber", counter.getGstin());
|
| Line 786... |
Line 806... |
| 786 |
|
806 |
|
| 787 |
}
|
807 |
}
|
| 788 |
|
808 |
|
| 789 |
if (fofoStore != null) {
|
809 |
if (fofoStore != null) {
|
| 790 |
fofoStore.setCounterSize(updateRetailerRequest.getCountersize());
|
810 |
fofoStore.setCounterSize(updateRetailerRequest.getCountersize());
|
| - |
|
811 |
fofoStore.setAstId(updateRetailerRequest.getAstId());
|
| 791 |
fofoStore.setMinimumInvestment(updateRetailerRequest.getMinInvestment());
|
812 |
fofoStore.setMinimumInvestment(updateRetailerRequest.getMinInvestment());
|
| 792 |
fofoStore.setWarehouseId(updateRetailerRequest.getWarehouseId());
|
813 |
fofoStore.setWarehouseId(updateRetailerRequest.getWarehouseId());
|
| 793 |
fofoStore.setCounterPotential(updateRetailerRequest.getCounterPotential());
|
814 |
fofoStore.setCounterPotential(updateRetailerRequest.getCounterPotential());
|
| 794 |
fofoStore.setFofoType(updateRetailerRequest.getFofoType());
|
815 |
fofoStore.setFofoType(updateRetailerRequest.getFofoType());
|
| 795 |
|
- |
|
| 796 |
} else {
|
816 |
} else {
|
| 797 |
int retailerAddressId = retailerRegisteredAddressRepository.selectAddressIdByRetailerId(retailerId);
|
817 |
int retailerAddressId = retailerRegisteredAddressRepository.selectAddressIdByRetailerId(retailerId);
|
| 798 |
Address retailerAddress = addressRepository.selectById(retailerAddressId);
|
818 |
Address retailerAddress = addressRepository.selectById(retailerAddressId);
|
| 799 |
|
819 |
|
| 800 |
// StateInfo stateInfo = null;
|
820 |
// StateInfo stateInfo = null;
|