From e81d002324ae79c193bf3ca4eecfb279cfcb0535 Mon Sep 17 00:00:00 2001 From: gaoben Date: Wed, 14 Aug 2024 11:08:22 +0800 Subject: [PATCH] =?UTF-8?q?v10:=E5=A2=9E=E5=8A=A0=E8=80=83=E5=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../httpapi/service/RecordSaveSyncService.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/httpapi/service/RecordSaveSyncService.java b/shapelight-admin/src/main/java/net/shapelight/modules/httpapi/service/RecordSaveSyncService.java index da81d65..fddf798 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/httpapi/service/RecordSaveSyncService.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/httpapi/service/RecordSaveSyncService.java @@ -4,7 +4,10 @@ package net.shapelight.modules.httpapi.service; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; +import net.shapelight.modules.ten.entity.TenPersonEntity; import net.shapelight.modules.ten.entity.TenRecordEntity; +import net.shapelight.modules.ten.service.TenCheckService; +import net.shapelight.modules.ten.service.TenPersonService; import net.shapelight.modules.ten.service.TenRecordService; import org.apache.commons.io.FileUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -22,6 +25,10 @@ import java.util.concurrent.ConcurrentLinkedQueue; public class RecordSaveSyncService implements ApplicationRunner { @Autowired private TenRecordService tenRecordService; + @Autowired + private TenPersonService tenPersonService; + @Autowired + private TenCheckService tenCheckService; private final ConcurrentLinkedQueue queue = new ConcurrentLinkedQueue<>(); @@ -37,6 +44,14 @@ public class RecordSaveSyncService implements ApplicationRunner { if (record != null) { log.debug("异步保存识别记录................................"); tenRecordService.saveServer(record); + + // 考勤记录,没有删除的人记录考勤 + TenPersonEntity memberEntity = tenPersonService.getById(record.getPersonId(),record.getCellId()); + if(memberEntity!=null){ + if(memberEntity.getDeleteFlag().intValue() == 0){ + tenCheckService.saveCheck(memberEntity,record); + } + } } Thread.sleep(100); }