dev
parent
d7b7127f55
commit
809f6b3659
|
|
@ -117,11 +117,12 @@ public class OrderStatController extends BaseController {
|
||||||
@Before(DayValidator.class)
|
@Before(DayValidator.class)
|
||||||
public void daystatCustomer() {
|
public void daystatCustomer() {
|
||||||
String tm = get("tm");
|
String tm = get("tm");
|
||||||
|
Integer invoice_type = getInt("invoice_type");
|
||||||
int export = getInt("export", 0);
|
int export = getInt("export", 0);
|
||||||
if (export == 0) {
|
if (export == 0) {
|
||||||
renderJson(Result.object(OrderStatService.me.salestatCustomer(tm)));
|
renderJson(Result.object(OrderStatService.me.salestatCustomer(tm, invoice_type)));
|
||||||
} else {
|
} else {
|
||||||
Workbook wb = OrderStatService.me.daysalestatCustomerExport(tm);
|
Workbook wb = OrderStatService.me.daysalestatCustomerExport(tm, invoice_type);
|
||||||
render(new ExcelRender(tm + "_销售日统计_" + System.currentTimeMillis() + ".xlsx", wb));
|
render(new ExcelRender(tm + "_销售日统计_" + System.currentTimeMillis() + ".xlsx", wb));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -132,12 +133,13 @@ public class OrderStatController extends BaseController {
|
||||||
@Before(MonthValidator.class)
|
@Before(MonthValidator.class)
|
||||||
public void monthstatCustomer() {
|
public void monthstatCustomer() {
|
||||||
String tm = get("tm");
|
String tm = get("tm");
|
||||||
|
Integer invoice_type = getInt("invoice_type");
|
||||||
int export = getInt("export", 0);
|
int export = getInt("export", 0);
|
||||||
|
|
||||||
if (export == 0) {
|
if (export == 0) {
|
||||||
renderJson(Result.object(OrderStatService.me.salestatCustomer(tm)));
|
renderJson(Result.object(OrderStatService.me.salestatCustomer(tm, invoice_type)));
|
||||||
} else {
|
} else {
|
||||||
Workbook wb = OrderStatService.me.monthsalestatCustomerExport(tm);
|
Workbook wb = OrderStatService.me.monthsalestatCustomerExport(tm, invoice_type);
|
||||||
render(new ExcelRender(tm + "_销售月统计_" + System.currentTimeMillis() + ".xlsx", wb));
|
render(new ExcelRender(tm + "_销售月统计_" + System.currentTimeMillis() + ".xlsx", wb));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue