| Line 62... |
Line 62... |
| 62 |
|
62 |
|
| 63 |
@NamedQuery(name = "ActivatedImei.selectActivatedGrnPendingAmount", query = "select cast(sum(o.lineItem.unitPrice) as float )"
|
63 |
@NamedQuery(name = "ActivatedImei.selectActivatedGrnPendingAmount", query = "select cast(sum(o.lineItem.unitPrice) as float )"
|
| 64 |
+ " from Order o join LineItemImei limei on o.lineItem.id=limei.lineItemId join FofoStore fs on fs.id=o.retailerId left join ActivatedImei ai on limei.serialNumber = ai.serialNumber "
|
64 |
+ " from Order o join LineItemImei limei on o.lineItem.id=limei.lineItemId join FofoStore fs on fs.id=o.retailerId left join ActivatedImei ai on limei.serialNumber = ai.serialNumber "
|
| 65 |
+ " where o.status in (12, 9) and ai.activationTimestamp is not null and o.partnerGrnTimestamp is null and o.retailerId=:fofoId group by o.retailerId"),
|
65 |
+ " where o.status in (12, 9) and ai.activationTimestamp is not null and o.partnerGrnTimestamp is null and o.retailerId=:fofoId group by o.retailerId"),
|
| 66 |
|
66 |
|
| - |
|
67 |
@NamedQuery(name = "ActivatedImei.getMonthlyUnbilledTertiaryPrice", query = "select new com.spice.profitmandi.dao.model.PartnerWiseActivatedNotBilledTotal(ii.fofoId, sum((tl.mop)), DATE_FORMAT(ai.activationTimestamp, '%Y-%m')) "
|
| - |
|
68 |
+" from InventoryItem ii" +
|
| - |
|
69 |
" join Item i on i.id=ii.itemId" +
|
| - |
|
70 |
" join TagListing tl on tl.itemId=i.id" +
|
| - |
|
71 |
" join ActivatedImei ai on ai.serialNumber=ii.serialNumber" +
|
| - |
|
72 |
" WHERE ii.goodQuantity=1 and ai.activationTimestamp is not null and ai.activationTimestamp >= :startDate " +
|
| - |
|
73 |
" and ii.fofoId= :fofoId group by DATE_FORMAT(ai.activationTimestamp, '%Y-%m')"),
|
| 67 |
})
|
74 |
})
|
| 68 |
public class ActivatedImei {
|
75 |
public class ActivatedImei {
|
| 69 |
@Id
|
76 |
@Id
|
| 70 |
@Column(name = "serial_number", unique = true)
|
77 |
@Column(name = "serial_number", unique = true)
|
| 71 |
private String serialNumber;
|
78 |
private String serialNumber;
|