| Line 60... |
Line 60... |
| 60 |
@Column(name = "good_quantity")
|
60 |
@Column(name = "good_quantity")
|
| 61 |
private int goodQuantity;
|
61 |
private int goodQuantity;
|
| 62 |
|
62 |
|
| 63 |
@Column(name = "bad_quantity")
|
63 |
@Column(name = "bad_quantity")
|
| 64 |
private int badQuantity;
|
64 |
private int badQuantity;
|
| - |
|
65 |
|
| - |
|
66 |
@Column(name = "activation_timestamp")
|
| - |
|
67 |
private LocalDateTime activationTimestamp;
|
| 65 |
|
68 |
|
| 66 |
@Column(name = "last_scan_type")
|
69 |
@Column(name = "last_scan_type")
|
| 67 |
@Enumerated(EnumType.STRING)
|
70 |
@Enumerated(EnumType.STRING)
|
| 68 |
private ScanType lastScanType;
|
71 |
private ScanType lastScanType;
|
| 69 |
|
72 |
|
| Line 106... |
Line 109... |
| 106 |
|
109 |
|
| 107 |
@OneToOne(fetch = FetchType.LAZY)
|
110 |
@OneToOne(fetch = FetchType.LAZY)
|
| 108 |
@JoinColumn(name = "purchase_id", insertable = false, updatable = false, nullable = false, referencedColumnName = "id")
|
111 |
@JoinColumn(name = "purchase_id", insertable = false, updatable = false, nullable = false, referencedColumnName = "id")
|
| 109 |
private Purchase purchase;
|
112 |
private Purchase purchase;
|
| 110 |
|
113 |
|
| 111 |
|
- |
|
| 112 |
@OneToOne(fetch = FetchType.EAGER)
|
- |
|
| 113 |
@JoinColumn(name = "serial_number", insertable = false, updatable = false, referencedColumnName = "serial_number")
|
- |
|
| 114 |
private ActivatedImei activatedImei;
|
- |
|
| 115 |
|
- |
|
| 116 |
|
- |
|
| 117 |
public void setUnitPrice(float unitPrice) {
|
114 |
public void setUnitPrice(float unitPrice) {
|
| 118 |
this.unitPrice = unitPrice;
|
115 |
this.unitPrice = unitPrice;
|
| 119 |
}
|
116 |
}
|
| 120 |
|
117 |
|
| 121 |
@Transient
|
118 |
@Transient
|
| Line 303... |
Line 300... |
| 303 |
|
300 |
|
| 304 |
@Override
|
301 |
@Override
|
| 305 |
public int hashCode() {
|
302 |
public int hashCode() {
|
| 306 |
final int prime = 31;
|
303 |
final int prime = 31;
|
| 307 |
int result = 1;
|
304 |
int result = 1;
|
| 308 |
result = prime * result + ((activatedImei == null) ? 0 : activatedImei.hashCode());
|
- |
|
| 309 |
result = prime * result + badQuantity;
|
305 |
result = prime * result + badQuantity;
|
| 310 |
result = prime * result + (buyBack ? 1231 : 1237);
|
306 |
result = prime * result + (buyBack ? 1231 : 1237);
|
| 311 |
result = prime * result + Float.floatToIntBits(cgstRate);
|
307 |
result = prime * result + Float.floatToIntBits(cgstRate);
|
| 312 |
result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
|
308 |
result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
|
| 313 |
result = prime * result + fofoId;
|
309 |
result = prime * result + fofoId;
|
| Line 337... |
Line 333... |
| 337 |
if (obj == null)
|
333 |
if (obj == null)
|
| 338 |
return false;
|
334 |
return false;
|
| 339 |
if (getClass() != obj.getClass())
|
335 |
if (getClass() != obj.getClass())
|
| 340 |
return false;
|
336 |
return false;
|
| 341 |
InventoryItem other = (InventoryItem) obj;
|
337 |
InventoryItem other = (InventoryItem) obj;
|
| 342 |
if (activatedImei == null) {
|
- |
|
| 343 |
if (other.activatedImei != null)
|
- |
|
| 344 |
return false;
|
- |
|
| 345 |
} else if (!activatedImei.equals(other.activatedImei))
|
- |
|
| 346 |
return false;
|
- |
|
| 347 |
if (badQuantity != other.badQuantity)
|
338 |
if (badQuantity != other.badQuantity)
|
| 348 |
return false;
|
339 |
return false;
|
| 349 |
if (buyBack != other.buyBack)
|
340 |
if (buyBack != other.buyBack)
|
| 350 |
return false;
|
341 |
return false;
|
| 351 |
if (Float.floatToIntBits(cgstRate) != Float.floatToIntBits(other.cgstRate))
|
342 |
if (Float.floatToIntBits(cgstRate) != Float.floatToIntBits(other.cgstRate))
|
| Line 416... |
Line 407... |
| 416 |
+ serialNumber + ", initialQuantity=" + initialQuantity + ", goodQuantity=" + goodQuantity
|
407 |
+ serialNumber + ", initialQuantity=" + initialQuantity + ", goodQuantity=" + goodQuantity
|
| 417 |
+ ", badQuantity=" + badQuantity + ", lastScanType=" + lastScanType + ", purchaseId=" + purchaseId
|
408 |
+ ", badQuantity=" + badQuantity + ", lastScanType=" + lastScanType + ", purchaseId=" + purchaseId
|
| 418 |
+ ", unitPrice=" + unitPrice + ", priceDropAmount=" + priceDropAmount + ", buyBack=" + buyBack
|
409 |
+ ", unitPrice=" + unitPrice + ", priceDropAmount=" + priceDropAmount + ", buyBack=" + buyBack
|
| 419 |
+ ", igstRate=" + igstRate + ", cgstRate=" + cgstRate + ", sgstRate=" + sgstRate + ", hsnCode="
|
410 |
+ ", igstRate=" + igstRate + ", cgstRate=" + cgstRate + ", sgstRate=" + sgstRate + ", hsnCode="
|
| 420 |
+ hsnCode + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp + ", item="
|
411 |
+ hsnCode + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp + ", item="
|
| 421 |
+ item + ", purchase=" + purchase + ", activatedImei=" + activatedImei + ", itemDescription="
|
412 |
+ item + ", purchase=" + purchase + ", itemDescription="
|
| 422 |
+ itemDescription + "]";
|
413 |
+ itemDescription + "]";
|
| 423 |
}
|
414 |
}
|
| 424 |
|
415 |
|
| 425 |
@Override
|
416 |
@Override
|
| 426 |
public int compareTo(Object o) {
|
417 |
public int compareTo(Object o) {
|