Subversion Repositories SmartDukaan

Rev

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

Rev 28166 Rev 28451
Line 116... Line 116...
116
				+ "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then 1 else 0 end),"
116
				+ "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then 1 else 0 end),"
117
				+ "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then CAST(tl.sellingPrice  AS int) else 0 end))"
117
				+ "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then CAST(tl.sellingPrice  AS int) else 0 end))"
118
				+ " from FofoStore fs join InventoryItem ii on fs.id = ii.fofoId join ActivatedImei ai on ai.serialNumber = ii.serialNumber join Item i on i.id = ii.itemId join TagListing tl on tl.itemId = i.id"
118
				+ " from FofoStore fs join InventoryItem ii on fs.id = ii.fofoId join ActivatedImei ai on ai.serialNumber = ii.serialNumber join Item i on i.id = ii.itemId join TagListing tl on tl.itemId = i.id"
119
				+ " where fs.active = true and ii.goodQuantity >= 1 and i.brand = :brand and fs.warehouseId in :warehouseId and fs.id in :fofoId  group by i.id"),
119
				+ " where fs.active = true and ii.goodQuantity >= 1 and i.brand = :brand and fs.warehouseId in :warehouseId and fs.id in :fofoId  group by i.id"),
120
 
120
 
121
})
-
 
-
 
121
		@NamedQuery(name = "FofoStore.selectGroupByBrandLms", query = "select new com.spice.profitmandi.dao.model.BrandWiseModel(foi.brand, DATE_FORMAT(fo.createTimestamp, '%m-%Y'),sum(cast(foi.mop*foi.quantity As int)))"
-
 
122
				+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true "
-
 
123
				+ " and foi.createTimestamp >= :lmsStartDate and i.categoryId = :categoryId and fs.id in :fofoId and fs.warehouseId in :warehouseId"
-
 
124
				+ " group by foi.brand,DATE_FORMAT(fo.createTimestamp, '%m-%Y')"), })
122
 
125
 
123
public class FofoStore implements Serializable {
126
public class FofoStore implements Serializable {
124
 
127
 
125
	private static final long serialVersionUID = 1L;
128
	private static final long serialVersionUID = 1L;
126
 
129