Subversion Repositories SmartDukaan

Rev

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

Rev 29926 Rev 29936
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.fofo;
1
package com.spice.profitmandi.dao.entity.fofo;
2
 
2
 
3
import java.io.Serializable;
-
 
4
import java.time.LocalDate;
-
 
5
import java.time.LocalDateTime;
-
 
6
 
-
 
7
import javax.persistence.Column;
-
 
8
import javax.persistence.Entity;
-
 
9
import javax.persistence.EnumType;
-
 
10
import javax.persistence.Enumerated;
-
 
11
import javax.persistence.Id;
-
 
12
import javax.persistence.NamedQueries;
-
 
13
import javax.persistence.NamedQuery;
-
 
14
import javax.persistence.Table;
-
 
15
import javax.persistence.Transient;
-
 
16
 
-
 
17
import com.spice.profitmandi.common.enumuration.CounterSize;
3
import com.spice.profitmandi.common.enumuration.CounterSize;
18
import com.spice.profitmandi.common.enumuration.FofoType;
4
import com.spice.profitmandi.common.enumuration.FofoType;
19
import com.spice.profitmandi.dao.entity.user.Address;
5
import com.spice.profitmandi.dao.entity.user.Address;
20
 
6
 
-
 
7
import javax.persistence.*;
-
 
8
import java.io.Serializable;
-
 
9
import java.time.LocalDate;
-
 
10
import java.time.LocalDateTime;
-
 
11
 
21
/**
12
/**
22
 * This class basically contains store code details
13
 * This class basically contains store code details
23
 * 
14
 * 
24
 * @author ashikali
15
 * @author ashikali
25
 *
16
 *
Line 27... Line 18...
27
@Entity
18
@Entity
28
@Table(name = "fofo.fofo_store", schema = "fofo")
19
@Table(name = "fofo.fofo_store", schema = "fofo")
29
 
20
 
30
@NamedQueries({
21
@NamedQueries({
31
 
22
 
32
		@NamedQuery(name="FofoStore.selectAllDtrUserIds", query = "select ua.userId from FofoStore fs join UserAccount ua on fs.id=ua.accountKey " +
23
		@NamedQuery(name = "FofoStore.selectAllDtrUserIds", query = "select ua.userId from FofoStore fs join UserAccount ua on fs.id=ua.accountKey " +
33
				"where ua='saholic' and fs.internal=false and fs.active=true"),
24
				"where ua.type='saholic' and fs.internal=false and fs.active=true"),
34
 
25
 
35
		@NamedQuery(name = "FofoStore.selectGroupByBrandWarehousePartnerSale", query = "select new com.spice.profitmandi.dao.model.BrandWisePartnerSaleModel(foi.brand, "
26
		@NamedQuery(name = "FofoStore.selectGroupByBrandWarehousePartnerSale", query = "select new com.spice.profitmandi.dao.model.BrandWisePartnerSaleModel(foi.brand, "
36
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS integer ) else 0 end),"
27
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS integer ) else 0 end),"
37
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
28
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
38
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS integer ) else 0 end),"
29
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS integer ) else 0 end),"