日、月按客户统计问题

dev
wuwenxiong 2022-02-15 23:06:08 +08:00
parent 9a37d32b88
commit 9cedc28427
1 changed files with 18 additions and 18 deletions

View File

@ -646,8 +646,7 @@ public class OrderStatService {
" from order_temp t\n" +
" left join customer c on c.id = t.customer_id \n" +
" where t.state = ? \n" +
saleParams +
" and t.create_time like ? \n";
" and t.create_time like ? \n" + saleParams + "";
if (customer_id != null) {
sql += " and c.id = ? \n";
paraList.add(customer_id);
@ -669,8 +668,7 @@ public class OrderStatService {
" from order_temp t\n" +
" left join customer c on c.id = t.customer_id \n" +
" where t.state = ? \n" +
saleParams +
" and t.create_time like ? \n";
" and t.create_time like ? \n" + saleParams + "";
if (customer_id != null) {
sql += " and c.id = ? \n";
paraList.add(customer_id);
@ -689,6 +687,7 @@ public class OrderStatService {
}
List<Record> dblist = Db.find(sql, paraList.toArray());
if (dblist.size() > 0) {
Record total = new Record();
total.set("id", 0);
total.set("name", "合计");
@ -705,6 +704,7 @@ public class OrderStatService {
total.set("weight", Double.parseDouble(String.format("%.2f", total.getDouble("weight"))));
total.set("product_name", "");
dblist.add(total);
}
for (Record record : dblist) {
String uuid = StrKit.getRandomUUID();