From a4441588344e4d2a3eb1abfa5ae3e75f2d7c829a Mon Sep 17 00:00:00 2001 From: "lisai17@sina.com" Date: Tue, 1 Dec 2020 21:16:33 +0800 Subject: [PATCH] . --- .../com/cowr/ssjygl/stat/sale/OrderStatService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java index 53858d6..f7dd05f 100644 --- a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java +++ b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java @@ -597,15 +597,15 @@ public class OrderStatService { List 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\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" + - " 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" + " where t.state = ? \n" + " and t.invoice_type = ? \n" + " and t.create_time like ? \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" + " where t.state = ? \n" + " and t.invoice_type = ? \n" + @@ -620,14 +620,14 @@ 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\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" + - " 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" + " where t.state = ? \n" + " and t.create_time like ? \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" + " where t.state = ? \n" + " and t.create_time like ? \n" +