lisai17@sina.com 2020-12-01 21:19:53 +08:00
parent a444158834
commit 4cc2dba94a
1 changed files with 2 additions and 2 deletions

View File

@ -597,7 +597,7 @@ public class OrderStatService {
List<Record> dblist = null; List<Record> dblist = null;
if (invoice_type != null) { if (invoice_type != null) {
dblist = Db.find("select max(t.customer_id) id, t.customer_name name, count(*) as orderCount, sum(t.total_price) as totalPrice, sum(t.weight) as weight, max(t.invoice_type) invoice_type\n" + dblist = Db.find("select max(t.customer_id) id, t.customer_name name, count(*) as orderCount, sum(t.total_price) as totalPrice, sum(t.weight) as weight, max(t.invoice_type) invoiceType\n" +
" from (\n" + " from (\n" +
" select ifnull(t.customer_id, t.customer_name) customer_id, t.customer_name, t.paid, t.total_price, t.weight, t.invoice_type\n" + " select ifnull(t.customer_id, t.customer_name) customer_id, t.customer_name, t.paid, t.total_price, t.weight, t.invoice_type\n" +
" from order_sale t\n" + " from order_sale t\n" +
@ -620,7 +620,7 @@ public class OrderStatService {
tm + "%" tm + "%"
); );
} else { } else {
dblist = Db.find("select max(t.customer_id) id, t.customer_name name, count(*) as orderCount, sum(t.total_price) as totalPrice, sum(t.weight) as weight, max(t.invoice_type) invoice_type\n" + dblist = Db.find("select max(t.customer_id) id, t.customer_name name, count(*) as orderCount, sum(t.total_price) as totalPrice, sum(t.weight) as weight, max(t.invoice_type) invoiceType\n" +
" from (\n" + " from (\n" +
" select ifnull(t.customer_id, t.customer_name) customer_id, t.customer_name, t.paid, t.total_price, t.weight, t.invoice_type\n" + " select ifnull(t.customer_id, t.customer_name) customer_id, t.customer_name, t.paid, t.total_price, t.weight, t.invoice_type\n" +
" from order_sale t\n" + " from order_sale t\n" +