Subversion Repositories SmartDukaan

Rev

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

Rev 31766 Rev 32133
Line 1... Line 1...
1
package com.spice.profitmandi.model;
1
package com.spice.profitmandi.model;
2
 
2
 
3
import java.util.Map;
-
 
4
import java.util.Objects;
3
public class WarehouseStockQtyModel {
5
 
4
 
6
public class WarehouseItemQtyModel {
-
 
7
 
5
 
8
    Map<Integer, Integer> vendorWarehouseNetAvailability;
-
 
9
    private int itemId;
6
    private int itemId;
-
 
7
    private String brand;
-
 
8
    private String modelName;
-
 
9
    private String modelNumber;
-
 
10
    private String color;
10
    private int warehouseFrom;
11
    private int warehouseFrom;
11
    private int availability;
12
    private int availability;
12
    private int reserved;
13
    private int reserved;
-
 
14
    private int inTransit;
13
    private int netAvailability;
15
    private int netAvailability;
-
 
16
 
-
 
17
    public WarehouseStockQtyModel(int itemId, String brand, String modelName, String modelNumber, String color, int warehouseFrom, int availability, int reserved, int inTransit, int netAvailability) {
-
 
18
        this.itemId = itemId;
-
 
19
        this.brand = brand;
-
 
20
        this.modelName = modelName;
-
 
21
        this.modelNumber = modelNumber;
-
 
22
        this.color = color;
14
    private int vendorWarehouseId;
23
        this.warehouseFrom = warehouseFrom;
15
    private int fulfillQty;
24
        this.availability = availability;
16
    private int newColorQty;
25
        this.reserved = reserved;
-
 
26
        this.inTransit = inTransit;
-
 
27
        this.netAvailability = netAvailability;
-
 
28
    }
17
 
29
 
18
    @Override
30
    @Override
19
    public String toString() {
31
    public String toString() {
20
        return "WarehouseItemQtyModel{" +
32
        return "WarehouseStockModel{" +
-
 
33
                "itemId=" + itemId +
-
 
34
                ", brand='" + brand + '\'' +
-
 
35
                ", modelName='" + modelName + '\'' +
21
                "vendorWarehouseNetAvailability=" + vendorWarehouseNetAvailability +
36
                ", modelNumber='" + modelNumber + '\'' +
22
                ", itemId=" + itemId +
37
                ", color='" + color + '\'' +
23
                ", warehouseFrom=" + warehouseFrom +
38
                ", warehouseFrom=" + warehouseFrom +
24
                ", availability=" + availability +
39
                ", availability=" + availability +
25
                ", reserved=" + reserved +
40
                ", reserved=" + reserved +
-
 
41
                ", inTransit=" + inTransit +
26
                ", netAvailability=" + netAvailability +
42
                ", netAvailability=" + netAvailability +
27
                ", vendorWarehouseId=" + vendorWarehouseId +
-
 
28
                ", fulfillQty=" + fulfillQty +
-
 
29
                ", newColorQty=" + newColorQty +
-
 
30
                '}';
43
                '}';
31
    }
44
    }
32
 
45
 
33
    public int getRemainingQty() {
46
    public int getItemId() {
34
        return this.netAvailability - this.fulfillQty;
-
 
35
    }
-
 
36
 
-
 
37
    public int getNewColorQty() {
-
 
38
        return newColorQty;
47
        return itemId;
39
    }
-
 
40
 
-
 
41
    public void setNewColorQty(int newColorQty) {
-
 
42
        this.newColorQty = newColorQty;
-
 
43
    }
48
    }
44
 
49
 
45
    public WarehouseItemQtyModel(int itemId, int warehouseFrom, int vendorWarehouseId, int availability, int reserved, int netAvailability) {
50
    public void setItemId(int itemId) {
46
        this.itemId = itemId;
51
        this.itemId = itemId;
47
        this.warehouseFrom = warehouseFrom;
-
 
48
        this.vendorWarehouseId = vendorWarehouseId;
-
 
49
        this.availability = availability;
-
 
50
        this.reserved = reserved;
-
 
51
        this.netAvailability = netAvailability;
-
 
52
    }
52
    }
53
 
53
 
54
    public Map<Integer, Integer> getVendorWarehouseNetAvailability() {
54
    public String getBrand() {
55
        return vendorWarehouseNetAvailability;
55
        return brand;
56
    }
56
    }
57
 
57
 
58
    public void setVendorWarehouseNetAvailability(Map<Integer, Integer> vendorWarehouseNetAvailability) {
58
    public void setBrand(String brand) {
59
        this.vendorWarehouseNetAvailability = vendorWarehouseNetAvailability;
59
        this.brand = brand;
60
    }
60
    }
61
 
61
 
62
    public int getVendorWarehouseId() {
62
    public String getModelName() {
63
        return vendorWarehouseId;
63
        return modelName;
64
    }
64
    }
65
 
65
 
66
    public void setVendorWarehouseId(int vendorWarehouseId) {
66
    public void setModelName(String modelName) {
67
        this.vendorWarehouseId = vendorWarehouseId;
67
        this.modelName = modelName;
68
    }
68
    }
69
 
69
 
70
    public int getFulfillQty() {
70
    public String getModelNumber() {
71
        return fulfillQty;
71
        return modelNumber;
72
    }
72
    }
73
 
73
 
74
    public void setFulfillQty(int fulfillQty) {
74
    public void setModelNumber(String modelNumber) {
75
        this.fulfillQty = fulfillQty;
75
        this.modelNumber = modelNumber;
76
    }
76
    }
77
 
77
 
78
    @Override
-
 
79
    public boolean equals(Object o) {
78
    public String getColor() {
80
        if (this == o) return true;
79
        return color;
81
        if (o == null || getClass() != o.getClass()) return false;
-
 
82
        WarehouseItemQtyModel that = (WarehouseItemQtyModel) o;
-
 
83
        return itemId == that.itemId && warehouseFrom == that.warehouseFrom && availability == that.availability && reserved == that.reserved && netAvailability == that.netAvailability && vendorWarehouseId == that.vendorWarehouseId;
-
 
84
    }
80
    }
85
 
81
 
86
    @Override
82
    public void setColor(String color) {
87
    public int hashCode() {
83
        this.color = color;
88
        return Objects.hash(itemId, warehouseFrom, availability, reserved, netAvailability, vendorWarehouseId);
-
 
89
    }
84
    }
90
 
85
 
91
    public int getNetAvailability() {
86
    public int getWarehouseFrom() {
92
        return netAvailability;
87
        return warehouseFrom;
93
    }
88
    }
94
 
89
 
95
    public void setNetAvailability(int netAvailability) {
90
    public void setWarehouseFrom(int warehouseFrom) {
96
        this.netAvailability = netAvailability;
91
        this.warehouseFrom = warehouseFrom;
97
    }
92
    }
98
 
93
 
99
    public int getAvailability() {
94
    public int getAvailability() {
100
        return availability;
95
        return availability;
101
    }
96
    }
Line 110... Line 105...
110
 
105
 
111
    public void setReserved(int reserved) {
106
    public void setReserved(int reserved) {
112
        this.reserved = reserved;
107
        this.reserved = reserved;
113
    }
108
    }
114
 
109
 
115
    public int getItemId() {
110
    public int getInTransit() {
116
        return itemId;
111
        return inTransit;
117
    }
112
    }
118
 
113
 
119
    public void setItemId(int itemId) {
114
    public void setInTransit(int inTransit) {
120
        this.itemId = itemId;
115
        this.inTransit = inTransit;
121
    }
116
    }
122
 
117
 
123
    public int getWarehouseFrom() {
118
    public int getNetAvailability() {
124
        return warehouseFrom;
119
        return netAvailability;
125
    }
120
    }
126
 
121
 
127
    public void setWarehouseFrom(int warehouseFrom) {
122
    public void setNetAvailability(int netAvailability) {
128
        this.warehouseFrom = warehouseFrom;
123
        this.netAvailability = netAvailability;
129
    }
124
    }
130
 
-
 
131
}
125
}