整体修改一体化事业部BI汇总sql逻辑-4
This commit is contained in:
parent
3018b00b18
commit
41b64c2ae2
@ -593,34 +593,11 @@ public class SaleDataSummaryServiceImpl implements DataSummaryService {
|
||||
Calendar endCal = Calendar.getInstance();
|
||||
endCal.setTime(dateRange.getEndDate());
|
||||
endCal.set(Calendar.DAY_OF_MONTH, endCal.getActualMaximum(Calendar.DAY_OF_MONTH)); // 设置为月份的最后一天
|
||||
|
||||
int year = startCal.get(Calendar.YEAR);
|
||||
int month = startCal.get(Calendar.MONTH) + 1;
|
||||
Calendar monthCal = (Calendar) startCal.clone();
|
||||
|
||||
while (!monthCal.after(endCal)) {
|
||||
int year = monthCal.get(Calendar.YEAR);
|
||||
int month = monthCal.get(Calendar.MONTH) + 1;
|
||||
String yearMonth = String.format("%04d-%02d", year, month);
|
||||
|
||||
LOGGER.info("计算月度汇总数据: {}-{}", year, month);
|
||||
|
||||
// 1. 产品配套率年度数据
|
||||
// calculateAndSaveMatchingRate(year, month, yearMonth, bkgs);
|
||||
|
||||
// 2. 产品销售月明细数据
|
||||
// calculateAndSaveProductMonthly(year, month, yearMonth, bkgs);
|
||||
|
||||
// 3. 应收账款品牌月明细
|
||||
// calculateAndSaveReceivableBrandMonthly(year, month, yearMonth, bkgs);
|
||||
|
||||
// 4. 应收账款年度汇总
|
||||
// calculateAndSaveReceivableYear(year, month, yearMonth, bkgs);
|
||||
|
||||
// 5. 营业收入年度汇总
|
||||
calculateAndSaveRevenueYear(startDate,year, month, yearMonth, bkgs);
|
||||
|
||||
// 移动到下个月
|
||||
monthCal.add(Calendar.MONTH, 1);
|
||||
}
|
||||
String yearMonth = String.format("%04d-%02d", year, month);
|
||||
calculateAndSaveRevenueYear(startDate,year, month, yearMonth, bkgs);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user