Subversion Repositories SmartDukaan

Rev

Rev 28566 | Rev 31860 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28566 Rev 31285
Line 12... Line 12...
12
import javax.persistence.FetchType;
12
import javax.persistence.FetchType;
13
import javax.persistence.GeneratedValue;
13
import javax.persistence.GeneratedValue;
14
import javax.persistence.GenerationType;
14
import javax.persistence.GenerationType;
15
import javax.persistence.Id;
15
import javax.persistence.Id;
16
import javax.persistence.JoinColumn;
16
import javax.persistence.JoinColumn;
-
 
17
import javax.persistence.NamedQueries;
-
 
18
import javax.persistence.NamedQuery;
17
import javax.persistence.OneToMany;
19
import javax.persistence.OneToMany;
18
import javax.persistence.Table;
20
import javax.persistence.Table;
19
import javax.persistence.Transient;
21
import javax.persistence.Transient;
20
import javax.persistence.UniqueConstraint;
22
import javax.persistence.UniqueConstraint;
21
 
23
 
22
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
24
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
23
 
25
 
24
@Entity
26
@Entity
25
@Table(name = "fofo.fofo_order_item", schema = "fofo", uniqueConstraints = {
27
@Table(name = "fofo.fofo_order_item", schema = "fofo", uniqueConstraints = {
26
		@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
 
-
 
30
@NamedQueries({
-
 
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 "
-
 
33
				+ " fo.id = foi.orderId  where fo.fofoId in :fofoIds and fo.cancelledTimestamp is null "
-
 
34
				+ " and foi.createTimestamp >= :startDate"
-
 
35
				+ " group by fo.fofoId,DATE_FORMAT(foi.createTimestamp, '%m-%Y')"), })
27
public class FofoOrderItem implements Serializable {
36
public class FofoOrderItem implements Serializable {
28
 
37
 
29
	private static final long serialVersionUID = 1L;
38
	private static final long serialVersionUID = 1L;
30
 
39
 
31
	@Id
40
	@Id