Subversion Repositories SmartDukaan

Rev

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

Rev 33430 Rev 33443
Line 95... Line 95...
95
                        "         join WarehouseScan  ws on (ws.orderId = o.id and ws.type = 'SALE' and wi.id = ws.inventoryItemId)" +
95
                        "         join WarehouseScan  ws on (ws.orderId = o.id and ws.type = 'SALE' and wi.id = ws.inventoryItemId)" +
96
                        "         join Item i on i.id=l.itemId " +
96
                        "         join Item i on i.id=l.itemId " +
97
                        "  left join ActivatedImei ai on ai.serialNumber = lii.serialNumber " +
97
                        "  left join ActivatedImei ai on ai.serialNumber = lii.serialNumber " +
98
                        "where fs.internal=false and i.catalogItemId=:catalogId and o.billingTimestamp >= :startDate " +
98
                        "where fs.internal=false and i.catalogItemId=:catalogId and o.billingTimestamp >= :startDate " +
99
                        "and (:endDate is null or o.billingTimestamp < :endDate) and (o.refundTimestamp is null or o.refundTimestamp <= :endDate)"),
99
                        "and (:endDate is null or o.billingTimestamp < :endDate) and (o.refundTimestamp is null or o.refundTimestamp <= :endDate)"),
-
 
100
        @NamedQuery(
-
 
101
                name = "Order.selectAllLiveDemoBrandItemsByBillingDate",
-
 
102
                query = "select new com.spice.profitmandi.dao.model.LiveDemoOrderLineItemModel (" +
-
 
103
                        "o.id, " +
-
 
104
                        "o.invoiceNumber, " +
-
 
105
                        "o.billingTimestamp, " +
-
 
106
                        "o.retailerName, " +
-
 
107
                        "o.retailerCity, " +
-
 
108
                        "o.retailerPinCode, " +
-
 
109
                        "o.retailerState, " +
-
 
110
                        "lii.serialNumber, " +
-
 
111
                        "li.modelNumber, " +
-
 
112
                        "li.modelName, " +
-
 
113
                        "li.brand," +
-
 
114
                        "li.itemId )" +
-
 
115
                        "FROM Order o JOIN LineItem li on o.id = li.orderId " +
-
 
116
                        "JOIN LineItemImei lii on li.id = lii.lineItemId " +
-
 
117
                        "WHERE li.brand = 'Live Demo' " +
-
 
118
                        "AND o.billingTimestamp between  :startDate and :endDate"
-
 
119
        )
-
 
120
 
100
 
121
 
101
 
122
 
102
})
123
})
103
//@NamedNativeQuery(name = "Order.findByEmailAddress", query = "select * from transaction.`order` o where  o.id = '1694173'", resultClass = Order.class)
124
//@NamedNativeQuery(name = "Order.findByEmailAddress", query = "select * from transaction.`order` o where  o.id = '1694173'", resultClass = Order.class)
104
 
125