| Line 3... |
Line 3... |
| 3 |
import java.io.File;
|
3 |
import java.io.File;
|
| 4 |
import java.io.IOException;
|
4 |
import java.io.IOException;
|
| 5 |
import java.time.LocalDate;
|
5 |
import java.time.LocalDate;
|
| 6 |
import java.time.LocalDateTime;
|
6 |
import java.time.LocalDateTime;
|
| 7 |
import java.time.LocalTime;
|
7 |
import java.time.LocalTime;
|
| - |
|
8 |
import java.time.Month;
|
| 8 |
import java.time.temporal.ChronoUnit;
|
9 |
import java.time.temporal.ChronoUnit;
|
| 9 |
import java.util.ArrayList;
|
10 |
import java.util.ArrayList;
|
| 10 |
import java.util.Arrays;
|
11 |
import java.util.Arrays;
|
| 11 |
import java.util.Base64;
|
12 |
import java.util.Base64;
|
| 12 |
import java.util.Collections;
|
13 |
import java.util.Collections;
|
| Line 53... |
Line 54... |
| 53 |
import com.spice.profitmandi.dao.entity.fofo.DebitNote;
|
54 |
import com.spice.profitmandi.dao.entity.fofo.DebitNote;
|
| 54 |
import com.spice.profitmandi.dao.entity.fofo.FofoLineItem;
|
55 |
import com.spice.profitmandi.dao.entity.fofo.FofoLineItem;
|
| 55 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
|
56 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
|
| 56 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrderItem;
|
57 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrderItem;
|
| 57 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
58 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
| 58 |
import com.spice.profitmandi.dao.entity.fofo.FofoStoreGeofence;
|
- |
|
| 59 |
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
|
59 |
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
|
| 60 |
import com.spice.profitmandi.dao.entity.fofo.PartnerTargetDetails;
|
60 |
import com.spice.profitmandi.dao.entity.fofo.PartnerTargetDetails;
|
| 61 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
61 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
| 62 |
import com.spice.profitmandi.dao.entity.fofo.PrebookingOrder;
|
62 |
import com.spice.profitmandi.dao.entity.fofo.PrebookingOrder;
|
| 63 |
import com.spice.profitmandi.dao.entity.fofo.Purchase;
|
63 |
import com.spice.profitmandi.dao.entity.fofo.Purchase;
|
| Line 73... |
Line 73... |
| 73 |
import com.spice.profitmandi.dao.entity.transaction.SellerWarehouse;
|
73 |
import com.spice.profitmandi.dao.entity.transaction.SellerWarehouse;
|
| 74 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
74 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
| 75 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
75 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
| 76 |
import com.spice.profitmandi.dao.entity.user.Address;
|
76 |
import com.spice.profitmandi.dao.entity.user.Address;
|
| 77 |
import com.spice.profitmandi.dao.entity.user.User;
|
77 |
import com.spice.profitmandi.dao.entity.user.User;
|
| - |
|
78 |
import com.spice.profitmandi.dao.entity.warehouse.WarehouseInventoryItem;
|
| 78 |
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
|
79 |
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
|
| 79 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
80 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
| 80 |
import com.spice.profitmandi.dao.enumuration.dtr.PaymentOptionReferenceType;
|
81 |
import com.spice.profitmandi.dao.enumuration.dtr.PaymentOptionReferenceType;
|
| 81 |
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
|
82 |
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
|
| 82 |
import com.spice.profitmandi.dao.model.ContentPojo;
|
83 |
import com.spice.profitmandi.dao.model.ContentPojo;
|
| Line 93... |
Line 94... |
| 93 |
import com.spice.profitmandi.dao.repository.fofo.CurrentInventorySnapshotRepository;
|
94 |
import com.spice.profitmandi.dao.repository.fofo.CurrentInventorySnapshotRepository;
|
| 94 |
import com.spice.profitmandi.dao.repository.fofo.DebitNoteRepository;
|
95 |
import com.spice.profitmandi.dao.repository.fofo.DebitNoteRepository;
|
| 95 |
import com.spice.profitmandi.dao.repository.fofo.FofoLineItemRepository;
|
96 |
import com.spice.profitmandi.dao.repository.fofo.FofoLineItemRepository;
|
| 96 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderItemRepository;
|
97 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderItemRepository;
|
| 97 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
98 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
| 98 |
import com.spice.profitmandi.dao.repository.fofo.FofoStoreGeofenceRepository;
|
- |
|
| 99 |
import com.spice.profitmandi.dao.repository.fofo.InventoryItemRepository;
|
99 |
import com.spice.profitmandi.dao.repository.fofo.InventoryItemRepository;
|
| 100 |
import com.spice.profitmandi.dao.repository.fofo.InvoiceNumberGenerationSequenceRepository;
|
100 |
import com.spice.profitmandi.dao.repository.fofo.InvoiceNumberGenerationSequenceRepository;
|
| 101 |
import com.spice.profitmandi.dao.repository.fofo.PartnerTargetRepository;
|
101 |
import com.spice.profitmandi.dao.repository.fofo.PartnerTargetRepository;
|
| 102 |
import com.spice.profitmandi.dao.repository.fofo.PrebookingOrderRepository;
|
102 |
import com.spice.profitmandi.dao.repository.fofo.PrebookingOrderRepository;
|
| 103 |
import com.spice.profitmandi.dao.repository.fofo.PurchaseRepository;
|
103 |
import com.spice.profitmandi.dao.repository.fofo.PurchaseRepository;
|
| Line 116... |
Line 116... |
| 116 |
import com.spice.profitmandi.dao.repository.transaction.SellerWarehouseRepository;
|
116 |
import com.spice.profitmandi.dao.repository.transaction.SellerWarehouseRepository;
|
| 117 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletHistoryRepository;
|
117 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletHistoryRepository;
|
| 118 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
|
118 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
|
| 119 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
119 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
| 120 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
120 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
| - |
|
121 |
import com.spice.profitmandi.dao.repository.warehouse.WarehouseInventoryItemRepository;
|
| 121 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
122 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
| 122 |
import com.spice.profitmandi.service.inventory.PurchaseService;
|
123 |
import com.spice.profitmandi.service.inventory.PurchaseService;
|
| 123 |
import com.spice.profitmandi.service.order.OrderService;
|
124 |
import com.spice.profitmandi.service.order.OrderService;
|
| 124 |
import com.spice.profitmandi.service.pricing.PriceDropService;
|
125 |
import com.spice.profitmandi.service.pricing.PriceDropService;
|
| 125 |
import com.spice.profitmandi.service.scheme.SchemeService;
|
126 |
import com.spice.profitmandi.service.scheme.SchemeService;
|
| Line 154... |
Line 155... |
| 154 |
@Autowired
|
155 |
@Autowired
|
| 155 |
private CsService csService;
|
156 |
private CsService csService;
|
| 156 |
|
157 |
|
| 157 |
@Autowired
|
158 |
@Autowired
|
| 158 |
private Mongo mongoClient;
|
159 |
private Mongo mongoClient;
|
| 159 |
|
160 |
|
| 160 |
@Autowired
|
161 |
@Autowired
|
| 161 |
private PaymentOptionTransactionRepository paymentOptionTransactionRepository;
|
162 |
private PaymentOptionTransactionRepository paymentOptionTransactionRepository;
|
| 162 |
|
163 |
|
| 163 |
@Autowired
|
164 |
@Autowired
|
| 164 |
private SamsungIMEIActivationService samsungActivationService;
|
165 |
private SamsungIMEIActivationService samsungActivationService;
|
| Line 178... |
Line 179... |
| 178 |
@Autowired
|
179 |
@Autowired
|
| 179 |
private SellerWarehouseRepository sellerWarehouseRepository;
|
180 |
private SellerWarehouseRepository sellerWarehouseRepository;
|
| 180 |
|
181 |
|
| 181 |
@Autowired
|
182 |
@Autowired
|
| 182 |
private FofoOrderItemRepository fofoOrderItemRepository;
|
183 |
private FofoOrderItemRepository fofoOrderItemRepository;
|
| 183 |
|
184 |
|
| 184 |
@Autowired
|
185 |
@Autowired
|
| 185 |
private FofoLineItemRepository fofoLineItemRepository;
|
186 |
private FofoLineItemRepository fofoLineItemRepository;
|
| 186 |
|
187 |
|
| 187 |
@Autowired
|
188 |
@Autowired
|
| 188 |
private FofoOrderRepository fofoOrderRepository;
|
189 |
private FofoOrderRepository fofoOrderRepository;
|
| Line 279... |
Line 280... |
| 279 |
private ScanRecordRepository scanRecordRepository;
|
280 |
private ScanRecordRepository scanRecordRepository;
|
| 280 |
|
281 |
|
| 281 |
@Autowired
|
282 |
@Autowired
|
| 282 |
private JavaMailSender mailSender;
|
283 |
private JavaMailSender mailSender;
|
| 283 |
|
284 |
|
| 284 |
@Autowired
|
- |
|
| 285 |
private FofoStoreGeofenceRepository fofoStoreGeofenceRepository;
|
- |
|
| 286 |
|
- |
|
| 287 |
private static final String ACCOUNT_ID = "aZ6flHhrgPIEl18buHdPBdueEN4";
|
285 |
private static final String ACCOUNT_ID = "aZ6flHhrgPIEl18buHdPBdueEN4";
|
| 288 |
private static final String SECRET_KEY = "a7rsX5B4UNNfTTx1-IJ19qdH48BT4YvBKlQJg3n3_KKNe7WWych55g";
|
286 |
private static final String SECRET_KEY = "a7rsX5B4UNNfTTx1-IJ19qdH48BT4YvBKlQJg3n3_KKNe7WWych55g";
|
| 289 |
|
287 |
|
| - |
|
288 |
@Autowired
|
| - |
|
289 |
private WarehouseInventoryItemRepository warehouseInventoryItemRepository;
|
| - |
|
290 |
|
| 290 |
public void populateGrnTimestamp() {
|
291 |
public void populateGrnTimestamp() {
|
| 291 |
List<Purchase> allPurchases = purchaseRepository.selectAll();
|
292 |
List<Purchase> allPurchases = purchaseRepository.selectAll();
|
| 292 |
for (Purchase p : allPurchases) {
|
293 |
for (Purchase p : allPurchases) {
|
| 293 |
String invoiceNumber = p.getPurchaseReference();
|
294 |
String invoiceNumber = p.getPurchaseReference();
|
| 294 |
if (p.getCompleteTimestamp() == null) {
|
295 |
if (p.getCompleteTimestamp() == null) {
|
| Line 1173... |
Line 1174... |
| 1173 |
|
1174 |
|
| 1174 |
public void processSchemeOut(int fofoId, int orderId) throws Exception {
|
1175 |
public void processSchemeOut(int fofoId, int orderId) throws Exception {
|
| 1175 |
schemeService.processSchemeOut(orderId, fofoId);
|
1176 |
schemeService.processSchemeOut(orderId, fofoId);
|
| 1176 |
|
1177 |
|
| 1177 |
}
|
1178 |
}
|
| - |
|
1179 |
|
| - |
|
1180 |
public void createDummyInvoices() {
|
| - |
|
1181 |
List<WarehouseInventoryItem> lavaInventoryItems = warehouseInventoryItemRepository.getSerialNumbers("Lava", LocalDate.of(2020,Month.SEPTEMBER, 1).atStartOfDay(), LocalDateTime.now());
|
| - |
|
1182 |
LOGGER.info("Lava Inventory Size is {}", lavaInventoryItems.size());
|
| - |
|
1183 |
}
|
| 1178 |
}
|
1184 |
}
|
| 1179 |
|
1185 |
|
| 1180 |
//7015845171
|
1186 |
//7015845171
|
| 1181 |
|
1187 |
|