| 31909 |
amit.gupta |
1 |
package com.spice.profitmandi.service.inventory;
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
import in.shop2020.warehouse.ScanType;
|
|
|
5 |
|
|
|
6 |
import java.time.LocalDateTime;
|
|
|
7 |
import java.util.Objects;
|
|
|
8 |
|
|
|
9 |
public class AgeingModel {
|
|
|
10 |
private int inventoryItemId;
|
|
|
11 |
private String serialNumber;
|
| 33243 |
ranu |
12 |
private String mofSerialNumber;
|
| 31909 |
amit.gupta |
13 |
private int itemId;
|
|
|
14 |
private String brand;
|
|
|
15 |
private String modelName;
|
|
|
16 |
private String modelNumber;
|
|
|
17 |
private String color;
|
|
|
18 |
private int exceedDays;
|
|
|
19 |
private ScanType lastScanType;
|
|
|
20 |
private String supplierName;
|
|
|
21 |
private String currentWarehouse;
|
|
|
22 |
private String firstWarehouse;
|
|
|
23 |
private String invoiceNumber;
|
|
|
24 |
private LocalDateTime invoiceDate;
|
|
|
25 |
|
|
|
26 |
public AgeingModel(int inventoryItemId, String serialNumber, int itemId, String brand, String modelName, String modelNumber, String color,
|
|
|
27 |
int exceedDays,
|
|
|
28 |
String lastScanType,
|
|
|
29 |
String supplierName, String currentWarehouse, String firstWarehouse, String invoiceNumber
|
|
|
30 |
, LocalDateTime invoiceDate
|
|
|
31 |
) {
|
|
|
32 |
this.inventoryItemId = inventoryItemId;
|
|
|
33 |
this.serialNumber = serialNumber;
|
| 33243 |
ranu |
34 |
this.mofSerialNumber = "xx" + serialNumber.substring(10);
|
| 31909 |
amit.gupta |
35 |
this.itemId = itemId;
|
|
|
36 |
this.brand = brand;
|
|
|
37 |
this.modelName = modelName;
|
|
|
38 |
this.modelNumber = modelNumber;
|
|
|
39 |
this.color = color;
|
|
|
40 |
this.exceedDays = exceedDays;
|
|
|
41 |
this.lastScanType = ScanType.valueOf(lastScanType);
|
|
|
42 |
this.supplierName = supplierName;
|
|
|
43 |
this.currentWarehouse = currentWarehouse;
|
|
|
44 |
this.firstWarehouse = firstWarehouse;
|
|
|
45 |
this.invoiceNumber = invoiceNumber;
|
|
|
46 |
this.invoiceDate = invoiceDate;
|
|
|
47 |
}
|
|
|
48 |
|
|
|
49 |
@Override
|
|
|
50 |
public String toString() {
|
|
|
51 |
return "AgeingModel{" +
|
|
|
52 |
"inventoryItemId=" + inventoryItemId +
|
|
|
53 |
", serialNumber='" + serialNumber + '\'' +
|
| 33243 |
ranu |
54 |
", serialNumber='" + mofSerialNumber + '\'' +
|
| 31909 |
amit.gupta |
55 |
", itemId=" + itemId +
|
|
|
56 |
", brand='" + brand + '\'' +
|
|
|
57 |
", modelName='" + modelName + '\'' +
|
|
|
58 |
", modelNumber='" + modelNumber + '\'' +
|
|
|
59 |
", color='" + color + '\'' +
|
|
|
60 |
", exceedDays=" + exceedDays +
|
|
|
61 |
", lastScanType=" + lastScanType +
|
|
|
62 |
", supplierName='" + supplierName + '\'' +
|
|
|
63 |
", currentWarehouse='" + currentWarehouse + '\'' +
|
|
|
64 |
", firstWarehouse='" + firstWarehouse + '\'' +
|
|
|
65 |
", invoiceNumber='" + invoiceNumber + '\'' +
|
|
|
66 |
", invoiceDate=" + invoiceDate +
|
|
|
67 |
'}';
|
|
|
68 |
}
|
|
|
69 |
|
|
|
70 |
@Override
|
|
|
71 |
public boolean equals(Object o) {
|
|
|
72 |
if (this == o) return true;
|
|
|
73 |
if (o == null || getClass() != o.getClass()) return false;
|
|
|
74 |
AgeingModel that = (AgeingModel) o;
|
| 33243 |
ranu |
75 |
return inventoryItemId == that.inventoryItemId && itemId == that.itemId && exceedDays == that.exceedDays && Objects.equals(serialNumber, that.serialNumber) && Objects.equals(mofSerialNumber, that.mofSerialNumber) && Objects.equals(brand, that.brand) && Objects.equals(modelName, that.modelName) && Objects.equals(modelNumber, that.modelNumber) && Objects.equals(color, that.color) && lastScanType == that.lastScanType && Objects.equals(supplierName, that.supplierName) && Objects.equals(currentWarehouse, that.currentWarehouse) && Objects.equals(firstWarehouse, that.firstWarehouse) && Objects.equals(invoiceNumber, that.invoiceNumber) && Objects.equals(invoiceDate, that.invoiceDate);
|
| 31909 |
amit.gupta |
76 |
}
|
|
|
77 |
|
|
|
78 |
@Override
|
|
|
79 |
public int hashCode() {
|
| 33243 |
ranu |
80 |
return Objects.hash(inventoryItemId, serialNumber, mofSerialNumber, itemId, brand, modelName, modelNumber, color, exceedDays, lastScanType, supplierName, currentWarehouse, firstWarehouse, invoiceNumber, invoiceDate);
|
| 31909 |
amit.gupta |
81 |
}
|
|
|
82 |
|
|
|
83 |
public int getInventoryItemId() {
|
|
|
84 |
return inventoryItemId;
|
|
|
85 |
}
|
|
|
86 |
|
|
|
87 |
public String getSerialNumber() {
|
|
|
88 |
return serialNumber;
|
|
|
89 |
}
|
|
|
90 |
|
| 33243 |
ranu |
91 |
public String getMofSerialNumber() {
|
|
|
92 |
return mofSerialNumber;
|
|
|
93 |
}
|
|
|
94 |
|
| 31909 |
amit.gupta |
95 |
public int getItemId() {
|
|
|
96 |
return itemId;
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
public String getBrand() {
|
|
|
100 |
return brand;
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
public String getModelName() {
|
|
|
104 |
return modelName;
|
|
|
105 |
}
|
|
|
106 |
|
|
|
107 |
public String getModelNumber() {
|
|
|
108 |
return modelNumber;
|
|
|
109 |
}
|
|
|
110 |
|
|
|
111 |
public String getColor() {
|
|
|
112 |
return color;
|
|
|
113 |
}
|
|
|
114 |
|
|
|
115 |
public int getExceedDays() {
|
|
|
116 |
return exceedDays;
|
|
|
117 |
}
|
|
|
118 |
|
|
|
119 |
public ScanType getLastScanType() {
|
|
|
120 |
return lastScanType;
|
|
|
121 |
}
|
|
|
122 |
|
|
|
123 |
public String getSupplierName() {
|
|
|
124 |
return supplierName;
|
|
|
125 |
}
|
|
|
126 |
|
|
|
127 |
public String getCurrentWarehouse() {
|
|
|
128 |
return currentWarehouse;
|
|
|
129 |
}
|
|
|
130 |
|
|
|
131 |
public String getFirstWarehouse() {
|
|
|
132 |
return firstWarehouse;
|
|
|
133 |
}
|
|
|
134 |
|
|
|
135 |
public String getInvoiceNumber() {
|
|
|
136 |
return invoiceNumber;
|
|
|
137 |
}
|
|
|
138 |
|
|
|
139 |
public LocalDateTime getInvoiceDate() {
|
|
|
140 |
return invoiceDate;
|
|
|
141 |
}
|
|
|
142 |
}
|