首页统计排除预售订单
parent
a27e23a467
commit
f228ed7303
|
|
@ -193,6 +193,8 @@ group by date
|
|||
" ifnull(sum(case when t.date >= ? then t.total_price end ), 0) day_total_price,\n" +
|
||||
" ifnull(sum(case when t.date >= ? then t.count else 0 end ), 0) day_truck_cnt\n" +
|
||||
" from order_end t\n" +
|
||||
" WHERE t.sale_type = 0 \n" +
|
||||
|
||||
" UNION\n" +
|
||||
" SELECT\n" +
|
||||
" ifnull( sum( t.weight ), 0 ) total_weight,\n" +
|
||||
|
|
@ -212,6 +214,7 @@ group by date
|
|||
" WHERE\n" +
|
||||
" t.state = 5 \n" +
|
||||
" AND t.create_time >= ? " +
|
||||
" and t.sale_type = 0 \n" +
|
||||
" union\n" +
|
||||
" select \n" +
|
||||
" 0 total_weight,\n" +
|
||||
|
|
|
|||
|
|
@ -2298,6 +2298,8 @@ public class OrderStatService {
|
|||
|
||||
if (sale_type != null && (sale_type == 0 || sale_type == 1)) {
|
||||
union_4 += " and t.sale_type = " + sale_type + " \n";
|
||||
}else{
|
||||
union_4 += " and t.sale_type = 0 \n";
|
||||
}
|
||||
|
||||
union_4 += " and t.supermarket_id = 4\n" +
|
||||
|
|
@ -2323,7 +2325,10 @@ public class OrderStatService {
|
|||
|
||||
if (sale_type != null && (sale_type == 0 || sale_type == 1)) {
|
||||
union_99 += " and t.sale_type = " + sale_type + " \n";
|
||||
}else{
|
||||
union_99 += " and t.sale_type = 0 \n";
|
||||
}
|
||||
|
||||
union_99 += " and t.supermarket_id = 4\n" +
|
||||
" and ((t.create_time >= '2021-09-08 00:00:00' and t.create_time <= '2021-10-15 23:59:59') \n" +
|
||||
" or (t.create_time >= '2021-10-20 00:00:00' and t.create_time <= '2021-10-20 23:59:59'))\n" +
|
||||
|
|
@ -2346,7 +2351,10 @@ public class OrderStatService {
|
|||
|
||||
if (sale_type != null && (sale_type == 0 || sale_type == 1)) {
|
||||
today += " and t.sale_type = " + sale_type + " \n";
|
||||
}else{
|
||||
today += " and t.sale_type = 0 \n";
|
||||
}
|
||||
|
||||
today += " and t.supermarket_id != 4\n" +
|
||||
" AND t.create_time >= CONCAT( CURDATE(), ' 00:00:00' ) \n" +
|
||||
// " and t.create_time>= ? \n" +
|
||||
|
|
|
|||
Loading…
Reference in New Issue