傅行帆 5 年之前
父節點
當前提交
31b1805459

+ 2
- 1
src/main/java/com/huiju/estateagents/statistic/service/impl/TsCustomerStatisticDailyServiceImpl.java 查看文件

@@ -100,13 +100,14 @@ public class TsCustomerStatisticDailyServiceImpl extends ServiceImpl<TsCustomerS
100 100
 			tsCustomerStatisticDaily.setDay(newDate);
101 101
 			tsCustomerStatisticDaily.setCustomerType(customerType);
102 102
 			tsCustomerStatisticDaily.setRealtyConsultant(personId);
103
-			newList.add(tsCustomerStatisticDaily);
103
+			
104 104
 			//合并数据
105 105
 			list.forEach(l -> {
106 106
 				if (newDate.equals(l.getDay())){
107 107
 					tsCustomerStatisticDaily.setCustomerNum(l.getCustomerNum());
108 108
 				}
109 109
 			});
110
+			newList.add(tsCustomerStatisticDaily);
110 111
 		}
111 112
 		
112 113
 		return newList;

+ 2
- 2
src/main/java/com/huiju/estateagents/statistic/service/impl/TsCustomerStatisticMonthlyServiceImpl.java 查看文件

@@ -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;