|
@@ -92,19 +92,19 @@ public class TsCustomerStatisticMonthlyServiceImpl extends ServiceImpl<TsCustome
|
92
|
92
|
List<TsCustomerStatisticMonthly> newList = new ArrayList<>();
|
93
|
93
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
94
|
94
|
for (int i = 0; i < 12;i++){
|
95
|
|
- String newDate = nowDate.plusDays(-i).format(formatter);
|
|
95
|
+ String newDate = nowDate.plusMonths(-i).format(formatter);
|
96
|
96
|
TsCustomerStatisticMonthly tsCustomerStatisticMonthly = new TsCustomerStatisticMonthly();
|
97
|
97
|
tsCustomerStatisticMonthly.setCustomerType(customerType);
|
98
|
98
|
tsCustomerStatisticMonthly.setMonth(newDate);
|
99
|
99
|
tsCustomerStatisticMonthly.setCustomerNum(0);
|
100
|
100
|
tsCustomerStatisticMonthly.setOrgId(orgId);
|
101
|
101
|
tsCustomerStatisticMonthly.setRealtyConsultant(personId);
|
102
|
|
- newList.add(tsCustomerStatisticMonthly);
|
103
|
102
|
list.forEach(l -> {
|
104
|
103
|
if (newDate.equals(l.getMonth())){
|
105
|
104
|
tsCustomerStatisticMonthly.setCustomerNum(l.getCustomerNum());
|
106
|
105
|
}
|
107
|
106
|
});
|
|
107
|
+ newList.add(tsCustomerStatisticMonthly);
|
108
|
108
|
}
|
109
|
109
|
|
110
|
110
|
return newList;
|