dev
parent
2f356fb6ed
commit
a444158834
|
|
@ -597,15 +597,15 @@ 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\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) invoice_type\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\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" +
|
||||||
" where t.state = ? \n" +
|
" where t.state = ? \n" +
|
||||||
" and t.invoice_type = ? \n" +
|
" and t.invoice_type = ? \n" +
|
||||||
" and t.create_time like ? \n" +
|
" and t.create_time like ? \n" +
|
||||||
" union all\n" +
|
" union all\n" +
|
||||||
" select ifnull(t.customer_id, t.customer_name) customer_id, t.customer_name, t.paid, t.total_price, t.weight\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_temp t\n" +
|
" from order_temp t\n" +
|
||||||
" where t.state = ? \n" +
|
" where t.state = ? \n" +
|
||||||
" and t.invoice_type = ? \n" +
|
" and t.invoice_type = ? \n" +
|
||||||
|
|
@ -620,14 +620,14 @@ 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\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) invoice_type\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\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" +
|
||||||
" where t.state = ? \n" +
|
" where t.state = ? \n" +
|
||||||
" and t.create_time like ? \n" +
|
" and t.create_time like ? \n" +
|
||||||
" union all\n" +
|
" union all\n" +
|
||||||
" select ifnull(t.customer_id, t.customer_name) customer_id, t.customer_name, t.paid, t.total_price, t.weight\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_temp t\n" +
|
" from order_temp t\n" +
|
||||||
" where t.state = ? \n" +
|
" where t.state = ? \n" +
|
||||||
" and t.create_time like ? \n" +
|
" and t.create_time like ? \n" +
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue