Subversion Repositories SmartDukaan

Rev

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

Rev 32868 Rev 32949
Line 4... Line 4...
4
import com.spice.profitmandi.dao.enumuration.catalog.OfferSchemeType;
4
import com.spice.profitmandi.dao.enumuration.catalog.OfferSchemeType;
5
 
5
 
6
import javax.persistence.*;
6
import javax.persistence.*;
7
import java.io.Serializable;
7
import java.io.Serializable;
8
import java.time.LocalDateTime;
8
import java.time.LocalDateTime;
9
import java.util.Objects;
9
@NamedQueries({
10
 
10
 
-
 
11
 
-
 
12
//@NamedQuery(name = "Offer.selectOfferPayoutDumpReport", query = "select new com.spice.profitmandi.dao.model.OfferPayoutDumpModel(fs.id,  fs.code, "+
-
 
13
		//" ua.name,ua.city, ua.state,  i.brand, i.modelName, i.modelNumber i.color, op.id, op.serialNumber, op.offerId, o.name, o.schemeType, o.startDate, o.endDate, op.description," +
-
 
14
		//" op.slabAmount, op.amount, op.createTimestamp, op.rejectTimestamp" +
-
 
15
		//" FROM FofoStore fs join User u on u.id = fs.id join Address ua on u.addressId = ua.id " +
-
 
16
		//" join  OfferPayout op  on op.fofoId=fs.id + join Offer o on o.id=op.offerId +" +
-
 
17
		//"left join InventoryItem ii on ii.serialNumber=op.serialNumber  left join Item i on i.id=ii.itemId " +
-
 
18
		//"where  (op.createTimestamp between :startDate and :endDate) "  +
-
 
19
		//"or (op.rejectTimestamp  between :startDate and :endDate) " )
-
 
20
		//group by op.id
-
 
21
		//" where 1=1 and  o.billingTimestamp between :startDate and :endDate and o.retailerId = :fofoId "),
-
 
22
		@NamedQuery(name = "Offer.selectOfferPayoutDumpReport", query = "select new com.spice.profitmandi.dao.model.OfferPayoutDumpModel(fs.id, fs.code, " +
-
 
23
				"ua.name, ua.city, ua.state, i.brand, i.modelName, i.modelNumber, i.color,  op.serialNumber, op.offerId, o.name, o.schemeType, o.startDate, o.endDate, op.description, " +
-
 
24
				"op.slabAmount, op.amount, op.createTimestamp, op.rejectTimestamp) " +
-
 
25
				"FROM FofoStore fs " +
-
 
26
				"JOIN User u ON u.id = fs.id " +
-
 
27
				"JOIN Address ua ON u.addressId = ua.id " +
-
 
28
				"JOIN OfferPayout op ON op.fofoId = fs.id " +
-
 
29
				"JOIN Offer o ON o.id = op.offerId " +
-
 
30
				"LEFT JOIN InventoryItem ii ON ii.serialNumber = op.serialNumber " +
-
 
31
				"LEFT JOIN Item i ON i.id = ii.itemId " +
-
 
32
				"WHERE (op.createTimestamp BETWEEN :startDate AND :endDate) " +
-
 
33
				"OR (op.rejectTimestamp BETWEEN :startDate AND :endDate)")
-
 
34
 
-
 
35
 
-
 
36
})
11
@Entity
37
@Entity
12
@Table(name = "catalog.offer")
38
@Table(name = "catalog.offer")
13
public class Offer implements Serializable {
39
public class Offer implements Serializable {
14
 
40
 
15
	@Id
41
	@Id
Line 110... Line 136...
110
	public void setBooster(boolean booster) {
136
	public void setBooster(boolean booster) {
111
		this.booster = booster;
137
		this.booster = booster;
112
	}
138
	}
113
 
139
 
114
	@Transient
140
	@Transient
115
	private String itemCriteriaString;
-
 
116
 
141
 
117
	public String getItemCriteriaString() {
-
 
118
		return itemCriteriaString;
-
 
-
 
142
 
119
	}
143
 
120
 
144
 
121
	public String getActivationBrands() {
145
	public String getActivationBrands() {
122
		return activationBrands;
146
		return activationBrands;
123
	}
147
	}
124
 
148
 
125
	public void setActivationBrands(String activationBrands) {
149
	public void setActivationBrands(String activationBrands) {
126
		this.activationBrands = activationBrands;
150
		this.activationBrands = activationBrands;
127
	}
151
	}
128
 
152
 
129
	public void setItemCriteriaString(String itemCriteriaString) {
-
 
130
		this.itemCriteriaString = itemCriteriaString;
-
 
131
	}
-
 
132
 
153
 
133
	public int getId() {
154
	public int getId() {
134
		return id;
155
		return id;
135
	}
156
	}
136
 
157
 
Line 263... Line 284...
263
				", createdTimestamp=" + createdTimestamp +
284
				", createdTimestamp=" + createdTimestamp +
264
				", booster=" + booster +
285
				", booster=" + booster +
265
				", discount=" + discount +
286
				", discount=" + discount +
266
				", active=" + active +
287
				", active=" + active +
267
				", processedTimestamp=" + processedTimestamp +
288
				", processedTimestamp=" + processedTimestamp +
268
				", itemCriteriaString='" + itemCriteriaString + '\'' +
-
 
-
 
289
 
269
				'}';
290
				'}';
270
	}
291
	}
271
 
292
 
272
	public boolean isDiscount() {
293
	public boolean isDiscount() {
273
		return discount;
294
		return discount;