lisai17@sina.com 2020-11-09 21:30:26 +08:00
parent 38ec8d2587
commit 826ea29b46
1 changed files with 7 additions and 5 deletions

View File

@ -267,7 +267,7 @@ group by date
List<Record> suppeie = Db.find("select t.supermarket_id, sum(t.total_weight) total_weight from ordercluster t\n" +
"where t.cutoff_time like ? \n" +
"and t.state < ? \n" +
"and t.state <= ? \n" +
"group by t.supermarket_id", nowdaytm + "%", OrderStateEnum.RECEIVED.getStateid());
for (Record record : by_supermarket_list) {
@ -521,11 +521,13 @@ group by date
outlist.add(c1);
outlist.add(c2);
List<Record> data1 = Db.find("select case when t.customer_id is null then 2 else 1 end cid, count(t.id) day_quota_cnt, sum(t.total_weight) day_quota_weight from ordercluster t\n" +
" where t.state < 5\n" +
List<Record> data1 = Db.find("select case when t.customer_id is null then 2 else 1 end cid, count(t.id) day_quota_cnt, sum(t.total_weight) day_quota_weight \n" +
" from ordercluster t\n" +
" where t.state <= 5\n" +
" and t.cutoff_time like ?\n" +
" group by cid", nowdaytm + "%");
List<Record> data2 = Db.find("select case when t.customer_id is null then 2 else 1 end cid, count(t.sn) day_cnt, sum(t.weight) day_weight, sum(total_price) day_total_price from order_temp t\n" +
List<Record> data2 = Db.find("select case when t.customer_id is null then 2 else 1 end cid, count(t.sn) day_cnt, sum(t.weight) day_weight, sum(total_price) day_total_price \n" +
" from order_temp t\n" +
" where t.state = 5\n" +
" and t.create_time like ?\n" +
" group by cid", nowdaytm + "%");
@ -585,7 +587,7 @@ group by date
" and t.create_time like ?\n" +
" group by t.ordercluster_id\n" +
" ) o on o.ordercluster_id = t.id\n" +
" where t.state < 5\n" +
" where t.state <= 5\n" +
" and t.cutoff_time like ? ", nowdaytm + "%", nowdaytm + "%");
}