dev
parent
a444158834
commit
4cc2dba94a
|
|
@ -597,7 +597,7 @@ public class OrderStatService {
|
|||
|
||||
List<Record> dblist = 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" +
|
||||
" 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" +
|
||||
|
|
@ -620,7 +620,7 @@ public class OrderStatService {
|
|||
tm + "%"
|
||||
);
|
||||
} 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" +
|
||||
" 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" +
|
||||
|
|
|
|||
Loading…
Reference in New Issue