数据重复问题
This commit is contained in:
@@ -132,7 +132,6 @@ public class FinanceStsServiceImpl implements FinanceStsService {
|
||||
|
||||
private List<Map<String, Object>> buildDayReportPrint(SaleSummaryCountParam param) {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
Map<String, Object> dayReportMap = new HashMap<>();
|
||||
if (param.getBeginDate() != null && param.getEndDate() != null) {
|
||||
// 计算相差天数
|
||||
long days = java.time.temporal.ChronoUnit.DAYS.between(param.getBeginDate(), param.getEndDate());
|
||||
@@ -140,6 +139,7 @@ public class FinanceStsServiceImpl implements FinanceStsService {
|
||||
.mapToObj(param.getBeginDate()::plusDays)
|
||||
.toList();
|
||||
for (LocalDate localDate : dateList) {
|
||||
Map<String, Object> dayReportMap = new HashMap<>();
|
||||
DayReportPrintDTO dayReportPrintDTO = new DayReportPrintDTO();
|
||||
FinanceStsQueryParam financeStsQueryParam = new FinanceStsQueryParam();
|
||||
financeStsQueryParam.setQueryDate(localDate);
|
||||
@@ -218,13 +218,13 @@ public class FinanceStsServiceImpl implements FinanceStsService {
|
||||
private List<Map<String, Object>> buildDaySettlePrint(SaleSummaryCountParam param) {
|
||||
List<Map<String, Object>> map = new ArrayList<>();
|
||||
if (param.getBeginDate() != null && param.getEndDate() != null) {
|
||||
Map<String, Object> dayReportMap = new HashMap<>();
|
||||
// 计算相差天数
|
||||
long days = java.time.temporal.ChronoUnit.DAYS.between(param.getBeginDate(), param.getEndDate());
|
||||
List<LocalDate> dateList = LongStream.rangeClosed(0, days)
|
||||
.mapToObj(param.getBeginDate()::plusDays)
|
||||
.toList();
|
||||
for (LocalDate localDate : dateList) {
|
||||
Map<String, Object> dayReportMap = new HashMap<>();
|
||||
DaySettlePrintDTO printDTO = new DaySettlePrintDTO();
|
||||
FinanceStsQueryParam param1 = new FinanceStsQueryParam();
|
||||
param1.setQueryDate(localDate);
|
||||
|
||||
Reference in New Issue
Block a user