|
@@ -62,7 +62,7 @@ public class StatisticalServiceImpl implements IStatisticalService {
|
62
|
62
|
public ResponseBean indexStatistical(Integer orgId) {
|
63
|
63
|
|
64
|
64
|
ResponseBean responseBean = new ResponseBean();
|
65
|
|
- Map<String,Object> map = new HashMap<>();
|
|
65
|
+ Map<String, Object> map = new HashMap<>();
|
66
|
66
|
|
67
|
67
|
// 总用户数
|
68
|
68
|
Integer selectUserCount = taPersonMapper.selectUserCount(orgId);
|
|
@@ -165,7 +165,7 @@ public class StatisticalServiceImpl implements IStatisticalService {
|
165
|
165
|
result.put("data_count", selectBuildingStatisticalSave);
|
166
|
166
|
break;
|
167
|
167
|
case CommConstant.BUILDING_SHARE:
|
168
|
|
- Map<String, Object> selectBuildingStatisticalShare = taBuildingMapper.selectBuildingStatistical(orgId,"share");
|
|
168
|
+ Map<String, Object> selectBuildingStatisticalShare = taBuildingMapper.selectBuildingStatistical(orgId, "share");
|
169
|
169
|
result.put("data_count", selectBuildingStatisticalShare);
|
170
|
170
|
break;
|
171
|
171
|
case CommConstant.ACTIVITY_SAVE:
|
|
@@ -217,7 +217,7 @@ public class StatisticalServiceImpl implements IStatisticalService {
|
217
|
217
|
|
218
|
218
|
// 用户来源饼状
|
219
|
219
|
// 来源置业顾问, 来源客户,其他
|
220
|
|
- Integer total = taPersonMapper.selectFromNum(orgId, null) ;
|
|
220
|
+ Integer total = taPersonMapper.selectFromNum(orgId, null);
|
221
|
221
|
Integer person_realty_consultant = taPersonMapper.selectFromNum(orgId, CommConstant.PERSON_REALTY_CONSULTANT);
|
222
|
222
|
Integer person_estate_agent = taPersonMapper.selectFromNum(orgId, CommConstant.PERSON_ESTATE_CUSTOMER);
|
223
|
223
|
Integer person_null = total - person_realty_consultant - person_estate_agent;
|
|
@@ -230,7 +230,7 @@ public class StatisticalServiceImpl implements IStatisticalService {
|
230
|
230
|
List<Map<String, Object>> selectUserSourceData = taPersonMapper.selectUserSourceData(orgId, CommConstant.PERSON_ESTATE_AGENT, startDate, endDate);
|
231
|
231
|
|
232
|
232
|
Map<String, Object> result = new HashMap<>();
|
233
|
|
- result.put("columnar", new ArrayList<Map<String,Object>>());
|
|
233
|
+ result.put("columnar", new ArrayList<Map<String, Object>>());
|
234
|
234
|
result.put("pie", map);
|
235
|
235
|
result.put("data", selectUserSourceData);
|
236
|
236
|
|
|
@@ -309,11 +309,11 @@ public class StatisticalServiceImpl implements IStatisticalService {
|
309
|
309
|
}
|
310
|
310
|
|
311
|
311
|
@Override
|
312
|
|
- public ResponseBean selectIntentionUser(Integer pageNum, Integer pageSize, Integer orgId, String buildingId) {
|
|
312
|
+ public ResponseBean selectIntentionUser(Integer pageNum, Integer pageSize, Integer orgId, String buildingId, Integer userId) {
|
313
|
313
|
ResponseBean responseBean = new ResponseBean();
|
314
|
314
|
|
315
|
|
- IPage<Map<String,Object>> pg = new Page<>(pageNum, pageSize);
|
316
|
|
- IPage<Map<String, Object>> page = taPersonIntentionRecordMapper.selectIntentionUser(pg, orgId, buildingId);
|
|
315
|
+ IPage<Map<String, Object>> pg = new Page<>(pageNum, pageSize);
|
|
316
|
+ IPage<Map<String, Object>> page = taPersonIntentionRecordMapper.selectIntentionUser(pg, orgId, buildingId, userId);
|
317
|
317
|
|
318
|
318
|
responseBean.addSuccess(page);
|
319
|
319
|
return responseBean;
|
|
@@ -330,7 +330,7 @@ public class StatisticalServiceImpl implements IStatisticalService {
|
330
|
330
|
@Override
|
331
|
331
|
public ResponseBean selectPersonFrom(Integer orgId, LocalDate startDate, LocalDate endDate) {
|
332
|
332
|
ResponseBean responseBean = new ResponseBean();
|
333
|
|
- List<TsPersonFromStatistic> list = tsPersonFromStatisticMapper.selectPersonFrom(orgId,startDate,endDate);
|
|
333
|
+ List<TsPersonFromStatistic> list = tsPersonFromStatisticMapper.selectPersonFrom(orgId, startDate, endDate);
|
334
|
334
|
QueryWrapper<TdWxDict> tdWxDictQueryWrapper = new QueryWrapper<>();
|
335
|
335
|
tdWxDictQueryWrapper.groupBy("scene_type");
|
336
|
336
|
List<TdWxDict> tdWxDicts = tdWxDictMapper.selectList(tdWxDictQueryWrapper);
|
|
@@ -340,10 +340,10 @@ public class StatisticalServiceImpl implements IStatisticalService {
|
340
|
340
|
e.setFromData(fromSum);
|
341
|
341
|
e.setRegisterSum(registerSum);
|
342
|
342
|
});
|
343
|
|
- Map<String,Object> map = new HashMap<>();
|
344
|
|
- map.put("tdWxDicts",tdWxDicts);
|
345
|
|
- List<TsPersonFromStatistic> tableList = tsPersonFromStatisticMapper.selectPersonFromGroupByData(orgId,startDate,endDate);
|
346
|
|
- map.put("list",tableList);
|
|
343
|
+ Map<String, Object> map = new HashMap<>();
|
|
344
|
+ map.put("tdWxDicts", tdWxDicts);
|
|
345
|
+ List<TsPersonFromStatistic> tableList = tsPersonFromStatisticMapper.selectPersonFromGroupByData(orgId, startDate, endDate);
|
|
346
|
+ map.put("list", tableList);
|
347
|
347
|
responseBean.addSuccess(map);
|
348
|
348
|
return responseBean;
|
349
|
349
|
}
|
|
@@ -359,10 +359,10 @@ public class StatisticalServiceImpl implements IStatisticalService {
|
359
|
359
|
@Override
|
360
|
360
|
public ResponseBean selectPersonFromGroupByDay(Integer orgId, LocalDate startDate, LocalDate endDate) {
|
361
|
361
|
List<TsPersonFromStatistic> dayList = getDayList(startDate, endDate);
|
362
|
|
- List<TsPersonFromStatistic> list = tsPersonFromStatisticMapper.selectPersonFromGroupByDay(orgId,startDate,endDate);
|
|
362
|
+ List<TsPersonFromStatistic> list = tsPersonFromStatisticMapper.selectPersonFromGroupByDay(orgId, startDate, endDate);
|
363
|
363
|
dayList.forEach(e -> {
|
364
|
364
|
list.forEach(l -> {
|
365
|
|
- if (e.getCreateTime().equals(l.getCreateTime())){
|
|
365
|
+ if (e.getCreateTime().equals(l.getCreateTime())) {
|
366
|
366
|
e.setFromNum(l.getFromNum());
|
367
|
367
|
e.setRegisteredNum(l.getRegisteredNum());
|
368
|
368
|
}
|
|
@@ -373,12 +373,13 @@ public class StatisticalServiceImpl implements IStatisticalService {
|
373
|
373
|
|
374
|
374
|
/**
|
375
|
375
|
* 返回时间区间格式
|
|
376
|
+ *
|
376
|
377
|
* @param startDate
|
377
|
378
|
* @param endDate
|
378
|
379
|
* @return
|
379
|
380
|
*/
|
380
|
381
|
private List<TsPersonFromStatistic> getDayList(LocalDate startDate, LocalDate endDate) {
|
381
|
|
- if (null == startDate || null == endDate){
|
|
382
|
+ if (null == startDate || null == endDate) {
|
382
|
383
|
endDate = LocalDate.now();
|
383
|
384
|
startDate = LocalDate.now().plusDays(-7);
|
384
|
385
|
}
|