| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.dao.entity.fofo;
|
1 |
package com.spice.profitmandi.dao.entity.fofo;
|
| 2 |
|
2 |
|
| 3 |
import java.io.Serializable;
|
- |
|
| 4 |
import java.time.LocalDateTime;
|
- |
|
| 5 |
|
- |
|
| 6 |
import javax.persistence.Column;
|
- |
|
| 7 |
import javax.persistence.Entity;
|
- |
|
| 8 |
import javax.persistence.EnumType;
|
- |
|
| 9 |
import javax.persistence.Enumerated;
|
- |
|
| 10 |
import javax.persistence.GeneratedValue;
|
- |
|
| 11 |
import javax.persistence.GenerationType;
|
- |
|
| 12 |
import javax.persistence.Id;
|
- |
|
| 13 |
import javax.persistence.NamedQueries;
|
- |
|
| 14 |
import javax.persistence.NamedQuery;
|
- |
|
| 15 |
import javax.persistence.Table;
|
- |
|
| 16 |
import javax.persistence.Transient;
|
- |
|
| 17 |
|
- |
|
| 18 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
3 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
| 19 |
import com.spice.profitmandi.dao.enumuration.transaction.SchemePayoutStatus;
|
4 |
import com.spice.profitmandi.dao.enumuration.transaction.SchemePayoutStatus;
|
| 20 |
|
5 |
|
| - |
|
6 |
import javax.persistence.*;
|
| - |
|
7 |
import java.io.Serializable;
|
| - |
|
8 |
import java.time.LocalDateTime;
|
| - |
|
9 |
|
| 21 |
@Entity
|
10 |
@Entity
|
| 22 |
@Table(name = "fofo.scheme_in_out", schema = "fofo")
|
11 |
@Table(name = "fofo.scheme_in_out", schema = "fofo")
|
| 23 |
|
12 |
|
| 24 |
@NamedQueries({
|
13 |
@NamedQueries({
|
| 25 |
|
14 |
|
| 26 |
@NamedQuery(name = "SchemeInOut.selectPendingActivationGroupByBrandYearMonth", query = "select new com.spice.profitmandi.dao.model.ActivationYearMonthModel(i.brand, "
|
15 |
@NamedQuery(name = "SchemeInOut.selectPendingActivationGroupByBrandYearMonth", query = "select new com.spice.profitmandi.dao.model.ActivationYearMonthModel(i.brand, "
|
| 27 |
+ " DATE_FORMAT(sio.createTimestamp, '%m-%Y'),sum(cast(sio.amount As int)) ) from Scheme sc join SchemeInOut sio on"
|
16 |
+ " DATE_FORMAT(sio.createTimestamp, '%m-%Y'),sum(cast(sio.amount As integer )) ) from Scheme sc join SchemeInOut sio on"
|
| 28 |
+ " sc.id = sio.schemeId join InventoryItem ii on ii.id = sio.inventoryItemId"
|
17 |
+ " sc.id = sio.schemeId join InventoryItem ii on ii.id = sio.inventoryItemId"
|
| 29 |
+ " join Item i on i.id = ii.itemId where sc.type = 'ACTIVATION' and sio.status ='PENDING' and sio.createTimestamp >= :startDate and ii.fofoId = :fofoId "
|
18 |
+ " join Item i on i.id = ii.itemId where sc.type = 'ACTIVATION' and sio.status ='PENDING' and sio.createTimestamp >= :startDate and ii.fofoId = :fofoId "
|
| 30 |
+ " group by i.brand, DATE_FORMAT(sio.createTimestamp, '%m-%Y')"),
|
19 |
+ " group by i.brand, DATE_FORMAT(sio.createTimestamp, '%m-%Y')"),
|
| 31 |
|
20 |
|
| 32 |
@NamedQuery(name = "SchemeInOut.selectByYearMonthActivationGroupByBrand", query = "select new com.spice.profitmandi.dao.model.ActivationBrandModel(i.brand, "
|
21 |
@NamedQuery(name = "SchemeInOut.selectByYearMonthActivationGroupByBrand", query = "select new com.spice.profitmandi.dao.model.ActivationBrandModel(i.brand, "
|