Commit 0e92f1a5 by 朱海

[chg]小时级数据统计异常bug

1 parent 37d67f4e
......@@ -3,11 +3,16 @@ package com.viontech.keliu.controller;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.viontech.keliu.entity.DPersonRecord;
import com.viontech.keliu.service.PersonGroupService;
import com.viontech.keliu.service.PersonRecordService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
......@@ -27,6 +32,8 @@ public class ToolController {
@Resource
private PersonRecordService personRecordService;
@Resource
private JdbcTemplate jdbcTemplate;
/*@Resource
private PersonGroupService personGroupService;*/
/*@GetMapping("/buildData")
......
package com.viontech.keliu.service;
import com.viontech.keliu.entity.DPersonRecord;
import java.util.Date;
import java.util.List;
/**
* Created with IntelliJ IDEA.
......
......@@ -591,6 +591,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
}
long newPersonCount = v.getStaffCount() + customerCount;
DMallHourFaceRecognitionSta updateSta = new DMallHourFaceRecognitionSta();
updateSta.setMallId(mallId);
updateSta.setCountdate(countDate);
updateSta.setPersonCount(newPersonCount);
updateSta.setCustomCount(customerCount);
......@@ -613,10 +614,12 @@ public class PersonRecordServiceImpl implements PersonRecordService {
updateSta.setFemaleStage(femaleStageStr);
CustomerGroupResult customerGroupResult = new CustomerGroupResult();
Map<String, List<DPersonRecord>> groupMap = personRecords.stream().collect(Collectors.groupingBy(DPersonRecord::getGroupUnid));
groupMap.forEach((k1,v1) -> {
calGroup(1, customerGroupResult, v1);
});
if (CollectionUtils.isNotEmpty(dPersonRecords)) {
Map<String, List<DPersonRecord>> groupMap = dPersonRecords.stream().collect(Collectors.groupingBy(DPersonRecord::getGroupUnid));
groupMap.forEach((k1,v1) -> {
calGroup(1, customerGroupResult, v1);
});
}
updateSta.setGroupNum(customerGroupResult.getGroupNum());
updateSta.setSingleGroupNum(customerGroupResult.getSingleGroup());
updateSta.setDoubleGroupNum(customerGroupResult.getDoubleGroup());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!