Commit 7b1527d1 by 朱海

[chg]接待时间早于进店时间的,将接待时间设置为进店时间后一秒

1 parent 6f4b0fab
...@@ -264,7 +264,12 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -264,7 +264,12 @@ public class PersonRecordServiceImpl implements PersonRecordService {
List<DPersonReception> personReceptionList = dPersonReceptionDao.getPersonReceptionList(dPersonRecord.getMallId(), dPersonRecord.getCountDate(), dPersonRecord.getPersonUnid(), dPersonRecord.getArriveTime(), dPersonRecord.getLeaveTime()); List<DPersonReception> personReceptionList = dPersonReceptionDao.getPersonReceptionList(dPersonRecord.getMallId(), dPersonRecord.getCountDate(), dPersonRecord.getPersonUnid(), dPersonRecord.getArriveTime(), dPersonRecord.getLeaveTime());
if (CollectionUtils.isNotEmpty(personReceptionList)) { if (CollectionUtils.isNotEmpty(personReceptionList)) {
dPersonRecord.setReceptionCount(personReceptionList.size()); dPersonRecord.setReceptionCount(personReceptionList.size());
dPersonRecord.setReceptionTime(personReceptionList.get(0).getStartTime()); Date startTime = personReceptionList.get(0).getStartTime();
//接待时间早于到店时间,接待时间为进店时间+1秒
if (startTime.before(dPersonRecord.getArriveTime())) {
startTime = DateUtil.offsetSecond(dPersonRecord.getArriveTime(), 1);
}
dPersonRecord.setReceptionTime(startTime);
dPersonRecord.setReceptionDuration(personReceptionList.stream().mapToLong(DPersonReception::getDuration).sum()); dPersonRecord.setReceptionDuration(personReceptionList.stream().mapToLong(DPersonReception::getDuration).sum());
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!