From 56fe5a2b45797c3ad8673764e5aeeefc3476fa3a Mon Sep 17 00:00:00 2001 From: ovo Date: Fri, 18 Oct 2024 09:48:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=95=BF=E5=BA=86=E9=A1=B9=E7=9B=AEday1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shapelight-admin/pom.xml | 6 + .../controller/member/CqMemberController.java | 184 +++++++++ .../iCq/controller/member/dto/VisitorDto.java | 23 ++ .../video/CqSafeVideoController.java | 189 ++++++++++ .../controller/video/dto/UpdateVideoDto.java | 10 + .../controller/video/dto/UploadVideoDto.java | 12 + .../modules/iCq/controller/video/vo/Unit.java | 14 + .../dataobject/member/TenPersonEntity.java | 357 ++++++++++++++++++ .../iCq/dal/dataobject/video/File.java | 16 + .../dataobject/video/TenSafeVideoEntity.java | 71 ++++ .../iCq/dal/mysql/member/CqMemberMapper.java | 19 + .../iCq/dal/mysql/video/CqFileMapper.java | 20 + .../dal/mysql/video/CqSafeVideoMapper.java | 40 ++ .../iCq/service/video/CqSafeVideoService.java | 4 + ...feVideoDao.xml.xml => TenSafeVideoDao.xml} | 2 +- .../resources/mapper/iCq/CqFileMapper.xml | 12 + .../resources/mapper/iCq/CqMemberMapper.xml | 16 + .../mapper/iCq/CqSafeVideoMapper.xml | 55 +++ 18 files changed, 1049 insertions(+), 1 deletion(-) create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/CqMemberController.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/dto/VisitorDto.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/CqSafeVideoController.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UpdateVideoDto.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UploadVideoDto.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/vo/Unit.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/member/TenPersonEntity.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/File.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/TenSafeVideoEntity.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/member/CqMemberMapper.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/video/CqFileMapper.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/video/CqSafeVideoMapper.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/service/video/CqSafeVideoService.java rename shapelight-admin/src/main/resources/mapper/changqing/{TenSafeVideoDao.xml.xml => TenSafeVideoDao.xml} (91%) create mode 100644 shapelight-admin/src/main/resources/mapper/iCq/CqFileMapper.xml create mode 100644 shapelight-admin/src/main/resources/mapper/iCq/CqMemberMapper.xml create mode 100644 shapelight-admin/src/main/resources/mapper/iCq/CqSafeVideoMapper.xml diff --git a/shapelight-admin/pom.xml b/shapelight-admin/pom.xml index 56bef91..a4ce16c 100644 --- a/shapelight-admin/pom.xml +++ b/shapelight-admin/pom.xml @@ -289,6 +289,12 @@ + + com.pig4cloud.plugin + oss-spring-boot-starter + 1.0.5 + + diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/CqMemberController.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/CqMemberController.java new file mode 100644 index 0000000..6c66960 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/CqMemberController.java @@ -0,0 +1,184 @@ +package net.shapelight.modules.iCq.controller.member; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.minio.MinioClient; +import io.minio.PutObjectOptions; +import io.swagger.annotations.Api; +import lombok.RequiredArgsConstructor; +import net.shapelight.common.config.MinioConfig; +import net.shapelight.common.utils.R; +import net.shapelight.common.utils.SnowflakeIdWorker; +import net.shapelight.common.utils.UUIDUtil; +import net.shapelight.modules.iCq.controller.member.dto.VisitorDto; +import net.shapelight.modules.iCq.controller.member.vo.MemberListVo; +import net.shapelight.modules.iCq.dal.dataobject.member.TenPersonEntity; +import net.shapelight.modules.iCq.dal.mysql.member.CqMemberMapper; +import net.shapelight.modules.iCq.dal.mysql.video.CqSafeVideoMapper; +import net.shapelight.modules.ten.service.TenPersonService; +import org.apache.commons.io.FilenameUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +/** + * 宣传片表 + */ +@RestController +@RequestMapping("cq/member") +@Api(value = "人员", tags = {"人员"}) +@RequiredArgsConstructor +public class CqMemberController { + + private final TenPersonService tenPersonService; + + private final CqSafeVideoMapper cqSafeVideoMapper; + + private final CqMemberMapper cqMemberMapper; + + + private final MinioConfig minioConfig; + + private final MinioClient minioClient; + + + + + @GetMapping("/list") + public R list(@RequestParam(defaultValue = "1") int page, + @RequestParam(defaultValue = "10") int size) { + // 创建分页对象 + Page pageRequest = new Page<>(page, size); + + // 使用 MyBatis-Plus 提供的分页查询 + IPage pageResult = cqMemberMapper.selectPage(pageRequest, null); + + List list = pageResult.getRecords(); + + List listVo = new ArrayList<>(); + + for (TenPersonEntity tenSafeVideoEntity : list) { + MemberListVo memberListVo = new MemberListVo(); + memberListVo.setId(tenSafeVideoEntity.getPersonId()); + memberListVo.setUnitName(cqMemberMapper.lookUpTheNameBasedOnTheDepartmentId + (tenSafeVideoEntity.getDeptId())); + memberListVo.setName(tenSafeVideoEntity.getName()); + memberListVo.setSex(tenSafeVideoEntity.getGender() == 0 ? "女" : "男"); + memberListVo.setPhone(tenSafeVideoEntity.getMobile()); + memberListVo.setIdCard(tenSafeVideoEntity.getIdCard()); + /* memberListVo.setIsEnterSulfurArea(tenSafeVideoEntity.getIsEnterSulfurArea());*/ + if (tenSafeVideoEntity.getIsEnterSulfurArea() == null) { + memberListVo.setIsEnterSulfurArea("是"); + } else { + memberListVo.setIsEnterSulfurArea("否"); + } + //memberListVo.setIsProtectDevice(tenSafeVideoEntity.getIsProtectDevice()); + if (tenSafeVideoEntity.getIsProtectDevice() == null) { + memberListVo.setIsProtectDevice("是"); + } else { + memberListVo.setIsProtectDevice("否"); + } + //memberListVo.setIsWatchSafeVideo(tenSafeVideoEntity.getIsWatchSafeVideo()); + if (tenSafeVideoEntity.getIsWatchSafeVideo() == null) { + memberListVo.setIsWatchSafeVideo("是"); + } else { + memberListVo.setIsWatchSafeVideo("否"); + } + + memberListVo.setEmployeeType(cqMemberMapper. + takeTheNameAccordingToType(tenSafeVideoEntity.getPersonType())); + + + memberListVo.setIsExtract(tenSafeVideoEntity.getFaceFailure()); + + listVo.add(memberListVo); + } + + return R.ok().put("data", listVo).put("total", pageResult.getTotal()); + } + + + @DeleteMapping("/delete") + public R delete(@RequestParam List id) { + for (Long l : id) { + if (cqMemberMapper.deleteById(l) != 1) { + return R.error(); + } + } + return R.ok(); + } + + @PostMapping("/gbUpload") + public R gbUpload(MultipartFile file) { + if (file.isEmpty() || file.getSize() == 0) { + System.out.println("文件不能为空"); + } + String fileName = null; + try { + String extension = FilenameUtils.getExtension(file.getOriginalFilename()); //后缀名 + fileName = "temp/" + "t_" + UUIDUtil.uuid() + "." + extension; + InputStream inputStream = file.getInputStream(); + PutObjectOptions putObjectOptions = new PutObjectOptions(inputStream.available(), -1); + putObjectOptions.setContentType(file.getContentType()); + minioClient.putObject( + minioConfig.getBucketName(), fileName, inputStream, putObjectOptions); + inputStream.close(); + } catch (Exception e) { + System.out.println(e.getMessage()); + } + System.out.println("方法结束"); + return R.ok().put("data", fileName); + } + + + + //修改 + @PostMapping("/newVisitor") + public R newVisitor(@RequestBody VisitorDto visitorDto) { + + TenPersonEntity tenPersonEntity = new TenPersonEntity(); + + long id = new SnowflakeIdWorker().nextId(); + tenPersonEntity.setPersonId(id); + tenPersonEntity.setUuid(UUIDUtil.uuid()); + tenPersonEntity.setCellId(1255898969448382468L); + tenPersonEntity.setAppFlag(0); + + tenPersonEntity.setDeptId(cqSafeVideoMapper.runTheNameById(visitorDto.getUnitName())); + + tenPersonEntity.setLabelId(cqMemberMapper.speciallyForVisitors()); + tenPersonEntity.setName(visitorDto.getName()); + tenPersonEntity.setGender(visitorDto.getSex()); + tenPersonEntity.setIc(visitorDto.getIdCard()); + tenPersonEntity.setMobile(visitorDto.getPhone()); + tenPersonEntity.setOrgImageTemp(visitorDto.getFacePhotoUrl()); + tenPersonEntity.setIsProtectDevice(visitorDto.getIsProtectDevice()); + tenPersonEntity.setIsEnterSulfurArea(visitorDto.getIsEnterSulfurArea()); + tenPersonEntity.setIsWatchSafeVideo(visitorDto.getIsWatchSafeVideo()); + + net.shapelight.modules.ten.entity.TenPersonEntity tenPersonEntity1 = new net.shapelight.modules.ten.entity.TenPersonEntity(); + + + //把前面的复制到后面 + BeanUtils.copyProperties(tenPersonEntity, tenPersonEntity1); + + + /* int i = tenPersonService.saveTenPerson(tenPersonEntity1); + System.out.println(i);*/ + + if (tenPersonService.saveTenPerson(tenPersonEntity1) == 0) { + return R.ok(); + } else { + return R.error(); + } + + } + + + +} \ No newline at end of file diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/dto/VisitorDto.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/dto/VisitorDto.java new file mode 100644 index 0000000..edd66cc --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/dto/VisitorDto.java @@ -0,0 +1,23 @@ +package net.shapelight.modules.iCq.controller.member.dto; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import net.shapelight.common.base.BaseEntity; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class VisitorDto extends BaseEntity { + private String unitName; + private String name; + private int sex; + private String idCard; + private String phone; + private String facePhotoUrl; + private int isProtectDevice; //防护设备 + private int isEnterSulfurArea; //含硫 + private int isWatchSafeVideo; //安全视频是否观看 + + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/CqSafeVideoController.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/CqSafeVideoController.java new file mode 100644 index 0000000..e9c8e9f --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/CqSafeVideoController.java @@ -0,0 +1,189 @@ +package net.shapelight.modules.iCq.controller.video; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.pig4cloud.plugin.oss.service.OssTemplate; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import net.shapelight.common.config.MinioConfig; +import net.shapelight.common.utils.R; +import net.shapelight.modules.iCq.controller.video.dto.UpdateVideoDto; +import net.shapelight.modules.iCq.controller.video.dto.UploadVideoDto; +import net.shapelight.modules.iCq.controller.video.vo.Unit; +import net.shapelight.modules.iCq.dal.dataobject.video.File; +import net.shapelight.modules.iCq.dal.dataobject.video.TenSafeVideoEntity; +import net.shapelight.modules.iCq.dal.mysql.video.CqFileMapper; +import net.shapelight.modules.iCq.dal.mysql.video.CqSafeVideoMapper; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.util.Date; +import java.util.List; +import java.util.UUID; + +/** + * 宣传片表 + */ +@RestController +@RequestMapping("cq/video") +@Api(value = "宣传片", tags = {"宣传片"}) +@RequiredArgsConstructor +public class CqSafeVideoController { + + private static String BUCKET_NAME = "cqyt"; + + private final OssTemplate template; + + private final MinioConfig minioConfig; + + private final CqSafeVideoMapper cqSafeVideoMapper; + + private final CqFileMapper cqFileMapper; + + @GetMapping("/getTopUnits") + @ApiOperation(value = "获取单位列表") + public R getTopUnits() { + List queryUnit = cqSafeVideoMapper.queryUnit(); + return R.ok().put("data", queryUnit); + } + + @GetMapping("/getChildUnits") + public R getChildUnits(String name) { + //查询子级 + List queryUnit = cqSafeVideoMapper.queryChildUnit(name); + return R.ok().put("data", queryUnit); + } + + + + @PostMapping("/upload") + + public R upload(@RequestParam("file")MultipartFile file){ + + /* String contentType = file.getContentType(); // 获取文件的 MIME 类型 + + UUID uuid = UUID.randomUUID(); + String fileName = uuid.toString().replace("-", "") + + file.getOriginalFilename(); + return;*/ + File file1 = new File(); + file1.setFileName(file.getOriginalFilename()); + UUID uuid = UUID.randomUUID(); + String replace = uuid.toString().replace("-", ""); + file1.setFileId(replace); + + + //TODO:生成URL + + + file1.setFileUrl("测试的URL"); + + cqFileMapper.insert(file1); + return R.ok().put("data",file1); + + } + + + + + @PostMapping("/insert") + public R insert(@ModelAttribute UploadVideoDto uploadVideoDto) throws IOException { + TenSafeVideoEntity tenSafeVideoEntity = new TenSafeVideoEntity(); + + tenSafeVideoEntity.setName(cqFileMapper.selectByFileId(uploadVideoDto.getFileId()).getFileName()); + tenSafeVideoEntity.setCellId(cqSafeVideoMapper.runTheNameById(uploadVideoDto.getUnitName())); + tenSafeVideoEntity.setCellName(uploadVideoDto.getUnitName()); + tenSafeVideoEntity.setUploadId(uploadVideoDto.getUploaderId()); + tenSafeVideoEntity.setUploadName(uploadVideoDto.getUploader()); + tenSafeVideoEntity.setUploadTime(new Date()); + tenSafeVideoEntity.setUrl(cqFileMapper.selectByFileId(uploadVideoDto.getFileId()).getFileUrl()); + tenSafeVideoEntity.setPlayCount(0); + + if (cqSafeVideoMapper.insert(tenSafeVideoEntity) == 1) { + return R.ok(); + } else { + return R.error(); + } + } + + + @GetMapping("/list") + public R list(@RequestParam(defaultValue = "1") int page, + @RequestParam(defaultValue = "10") int size) { + // 创建分页对象 + Page pageRequest = new Page<>(page, size); + + // 使用 MyBatis-Plus 提供的分页查询 + IPage pageResult = cqSafeVideoMapper.selectPage(pageRequest, null); + + List list = pageResult.getRecords(); + + /* for (TenSafeVideoEntity tenSafeVideoEntity : list) { + tenSafeVideoEntity.setCellName(cqSafeVideoMapper.findsTheParentId(tenSafeVideoEntity.getCellId()) + "/" + + tenSafeVideoEntity.getCellName()); + }*/ + + return R.ok().put("data", list).put("total", pageResult.getTotal()); + } + + @DeleteMapping("/delete/{id}") + public R delete(@PathVariable Long id) { + if (cqSafeVideoMapper.deleteById(id) == 1) { + return R.ok(); + } else { + return R.error(); + } + } + + //修改 + @PostMapping("/update") + public R update(@ModelAttribute UpdateVideoDto updateVideoDto) { + + TenSafeVideoEntity tenSafeVideoEntity = new TenSafeVideoEntity(); + + tenSafeVideoEntity.setName(cqFileMapper.selectByFileId(updateVideoDto.getFileId()).getFileName()); + + tenSafeVideoEntity.setId(updateVideoDto.getVideoId()); + tenSafeVideoEntity.setCellId(cqSafeVideoMapper.runTheNameById(updateVideoDto.getUnitName())); + tenSafeVideoEntity.setCellName(updateVideoDto.getUnitName()); + tenSafeVideoEntity.setUploadTime(new Date()); + + tenSafeVideoEntity.setUrl(cqFileMapper.selectByFileId(updateVideoDto.getFileId()).getFileUrl()); + + if (cqSafeVideoMapper.updateById(tenSafeVideoEntity) == 1) { + return R.ok(); + } else { + return R.error(); + } + } + + + @GetMapping("/show") + public R show(@RequestParam(defaultValue = "1") int page, + @RequestParam(defaultValue = "10") int size) { + // 创建分页对象 + Page pageRequest = new Page<>(page, size); + + // 使用 MyBatis-Plus 提供的分页查询 + IPage pageResult = cqFileMapper.selectPage(pageRequest, null); + + List list = pageResult.getRecords(); + return R.ok().put("data", list); + } + + + @GetMapping("/inquireVideo") + public R inquireVideo(String unitName, String videoName, String uploader){ + + List list = cqSafeVideoMapper.relatedQuery(unitName, videoName, uploader); + + + return R.ok(); + } + + + + +} \ No newline at end of file diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UpdateVideoDto.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UpdateVideoDto.java new file mode 100644 index 0000000..a12cb69 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UpdateVideoDto.java @@ -0,0 +1,10 @@ +package net.shapelight.modules.iCq.controller.video.dto; + +import lombok.Data; + +@Data +public class UpdateVideoDto { + private String fileId; + private Long videoId; + private String unitName; +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UploadVideoDto.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UploadVideoDto.java new file mode 100644 index 0000000..0eeb599 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UploadVideoDto.java @@ -0,0 +1,12 @@ +package net.shapelight.modules.iCq.controller.video.dto; + +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; + +@Data +public class UploadVideoDto { + private String fileId; + private String uploader; + private Long uploaderId; + private String unitName; +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/vo/Unit.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/vo/Unit.java new file mode 100644 index 0000000..695bac1 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/vo/Unit.java @@ -0,0 +1,14 @@ +package net.shapelight.modules.iCq.controller.video.vo; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +//单位返回Vo +@Data +@AllArgsConstructor +@NoArgsConstructor +public class Unit { + private Long deptId; + private String name; +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/member/TenPersonEntity.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/member/TenPersonEntity.java new file mode 100644 index 0000000..f9e5a0b --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/member/TenPersonEntity.java @@ -0,0 +1,357 @@ +package net.shapelight.modules.iCq.dal.dataobject.member; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.shapelight.common.base.BaseEntity; +import net.shapelight.modules.ten.entity.TenDoorCardEntity; +import net.shapelight.modules.ten.entity.TenPersonExtractEntity; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * 人员表 + */ +@Data +@TableName("ten_person") +public class TenPersonEntity extends BaseEntity implements Serializable { + private static final long serialVersionUID = 1L; + + + /** + * ID + */ + @TableId + @ApiModelProperty("人员ID") + private Integer memberId; + + /** + * ID + */ + @TableId(type = IdType.INPUT) + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty("人员ID") + private Long personId; + /** + * 用户名 + */ + @ApiModelProperty("账号用户名") + private String username; + /** + * 密码 + */ + @ApiModelProperty("密码") + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) + private String password; + /** + * 盐 + */ + @ApiModelProperty("盐") + private String salt; + /** + * 姓名 + */ + @ApiModelProperty("姓名") + private String name; + /** + * 性别0女1男 + */ + @ApiModelProperty("性别0女1男") + private Integer gender; + /** + * 民族1汉2蒙古 + */ + @ApiModelProperty("民族") + private Integer nation; + /** + * 手机号 + */ + @ApiModelProperty("手机号") + private String mobile; + /** + * 小区ID + */ + @ApiModelProperty("小区ID") + @JsonSerialize(using = ToStringSerializer.class) + private Long cellId; + /** + * 楼栋ID + */ + @ApiModelProperty("楼栋ID") + @JsonSerialize(using = ToStringSerializer.class) + private Long buildId; + /** + * 房间ID + */ + @ApiModelProperty("房间ID") + @JsonSerialize(using = ToStringSerializer.class) + private Long roomId; + /** + * 类型:业主,家属,物业,访客,白名单,黑名单 + */ + @ApiModelProperty("类型:业主,家属,物业,访客,白名单,黑名单") + private Integer personType; + /** + * 原始照片 + */ + @ApiModelProperty("原始照片") + private String orgImage; + /** + * 人脸照片 + */ + @ApiModelProperty("人脸照片") + private String faceImage; + /** + * 标签 + */ + @ApiModelProperty("标签Id") + private Integer labelId; + /** + * 备注 + */ + @ApiModelProperty("备注") + private String remark; + /** + * 是否app登录1是0否 + */ + @ApiModelProperty("app登录1是0否") + private Integer appFlag; + /** + * 身份证号码 + */ + @ApiModelProperty("身份证号码") + private String idCard; + /** + * 1身份证 + */ + @ApiModelProperty("身份证类型") + private Integer idType; + /** + * 身份证正面照片 + */ + @ApiModelProperty("身份证正面照片") + private String idFrontImage; + /** + * 身份证反面照片 + */ + @ApiModelProperty("身份证反面照片") + private String idBackImage; + /** + * 生效开始 + */ + @ApiModelProperty("生效开始") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date liveStart; + /** + * 生效结束 + */ + @ApiModelProperty("生效结束") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date liveEnd; + + /** + * 邮箱地址 + */ + @ApiModelProperty("邮箱地址") + private String email; + /** + * 工作单位职业 + */ + @ApiModelProperty("工作单位职业") + private String work; + /** + * 0正常1禁用2待审核3审核不通过 + */ + @ApiModelProperty("0正常1禁用2待审核3审核不通过") + private Integer status; + /** + * 审核内容 + */ + @ApiModelProperty("审核内容") + private String note; + /** + * 最后登录时间 + */ + @ApiModelProperty("最后登录时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date loginTime; + /** + * 第三方登录id + */ + @ApiModelProperty("第三方登录id") + private String openId; + /** + * 第三方id + */ + @ApiModelProperty("ryid") + private String ryid; + /** + * uuid + */ + @ApiModelProperty("ryid") + private String uuid; + /** + * 0未删除1删除 + */ + @ApiModelProperty("0未删除1删除") + private Integer deleteFlag; + /** + * 1.app 2.后台添加 3.导入 + */ + @ApiModelProperty("1.app 2.后台添加 3.导入") + private Integer registerType; + /** + * 运营商ID + */ + @ApiModelProperty("运营商ID") + @JsonSerialize(using = ToStringSerializer.class) + private Long tenantId; + + /** + * 人脸提起失败标志0正常1失败 + */ + @ApiModelProperty("人脸提起失败标志0正常1失败") + private Integer faceFailure; + + + @TableField(exist = false) + @ApiModelProperty("小区名称") + private String cellName; + + @TableField(exist = false) + @ApiModelProperty("楼栋名称") + private String buildName; + + @TableField(exist = false) + @ApiModelProperty("楼栋单元") + private String buildUnit; + + @TableField(exist = false) + @ApiModelProperty("户室名称") + private String roomName; + + @TableField(exist = false) + @ApiModelProperty("楼层") + private Integer layer; + + @TableField(exist = false) + @ApiModelProperty("区域名称") + private String areaName; + + @TableField(exist = false) + @ApiModelProperty("标签名称") + private String labelName; + + @TableField(exist = false) + @ApiModelProperty("AppUserId") + private Long appUserId; + + + /** + * 临时原始照片 + */ + @ApiModelProperty("临时原始照片") + @TableField(exist = false) + private String orgImageTemp; + + + + + + + @ApiModelProperty("门禁卡号") + @TableField(exist = false) + private TenDoorCardEntity doorCardEntity; + + @ApiModelProperty("最后记录时间") + @TableField(exist = false) + private String lastRecordTime; + + @ApiModelProperty("最后登录时间") + @TableField(exist = false) + private String lastLoginTime; + + @ApiModelProperty("所属运营商") + @TableField(exist = false) + private String tenantName; + + @ApiModelProperty("门牌号") + @TableField(exist = false) + private String doorNumber; + + + @ApiModelProperty("提取失败log个数") + @TableField(exist = false) + private Integer extractCount; + + @ApiModelProperty("提取失败log个数") + @TableField(exist = false) + private List extractList; + + @ApiModelProperty("") + private Integer xaSync; + + @ApiModelProperty("") + private Integer xaSyncCard; + + @ApiModelProperty("") + private Integer xaSyncImage; + + +// "rgb":"url" +// "depth":"url" +// "faceModel": "", +// "souceFile": "url", +// "cameraParam": "65464313212", + + private String depth; + private String faceModel; + private String sourceFile; + private String cameraParam; + + //-----------------v5http----- + private String thdFeature; + + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty("部门ID") + private Long deptId; + + @ApiModelProperty("部门名称") + @TableField(exist = false) + private String deptName; + + @ApiModelProperty("部门长名称") + @TableField(exist = false) + private String deptAllName; + + private String orgId; + + + //--------v10掌静脉--------------- + private String pvLeft; + private String pvRight; + private Integer featureType; + + //-----------------后台识别,保存特征 + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) + private String feature; + private String ic; + private String householder; + private String relation; + + //-----------------长庆新增字段 + private Integer isEnterSulfurArea; //含硫 + private Integer isProtectDevice; //防护设备 + private Integer isWatchSafeVideo; //安全视频是否观看 + private String belongContractorName; //所属承包商 + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/File.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/File.java new file mode 100644 index 0000000..971890a --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/File.java @@ -0,0 +1,16 @@ +package net.shapelight.modules.iCq.dal.dataobject.video; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +@Data +@TableName("ten_file") +public class File implements Serializable { + private static final long serialVersionUID = 1L; + private String fileId; + private String fileName; + private String fileUrl; +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/TenSafeVideoEntity.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/TenSafeVideoEntity.java new file mode 100644 index 0000000..9758cbb --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/TenSafeVideoEntity.java @@ -0,0 +1,71 @@ +package net.shapelight.modules.iCq.dal.dataobject.video; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 宣传片表 + */ +@Data +@TableName("ten_safe_video") +public class TenSafeVideoEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId + private Long id; + + /** + * 视频名称 + */ + private String name; + + /** + * 单位ID + */ + private Long cellId; + + /** + * 单位名称 + */ + private String cellName; + + /** + * 上传人ID + */ + private Long uploadId; + + /** + * 上传人姓名 + */ + private String uploadName; + + /** + * 上传时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date uploadTime; + + /** + * 视频地址 + */ + private String url; + + /** + * 上次播放时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date playTime; + + /** + * 播放次数 + */ + private Integer playCount; +} \ No newline at end of file diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/member/CqMemberMapper.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/member/CqMemberMapper.java new file mode 100644 index 0000000..f296e36 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/member/CqMemberMapper.java @@ -0,0 +1,19 @@ +package net.shapelight.modules.iCq.dal.mysql.member; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import net.shapelight.modules.iCq.dal.dataobject.member.TenPersonEntity; +import net.shapelight.modules.iCq.dal.dataobject.video.TenSafeVideoEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface CqMemberMapper extends BaseMapper { + + + String lookUpTheNameBasedOnTheDepartmentId(Long deptId); + + String takeTheNameAccordingToType(Integer personType); + + Integer speciallyForVisitors(); +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/video/CqFileMapper.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/video/CqFileMapper.java new file mode 100644 index 0000000..bcd8bb5 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/video/CqFileMapper.java @@ -0,0 +1,20 @@ +package net.shapelight.modules.iCq.dal.mysql.video; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import net.shapelight.modules.iCq.dal.dataobject.video.File; +import net.shapelight.modules.iCq.dal.dataobject.video.TenSafeVideoEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface CqFileMapper extends BaseMapper { + + /** + * 根据文件id获取文件信息 + * @param fileId + * @return + */ + File selectByFileId(String fileId); + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/video/CqSafeVideoMapper.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/video/CqSafeVideoMapper.java new file mode 100644 index 0000000..ea3613b --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/video/CqSafeVideoMapper.java @@ -0,0 +1,40 @@ +package net.shapelight.modules.iCq.dal.mysql.video; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import net.shapelight.modules.iCq.controller.video.vo.Unit; +import net.shapelight.modules.iCq.dal.dataobject.video.TenSafeVideoEntity; +import org.apache.ibatis.annotations.MapKey; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +@Mapper +public interface CqSafeVideoMapper extends BaseMapper { + + /** + * 查询 单位 信息(名称 和 id) + * @return + */ + List queryUnit(); + + /** + * 根据单位id查询单位名称 + * @param unitName 单位名称 + * @return + */ + Long runTheNameById(String unitName); + + + //目前没用 明天测试 待删除 + String findsTheParentId(Long id); + + //目前没用 明天测试 待删除 + List queryHighestLevelUnit(); + + //目前没用 明天测试 待删除 + List queryChildUnit(String name); + + List relatedQuery(String unitName, String videoName, String uploader); +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/service/video/CqSafeVideoService.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/service/video/CqSafeVideoService.java new file mode 100644 index 0000000..f900c1e --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/service/video/CqSafeVideoService.java @@ -0,0 +1,4 @@ +package net.shapelight.modules.iCq.service.video; + +public interface CqSafeVideoService { +} diff --git a/shapelight-admin/src/main/resources/mapper/changqing/TenSafeVideoDao.xml.xml b/shapelight-admin/src/main/resources/mapper/changqing/TenSafeVideoDao.xml similarity index 91% rename from shapelight-admin/src/main/resources/mapper/changqing/TenSafeVideoDao.xml.xml rename to shapelight-admin/src/main/resources/mapper/changqing/TenSafeVideoDao.xml index 80de992..96348e8 100644 --- a/shapelight-admin/src/main/resources/mapper/changqing/TenSafeVideoDao.xml.xml +++ b/shapelight-admin/src/main/resources/mapper/changqing/TenSafeVideoDao.xml @@ -1,7 +1,7 @@ - + diff --git a/shapelight-admin/src/main/resources/mapper/iCq/CqFileMapper.xml b/shapelight-admin/src/main/resources/mapper/iCq/CqFileMapper.xml new file mode 100644 index 0000000..9022ca4 --- /dev/null +++ b/shapelight-admin/src/main/resources/mapper/iCq/CqFileMapper.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/shapelight-admin/src/main/resources/mapper/iCq/CqMemberMapper.xml b/shapelight-admin/src/main/resources/mapper/iCq/CqMemberMapper.xml new file mode 100644 index 0000000..56e9295 --- /dev/null +++ b/shapelight-admin/src/main/resources/mapper/iCq/CqMemberMapper.xml @@ -0,0 +1,16 @@ + + + + + + + + + + \ No newline at end of file diff --git a/shapelight-admin/src/main/resources/mapper/iCq/CqSafeVideoMapper.xml b/shapelight-admin/src/main/resources/mapper/iCq/CqSafeVideoMapper.xml new file mode 100644 index 0000000..2aa14aa --- /dev/null +++ b/shapelight-admin/src/main/resources/mapper/iCq/CqSafeVideoMapper.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 3be03258a0e49ef14bd1af15468fa57745679f07 Mon Sep 17 00:00:00 2001 From: ovo Date: Fri, 18 Oct 2024 09:52:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=95=BF=E5=BA=86=E9=A1=B9=E7=9B=AEday1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/member/vo/MemberListVo.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/vo/MemberListVo.java diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/vo/MemberListVo.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/vo/MemberListVo.java new file mode 100644 index 0000000..c2d8e51 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/vo/MemberListVo.java @@ -0,0 +1,31 @@ +package net.shapelight.modules.iCq.controller.member.vo; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class MemberListVo { + // id 或者 person id 一样的 + private Long id; + //单位名称 + private String unitName; + //姓名 + private String name; + //性别 + private String sex; + //手机号 + private String phone; + //身份证号 + private String idCard; + private String isEnterSulfurArea; //含硫 + private String isProtectDevice; //防护设备 + private String isWatchSafeVideo; //安全视频是否观看 + //员工类型 + private String employeeType; + //是否提取成功 + private Integer isExtract; + +}