Subversion Repositories SmartDukaan

Rev

Rev 4846 | Rev 5185 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4846 Rev 5110
Line 1... Line 1...
1
namespace java in.shop2020.warehouse
1
namespace java in.shop2020.warehouse
2
namespace py shop2020.thriftpy.warehouse
2
namespace py shop2020.thriftpy.warehouse
3
 
3
 
4
include "GenericService.thrift"
4
include "GenericService.thrift"
5
 
5
 
6
struct Warehouse {
-
 
7
    1:i64 id,
-
 
8
    2:string displayName,
-
 
9
    3:string location
-
 
10
}
-
 
11
 
-
 
12
struct InventoryItem {
6
struct InventoryItem {
13
    // fields in db
7
    // fields in db
14
    1:i64 id,
8
    1:i64 id,
15
    2:i64 itemId,
9
    2:i64 itemId,
16
    3:string itemNumber,
10
    3:string itemNumber,
Line 28... Line 22...
28
    PURCHASE = 0,   // Scan-in at the time of purchase
22
    PURCHASE = 0,   // Scan-in at the time of purchase
29
    SALE = 1,       // Scan-out for sale
23
    SALE = 1,       // Scan-out for sale
30
    SALE_RET = 2,   // Scan-in when an item is returned undelivered
24
    SALE_RET = 2,   // Scan-in when an item is returned undelivered
31
    DOA_IN = 3,     // Scan-in when an item is returned by the customer with the DOA certificate
25
    DOA_IN = 3,     // Scan-in when an item is returned by the customer with the DOA certificate
32
    DOA_OUT = 4,     // Scan-out to return an item to the supplier
26
    DOA_OUT = 4,     // Scan-out to return an item to the supplier
33
    PURCHASE_RETURN = 5 // Scan-out to return an item to the supplier (a Non-DOA case)
27
    PURCHASE_RETURN = 5, // Scan-out to return an item to the supplier (a Non-DOA case)
-
 
28
    SALE_RET_UNUSABLE = 6,
-
 
29
    LOST_IN_TRANSIT = 7
34
}
30
}
35
 
31
 
36
struct Scan {
32
struct Scan {
37
    1:i64 id,
33
    1:i64 id,
38
    2:i64 inventoryItemId,
34
    2:i64 inventoryItemId,
Line 90... Line 86...
90
    list<Scan> getScan(1:i64 inventoryItemId);
86
    list<Scan> getScan(1:i64 inventoryItemId);
91
 
87
 
92
    /**
88
    /**
93
     * Scan serialized items.
89
     * Scan serialized items.
94
     */
90
     */
95
    void scanSerializedItem(1:i64 inventoryItemId, 2:ScanType type, 3:i64 warehouseId) throws (1:WarehouseServiceException wex);
91
    void scanSerializedItem(1:InventoryItem inventoryItem, 2:ScanType type, 3:i64 warehouseId) throws (1:WarehouseServiceException wex);
96
 
92
 
97
    /**
93
    /**
98
     * Scan non-serialized items.
94
     * Scan non-serialized items.
99
     */
95
     */
100
    void scan(1:i64 inventoryItemId, 2:ScanType type, 3:i64 quantity, 4:i64 warehouseId) throws (1:WarehouseServiceException wex);
96
    void scan(1:i64 inventoryItemId, 2:ScanType type, 3:i64 quantity, 4:i64 warehouseId) throws (1:WarehouseServiceException wex);
101
 
97
 
102
    /**
98
    /**
103
     * Scan serialized items linked with an order. Returns its price.
99
     * Scan serialized items linked with an order. Returns its price.
104
     */
100
     */
105
    InventoryItem scanSerializedItemForOrder(1:string serialNumber, 2:ScanType type, 3:i64 orderId, 4:i64 warehouseId) throws (1:WarehouseServiceException wex);
101
    InventoryItem scanSerializedItemForOrder(1:string serialNumber, 2:ScanType type, 3:i64 orderId, 4:i64 fulfilmentWarehouseId, 5:double quantity, 6:i64 billingWarehouseId) throws (1:WarehouseServiceException wex);
106
 
102
 
107
    /**
103
    /**
108
     * Scan non-serialized items linked with an order.
104
     * Scan non-serialized items linked with an order.
109
     */
105
     */
110
    void scanForOrder(1:i64 inventoryItemId, 2:ScanType type, 3:i64 quantity, 4:i64 orderId, 5:i64 warehouseId) throws (1:WarehouseServiceException wex);
106
    void scanForOrder(1:i64 inventoryItemId, 2:ScanType type, 3:i64 quantity, 4:i64 orderId, 5:i64 fulfilmentWarehouseId) throws (1:WarehouseServiceException wex);
111
 
107
 
112
    /**
108
    /**
113
     * Created item number to item id mapping
109
     * Created item number to item id mapping
114
     */
110
     */
115
    void createItemNumberMapping(1:string itemNumber, 2:i64 itemId);
111
    void createItemNumberMapping(1:string itemNumber, 2:i64 itemId);
116
 
112
 
117
    /**
113
    /**
118
     * Get itemNumber mappings for itemId 
114
     * Get itemNumber mappings for itemId 
119
     */
115
     */
120
    list<string> getItemNumbers(1:i64 itemId);
116
    list<string> getItemNumbers(1:i64 itemId);
-
 
117
 
-
 
118
    /**
-
 
119
     * Gets item ids for a given item number
-
 
120
     */
-
 
121
    list<i64> getItemIds(1:string itemNumber);
121
}
122
}