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); }