| Line 73... |
Line 73... |
| 73 |
import com.spice.profitmandi.dao.entity.dtr.NotificationCampaign;
|
73 |
import com.spice.profitmandi.dao.entity.dtr.NotificationCampaign;
|
| 74 |
import com.spice.profitmandi.dao.entity.dtr.PushNotifications;
|
74 |
import com.spice.profitmandi.dao.entity.dtr.PushNotifications;
|
| 75 |
import com.spice.profitmandi.dao.entity.dtr.RechargeProvider;
|
75 |
import com.spice.profitmandi.dao.entity.dtr.RechargeProvider;
|
| 76 |
import com.spice.profitmandi.dao.entity.dtr.RechargeProviderCreditWalletHistory;
|
76 |
import com.spice.profitmandi.dao.entity.dtr.RechargeProviderCreditWalletHistory;
|
| 77 |
import com.spice.profitmandi.dao.entity.dtr.RechargeTransaction;
|
77 |
import com.spice.profitmandi.dao.entity.dtr.RechargeTransaction;
|
| 78 |
import com.spice.profitmandi.dao.entity.fofo.ActivatedImei;
|
- |
|
| 79 |
import com.spice.profitmandi.dao.entity.fofo.ActivityType;
|
78 |
import com.spice.profitmandi.dao.entity.fofo.ActivityType;
|
| 80 |
import com.spice.profitmandi.dao.entity.fofo.CustomerAddress;
|
79 |
import com.spice.profitmandi.dao.entity.fofo.CustomerAddress;
|
| 81 |
import com.spice.profitmandi.dao.entity.fofo.FofoLineItem;
|
80 |
import com.spice.profitmandi.dao.entity.fofo.FofoLineItem;
|
| 82 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
|
81 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
|
| 83 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrderItem;
|
82 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrderItem;
|
| Line 85... |
Line 84... |
| 85 |
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
|
84 |
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
|
| 86 |
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
|
85 |
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
|
| 87 |
import com.spice.profitmandi.dao.entity.fofo.Purchase;
|
86 |
import com.spice.profitmandi.dao.entity.fofo.Purchase;
|
| 88 |
import com.spice.profitmandi.dao.entity.fofo.ScanRecord;
|
87 |
import com.spice.profitmandi.dao.entity.fofo.ScanRecord;
|
| 89 |
import com.spice.profitmandi.dao.entity.fofo.SchemeInOut;
|
88 |
import com.spice.profitmandi.dao.entity.fofo.SchemeInOut;
|
| 90 |
import com.spice.profitmandi.dao.entity.transaction.HdfcPayment;
|
- |
|
| 91 |
import com.spice.profitmandi.dao.entity.transaction.PriceDrop;
|
89 |
import com.spice.profitmandi.dao.entity.transaction.PriceDrop;
|
| 92 |
import com.spice.profitmandi.dao.entity.transaction.PriceDropIMEI;
|
90 |
import com.spice.profitmandi.dao.entity.transaction.PriceDropIMEI;
|
| 93 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
91 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
| 94 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
92 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
| 95 |
import com.spice.profitmandi.dao.entity.user.Address;
|
93 |
import com.spice.profitmandi.dao.entity.user.Address;
|
| Line 100... |
Line 98... |
| 100 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
98 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
| 101 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
99 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
| 102 |
import com.spice.profitmandi.dao.enumuration.dtr.RefferalStatus;
|
100 |
import com.spice.profitmandi.dao.enumuration.dtr.RefferalStatus;
|
| 103 |
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
|
101 |
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
|
| 104 |
import com.spice.profitmandi.dao.enumuration.transaction.PriceDropImeiStatus;
|
102 |
import com.spice.profitmandi.dao.enumuration.transaction.PriceDropImeiStatus;
|
| 105 |
import com.spice.profitmandi.dao.model.AddPaymentRequest;
|
- |
|
| 106 |
import com.spice.profitmandi.dao.model.AddPaymentResponse;
|
- |
|
| 107 |
import com.spice.profitmandi.dao.model.SimpleCampaign;
|
103 |
import com.spice.profitmandi.dao.model.SimpleCampaign;
|
| 108 |
import com.spice.profitmandi.dao.model.SimpleCampaignParams;
|
104 |
import com.spice.profitmandi.dao.model.SimpleCampaignParams;
|
| 109 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
105 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| 110 |
import com.spice.profitmandi.dao.repository.catalog.DeviceRepository;
|
106 |
import com.spice.profitmandi.dao.repository.catalog.DeviceRepository;
|
| 111 |
import com.spice.profitmandi.dao.repository.catalog.FocusedModelRepository;
|
107 |
import com.spice.profitmandi.dao.repository.catalog.FocusedModelRepository;
|
| 112 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
108 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
| 113 |
import com.spice.profitmandi.dao.repository.catalog.SchemeRepository;
|
109 |
import com.spice.profitmandi.dao.repository.catalog.SchemeRepository;
|
| - |
|
110 |
import com.spice.profitmandi.dao.repository.catalog.StateGstRateRepository;
|
| 114 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
111 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
| 115 |
import com.spice.profitmandi.dao.repository.cs.PositionRepository;
|
112 |
import com.spice.profitmandi.dao.repository.cs.PositionRepository;
|
| 116 |
import com.spice.profitmandi.dao.repository.cs.TicketRepository;
|
113 |
import com.spice.profitmandi.dao.repository.cs.TicketRepository;
|
| 117 |
import com.spice.profitmandi.dao.repository.dtr.DailyRechargeRepository;
|
114 |
import com.spice.profitmandi.dao.repository.dtr.DailyRechargeRepository;
|
| 118 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
115 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
| Line 335... |
Line 332... |
| 335 |
@Autowired
|
332 |
@Autowired
|
| 336 |
private TargetSlabService targetService;
|
333 |
private TargetSlabService targetService;
|
| 337 |
|
334 |
|
| 338 |
@Value("${prod}")
|
335 |
@Value("${prod}")
|
| 339 |
private boolean prod;
|
336 |
private boolean prod;
|
| - |
|
337 |
|
| - |
|
338 |
@Autowired
|
| - |
|
339 |
private StateGstRateRepository stateGstRateRepository;
|
| 340 |
|
340 |
|
| 341 |
@Autowired
|
341 |
@Autowired
|
| 342 |
private RetailerService retailerService;
|
342 |
private RetailerService retailerService;
|
| 343 |
|
343 |
|
| 344 |
@Autowired
|
344 |
@Autowired
|
| Line 977... |
Line 977... |
| 977 |
}
|
977 |
}
|
| 978 |
Map<Integer, GstRate> itemIdStateTaxRateMap = null;
|
978 |
Map<Integer, GstRate> itemIdStateTaxRateMap = null;
|
| 979 |
Map<Integer, Float> itemIdIgstTaxRateMap = null;
|
979 |
Map<Integer, Float> itemIdIgstTaxRateMap = null;
|
| 980 |
|
980 |
|
| 981 |
List<FofoOrderItem> fofoOrderItems = fofoOrderItemRepository.selectByOrderId(fofoOrder.getId());
|
981 |
List<FofoOrderItem> fofoOrderItems = fofoOrderItemRepository.selectByOrderId(fofoOrder.getId());
|
| 982 |
Set<Integer> itemIds = fofoOrderItems.stream().map(x -> x.getItemId()).collect(Collectors.toSet());
|
982 |
List<Integer> itemIds = fofoOrderItems.stream().map(x -> x.getItemId()).collect(Collectors.toList());
|
| 983 |
if (stateId != null) {
|
983 |
if (stateId != null) {
|
| 984 |
itemIdStateTaxRateMap = Utils.getStateTaxRate(new ArrayList<>(itemIds), stateId);
|
984 |
itemIdStateTaxRateMap = stateGstRateRepository.getStateTaxRate(itemIds, stateId);
|
| 985 |
} else {
|
985 |
} else {
|
| 986 |
itemIdIgstTaxRateMap = Utils.getIgstTaxRate(new ArrayList<>(itemIds));
|
986 |
itemIdIgstTaxRateMap = stateGstRateRepository.getIgstTaxRate(itemIds);
|
| 987 |
}
|
987 |
}
|
| 988 |
|
988 |
|
| 989 |
for (FofoOrderItem foi : fofoOrderItems) {
|
989 |
for (FofoOrderItem foi : fofoOrderItems) {
|
| 990 |
if (stateId == null) {
|
990 |
if (stateId == null) {
|
| 991 |
foi.setIgstRate(itemIdIgstTaxRateMap.get(foi.getItemId()));
|
991 |
foi.setIgstRate(itemIdIgstTaxRateMap.get(foi.getItemId()));
|