| Line 22... |
Line 22... |
| 22 |
import javax.persistence.UniqueConstraint;
|
22 |
import javax.persistence.UniqueConstraint;
|
| 23 |
|
23 |
|
| 24 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
24 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
| 25 |
|
25 |
|
| 26 |
@Entity
|
26 |
@Entity
|
| 27 |
@Table(name = "fofo.fofo_order_item", schema = "fofo", uniqueConstraints = {
|
27 |
@Table(name = "fofo.fofo_order_item", uniqueConstraints = {
|
| 28 |
@UniqueConstraint(name = "UK_ORDER_ID_AND_ITEM_ID", columnNames = { "order_id", "item_id" }) })
|
28 |
@UniqueConstraint(name = "UK_ORDER_ID_AND_ITEM_ID", columnNames = { "order_id", "item_id" }) })
|
| 29 |
|
29 |
|
| 30 |
@NamedQueries({
|
30 |
@NamedQueries({
|
| 31 |
@NamedQuery(name = "FofoOrderItem.selectPartnerMonthlySale", query = "select new com.spice.profitmandi.dao.model.PartnerMonthlySaleModel(fo.fofoId, "
|
31 |
@NamedQuery(name = "FofoOrderItem.selectPartnerMonthlySale", query = "select new com.spice.profitmandi.dao.model.PartnerMonthlySaleModel(fo.fofoId, "
|
| 32 |
+ " DATE_FORMAT(foi.createTimestamp, '%m-%Y'),sum(CAST(foi.quantity*foi.mop AS int))) from FofoOrder fo join FofoOrderItem foi on "
|
32 |
+ " DATE_FORMAT(foi.createTimestamp, '%m-%Y'),sum(CAST(foi.quantity*foi.mop AS int))) from FofoOrder fo join FofoOrderItem foi on "
|