Commit a58329c7 authored by 赵啸非's avatar 赵啸非

添加定时删除七天前的人流数据

parent dd585911
package com.mortals.xhx.daemon.task; package com.mortals.xhx.daemon.task;
import cn.hutool.core.date.DateUtil;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ITask; import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService; import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.framework.utils.ServletUtils; import com.mortals.framework.utils.ServletUtils;
import com.mortals.xhx.base.system.upload.service.UploadService; import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.common.code.InFaceHkEnum;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.module.hik.face.model.req.img.ImgReq; import com.mortals.xhx.module.hik.face.model.req.img.ImgReq;
import com.mortals.xhx.module.hik.face.service.IHikFaceService; import com.mortals.xhx.module.hik.face.service.IHikFaceService;
...@@ -15,22 +13,14 @@ import com.mortals.xhx.module.person.model.PersonEntity; ...@@ -15,22 +13,14 @@ import com.mortals.xhx.module.person.model.PersonEntity;
import com.mortals.xhx.module.person.model.PersonQuery; import com.mortals.xhx.module.person.model.PersonQuery;
import com.mortals.xhx.module.person.service.PersonService; import com.mortals.xhx.module.person.service.PersonService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
......
...@@ -81,7 +81,7 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService { ...@@ -81,7 +81,7 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService {
if (rest.getCode() == YesNoEnum.YES.getValue()) { if (rest.getCode() == YesNoEnum.YES.getValue()) {
List<DataItem> userList = rest.getData().getData(); List<DataItem> userList = rest.getData().getData();
log.info("注册用户有照片数量:{}", userList.size()); log.info("注册用户有照片数量:{} \n {}", userList.size(),JSON.toJSONString(userList));
for (DataItem user : userList) { for (DataItem user : userList) {
//判断是否本地已存在 不存在 //判断是否本地已存在 不存在
if (ObjectUtils.isEmpty(user.getIdcardIDCardNo())) { if (ObjectUtils.isEmpty(user.getIdcardIDCardNo())) {
......
...@@ -4,6 +4,7 @@ import com.mortals.framework.common.Rest; ...@@ -4,6 +4,7 @@ import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.base.system.user.model.UserEntity; import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.module.care.dao.CareRecordsDao;
import com.mortals.xhx.module.care.model.CareRecordsEntity; import com.mortals.xhx.module.care.model.CareRecordsEntity;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -17,6 +18,8 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -17,6 +18,8 @@ import org.springframework.web.bind.annotation.RequestBody;
*/ */
public interface CareRecordsService extends ICRUDService<CareRecordsEntity, Long> { public interface CareRecordsService extends ICRUDService<CareRecordsEntity, Long> {
CareRecordsDao getDao();
Rest<String> notice(CareRecordsEntity careRecordsEntity, Context context); Rest<String> notice(CareRecordsEntity careRecordsEntity, Context context);
Rest<String> toCare(CareRecordsEntity careRecordsEntity, Context context); Rest<String> toCare(CareRecordsEntity careRecordsEntity, Context context);
......
...@@ -217,8 +217,6 @@ public class BlackPlanRecoginze extends EventTypeAbstract { ...@@ -217,8 +217,6 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
} }
private void savedataFlow(EventsItem event, EventData eventData, Snap snap, PersonEntity personCache) { private void savedataFlow(EventsItem event, EventData eventData, Snap snap, PersonEntity personCache) {
RealtimeDataflowEntity realtimeDataflowEntity = new RealtimeDataflowEntity(); RealtimeDataflowEntity realtimeDataflowEntity = new RealtimeDataflowEntity();
realtimeDataflowEntity.setDetectTime(event.getHappenTime()); realtimeDataflowEntity.setDetectTime(event.getHappenTime());
String resIndexCodes = eventData.getResInfo().stream().map(i -> i.getIndexCode()).collect(Collectors.joining(",")); String resIndexCodes = eventData.getResInfo().stream().map(i -> i.getIndexCode()).collect(Collectors.joining(","));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment