Commit 36e83d16 by 朱海

[chg]顾客批次,店内区域匹配修改逻辑

1 parent a3f9b5f1
...@@ -148,7 +148,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -148,7 +148,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
//按进店时间排序 //按进店时间排序
List<PersonInOutDetail> inOutDetailList = personInOutDetailList.stream().sorted(Comparator.comparing(PersonInOutDetail::getArriveTime)).collect(Collectors.toList()); List<PersonInOutDetail> inOutDetailList = personInOutDetailList.stream().sorted(Comparator.comparing(PersonInOutDetail::getArriveTime)).collect(Collectors.toList());
List<PersonInOutDetail> customerList = inOutDetailList.stream().filter(p -> p.getPersonType() == 0).collect(Collectors.toList()); List<PersonInOutDetail> customerList = inOutDetailList.stream().filter(p -> p.getPersonType() != 1).collect(Collectors.toList());
//处理顾客分组信息 //处理顾客分组信息
customerList = personGroupCompute(mallId, customerList, countDate); customerList = personGroupCompute(mallId, customerList, countDate);
List<PersonInOutDetail> staffList = inOutDetailList.stream().filter(p -> p.getPersonType() == 1).collect(Collectors.toList()); List<PersonInOutDetail> staffList = inOutDetailList.stream().filter(p -> p.getPersonType() == 1).collect(Collectors.toList());
...@@ -177,12 +177,10 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -177,12 +177,10 @@ public class PersonRecordServiceImpl implements PersonRecordService {
private List<PersonInOutDetail> personGroupCompute(Long mallId, List<PersonInOutDetail> personList, Date countDate) { private List<PersonInOutDetail> personGroupCompute(Long mallId, List<PersonInOutDetail> personList, Date countDate) {
List<PersonInOutDetail> resultList = new ArrayList<>(); List<PersonInOutDetail> resultList = new ArrayList<>();
//获取分组间隔配置 //获取分组间隔配置
String configValue = configParamDao.getConfigParamByMallIdAndConfigKey(mallId, "personGroupInterval"); /*String configValue = configParamDao.getConfigParamByMallIdAndConfigKey(mallId, "personGroupInterval");
if (configValue == null) { if (configValue == null) {
return personList; return personList;
} }*/
if (CollectionUtils.isNotEmpty(personBatchMallIds) && personBatchMallIds.contains(mallId)) {
//先判断是否从全天分析获取了批次信息,如果有,使用全天分析的批次结果
List<DPersonBatch> personBatchList = dPersonBatchDao.getPersonBatchList(mallId, countDate); List<DPersonBatch> personBatchList = dPersonBatchDao.getPersonBatchList(mallId, countDate);
if (CollectionUtils.isNotEmpty(personBatchList)) { if (CollectionUtils.isNotEmpty(personBatchList)) {
Map<String, String> batchMap = personBatchList.stream().collect(Collectors.toMap(v -> v.getPersonUnid() + DateUtil.formatDateTime(v.getArriveTime()), DPersonBatch::getBatchId, (v1, v2) -> v1)); Map<String, String> batchMap = personBatchList.stream().collect(Collectors.toMap(v -> v.getPersonUnid() + DateUtil.formatDateTime(v.getArriveTime()), DPersonBatch::getBatchId, (v1, v2) -> v1));
...@@ -196,8 +194,12 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -196,8 +194,12 @@ public class PersonRecordServiceImpl implements PersonRecordService {
} }
resultList.add(personInOutDetail); resultList.add(personInOutDetail);
} }
return resultList;
} }
return resultList;
/*if (CollectionUtils.isNotEmpty(personBatchMallIds) && personBatchMallIds.contains(mallId)) {
//先判断是否从全天分析获取了批次信息,如果有,使用全天分析的批次结果
} }
if (CollectionUtils.isEmpty(resultList)) { if (CollectionUtils.isEmpty(resultList)) {
...@@ -228,7 +230,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -228,7 +230,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
} }
} }
} }
return resultList; return resultList;*/
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!