| Line 14... |
Line 14... |
| 14 |
/**
|
14 |
/**
|
| 15 |
* This class basically contains scheme details
|
15 |
* This class basically contains scheme details
|
| 16 |
*
|
16 |
*
|
| 17 |
* @author ashikali
|
17 |
* @author ashikali
|
| 18 |
*/
|
18 |
*/
|
| - |
|
19 |
@NamedQueries({
|
| - |
|
20 |
@NamedQuery(name = "scheme.selectSchemesByRetailerIdsSchemeIds", query = "select sr.schemeId from" +
|
| - |
|
21 |
" SchemeRegion sr join PartnerRegion pr on pr.regionId=sr.regionId where pr.fofoId in :fofoIds and sr.schemeId in :schemeIds"),
|
| - |
|
22 |
|
| - |
|
23 |
@NamedQuery(name = "Scheme.selectSchemeByModelsPartnerTypeFofoId", query = "select s from Scheme s" +
|
| - |
|
24 |
" join SchemeItem si on si.schemeId = s.id" +
|
| - |
|
25 |
" join SchemeRegion sr on sr.schemeId = s.id" +
|
| - |
|
26 |
" join PartnerRegion pr on pr.regionId=sr.regionId" +
|
| - |
|
27 |
" where pr.fofoId in :fofoIds and s.partnerType in :partnerTypes" +
|
| - |
|
28 |
" and si.catalogId in :catalogIds" +
|
| - |
|
29 |
" and :onDate between s.startDateTime and s.endDateTime" +
|
| - |
|
30 |
//" and s.endDateTime >= :onDate" +
|
| - |
|
31 |
" and s.activeTimestamp is not null"),
|
| - |
|
32 |
})
|
| 19 |
|
33 |
|
| 20 |
@NamedNativeQueries({
|
34 |
@NamedNativeQueries({
|
| 21 |
@NamedNativeQuery(name = "scheme.selectMissedActivationSale",
|
35 |
@NamedNativeQuery(name = "scheme.selectMissedActivationSale",
|
| 22 |
query = "select cs.id as scheme_id, ai.serial_number, sr.order_id, ii.id as inventory_item_id, ai.activation_timestamp" +
|
36 |
query = "select cs.id as scheme_id, ai.serial_number, sr.order_id, ii.id as inventory_item_id, ai.activation_timestamp" +
|
| 23 |
" from fofo.activated_imei ai " +
|
37 |
" from fofo.activated_imei ai " +
|