Subversion Repositories SmartDukaan

Rev

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