整体修改一体化事业部BI汇总sql逻辑-3

This commit is contained in:
yujh_java 2025-09-17 20:24:12 +08:00
parent f02850f58b
commit ebaa68de13

View File

@ -901,7 +901,7 @@ public class SaleDataSummaryServiceImpl implements DataSummaryService {
String monthStr = String.format("%02d", month);
//新增前删除数据
int delete = DBSql.update("DELETE FROM " + REVENUE_YEAR_TABLE
+ " WHERE YEARMONTH = '" + yearMonth + "' AND BKGS = '"+bkgs+"'");
+ " WHERE YEARMONTH >= '" + yearMonth + "' AND BKGS = '"+bkgs+"'");
LOGGER.info("准备同步{}年{}月-营业收入累计数据,删除了{}条数据",year, month,delete);
//计算轻钢龙骨和石膏板
String querySql = "SELECT " +