lisai17@sina.com 2020-11-04 15:44:40 +08:00
parent d532b290b0
commit 846a9af165
1 changed files with 2 additions and 1 deletions

View File

@ -504,6 +504,7 @@ group by date
" t.* \n" +
" , s.lgtd origin_lgtd, s.lttd origin_lttd\n" +
" , ifnull(c.lgtd, " + Const.DEFAULT_LGTD + ") dest_lgtd, ifnull(c.lttd, " + Const.DEFAULT_LTTD + ") dest_lttd\n" +
" , ifnull(o.cnt, 0) over_cnt\n" +
" , ifnull(o.total_weight, 0) over_weight\n" +
" , ifnull(o.total_price, 0) over_total_price\n" +
" from ordercluster t\n" +
@ -516,7 +517,7 @@ group by date
" where a.id is not null\n" +
" ) c on c.customer_id = t.customer_id\n" +
" left join (\n" +
" select t.ordercluster_id, sum(t.weight) total_weight, sum(t.total_price) total_price from order_temp t\n" +
" select t.ordercluster_id, count(t.sn) cnt, sum(t.weight) total_weight, sum(t.total_price) total_price from order_temp t\n" +
" where t.state = 5\n" +
" and t.create_time like ?\n" +
" group by t.ordercluster_id\n" +