| 25721 |
tejbeer |
1 |
package com.spice.profitmandi.dao.entity.catalog;
|
|
|
2 |
|
|
|
3 |
import java.io.Serializable;
|
|
|
4 |
import java.time.LocalDateTime;
|
|
|
5 |
|
| 33873 |
ranu |
6 |
import javax.persistence.*;
|
| 25721 |
tejbeer |
7 |
|
|
|
8 |
@Entity
|
| 31860 |
tejbeer |
9 |
@Table(name = "catalog.focused_model")
|
| 33873 |
ranu |
10 |
@NamedQueries({@NamedQuery(name = "Focused.soldFocusItemByPartner",
|
|
|
11 |
query = "select new com.spice.profitmandi.dao.model.SoldFocusedItemPartnerWiseModel" +
|
|
|
12 |
"(foi.itemId, fm.catalogId, fm.obsRecommendedQty, fm.regionId, odr.createTimestamp) " +
|
|
|
13 |
" FROM FofoOrder odr " +
|
|
|
14 |
" JOIN FofoOrderItem foi on foi.orderId = odr.id " +
|
|
|
15 |
" JOIN Item ci on ci.id = foi.itemId " +
|
|
|
16 |
" JOIN FocusedModel fm on fm.catalogId = ci.catalogItemId " +
|
|
|
17 |
" JOIN PartnerRegion ptr on ptr.fofoId = (:fofoId) " +
|
|
|
18 |
" WHERE odr.fofoId = (:fofoId) and odr.createTimestamp > (:orderDate) " +
|
|
|
19 |
" and (fm.regionId = 5 OR fm.regionId = ptr.regionId) " +
|
|
|
20 |
" and fm.obsRecommendedQty > 0")
|
|
|
21 |
|
|
|
22 |
})
|
| 25721 |
tejbeer |
23 |
public class FocusedModel implements Serializable {
|
|
|
24 |
|
|
|
25 |
private static final long serialVersionUID = 1L;
|
|
|
26 |
|
|
|
27 |
@Id
|
| 27081 |
tejbeer |
28 |
@Column(name = "id", columnDefinition = "int(11)")
|
|
|
29 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
30 |
private int id;
|
|
|
31 |
|
|
|
32 |
@Column(name = "catalog_id")
|
| 25721 |
tejbeer |
33 |
private int catalogId;
|
|
|
34 |
|
|
|
35 |
@Column(name = "recommended_qty")
|
|
|
36 |
private int recommendedQty;
|
|
|
37 |
|
|
|
38 |
@Column(name = "minimum_qty")
|
|
|
39 |
private int minimumQty;
|
|
|
40 |
|
| 27088 |
tejbeer |
41 |
@Column(name = "region_id")
|
|
|
42 |
private int regionId;;
|
| 27081 |
tejbeer |
43 |
|
| 29667 |
tejbeer |
44 |
@Column(name = "observable_recommended_qty")
|
|
|
45 |
private int obsRecommendedQty;
|
|
|
46 |
|
|
|
47 |
@Column(name = "observable_minimum_qty")
|
|
|
48 |
private int obsMinimumQty;
|
|
|
49 |
|
| 25721 |
tejbeer |
50 |
@Column(name = "created_timestamp")
|
|
|
51 |
private LocalDateTime createdTimestamp;
|
|
|
52 |
|
| 29667 |
tejbeer |
53 |
public int getId() {
|
|
|
54 |
return id;
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
public void setId(int id) {
|
|
|
58 |
this.id = id;
|
|
|
59 |
}
|
|
|
60 |
|
|
|
61 |
public int getObsRecommendedQty() {
|
|
|
62 |
return obsRecommendedQty;
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
public void setObsRecommendedQty(int obsRecommendedQty) {
|
|
|
66 |
this.obsRecommendedQty = obsRecommendedQty;
|
|
|
67 |
}
|
|
|
68 |
|
|
|
69 |
public int getObsMinimumQty() {
|
|
|
70 |
return obsMinimumQty;
|
|
|
71 |
}
|
|
|
72 |
|
|
|
73 |
public void setObsMinimumQty(int obsMinimumQty) {
|
|
|
74 |
this.obsMinimumQty = obsMinimumQty;
|
|
|
75 |
}
|
|
|
76 |
|
| 27088 |
tejbeer |
77 |
public int getRegionId() {
|
|
|
78 |
return regionId;
|
| 27081 |
tejbeer |
79 |
}
|
|
|
80 |
|
| 27088 |
tejbeer |
81 |
public void setRegionId(int regionId) {
|
|
|
82 |
this.regionId = regionId;
|
| 27081 |
tejbeer |
83 |
}
|
|
|
84 |
|
| 25721 |
tejbeer |
85 |
public int getCatalogId() {
|
|
|
86 |
return catalogId;
|
|
|
87 |
}
|
|
|
88 |
|
|
|
89 |
public LocalDateTime getCreatedTimestamp() {
|
|
|
90 |
return createdTimestamp;
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
|
|
|
94 |
this.createdTimestamp = createdTimestamp;
|
|
|
95 |
}
|
|
|
96 |
|
|
|
97 |
public void setCatalogId(int catalogId) {
|
|
|
98 |
this.catalogId = catalogId;
|
|
|
99 |
}
|
|
|
100 |
|
|
|
101 |
public int getRecommendedQty() {
|
|
|
102 |
return recommendedQty;
|
|
|
103 |
}
|
|
|
104 |
|
|
|
105 |
public void setRecommendedQty(int recommendedQty) {
|
|
|
106 |
this.recommendedQty = recommendedQty;
|
|
|
107 |
}
|
|
|
108 |
|
|
|
109 |
public int getMinimumQty() {
|
|
|
110 |
return minimumQty;
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
public void setMinimumQty(int minimumQty) {
|
|
|
114 |
this.minimumQty = minimumQty;
|
|
|
115 |
}
|
|
|
116 |
|
|
|
117 |
public static long getSerialversionuid() {
|
|
|
118 |
return serialVersionUID;
|
|
|
119 |
}
|
|
|
120 |
|
|
|
121 |
@Override
|
|
|
122 |
public String toString() {
|
| 27081 |
tejbeer |
123 |
return "FocusedModel [id=" + id + ", catalogId=" + catalogId + ", recommendedQty=" + recommendedQty
|
| 29667 |
tejbeer |
124 |
+ ", minimumQty=" + minimumQty + ", regionId=" + regionId + ", obsRecommendedQty=" + obsRecommendedQty
|
|
|
125 |
+ ", obsMinimumQty=" + obsMinimumQty + ", createdTimestamp=" + createdTimestamp + "]";
|
| 25721 |
tejbeer |
126 |
}
|
|
|
127 |
|
|
|
128 |
}
|