Subversion Repositories SmartDukaan

Rev

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

Rev 30107 Rev 30108
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.transaction;
1
package com.spice.profitmandi.dao.entity.transaction;
2
 
2
 
3
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
-
 
4
import in.shop2020.model.v1.order.OrderStatus;
-
 
5
import in.shop2020.model.v1.order.TaxType;
-
 
6
 
-
 
7
import javax.persistence.*;
-
 
8
import java.io.Serializable;
3
import java.io.Serializable;
9
import java.time.LocalDateTime;
4
import java.time.LocalDateTime;
10
import java.time.format.DateTimeFormatter;
5
import java.time.format.DateTimeFormatter;
11
 
6
 
-
 
7
import javax.persistence.CascadeType;
-
 
8
import javax.persistence.Column;
-
 
9
import javax.persistence.Convert;
-
 
10
import javax.persistence.Entity;
-
 
11
import javax.persistence.EnumType;
-
 
12
import javax.persistence.Enumerated;
-
 
13
import javax.persistence.FetchType;
-
 
14
import javax.persistence.GeneratedValue;
-
 
15
import javax.persistence.GenerationType;
-
 
16
import javax.persistence.Id;
-
 
17
import javax.persistence.JoinColumn;
-
 
18
import javax.persistence.ManyToOne;
-
 
19
import javax.persistence.NamedQueries;
-
 
20
import javax.persistence.NamedQuery;
-
 
21
import javax.persistence.Table;
-
 
22
 
-
 
23
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
-
 
24
 
-
 
25
import in.shop2020.model.v1.order.OrderStatus;
-
 
26
import in.shop2020.model.v1.order.TaxType;
-
 
27
 
12
/**
28
/**
13
 * This class basically contains order details
29
 * This class basically contains order details
14
 *
30
 *
15
 * @author ashikali
31
 * @author ashikali
16
 */
32
 */
Line 167... Line 183...
167
				+ "  case when  psp.secondaryPlan is not null then cast(psp.secondaryPlan As long) else 0 end , sum(cast(o.totalAmount AS integer)),"
183
				+ "  case when  psp.secondaryPlan is not null then cast(psp.secondaryPlan As long) else 0 end , sum(cast(o.totalAmount AS integer)),"
168
				+ "  psp.authId )"
184
				+ "  psp.authId )"
169
				+ "	 from FofoStore fs left join Order o on (fs.id = o.retailerId and o.status in (7,9,10,12)"
185
				+ "	 from FofoStore fs left join Order o on (fs.id = o.retailerId and o.status in (7,9,10,12)"
170
				+ "	 and o.billingTimestamp >= :startDate and o.billingTimestamp <= :endDate ) left join LineItem li on o.id = li.orderId left join  "
186
				+ "	 and o.billingTimestamp >= :startDate and o.billingTimestamp <= :endDate ) left join LineItem li on o.id = li.orderId left join  "
171
				+ "  PartnerSecondaryPlan psp on (psp.fofoId = fs.id and psp.createTimestamp >= :startDate "
187
				+ "  PartnerSecondaryPlan psp on (psp.fofoId = fs.id and psp.createTimestamp >= :startDate "
172
				+ "  and psp.createTimestamp <= :endDate and psp.active = 1 )"
188
				+ "  and psp.createTimestamp <= :endDate and psp.active = 1 and li.brand=psp.brand)"
173
				+ " where fs.id in :fofoIds and fs.internal = 0  group by li.brand,psp.brand,fs.id"),
189
				+ " where fs.id in :fofoIds and fs.internal = 0  group by li.brand,psp.brand,fs.id"),
174
 
190
 
175
})
191
})
176
public class Order implements Serializable {
192
public class Order implements Serializable {
177
 
193