v10:增加考勤
This commit is contained in:
parent
75cc8af2cb
commit
e81d002324
|
@ -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<TenRecordEntity> 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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue