diff --git a/ssjygl-xsct-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java b/ssjygl-xsct-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java index 285d8c9..b673a46 100644 --- a/ssjygl-xsct-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java +++ b/ssjygl-xsct-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java @@ -542,10 +542,10 @@ public class OrderStatService { // saleParams += " and t.sale_type = 0 \n"; } - if (type != null){ - saleParams += " and s.type = ? \n"; - params.add(type); - } +// if (type != null){ +// saleParams += " and s.type = ? \n"; +// params.add(type); +// } params.addAll(params); //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" + " 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" + 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 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" + @@ -4020,8 +4020,9 @@ public class OrderStatService { "FROM\n" + " supermarket t\n" + "WHERE\n" + - " id <= 6\n" + - "OR id = 11 or id = 12 " +// " id <= 6\n" + +// "OR id = 11 or id = 12 " + "t.type = 0 " ); List shParamsList = new ArrayList<>();