| Line 67... |
Line 67... |
| 67 |
import com.spice.profitmandi.dao.entity.fofo.PurchaseReturnItem;
|
67 |
import com.spice.profitmandi.dao.entity.fofo.PurchaseReturnItem;
|
| 68 |
import com.spice.profitmandi.dao.entity.fofo.ScanRecord;
|
68 |
import com.spice.profitmandi.dao.entity.fofo.ScanRecord;
|
| 69 |
import com.spice.profitmandi.dao.entity.fofo.SchemeInOut;
|
69 |
import com.spice.profitmandi.dao.entity.fofo.SchemeInOut;
|
| 70 |
import com.spice.profitmandi.dao.entity.fofo.SchemeItem;
|
70 |
import com.spice.profitmandi.dao.entity.fofo.SchemeItem;
|
| 71 |
import com.spice.profitmandi.dao.entity.inventory.SaholicInventorySnapshot;
|
71 |
import com.spice.profitmandi.dao.entity.inventory.SaholicInventorySnapshot;
|
| - |
|
72 |
import com.spice.profitmandi.dao.entity.inventory.VendorItemPricing;
|
| 72 |
import com.spice.profitmandi.dao.entity.transaction.HdfcPayment;
|
73 |
import com.spice.profitmandi.dao.entity.transaction.HdfcPayment;
|
| 73 |
import com.spice.profitmandi.dao.entity.transaction.LineItem;
|
74 |
import com.spice.profitmandi.dao.entity.transaction.LineItem;
|
| 74 |
import com.spice.profitmandi.dao.entity.transaction.LineItemImei;
|
75 |
import com.spice.profitmandi.dao.entity.transaction.LineItemImei;
|
| 75 |
import com.spice.profitmandi.dao.entity.transaction.ManualPaymentType;
|
76 |
import com.spice.profitmandi.dao.entity.transaction.ManualPaymentType;
|
| 76 |
import com.spice.profitmandi.dao.entity.transaction.Order;
|
77 |
import com.spice.profitmandi.dao.entity.transaction.Order;
|
| Line 114... |
Line 115... |
| 114 |
import com.spice.profitmandi.dao.repository.fofo.ScanRecordRepository;
|
115 |
import com.spice.profitmandi.dao.repository.fofo.ScanRecordRepository;
|
| 115 |
import com.spice.profitmandi.dao.repository.fofo.SchemeInOutRepository;
|
116 |
import com.spice.profitmandi.dao.repository.fofo.SchemeInOutRepository;
|
| 116 |
import com.spice.profitmandi.dao.repository.fofo.SchemeItemRepository;
|
117 |
import com.spice.profitmandi.dao.repository.fofo.SchemeItemRepository;
|
| 117 |
import com.spice.profitmandi.dao.repository.inventory.SaholicInventorySnapshotRepository;
|
118 |
import com.spice.profitmandi.dao.repository.inventory.SaholicInventorySnapshotRepository;
|
| 118 |
import com.spice.profitmandi.dao.repository.inventory.SaholicReservationSnapshotRepository;
|
119 |
import com.spice.profitmandi.dao.repository.inventory.SaholicReservationSnapshotRepository;
|
| - |
|
120 |
import com.spice.profitmandi.dao.repository.inventory.VendorItemPricingRepository;
|
| 119 |
import com.spice.profitmandi.dao.repository.transaction.HdfcPaymentRepository;
|
121 |
import com.spice.profitmandi.dao.repository.transaction.HdfcPaymentRepository;
|
| 120 |
import com.spice.profitmandi.dao.repository.transaction.LineItemImeisRepository;
|
122 |
import com.spice.profitmandi.dao.repository.transaction.LineItemImeisRepository;
|
| 121 |
import com.spice.profitmandi.dao.repository.transaction.LineItemRepository;
|
123 |
import com.spice.profitmandi.dao.repository.transaction.LineItemRepository;
|
| 122 |
import com.spice.profitmandi.dao.repository.transaction.OrderRepository;
|
124 |
import com.spice.profitmandi.dao.repository.transaction.OrderRepository;
|
| 123 |
import com.spice.profitmandi.dao.repository.transaction.ReturnOrderRepository;
|
125 |
import com.spice.profitmandi.dao.repository.transaction.ReturnOrderRepository;
|
| Line 154... |
Line 156... |
| 154 |
@Autowired
|
156 |
@Autowired
|
| 155 |
private LineItemRepository lineItemRepository;
|
157 |
private LineItemRepository lineItemRepository;
|
| 156 |
|
158 |
|
| 157 |
@Autowired
|
159 |
@Autowired
|
| 158 |
private LeadRepository leadRepository;
|
160 |
private LeadRepository leadRepository;
|
| - |
|
161 |
|
| - |
|
162 |
@Autowired
|
| - |
|
163 |
private VendorItemPricingRepository vendorItemPricingRepository;
|
| 159 |
|
164 |
|
| 160 |
@Autowired
|
165 |
@Autowired
|
| 161 |
private PurchaseReturnItemRepository purchaseReturnItemRepository;
|
166 |
private PurchaseReturnItemRepository purchaseReturnItemRepository;
|
| 162 |
|
167 |
|
| 163 |
@Autowired
|
168 |
@Autowired
|
| Line 1376... |
Line 1381... |
| 1376 |
}
|
1381 |
}
|
| 1377 |
|
1382 |
|
| 1378 |
}
|
1383 |
}
|
| 1379 |
}
|
1384 |
}
|
| 1380 |
|
1385 |
|
| - |
|
1386 |
public void fixOrders() throws Exception {
|
| - |
|
1387 |
List<Order> orders = orderRepository.selectAllOrderDatesBetweenByStatus(LocalDate.now().atStartOfDay(), LocalDateTime.now(), OrderStatus.SUBMITTED_FOR_PROCESSING);
|
| - |
|
1388 |
for(Order order : orders) {
|
| - |
|
1389 |
if(order.getLineItem().getNlc()==null) {
|
| - |
|
1390 |
int itemId = order.getLineItem().getItemId();
|
| - |
|
1391 |
int fulfillmentWarehouseId = order.getFulfilmentWarehouseId();
|
| - |
|
1392 |
Item item = itemRepository.selectById(itemId);
|
| - |
|
1393 |
|
| - |
|
1394 |
VendorItemPricing vendorItemPricing = vendorItemPricingRepository.selectByItemIdAndVendorId(itemId, fulfillmentWarehouseId);
|
| - |
|
1395 |
order.getLineItem().setProductGoup(item.getProductGroup());
|
| - |
|
1396 |
order.getLineItem().setColor(item.getColor());
|
| - |
|
1397 |
order.getLineItem().setNlc(vendorItemPricing.getNlc());
|
| - |
|
1398 |
order.getLineItem().setTransferPrice(vendorItemPricing.getTp());
|
| - |
|
1399 |
}
|
| - |
|
1400 |
}
|
| - |
|
1401 |
|
| - |
|
1402 |
}
|
| - |
|
1403 |
|
| 1381 |
}
|
1404 |
}
|
| 1382 |
|
1405 |
|
| 1383 |
//7015845171
|
1406 |
//7015845171
|
| 1384 |
|
1407 |
|