Subversion Repositories SmartDukaan

Rev

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

Rev 35104 Rev 35119
Line 49... Line 49...
49
                        "where pr.regionId = :regionId " +
49
                        "where pr.regionId = :regionId " +
50
                        "and i.brand = :brand " +
50
                        "and i.brand = :brand " +
51
                        "and o.createTimestamp between :orderStartDate and :orderEndDate " +
51
                        "and o.createTimestamp between :orderStartDate and :orderEndDate " +
52
                        "and not exists (select 1 from SaleRewardHistory srh where srh.imeis = ai.serialNumber) " +
52
                        "and not exists (select 1 from SaleRewardHistory srh where srh.imeis = ai.serialNumber) " +
53
                        "group by li.serialNumber"
53
                        "group by li.serialNumber"
54
        )
54
		),
55
 
55
 
-
 
56
		@NamedQuery(
-
 
57
				name = "LineItem.selectPartnerBrandItemMonthlySecondarySale",
-
 
58
				query = "select new com.spice.profitmandi.dao.model.BrandItemWisePartnerSaleModel( " +
-
 
59
						"i.brand, " +
-
 
60
						"i.modelName, " +
-
 
61
						"i.modelNumber, " +
-
 
62
						"sum(l.quantity)) " +
-
 
63
						"from Order o " +
-
 
64
						"join LineItem l on o.id = l.orderId " +
-
 
65
						"join Item i on i.id = l.itemId " +
-
 
66
						"join Catalog  ca on ca.modelNumber=i.modelNumber " +
-
 
67
						"where i.brand =:brand " +
-
 
68
						"and o.retailerId = :fofoIds " +
-
 
69
						"and o.billingTimestamp >= :startDate " +
-
 
70
						"and o.billingTimestamp < :endDate " +
-
 
71
						"and ca.categoryId =  10006 " +
-
 
72
						"group by i.brand, i.modelName, i.modelNumber, DATE_FORMAT(o.billingTimestamp, '%m-%Y')"
-
 
73
		),
56
})
74
})
57
public class FofoOrderItem implements Serializable {
75
public class FofoOrderItem implements Serializable {
58
 
76
 
59
	private static final long serialVersionUID = 1L;
77
	private static final long serialVersionUID = 1L;
60
 
78