Subversion Repositories SmartDukaan

Rev

Rev 34330 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4500 mandeep.dh 1
package in.shop2020.warehouse.persistence;
2
 
14491 manish.sha 3
import in.shop2020.warehouse.DoaOutInventoryItem;
7613 amar.kumar 4
import in.shop2020.warehouse.InTransitInventory;
5185 mandeep.dh 5
import in.shop2020.warehouse.ScanType;
4500 mandeep.dh 6
import in.shop2020.warehouse.domain.InventoryItem;
7
 
10215 amar.kumar 8
import java.util.Date;
5185 mandeep.dh 9
import java.util.List;
6484 amar.kumar 10
import java.util.Map;
4500 mandeep.dh 11
 
10864 manish.sha 12
import org.apache.ibatis.annotations.MapKey;
5361 mandeep.dh 13
import org.apache.ibatis.annotations.Param;
5185 mandeep.dh 14
 
5361 mandeep.dh 15
 
4500 mandeep.dh 16
public interface InventoryItemMapper {
17
 
18
    /**
19
     * @param inventoryItem
20
     */
21
    void insertInventoryItem(InventoryItem inventoryItem);
22
 
23
    /**
24
     * @param inventoryItemId
25
     * @return
26
     */
27
    InventoryItem getInventoryItem(long inventoryItemId);
28
 
29
    /**
30
     * @param serialNumber
31
     * @return
32
     */
33
    InventoryItem getInventoryItemFromSerialNumber(String serialNumber);
5185 mandeep.dh 34
 
34330 amit.gupta 35
	InventoryItem getInventoryItemInStockFromSerialNumber(String serialNumber);
36
 
32594 amit.gupta 37
    /**
38
     * @param serialNumber
39
     * @param serialNumber
40
     * @return
41
     */
33292 amit.gupta 42
    InventoryItem getInventoryItemFromSerialNumberWarehouse(@Param("serialNumber") String serialNumber, @Param("physicalWarehouseId") long billingWarehouseId);
32594 amit.gupta 43
 
35700 amit 44
    InventoryItem getInventoryItemSoldOnOrder(@Param("serialNumber") String serialNumber, @Param("physicalWarehouseId") long physicalWarehouseId, @Param("orderId") long orderId);
45
 
5185 mandeep.dh 46
    List<InventoryItem> getInventoryItemsFromLastScanType(ScanType scanType);
47
 
48
    /**
49
     * @param inventoryItemId
50
     * @return
51
     */
52
    InventoryItem getInventoryItemsFromId(long inventoryItemId);
53
 
54
    /**
55
     * @param inventoryItem
56
     */
57
    void update(InventoryItem inventoryItem);
5361 mandeep.dh 58
 
59
    /**
60
     * @param itemId
61
     * @param warehouseId
62
     * @return
63
     */
8565 amar.kumar 64
    InventoryItem getNonSerializedInventoryItem(@Param("itemNumber")String itemNumber, @Param("itemId")long itemId, 
65
    		@Param("warehouseId")long warehouseId, @Param("physicalWarehouseId")long physicalWarehouseId);
6467 amar.kumar 66
 
16411 manish.sha 67
	Long getCurrentQuantityForNonSerializedItem(@Param("itemId")long itemId, @Param("warehouseId")long warehouseId, @Param("physicalWarehouseId")long physicalWarehouseId, @Param("purchaseId")long purchaseId);
6467 amar.kumar 68
 
69
	void markPurchaseReturnIdForItem(@Param("id")long id, @Param("currentQuantity")long currentQuantity, @Param("purchaseReturnId")long purchaseReturnId);
10864 manish.sha 70
 
71
	void markPurchaseReturnIdForBadItem(@Param("id")long id, @Param("currentQuantity")long currentQuantity, @Param("purchaseReturnId")long purchaseReturnId);
6467 amar.kumar 72
 
8689 amar.kumar 73
	List<InventoryItem> getCurrentNonSerializedItemsByItemId(@Param("itemId")long itemId, @Param("warehouseId")long warehouseId, 
16411 manish.sha 74
			@Param("physicalWarehouseId")long physicalWarehouseId, @Param("purchaseId")long purchaseId);
6484 amar.kumar 75
 
10864 manish.sha 76
	List<InventoryItem> getNonSerializedItemsForBadInventory(@Param("itemId")long itemId, @Param("currentWarehouseId")long currentWarehouseId, 
77
			@Param("physicalWarehouseId")long physicalWarehouseId);
78
 
6484 amar.kumar 79
	List<Map<String, Integer>> getCurrentSerializedInventory();
80
 
81
	List<Map<String, Integer>> getCurrentNonSerializedInventory();
6548 amar.kumar 82
 
83
	void markItemAsLost(@Param("id")long id, @Param("currentQuantity")long currentQuantity);
7410 amar.kumar 84
 
85
	//void markTransferLotAsRecieved(long id);
86
 
87
	List<InventoryItem> getInventoryItemsForTransferLot(long id);
88
 
89
	long getCurrentQuantityForNonSerializedItemInPhysicalWarehouse(@Param("itemId")long itemId,
90
			@Param("physicalWarehouseId")long physicalWarehouseId);
91
 
92
	List<InventoryItem> getCurrentNonSerializedItemsByItemIdInPhysicalWarehouse(
93
			@Param("itemId")long itemId, @Param("physicalWarehouseId")long physicalWarehouseId);
94
 
7574 amar.kumar 95
	long getCurrentQuantityForNonSerializedInTransitItemInPhysicalWarehouse(
96
			@Param("itemId")long itemId, @Param("physicalWarehouseId")long physicalWarehouseId);
97
 
7613 amar.kumar 98
	List<in.shop2020.warehouse.domain.InTransitInventory> getInTransitInventory(long originWarehouseId);
99
 
9129 amar.kumar 100
	List<InventoryItem> getCurrentInTransitInventoryInPhysicalWarehouse(
101
			@Param("itemId")long itemId, @Param("originWarehouseId")long originWarehouseId);
102
 
7410 amar.kumar 103
	/*InventoryItem getNonSeralizedInventoryItemForPhysicalWarehouse(
104
			@Param("itemNumber")String itemNumber, @Param("itemId")long itemId, @Param("physicalWarehouseId")long physicalWarehouseId);*/
10120 manish.sha 105
 
106
	List<InventoryItem> getTransferLotItemsForMarkReceive(
107
			@Param("transferLotId")long transferLotId,@Param("type")ScanType scanType);
10215 amar.kumar 108
 
109
	List<Long> getNonEmptyGrnsByDate(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
110
 
111
	List<Long> getAllGrnsByDate(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
10407 amar.kumar 112
 
113
	InventoryItem getSellableBadNonSerializedItem(@Param("itemId") long itemId, @Param("itemNumber") String itemNumber, 
114
			@Param("physicalWarehouseId") long physicalWarehouseId);
10689 manish.sha 115
 
116
	List<InventoryItem> getInventoryItemScannedInForPO(@Param("itemId") long itemId,@Param("purchaseIds") List<Long> purchaseIds);
10864 manish.sha 117
 
21617 amit.gupta 118
	List<InventoryItem> getInventoryItemsBySerailNumbers(@Param("serialNumbers") List<String> serialNumbers);
119
 
10864 manish.sha 120
	Long getCurrentBadQuantityForItem(@Param("itemId") long itemId,@Param("currentWarehouseId") long currentWarehouseId, @Param("physicalWarehouseId") long physicalWarehouseId);
121
 
122
	@MapKey("itemId")
13504 manish.sha 123
	Map<Integer, Integer> getItemsInPurchaseReturn(@Param("purchaseReturnId")long purchaseReturnId, @Param("type")ScanType type, @Param("returnTime")String returnTime);
14491 manish.sha 124
 
125
	List<InventoryItem> getDoaOutInventoryItems(@Param("offset")long offset, @Param("limit")long limit);
126
 
127
	List<InventoryItem> getDoaOutSearchedItems(@Param("searchTerm")String searchTerm, @Param("offset")long offset, @Param("limit")long limit);
128
 
129
	long getCountForDoaOutInventoryItems();
130
 
131
	long getDoaOutInventoryItemsResultCount(@Param("searchTerm")String searchTerm);
132
 
133
	List<DoaOutInventoryItem> getAllDoaOutInventoryItems();
4500 mandeep.dh 134
}