diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/face/rtsp/RtspFrameGrabber.java b/shapelight-admin/src/main/java/net/shapelight/modules/face/rtsp/RtspFrameGrabber.java index 6da75a9..8eaca43 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/face/rtsp/RtspFrameGrabber.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/face/rtsp/RtspFrameGrabber.java @@ -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"); diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/httpapi/controler/HttpApiController.java b/shapelight-admin/src/main/java/net/shapelight/modules/httpapi/controler/HttpApiController.java index 07d6487..3872bf0 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/httpapi/controler/HttpApiController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/httpapi/controler/HttpApiController.java @@ -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 tenPersonCertList = certService.list(new LambdaQueryWrapper() + .eq(TenPersonCert::getPerson,p.getPersonId())); + List tenPersonTrainList = trainService.list(new LambdaQueryWrapper() + .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 personnelTypeMap = new HashMap<>(); personnelTypeMap.put(Constant.PERSON_TYPE_OWNER,"2");//内部人员 personnelTypeMap.put(Constant.PERSON_TYPE_MEMBER,"1");//承包商 diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenPersonCertDao.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenPersonCertDao.java new file mode 100644 index 0000000..e186ee5 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenPersonCertDao.java @@ -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 { + + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenPersonTrainDao.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenPersonTrainDao.java new file mode 100644 index 0000000..3ca934b --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenPersonTrainDao.java @@ -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 { + + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/entity/TenRecordEntity.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/entity/TenRecordEntity.java index 163a4f2..cb005a7 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/entity/TenRecordEntity.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/entity/TenRecordEntity.java @@ -190,4 +190,7 @@ cameraParam 否 string 相机参数 private String labelName; + //-----------------长庆新增字段 + private String failureReason; + } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/vo/TenUserVo.java b/shapelight-admin/src/main/java/net/shapelight/modules/vo/TenUserVo.java index efa111d..e7c078c 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/vo/TenUserVo.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/vo/TenUserVo.java @@ -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 tenPersonCertList; + private List tenPersonTrainList; diff --git a/shapelight-admin/src/main/resources/mapper/ten/TenRecordDao.xml b/shapelight-admin/src/main/resources/mapper/ten/TenRecordDao.xml index acf9c44..bb7d240 100644 --- a/shapelight-admin/src/main/resources/mapper/ten/TenRecordDao.xml +++ b/shapelight-admin/src/main/resources/mapper/ten/TenRecordDao.xml @@ -38,6 +38,7 @@ + @@ -120,6 +121,9 @@ label_name, + + failure_reason, + @@ -199,6 +203,10 @@ #{labelName}, + + #{failureReason}, + + @@ -259,6 +267,9 @@ name = #{labelName,jdbcType=VARCHAR}, + + name = #{failureReason,jdbcType=VARCHAR}, + where record_id = #{recordId,jdbcType=BIGINT}