Subversion Repositories SmartDukaan

Rev

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

Rev 37089 Rev 37588
Line 62... Line 62...
62
 
62
 
63
        @NamedQuery(name = "Order.selectFirstBillingByRetailer",
63
        @NamedQuery(name = "Order.selectFirstBillingByRetailer",
64
                query = "select min(o.billingTimestamp) from Order o " +
64
                query = "select min(o.billingTimestamp) from Order o " +
65
                        "where o.retailerId = :retailerId and o.billingTimestamp >= :minDate"),
65
                        "where o.retailerId = :retailerId and o.billingTimestamp >= :minDate"),
66
 
66
 
-
 
67
        @NamedQuery(name = "Order.selectFirstBillingByRetailers",
-
 
68
                query = "select o.retailerId, min(o.billingTimestamp) from Order o " +
-
 
69
                        "where o.retailerId in :retailerIds and o.billingTimestamp >= :minDate " +
-
 
70
                        "group by o.retailerId"),
-
 
71
 
67
        @NamedQuery(name = "Order.selectAllGrnPendingOrderByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel(" + "  fs.warehouseId,fs.id,sum(li.quantity ),i.brand,i.modelName,i.modelNumber,i.catalogItemId) from FofoStore fs join  Order o on fs.id = o.retailerId " + "  join LineItem li on o.id = li.orderId  join TagListing tl on tl.itemId = li.itemId " + "  join Item i on (i.id = tl.itemId ) where fs.active = true and fs.internal = false and" + "  o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null" + "  and tl.mop between :startPrice and :endPrice and i.categoryId=10006 group by fs.id,i.catalogItemId,i.brand,i.modelName,i.modelNumber"),
72
        @NamedQuery(name = "Order.selectAllGrnPendingOrderByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel(" + "  fs.warehouseId,fs.id,sum(li.quantity ),i.brand,i.modelName,i.modelNumber,i.catalogItemId) from FofoStore fs join  Order o on fs.id = o.retailerId " + "  join LineItem li on o.id = li.orderId  join TagListing tl on tl.itemId = li.itemId " + "  join Item i on (i.id = tl.itemId ) where fs.active = true and fs.internal = false and" + "  o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null" + "  and tl.mop between :startPrice and :endPrice and i.categoryId=10006 group by fs.id,i.catalogItemId,i.brand,i.modelName,i.modelNumber"),
68
 
73
 
69
//        query = "select o.*,tl.sellingPrice as tlSellingPrice" +
74
//        query = "select o.*,tl.sellingPrice as tlSellingPrice" +
70
//        "from FofoStore fs " +
75
//        "from FofoStore fs " +
71
        @NamedQuery(
76
        @NamedQuery(