Subversion Repositories SmartDukaan

Rev

Rev 33292 | 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
 
5185 mandeep.dh 44
    List<InventoryItem> getInventoryItemsFromLastScanType(ScanType scanType);
45
 
46
    /**
47
     * @param inventoryItemId
48
     * @return
49
     */
50
    InventoryItem getInventoryItemsFromId(long inventoryItemId);
51
 
52
    /**
53
     * @param inventoryItem
54
     */
55
    void update(InventoryItem inventoryItem);
5361 mandeep.dh 56
 
57
    /**
58
     * @param itemId
59
     * @param warehouseId
60
     * @return
61
     */
8565 amar.kumar 62
    InventoryItem getNonSerializedInventoryItem(@Param("itemNumber")String itemNumber, @Param("itemId")long itemId, 
63
    		@Param("warehouseId")long warehouseId, @Param("physicalWarehouseId")long physicalWarehouseId);
6467 amar.kumar 64
 
16411 manish.sha 65
	Long getCurrentQuantityForNonSerializedItem(@Param("itemId")long itemId, @Param("warehouseId")long warehouseId, @Param("physicalWarehouseId")long physicalWarehouseId, @Param("purchaseId")long purchaseId);
6467 amar.kumar 66
 
67
	void markPurchaseReturnIdForItem(@Param("id")long id, @Param("currentQuantity")long currentQuantity, @Param("purchaseReturnId")long purchaseReturnId);
10864 manish.sha 68
 
69
	void markPurchaseReturnIdForBadItem(@Param("id")long id, @Param("currentQuantity")long currentQuantity, @Param("purchaseReturnId")long purchaseReturnId);
6467 amar.kumar 70
 
8689 amar.kumar 71
	List<InventoryItem> getCurrentNonSerializedItemsByItemId(@Param("itemId")long itemId, @Param("warehouseId")long warehouseId, 
16411 manish.sha 72
			@Param("physicalWarehouseId")long physicalWarehouseId, @Param("purchaseId")long purchaseId);
6484 amar.kumar 73
 
10864 manish.sha 74
	List<InventoryItem> getNonSerializedItemsForBadInventory(@Param("itemId")long itemId, @Param("currentWarehouseId")long currentWarehouseId, 
75
			@Param("physicalWarehouseId")long physicalWarehouseId);
76
 
6484 amar.kumar 77
	List<Map<String, Integer>> getCurrentSerializedInventory();
78
 
79
	List<Map<String, Integer>> getCurrentNonSerializedInventory();
6548 amar.kumar 80
 
81
	void markItemAsLost(@Param("id")long id, @Param("currentQuantity")long currentQuantity);
7410 amar.kumar 82
 
83
	//void markTransferLotAsRecieved(long id);
84
 
85
	List<InventoryItem> getInventoryItemsForTransferLot(long id);
86
 
87
	long getCurrentQuantityForNonSerializedItemInPhysicalWarehouse(@Param("itemId")long itemId,
88
			@Param("physicalWarehouseId")long physicalWarehouseId);
89
 
90
	List<InventoryItem> getCurrentNonSerializedItemsByItemIdInPhysicalWarehouse(
91
			@Param("itemId")long itemId, @Param("physicalWarehouseId")long physicalWarehouseId);
92
 
7574 amar.kumar 93
	long getCurrentQuantityForNonSerializedInTransitItemInPhysicalWarehouse(
94
			@Param("itemId")long itemId, @Param("physicalWarehouseId")long physicalWarehouseId);
95
 
7613 amar.kumar 96
	List<in.shop2020.warehouse.domain.InTransitInventory> getInTransitInventory(long originWarehouseId);
97
 
9129 amar.kumar 98
	List<InventoryItem> getCurrentInTransitInventoryInPhysicalWarehouse(
99
			@Param("itemId")long itemId, @Param("originWarehouseId")long originWarehouseId);
100
 
7410 amar.kumar 101
	/*InventoryItem getNonSeralizedInventoryItemForPhysicalWarehouse(
102
			@Param("itemNumber")String itemNumber, @Param("itemId")long itemId, @Param("physicalWarehouseId")long physicalWarehouseId);*/
10120 manish.sha 103
 
104
	List<InventoryItem> getTransferLotItemsForMarkReceive(
105
			@Param("transferLotId")long transferLotId,@Param("type")ScanType scanType);
10215 amar.kumar 106
 
107
	List<Long> getNonEmptyGrnsByDate(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
108
 
109
	List<Long> getAllGrnsByDate(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
10407 amar.kumar 110
 
111
	InventoryItem getSellableBadNonSerializedItem(@Param("itemId") long itemId, @Param("itemNumber") String itemNumber, 
112
			@Param("physicalWarehouseId") long physicalWarehouseId);
10689 manish.sha 113
 
114
	List<InventoryItem> getInventoryItemScannedInForPO(@Param("itemId") long itemId,@Param("purchaseIds") List<Long> purchaseIds);
10864 manish.sha 115
 
21617 amit.gupta 116
	List<InventoryItem> getInventoryItemsBySerailNumbers(@Param("serialNumbers") List<String> serialNumbers);
117
 
10864 manish.sha 118
	Long getCurrentBadQuantityForItem(@Param("itemId") long itemId,@Param("currentWarehouseId") long currentWarehouseId, @Param("physicalWarehouseId") long physicalWarehouseId);
119
 
120
	@MapKey("itemId")
13504 manish.sha 121
	Map<Integer, Integer> getItemsInPurchaseReturn(@Param("purchaseReturnId")long purchaseReturnId, @Param("type")ScanType type, @Param("returnTime")String returnTime);
14491 manish.sha 122
 
123
	List<InventoryItem> getDoaOutInventoryItems(@Param("offset")long offset, @Param("limit")long limit);
124
 
125
	List<InventoryItem> getDoaOutSearchedItems(@Param("searchTerm")String searchTerm, @Param("offset")long offset, @Param("limit")long limit);
126
 
127
	long getCountForDoaOutInventoryItems();
128
 
129
	long getDoaOutInventoryItemsResultCount(@Param("searchTerm")String searchTerm);
130
 
131
	List<DoaOutInventoryItem> getAllDoaOutInventoryItems();
4500 mandeep.dh 132
}