| 37319 |
amit |
1 |
package com.spice.profitmandi.dao.model;
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Per-(month, brand) tertiary sell-out for one partner: carries the year-month bucket
|
|
|
5 |
* (yyyymm, e.g. 202607) so a single aggregate query replaces loading every FofoOrder and
|
|
|
6 |
* FofoOrderItem for the range and summing them in memory.
|
|
|
7 |
*
|
|
|
8 |
* Amount is sum(quantity * mop) over the order items - the same catalogue-price basis the
|
|
|
9 |
* DSR and the partner tier calculation use (FofoOrder.selectPartnerTertiarySales), not the
|
|
|
10 |
* POS-typed fofo_order.total_amount header.
|
|
|
11 |
*/
|
|
|
12 |
public class MonthlyBrandTertiaryModel {
|
|
|
13 |
|
|
|
14 |
private int yearMonth;
|
|
|
15 |
private String brand;
|
|
|
16 |
private long amount;
|
|
|
17 |
|
|
|
18 |
public MonthlyBrandTertiaryModel(int yearMonth, String brand, long amount) {
|
|
|
19 |
this.yearMonth = yearMonth;
|
|
|
20 |
this.brand = brand;
|
|
|
21 |
this.amount = amount;
|
|
|
22 |
}
|
|
|
23 |
|
|
|
24 |
public int getYearMonth() {
|
|
|
25 |
return yearMonth;
|
|
|
26 |
}
|
|
|
27 |
|
|
|
28 |
public void setYearMonth(int yearMonth) {
|
|
|
29 |
this.yearMonth = yearMonth;
|
|
|
30 |
}
|
|
|
31 |
|
|
|
32 |
public String getBrand() {
|
|
|
33 |
return brand;
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
public void setBrand(String brand) {
|
|
|
37 |
this.brand = brand;
|
|
|
38 |
}
|
|
|
39 |
|
|
|
40 |
public long getAmount() {
|
|
|
41 |
return amount;
|
|
|
42 |
}
|
|
|
43 |
|
|
|
44 |
public void setAmount(long amount) {
|
|
|
45 |
this.amount = amount;
|
|
|
46 |
}
|
|
|
47 |
|
|
|
48 |
@Override
|
|
|
49 |
public String toString() {
|
|
|
50 |
return "MonthlyBrandTertiaryModel [yearMonth=" + yearMonth + ", brand=" + brand + ", amount=" + amount + "]";
|
|
|
51 |
}
|
|
|
52 |
|
|
|
53 |
}
|