统计修改
parent
f77b4d3b05
commit
e61a2c3adb
|
|
@ -542,10 +542,10 @@ public class OrderStatService {
|
||||||
// saleParams += " and t.sale_type = 0 \n";
|
// saleParams += " and t.sale_type = 0 \n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type != null){
|
// if (type != null){
|
||||||
saleParams += " and s.type = ? \n";
|
// saleParams += " and s.type = ? \n";
|
||||||
params.add(type);
|
// params.add(type);
|
||||||
}
|
// }
|
||||||
|
|
||||||
params.addAll(params);
|
params.addAll(params);
|
||||||
//2025-03-06更改,解决砂站商品删除后月统计数据查询不到问题
|
//2025-03-06更改,解决砂站商品删除后月统计数据查询不到问题
|
||||||
|
|
@ -563,11 +563,11 @@ public class OrderStatService {
|
||||||
|
|
||||||
String sql = "select m.* from (" + selectSql + "left join (\n" + commonSql + " ) a on a.id = t.supermarket_id and a.product_id = t.product_id\n" +
|
String sql = "select m.* from (" + selectSql + "left join (\n" + commonSql + " ) a on a.id = t.supermarket_id and a.product_id = t.product_id\n" +
|
||||||
" left join supermarket s on s.id = t.supermarket_id\n" +
|
" left join supermarket s on s.id = t.supermarket_id\n" +
|
||||||
" left join product p on p.id = t.product_id\n" +
|
" left join product p on p.id = t.product_id where s.type = 0 \n" +
|
||||||
"union\n" +
|
"union\n" +
|
||||||
selectSql + "right join (\n" + commonSql + " ) a on a.id = t.supermarket_id and a.product_id = t.product_id\n" +
|
selectSql + "right join (\n" + commonSql + " ) a on a.id = t.supermarket_id and a.product_id = t.product_id\n" +
|
||||||
" left join supermarket s on s.id = a.id\n" +
|
" left join supermarket s on s.id = a.id\n" +
|
||||||
" left join product p on p.id = a.product_id ) m order by m.id,m.product_id";
|
" left join product p on p.id = a.product_id where s.type = 0) m order by m.id,m.product_id";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
String sql = "select s.id, s.name, s.name2, p.id product_id, p.`name` product_name, ifnull(a.orderCount, 0) as orderCount, ifnull(a.totalPrice, 0) as totalPrice, ifnull(a.weight, 0) as weight\n" +
|
String sql = "select s.id, s.name, s.name2, p.id product_id, p.`name` product_name, ifnull(a.orderCount, 0) as orderCount, ifnull(a.totalPrice, 0) as totalPrice, ifnull(a.weight, 0) as weight\n" +
|
||||||
|
|
@ -4020,8 +4020,9 @@ public class OrderStatService {
|
||||||
"FROM\n" +
|
"FROM\n" +
|
||||||
" supermarket t\n"
|
" supermarket t\n"
|
||||||
+ "WHERE\n" +
|
+ "WHERE\n" +
|
||||||
" id <= 6\n" +
|
// " id <= 6\n" +
|
||||||
"OR id = 11 or id = 12 "
|
// "OR id = 11 or id = 12 "
|
||||||
|
"t.type = 0 "
|
||||||
);
|
);
|
||||||
|
|
||||||
List<Object> shParamsList = new ArrayList<>();
|
List<Object> shParamsList = new ArrayList<>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue