| Line 32... |
Line 32... |
| 32 |
query = "select ii.itemId, sum(ii.initialQuantity) from InventoryItem ii "
|
32 |
query = "select ii.itemId, sum(ii.initialQuantity) from InventoryItem ii "
|
| 33 |
+ "where ii.itemId in :itemIds and ii.fofoId = :fofoId and ii.purchaseId = :purchaseId group by ii.itemId")
|
33 |
+ "where ii.itemId in :itemIds and ii.fofoId = :fofoId and ii.purchaseId = :purchaseId group by ii.itemId")
|
| 34 |
})
|
34 |
})
|
| 35 |
@Entity
|
35 |
@Entity
|
| 36 |
@Table(name="fofo.inventory_item", schema = "fofo")
|
36 |
@Table(name="fofo.inventory_item", schema = "fofo")
|
| 37 |
public class InventoryItem {
|
37 |
public class InventoryItem implements Comparable {
|
| 38 |
|
38 |
|
| 39 |
@Id
|
39 |
@Id
|
| 40 |
@Column(name="id", unique=true, updatable=false)
|
40 |
@Column(name="id", unique=true, updatable=false)
|
| 41 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
41 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
| 42 |
private int id;
|
42 |
private int id;
|
| Line 305... |
Line 305... |
| 305 |
+ ", unitPrice=" + unitPrice + ", priceDropAmount=" + priceDropAmount + ", buyBack=" + buyBack
|
305 |
+ ", unitPrice=" + unitPrice + ", priceDropAmount=" + priceDropAmount + ", buyBack=" + buyBack
|
| 306 |
+ ", igstRate=" + igstRate + ", cgstRate=" + cgstRate + ", sgstRate=" + sgstRate + ", hsnCode="
|
306 |
+ ", igstRate=" + igstRate + ", cgstRate=" + cgstRate + ", sgstRate=" + sgstRate + ", hsnCode="
|
| 307 |
+ hsnCode + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp + ", item="
|
307 |
+ hsnCode + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp + ", item="
|
| 308 |
+ item + ", purchase=" + purchase + "]";
|
308 |
+ item + ", purchase=" + purchase + "]";
|
| 309 |
}
|
309 |
}
|
| - |
|
310 |
|
| - |
|
311 |
@Override
|
| - |
|
312 |
public int compareTo(Object o) {
|
| - |
|
313 |
return o.hashCode() - this.hashCode();
|
| - |
|
314 |
}
|
| 310 |
|
315 |
|
| 311 |
}
|
316 |
}
|