| Line 35... |
Line 35... |
| 35 |
+ " DATE_FORMAT(pd.affectedOn, '%m-%Y'),sum(cast(pd.amount As int)) ) from PriceDrop pd join PriceDropIMEI pdi on"
|
35 |
+ " DATE_FORMAT(pd.affectedOn, '%m-%Y'),sum(cast(pd.amount As int)) ) from PriceDrop pd join PriceDropIMEI pdi on"
|
| 36 |
+ " (pd.id = pdi.priceDropId) join InventoryItem it on (pdi.imei = it.serialNumber and pdi.partnerId=it.fofoId)"
|
36 |
+ " (pd.id = pdi.priceDropId) join InventoryItem it on (pdi.imei = it.serialNumber and pdi.partnerId=it.fofoId)"
|
| 37 |
+ " join Item i on i.id = it.itemId where pdi.status ='PENDING' and pdi.partnerId = :fofoId and "
|
37 |
+ " join Item i on i.id = it.itemId where pdi.status ='PENDING' and pdi.partnerId = :fofoId and "
|
| 38 |
+ " pd.amount > 0 and pd.affectedOn >= :startDate group by i.brand, DATE_FORMAT(pd.affectedOn, '%m-%Y')"),
|
38 |
+ " pd.amount > 0 and pd.affectedOn >= :startDate group by i.brand, DATE_FORMAT(pd.affectedOn, '%m-%Y')"),
|
| 39 |
|
39 |
|
| - |
|
40 |
@NamedQuery(name = "PriceDrop.selectBrandPendingPriceDropWithDetailsByYearMonth", query = "select new com.spice.profitmandi.dao.model.PriceDropWithDetailsByYearMonthModel(i.brand, "
|
| - |
|
41 |
+ " i.modelName,i.modelNumber,cast(pd.amount As int),pdi.imei ) from PriceDrop pd join PriceDropIMEI pdi on"
|
| - |
|
42 |
+ " (pd.id = pdi.priceDropId) join InventoryItem it on (pdi.imei = it.serialNumber and pdi.partnerId=it.fofoId)"
|
| - |
|
43 |
+ " join Item i on i.id = it.itemId where pdi.status ='PENDING' and pdi.partnerId = :fofoId and "
|
| - |
|
44 |
+ " pd.amount > 0 and i.brand = :brand and DATE_FORMAT(pd.affectedOn, '%m-%Y') = :yearMonthValue"),
|
| - |
|
45 |
|
| 40 |
})
|
46 |
})
|
| 41 |
public class PriceDrop implements Serializable {
|
47 |
public class PriceDrop implements Serializable {
|
| 42 |
|
48 |
|
| 43 |
private static final long serialVersionUID = 1L;
|
49 |
private static final long serialVersionUID = 1L;
|
| 44 |
|
50 |
|