傅行帆 5 years ago
parent
commit
31b1805459

+ 2
- 1
src/main/java/com/huiju/estateagents/statistic/service/impl/TsCustomerStatisticDailyServiceImpl.java View File

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

+ 2
- 2
src/main/java/com/huiju/estateagents/statistic/service/impl/TsCustomerStatisticMonthlyServiceImpl.java View File

92
 		List<TsCustomerStatisticMonthly> newList = new ArrayList<>();
92
 		List<TsCustomerStatisticMonthly> newList = new ArrayList<>();
93
 		DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
93
 		DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
94
 		for (int i = 0; i < 12;i++){
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
 			TsCustomerStatisticMonthly tsCustomerStatisticMonthly = new TsCustomerStatisticMonthly();
96
 			TsCustomerStatisticMonthly tsCustomerStatisticMonthly = new TsCustomerStatisticMonthly();
97
 			tsCustomerStatisticMonthly.setCustomerType(customerType);
97
 			tsCustomerStatisticMonthly.setCustomerType(customerType);
98
 			tsCustomerStatisticMonthly.setMonth(newDate);
98
 			tsCustomerStatisticMonthly.setMonth(newDate);
99
 			tsCustomerStatisticMonthly.setCustomerNum(0);
99
 			tsCustomerStatisticMonthly.setCustomerNum(0);
100
 			tsCustomerStatisticMonthly.setOrgId(orgId);
100
 			tsCustomerStatisticMonthly.setOrgId(orgId);
101
 			tsCustomerStatisticMonthly.setRealtyConsultant(personId);
101
 			tsCustomerStatisticMonthly.setRealtyConsultant(personId);
102
-			newList.add(tsCustomerStatisticMonthly);
103
 			list.forEach(l -> {
102
 			list.forEach(l -> {
104
 				if (newDate.equals(l.getMonth())){
103
 				if (newDate.equals(l.getMonth())){
105
 					tsCustomerStatisticMonthly.setCustomerNum(l.getCustomerNum());
104
 					tsCustomerStatisticMonthly.setCustomerNum(l.getCustomerNum());
106
 				}
105
 				}
107
 			});
106
 			});
107
+			newList.add(tsCustomerStatisticMonthly);
108
 		}
108
 		}
109
 		
109
 		
110
 		return newList;
110
 		return newList;