bug修改
parent
31c92614f7
commit
69e5619c30
|
|
@ -6,8 +6,10 @@ import com.cowr.common.validator.MonthValidator;
|
||||||
import com.cowr.common.validator.StartAndEndIntervalValidator;
|
import com.cowr.common.validator.StartAndEndIntervalValidator;
|
||||||
import com.cowr.common.view.ExcelRender;
|
import com.cowr.common.view.ExcelRender;
|
||||||
import com.cowr.common.view.Result;
|
import com.cowr.common.view.Result;
|
||||||
|
import com.cowr.local.ssjygl.main.AuthInterceptor;
|
||||||
import com.cowr.ssjygl.stat.sale.OrderStatService;
|
import com.cowr.ssjygl.stat.sale.OrderStatService;
|
||||||
import com.jfinal.aop.Before;
|
import com.jfinal.aop.Before;
|
||||||
|
import com.jfinal.aop.Clear;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
|
||||||
public class OrderStatController extends BaseController {
|
public class OrderStatController extends BaseController {
|
||||||
|
|
@ -101,6 +103,34 @@ public class OrderStatController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取土场销售日统计
|
||||||
|
*/
|
||||||
|
@Before(DayValidator.class)
|
||||||
|
public void daystat1() {
|
||||||
|
String tm = get("tm");
|
||||||
|
int export = getInt("export", 0);
|
||||||
|
if (export == 0) {
|
||||||
|
renderJson(Result.object(OrderStatService.me.salestat1(tm)));
|
||||||
|
} else {
|
||||||
|
Workbook wb = OrderStatService.me.daysalestatExport1(tm);
|
||||||
|
render(new ExcelRender(tm + "_销售日统计_" + System.currentTimeMillis() + ".xlsx", wb));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Before(StartAndEndIntervalValidator.class)
|
||||||
|
public void statRange1() {
|
||||||
|
String stm = get("stm");
|
||||||
|
String etm = get("etm");
|
||||||
|
int export = getInt("export", 0); // 是否导出为exce 0 不导出,1 导出
|
||||||
|
if (export == 0) {
|
||||||
|
renderJson(Result.object(OrderStatService.me.salestat1(stm, etm)));
|
||||||
|
} else {
|
||||||
|
Workbook wb = OrderStatService.me.salestatExport1(stm, etm,"");
|
||||||
|
render(new ExcelRender("按取土场总销售汇总表_" + System.currentTimeMillis() + ".xlsx", wb));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 销售月统计
|
* 销售月统计
|
||||||
*/
|
*/
|
||||||
|
|
@ -118,6 +148,21 @@ public class OrderStatController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售月统计
|
||||||
|
*/
|
||||||
|
@Before(MonthValidator.class)
|
||||||
|
public void monthstat1() {
|
||||||
|
String tm = get("tm");
|
||||||
|
int export = getInt("export", 0);
|
||||||
|
if (export == 0) {
|
||||||
|
renderJson(Result.object(OrderStatService.me.salestat1(tm)));
|
||||||
|
} else {
|
||||||
|
Workbook wb = OrderStatService.me.monthsalestatExport1(tm);
|
||||||
|
render(new ExcelRender(tm + "_销售月统计_" + System.currentTimeMillis() + ".xlsx", wb));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 销售日统计
|
* 销售日统计
|
||||||
*/
|
*/
|
||||||
|
|
@ -377,4 +422,36 @@ public class OrderStatController extends BaseController {
|
||||||
Integer sale_type = getInt("sale_type", 0);
|
Integer sale_type = getInt("sale_type", 0);
|
||||||
renderJson(Result.object(OrderStatService.me.yearStatisticsByCustomerId(year, customer_id, customer_name, type, sale_type)));
|
renderJson(Result.object(OrderStatService.me.yearStatisticsByCustomerId(year, customer_id, customer_name, type, sale_type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按取土场年统计
|
||||||
|
*/
|
||||||
|
@Clear(AuthInterceptor.class)
|
||||||
|
public void yearstat1() {
|
||||||
|
String tm = get("tm");
|
||||||
|
int export = getInt("export", 0); // 是否导出为exce 0 不导出,1 导出
|
||||||
|
Boolean stat_product = getBoolean("stat_product", false);
|
||||||
|
if (export == 0) {
|
||||||
|
renderJson(Result.object(OrderStatService.me.salestat1(tm)));
|
||||||
|
} else {
|
||||||
|
Workbook wb = OrderStatService.me.yearsalestatExport1(tm);
|
||||||
|
render(new ExcelRender("按砂站总销售汇总表_" + System.currentTimeMillis() + ".xlsx", wb));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 各取土场运输量统计表
|
||||||
|
*/
|
||||||
|
@Clear(AuthInterceptor.class)
|
||||||
|
public void trafficStatisticsOfEachSandStation1() {
|
||||||
|
String stm = get("stm");
|
||||||
|
String etm = get("etm");
|
||||||
|
int export = getInt("export", 0); // 是否导出为exce 0 不导出,1 导出
|
||||||
|
if (export == 0) {
|
||||||
|
renderJson(Result.object(OrderStatService.me.trafficStatisticsOfEachSandStation1(stm, etm)));
|
||||||
|
} else {
|
||||||
|
Workbook wb = OrderStatService.me.trafficStatisticsOfEachSandStationExport1(stm, etm);
|
||||||
|
render(new ExcelRender("各砂站运输量统计表_" + System.currentTimeMillis() + ".xlsx", wb));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue