| 4500 |
mandeep.dh |
1 |
package in.shop2020.warehouse.handler;
|
|
|
2 |
|
| 5372 |
mandeep.dh |
3 |
import in.shop2020.warehouse.DetailedPurchaseScan;
|
| 5711 |
mandeep.dh |
4 |
import in.shop2020.warehouse.InventoryAge;
|
| 6630 |
amar.kumar |
5 |
import in.shop2020.warehouse.InventoryAvailability;
|
| 6880 |
amar.kumar |
6 |
import in.shop2020.warehouse.InventoryMovement;
|
| 5496 |
mandeep.dh |
7 |
import in.shop2020.warehouse.InvoiceScan;
|
| 4500 |
mandeep.dh |
8 |
import in.shop2020.warehouse.ScanType;
|
|
|
9 |
import in.shop2020.warehouse.domain.Scan;
|
|
|
10 |
import in.shop2020.warehouse.persistence.ScanMapper;
|
|
|
11 |
|
| 5372 |
mandeep.dh |
12 |
import java.util.Date;
|
| 4500 |
mandeep.dh |
13 |
import java.util.List;
|
|
|
14 |
|
|
|
15 |
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
16 |
import org.springframework.stereotype.Service;
|
|
|
17 |
|
|
|
18 |
@Service
|
|
|
19 |
public class ScanHandler {
|
|
|
20 |
@Autowired
|
|
|
21 |
private ScanMapper scanMapper;
|
|
|
22 |
|
|
|
23 |
/**
|
|
|
24 |
* @param scan
|
|
|
25 |
*/
|
|
|
26 |
public void insert(Scan scan) {
|
|
|
27 |
scanMapper.insert(scan);
|
|
|
28 |
}
|
|
|
29 |
|
|
|
30 |
/**
|
|
|
31 |
* @param inventoryItemId
|
|
|
32 |
* @param scanType
|
|
|
33 |
* @return
|
|
|
34 |
*/
|
|
|
35 |
public List<Scan> getScans(long inventoryItemId, ScanType scanType) {
|
|
|
36 |
return scanMapper.get(inventoryItemId, scanType);
|
|
|
37 |
}
|
| 5361 |
mandeep.dh |
38 |
|
|
|
39 |
/**
|
|
|
40 |
* @param orderId
|
|
|
41 |
*/
|
|
|
42 |
public List<Scan> getScans(long orderId) {
|
|
|
43 |
return scanMapper.getScansFromOrderId(orderId);
|
|
|
44 |
}
|
| 5372 |
mandeep.dh |
45 |
|
|
|
46 |
/**
|
|
|
47 |
* @param startDate
|
|
|
48 |
* @param endDate
|
|
|
49 |
* @return
|
|
|
50 |
*/
|
|
|
51 |
public List<DetailedPurchaseScan> getPurchaseScans(long startDate,
|
|
|
52 |
long endDate)
|
|
|
53 |
{
|
|
|
54 |
return scanMapper.getPurchaseScans(new Date(startDate), new Date(endDate));
|
|
|
55 |
}
|
| 5496 |
mandeep.dh |
56 |
|
|
|
57 |
/**
|
|
|
58 |
* @param date
|
|
|
59 |
* @return
|
|
|
60 |
*/
|
|
|
61 |
public List<InvoiceScan> fetchMismatchScansPerInvoiceNumber(long date) {
|
|
|
62 |
return scanMapper.fetchMismatchScansPerInvoiceNumber(new Date(date));
|
|
|
63 |
}
|
| 5711 |
mandeep.dh |
64 |
|
|
|
65 |
/**
|
|
|
66 |
* @return
|
|
|
67 |
*/
|
|
|
68 |
public List<InventoryAge> getInventoryAge() {
|
|
|
69 |
return scanMapper.getInventoryAge();
|
|
|
70 |
}
|
| 6322 |
amar.kumar |
71 |
|
|
|
72 |
public List<Scan> getScansForItem(Long itemId, Date fromDate, Date toDate) {
|
|
|
73 |
return scanMapper.getScansForItem(itemId, fromDate, toDate);
|
|
|
74 |
}
|
| 6467 |
amar.kumar |
75 |
|
| 6548 |
amar.kumar |
76 |
public void genericScan(Scan scan) {
|
|
|
77 |
scanMapper.genericScan(scan);
|
| 6467 |
amar.kumar |
78 |
|
|
|
79 |
}
|
| 6548 |
amar.kumar |
80 |
|
| 7676 |
amar.kumar |
81 |
public List<in.shop2020.warehouse.InventoryAvailability> getCurrentSerializedInventoryByScans(Long physicalWarehouseId) {
|
|
|
82 |
return scanMapper.getCurrentSerializedInventoryByScans(physicalWarehouseId);
|
| 6548 |
amar.kumar |
83 |
}
|
| 6630 |
amar.kumar |
84 |
|
| 7676 |
amar.kumar |
85 |
public List<InventoryAvailability> getCurrentNonSerializedInventoryByScans(Long physicalWarehouseId) {
|
|
|
86 |
return scanMapper.getCurrentNonSerializedInventoryByScans(physicalWarehouseId);
|
| 6630 |
amar.kumar |
87 |
}
|
| 6762 |
amar.kumar |
88 |
|
|
|
89 |
public List<in.shop2020.warehouse.InventoryAvailability> getHistoricSerializedInventoryByScans(Date date) {
|
|
|
90 |
return scanMapper.getHistoricSerializedInventoryByScans(date);
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
public List<InventoryAvailability> getHistoricNonSerializedInventoryByScans(Date date) {
|
|
|
94 |
return scanMapper.getHistoricNonSerializedInventoryByScans(date);
|
|
|
95 |
}
|
|
|
96 |
|
| 6880 |
amar.kumar |
97 |
public List<InventoryMovement> getMovementSerializedInventoryByScans(
|
| 6762 |
amar.kumar |
98 |
Date startDate, Date endDate) {
|
|
|
99 |
return scanMapper.getMovementSerializedInventoryByScans(startDate, endDate);
|
|
|
100 |
}
|
|
|
101 |
|
|
|
102 |
public List<InventoryMovement> getMovementNonSerializedInventoryByScans(
|
|
|
103 |
Date startDate, Date endDate) {
|
|
|
104 |
return scanMapper.getMovementNonSerializedInventoryByScans(startDate, endDate);
|
| 6880 |
amar.kumar |
105 |
}
|
| 7199 |
amar.kumar |
106 |
|
|
|
107 |
public List<Scan> getScansForOrderAndItem(Long orderId, Long itemId) {
|
|
|
108 |
return scanMapper.getScansForOrderAndItem(orderId, itemId);
|
|
|
109 |
}
|
| 7210 |
amar.kumar |
110 |
|
|
|
111 |
public List<DetailedPurchaseScan> getPurchaseScansByGrnDate(long startDate,
|
|
|
112 |
long endDate) {
|
|
|
113 |
return scanMapper.getPurchaseScansByGrnDate(new Date(startDate), new Date(endDate));
|
|
|
114 |
}
|
| 7216 |
amar.kumar |
115 |
|
|
|
116 |
public List<InventoryMovement> getCompleteMovementSerializedInventoryByScans(
|
|
|
117 |
Date startDate, Date endDate) {
|
|
|
118 |
return scanMapper.getCompleteMovementSerializedInventoryByScans(startDate, endDate);
|
|
|
119 |
}
|
|
|
120 |
|
|
|
121 |
public List<InventoryMovement> getCompleteMovementNonSerializedInventoryByScans(
|
|
|
122 |
Date startDate, Date endDate) {
|
|
|
123 |
return scanMapper.getCompleteMovementNonSerializedInventoryByScans(startDate, endDate);
|
|
|
124 |
}
|
| 7410 |
amar.kumar |
125 |
|
|
|
126 |
public List<Long> getTransferrableWarehousesFromWarehouse(Long warehouseId) {
|
|
|
127 |
return scanMapper.getTransferrableWarehousesFromWarehouse(warehouseId);
|
|
|
128 |
}
|
|
|
129 |
|
|
|
130 |
public List<Scan> getScansForTransferLot(long id) {
|
|
|
131 |
return scanMapper.getScansForTransferLot(id);
|
|
|
132 |
}
|
| 7957 |
amar.kumar |
133 |
|
|
|
134 |
public List<InventoryAvailability> getHistoricBadInventoryByScans(Date date) {
|
|
|
135 |
return scanMapper.getHistoricBadInventoryByScans(date);
|
|
|
136 |
}
|
| 10120 |
manish.sha |
137 |
|
|
|
138 |
public Scan getScansForTransferLotAndInventoryItem(long transferLotId, long inventoryItemId){
|
|
|
139 |
return scanMapper.getScansForTransferLotAndInventoryItem(transferLotId,inventoryItemId);
|
|
|
140 |
}
|
| 4500 |
mandeep.dh |
141 |
}
|