lisai17@sina.com 2020-11-30 23:34:14 +08:00
parent d7b7127f55
commit 809f6b3659
1 changed files with 14 additions and 12 deletions

View File

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