| Line 16... |
Line 16... |
| 16 |
+ " from CurrentInventorySnapshot cis "
|
16 |
+ " from CurrentInventorySnapshot cis "
|
| 17 |
+ " join Item i on i.id = cis.itemId"
|
17 |
+ " join Item i on i.id = cis.itemId"
|
| 18 |
+ " left join CategorisedCatalog cc on cc.catalogId = i.catalogItemId and cc.endDate is null "
|
18 |
+ " left join CategorisedCatalog cc on cc.catalogId = i.catalogItemId and cc.endDate is null "
|
| 19 |
+ " where ((cc.status is null OR cc.status = 'OTHER' OR cc.status = 'SLOWMOVING')) and i.categoryId in (10006,10009,10010) and i.brand= :brand and cis.fofoId = :fofoId group by i.catalogItemId having sum(cis.availability) > 0"),
|
19 |
+ " where ((cc.status is null OR cc.status = 'OTHER' OR cc.status = 'SLOWMOVING')) and i.categoryId in (10006,10009,10010) and i.brand= :brand and cis.fofoId = :fofoId group by i.catalogItemId having sum(cis.availability) > 0"),
|
| 20 |
|
20 |
|
| 21 |
@NamedQuery(name = "Catalog.findAllWithEOLWithOutStockItemId", query = "select i.id "
|
21 |
@NamedQuery(name = "Catalog.findAllWithEOLWithOutStock", query = "select i.catalogItemId "
|
| 22 |
+ " from Item i "
|
22 |
+ " from Item i "
|
| 23 |
+ " left join WarehouseInventoryItem wi on i.id = wi.itemId"
|
23 |
+ " left join WarehouseInventoryItem wi on i.id = wi.itemId"
|
| 24 |
+ " left join CategorisedCatalog cc on cc.catalogId = i.catalogItemId and cc.endDate is null "
|
24 |
+ " left join CategorisedCatalog cc on cc.catalogId = i.catalogItemId and cc.endDate is null "
|
| 25 |
+ " where ((cc.status is null OR cc.status = 'OTHER' OR cc.status = 'SLOWMOVING')) and i.categoryId in (10006,10009,10010) group by i.id having (sum(wi.currentQuantity) = 0 OR sum(wi.currentQuantity) IS NULL)"),
|
25 |
+ " where ((cc.status is null OR cc.status = 'OTHER' OR cc.status = 'SLOWMOVING')) and i.categoryId in (10006,10009,10010) group by i.catalogItemId having (sum(wi.currentQuantity) = 0 OR sum(wi.currentQuantity) IS NULL)"),
|
| 26 |
|
26 |
|
| 27 |
})
|
27 |
})
|
| 28 |
|
28 |
|
| 29 |
@Entity
|
29 |
@Entity
|
| 30 |
@Table(name = "catalog.catalog")
|
30 |
@Table(name = "catalog.catalog")
|