终端接口修改
This commit is contained in:
parent
ae8d25d96e
commit
cdd9c76d5c
|
@ -68,6 +68,7 @@ public class RtspFrameGrabber {
|
|||
/**
|
||||
* rtsp视频流url
|
||||
*/
|
||||
@Value("${global.Url.rtspUrl}")
|
||||
private String rtspUrl;
|
||||
/**
|
||||
* 帧抓取器
|
||||
|
@ -94,7 +95,7 @@ public class RtspFrameGrabber {
|
|||
private void createGrabber() {
|
||||
try {
|
||||
|
||||
grabber = FFmpegFrameGrabber.createDefault("rtsp://192.168.100.102:554/main");
|
||||
grabber = FFmpegFrameGrabber.createDefault(rtspUrl);
|
||||
grabber.setOption("rtsp_transport", "tcp");
|
||||
|
||||
// grabber.setOption("reconnect", "1");
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.arcsoft.face.FaceInfo;
|
|||
import com.arcsoft.face.enums.ExtractType;
|
||||
import com.arcsoft.face.toolkit.ImageFactory;
|
||||
import com.arcsoft.face.toolkit.ImageInfo;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.minio.MinioClient;
|
||||
import io.minio.PutObjectOptions;
|
||||
|
@ -114,6 +115,10 @@ public class HttpApiController {
|
|||
private RecordSaveSyncService recordSaveSyncService;
|
||||
@Autowired
|
||||
private CxFeignClient cxFeignClient;
|
||||
@Autowired
|
||||
private TenPersonCertService certService;
|
||||
@Autowired
|
||||
private TenPersonTrainService trainService;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -444,8 +449,16 @@ public class HttpApiController {
|
|||
}
|
||||
puser.setLabelId(p.getLabelId());
|
||||
puser.setLabelName(p.getLabelName());
|
||||
puser.setIsProtectDevice(p.getIsProtectDevice());
|
||||
puser.setIsEnterSulfurArea(p.getIsEnterSulfurArea());
|
||||
puser.setIsWatchSafeVideo(p.getIsWatchSafeVideo());
|
||||
List<TenPersonCert> tenPersonCertList = certService.list(new LambdaQueryWrapper<TenPersonCert>()
|
||||
.eq(TenPersonCert::getPerson,p.getPersonId()));
|
||||
List<TenPersonTrain> tenPersonTrainList = trainService.list(new LambdaQueryWrapper<TenPersonTrain>()
|
||||
.eq(TenPersonTrain::getPersonId,p.getPersonId()));
|
||||
|
||||
|
||||
puser.setTenPersonCertList(tenPersonCertList);
|
||||
puser.setTenPersonTrainList(tenPersonTrainList);
|
||||
TenPersonSyncEntity syncEntity = tenPersonSyncService.findByDeviceIdAndPersonId(deviceEntity.getDeviceId(),
|
||||
p.getPersonId(),deviceEntity.getTenantId());
|
||||
syncEntity.setState(Constant.PERSON_SYNC_OK);
|
||||
|
@ -798,7 +811,7 @@ public class HttpApiController {
|
|||
tenRecordService.saveForFace(record);
|
||||
|
||||
// 考勤记录,没有删除的人记录考勤
|
||||
TenPersonEntity memberEntity = tenPersonService.getById(personId,deviceEntity.getCellId());
|
||||
|
||||
/*if(memberEntity!=null){
|
||||
if(memberEntity.getDeleteFlag().intValue() == 0){
|
||||
tenCheckService.saveCheck(memberEntity,record);
|
||||
|
@ -818,6 +831,8 @@ public class HttpApiController {
|
|||
"state": "string", 是否成功 字典项: 1:成功;0:失败
|
||||
"failureReason": "string" 失败原因,当出入场失败的时候赋值
|
||||
}*/
|
||||
//同步出入记录到长庆
|
||||
TenPersonEntity memberEntity = tenPersonService.getById(personId,deviceEntity.getCellId());
|
||||
Map<Integer,String> personnelTypeMap = new HashMap<>();
|
||||
personnelTypeMap.put(Constant.PERSON_TYPE_OWNER,"2");//内部人员
|
||||
personnelTypeMap.put(Constant.PERSON_TYPE_MEMBER,"1");//承包商
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package net.shapelight.modules.ten.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.shapelight.modules.ten.entity.TenPersonCert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* @author zhangbo
|
||||
* @description 针对表【ten_person_cert】的数据库操作Mapper
|
||||
* @createDate 2024-10-16 19:43:27
|
||||
* @Entity net.shapelight.modules.ten.TenPersonCert
|
||||
*/
|
||||
@Mapper
|
||||
public interface TenPersonCertDao extends BaseMapper<TenPersonCert> {
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package net.shapelight.modules.ten.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.shapelight.modules.ten.entity.TenPersonTrain;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author zhangbo
|
||||
* @description 针对表【ten_person_train】的数据库操作Mapper
|
||||
* @createDate 2024-10-16 19:50:29
|
||||
* @Entity net.shapelight.modules.ten.ten.TenPersonTrain
|
||||
*/
|
||||
@Mapper
|
||||
public interface TenPersonTrainDao extends BaseMapper<TenPersonTrain> {
|
||||
|
||||
|
||||
}
|
|
@ -190,4 +190,7 @@ cameraParam 否 string 相机参数
|
|||
|
||||
private String labelName;
|
||||
|
||||
//-----------------长庆新增字段
|
||||
private String failureReason;
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@ package net.shapelight.modules.vo;
|
|||
|
||||
|
||||
import lombok.Data;
|
||||
import net.shapelight.modules.ten.entity.TenPersonCert;
|
||||
import net.shapelight.modules.ten.entity.TenPersonTrain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class TenUserVo {
|
||||
|
@ -48,6 +52,12 @@ public class TenUserVo {
|
|||
private String pvLeft;
|
||||
private String pvRight;
|
||||
private Integer featureType;
|
||||
//-----------------长庆新增字段
|
||||
private Integer isEnterSulfurArea;
|
||||
private Integer isProtectDevice;
|
||||
private Integer isWatchSafeVideo;
|
||||
private List<TenPersonCert> tenPersonCertList;
|
||||
private List<TenPersonTrain> tenPersonTrainList;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
<result property="idCard" column="id_card"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="labelName" column="name"/>
|
||||
<result property="failureReason" column="failure_reason"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
@ -120,6 +121,9 @@
|
|||
<if test="labelName != null">
|
||||
label_name,
|
||||
</if>
|
||||
<if test="failureReason != null">
|
||||
failure_reason,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">
|
||||
|
@ -199,6 +203,10 @@
|
|||
<if test="labelName != null">
|
||||
#{labelName},
|
||||
</if>
|
||||
<if test="failureReason != null">
|
||||
#{failureReason},
|
||||
</if>
|
||||
|
||||
|
||||
</trim>
|
||||
</insert>
|
||||
|
@ -259,6 +267,9 @@
|
|||
<if test="labelName != null">
|
||||
name = #{labelName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="failureReason != null">
|
||||
name = #{failureReason,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where record_id = #{recordId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
|
Loading…
Reference in New Issue