长庆项目10.30
This commit is contained in:
parent
2f2203d7ee
commit
139718fc34
|
@ -127,6 +127,7 @@ public class ShiroConfig {
|
||||||
filterMap.put("/swagger-ui.html", "anon");
|
filterMap.put("/swagger-ui.html", "anon");
|
||||||
filterMap.put("/swagger-resources/**", "anon");
|
filterMap.put("/swagger-resources/**", "anon");
|
||||||
filterMap.put("/captcha.jpg", "anon");
|
filterMap.put("/captcha.jpg", "anon");
|
||||||
|
filterMap.put("/cq/demo/**", "anon");
|
||||||
// filterMap.put("/aaa.txt", "anon");
|
// filterMap.put("/aaa.txt", "anon");
|
||||||
filterMap.put("/**", "oauth2");
|
filterMap.put("/**", "oauth2");
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,7 @@ package net.shapelight.modules.face.rtsp;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.arcsoft.face.FaceEngine;
|
|
||||||
import com.arcsoft.face.FaceFeature;
|
|
||||||
import com.arcsoft.face.FaceInfo;
|
import com.arcsoft.face.FaceInfo;
|
||||||
import com.arcsoft.face.FaceSimilar;
|
|
||||||
import com.arcsoft.face.enums.ExtractType;
|
import com.arcsoft.face.enums.ExtractType;
|
||||||
import com.arcsoft.face.toolkit.ImageFactory;
|
import com.arcsoft.face.toolkit.ImageFactory;
|
||||||
import com.arcsoft.face.toolkit.ImageInfo;
|
import com.arcsoft.face.toolkit.ImageInfo;
|
||||||
|
@ -14,19 +11,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import io.minio.MinioClient;
|
import io.minio.MinioClient;
|
||||||
import io.minio.PutObjectOptions;
|
import io.minio.PutObjectOptions;
|
||||||
import io.minio.errors.*;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.shapelight.common.config.GlobalValue;
|
import net.shapelight.common.config.GlobalValue;
|
||||||
import net.shapelight.common.config.MinioConfig;
|
import net.shapelight.common.config.MinioConfig;
|
||||||
import net.shapelight.common.utils.Constant;
|
import net.shapelight.common.utils.Constant;
|
||||||
import net.shapelight.common.utils.UUIDUtil;
|
import net.shapelight.common.utils.UUIDUtil;
|
||||||
import net.shapelight.modules.face.dto.FaceRecognitionResDTO;
|
|
||||||
import net.shapelight.modules.face.entity.UserCompareInfo;
|
import net.shapelight.modules.face.entity.UserCompareInfo;
|
||||||
import net.shapelight.modules.face.enums.ErrorCodeEnum;
|
|
||||||
import net.shapelight.modules.face.face.FacePreviewInfo;
|
|
||||||
import net.shapelight.modules.face.rpc.BusinessException;
|
|
||||||
import net.shapelight.modules.face.service.FaceEngineService;
|
import net.shapelight.modules.face.service.FaceEngineService;
|
||||||
import net.shapelight.modules.face.service.impl.FaceEngineServiceImpl;
|
|
||||||
import net.shapelight.modules.face.util.UserInfo;
|
import net.shapelight.modules.face.util.UserInfo;
|
||||||
import net.shapelight.modules.face.util.UserRamGroup;
|
import net.shapelight.modules.face.util.UserRamGroup;
|
||||||
import net.shapelight.modules.feignClient.CxFeignClient;
|
import net.shapelight.modules.feignClient.CxFeignClient;
|
||||||
|
@ -36,23 +27,27 @@ import net.shapelight.modules.ten.entity.TenCellEntity;
|
||||||
import net.shapelight.modules.ten.entity.TenPersonEntity;
|
import net.shapelight.modules.ten.entity.TenPersonEntity;
|
||||||
import net.shapelight.modules.ten.service.TenPersonService;
|
import net.shapelight.modules.ten.service.TenPersonService;
|
||||||
import net.shapelight.modules.ten.service.impl.TenPersonServiceImpl;
|
import net.shapelight.modules.ten.service.impl.TenPersonServiceImpl;
|
||||||
import org.apache.commons.pool2.impl.GenericObjectPool;
|
|
||||||
import org.bytedeco.javacpp.avutil;
|
import org.bytedeco.javacpp.avutil;
|
||||||
import org.bytedeco.javacv.*;
|
import org.bytedeco.javacv.FFmpegFrameGrabber;
|
||||||
|
import org.bytedeco.javacv.Frame;
|
||||||
|
import org.bytedeco.javacv.FrameGrabber;
|
||||||
|
import org.bytedeco.javacv.Java2DFrameConverter;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.*;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.security.InvalidKeyException;
|
import java.io.IOException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.io.InputStream;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import static org.bytedeco.javacpp.avutil.AV_LOG_ERROR;
|
import static org.bytedeco.javacpp.avutil.AV_LOG_ERROR;
|
||||||
|
@ -253,17 +248,6 @@ public class RtspFrameGrabber {
|
||||||
List<FaceInfo> faceInfoList = faceEngineService.detectFaces(imageInfo);
|
List<FaceInfo> faceInfoList = faceEngineService.detectFaces(imageInfo);
|
||||||
|
|
||||||
|
|
||||||
/* for (FaceInfo faceInfo : faceInfoList) {
|
|
||||||
System.out.println(faceInfo.getFace3DAngle());
|
|
||||||
//Yaw上下 Pitch左右
|
|
||||||
if (faceInfo.getFace3DAngle().getYaw() > 20 || faceInfo.getFace3DAngle().getYaw() < -20) {
|
|
||||||
System.out.println("没在好好看!!!");
|
|
||||||
// faceInfoList.remove(faceInfo);
|
|
||||||
}
|
|
||||||
if (faceInfo.getFace3DAngle().getPitch() > 20 || faceInfo.getFace3DAngle().getPitch() < -20) {
|
|
||||||
System.out.println("没在好好看!!!");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(faceInfoList)) {
|
if (CollectionUtil.isNotEmpty(faceInfoList)) {
|
||||||
|
@ -282,6 +266,11 @@ public class RtspFrameGrabber {
|
||||||
|
|
||||||
for (UserCompareInfo userCompareInfo : userCompareInfoList) {
|
for (UserCompareInfo userCompareInfo : userCompareInfoList) {
|
||||||
FaceVideoVo faceVideoVo = new FaceVideoVo();
|
FaceVideoVo faceVideoVo = new FaceVideoVo();
|
||||||
|
|
||||||
|
//System.out.println("faceInfo = " + faceInfo.getRect());
|
||||||
|
|
||||||
|
faceVideoVo.setRect(faceInfo.getRect());
|
||||||
|
|
||||||
if (faceInfo.getFace3DAngle().getYaw() > 20 || faceInfo.getFace3DAngle().getYaw() < -20) {
|
if (faceInfo.getFace3DAngle().getYaw() > 20 || faceInfo.getFace3DAngle().getYaw() < -20) {
|
||||||
faceVideoVo.setIsHeadOnView(0);
|
faceVideoVo.setIsHeadOnView(0);
|
||||||
}else if (faceInfo.getFace3DAngle().getPitch() > 20 || faceInfo.getFace3DAngle().getPitch() < -20) {
|
}else if (faceInfo.getFace3DAngle().getPitch() > 20 || faceInfo.getFace3DAngle().getPitch() < -20) {
|
||||||
|
@ -322,10 +311,9 @@ public class RtspFrameGrabber {
|
||||||
faceVideoVo.setImageUrl(frameFileName);
|
faceVideoVo.setImageUrl(frameFileName);
|
||||||
|
|
||||||
temp.add(faceVideoVo);
|
temp.add(faceVideoVo);
|
||||||
}
|
|
||||||
if (!userCompareInfoList.isEmpty()) {
|
|
||||||
|
|
||||||
for (UserCompareInfo userCompareInfo : userCompareInfoList) {
|
|
||||||
|
|
||||||
TenPersonEntity tenPerson = personService.getOne(new LambdaQueryWrapper<TenPersonEntity>()
|
TenPersonEntity tenPerson = personService.getOne(new LambdaQueryWrapper<TenPersonEntity>()
|
||||||
.eq(TenPersonEntity::getPersonId, userCompareInfo.getFaceId()));
|
.eq(TenPersonEntity::getPersonId, userCompareInfo.getFaceId()));
|
||||||
Map<Integer, String> personnelTypeMap = new HashMap<>();
|
Map<Integer, String> personnelTypeMap = new HashMap<>();
|
||||||
|
@ -338,7 +326,7 @@ public class RtspFrameGrabber {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("pmWatchVideoRecordId", "");
|
params.put("pmWatchVideoRecordId", "");
|
||||||
params.put("orgId", tenPerson.getOrgId());
|
params.put("orgId", tenPerson.getOrgId());
|
||||||
params.put("orgName", tenCellDao.selectOne(new QueryWrapper<TenCellEntity>().eq("cell_id", tenPerson.getCellId())));
|
params.put("orgName", tenCellDao.selectOne(new QueryWrapper<TenCellEntity>().eq("cell_id", tenPerson.getCellId())).getName());
|
||||||
params.put("personnelName", tenPerson.getName());
|
params.put("personnelName", tenPerson.getName());
|
||||||
params.put("personnelId", tenPerson.getOpenId());
|
params.put("personnelId", tenPerson.getOpenId());
|
||||||
params.put("personnelCardId", tenPerson.getIdCard());
|
params.put("personnelCardId", tenPerson.getIdCard());
|
||||||
|
@ -346,11 +334,16 @@ public class RtspFrameGrabber {
|
||||||
params.put("dictSex", tenPerson.getGender() == 0 ? "女" : "男");
|
params.put("dictSex", tenPerson.getGender() == 0 ? "女" : "男");
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||||
params.put("watchVideoTime", sdf.format(System.currentTimeMillis()));
|
params.put("watchVideoTime", sdf.format(System.currentTimeMillis()));
|
||||||
tenPerson.setIsWatchSafeVideo(1);
|
|
||||||
|
|
||||||
|
tenPerson.setIsWatchSafeVideo(faceVideoVo.getIsHeadOnView() == 0 ? 2 : 1);
|
||||||
|
|
||||||
|
|
||||||
tenPersonService.updateById(tenPerson);
|
tenPersonService.updateById(tenPerson);
|
||||||
|
|
||||||
System.out.println("params = " + params);
|
System.out.println("params = " + params);
|
||||||
|
|
||||||
|
if(faceVideoVo.getIsHeadOnView() == 1){
|
||||||
/* JSONObject jsonObject = feignClient.savePmWatchVideoRecord(params);
|
/* JSONObject jsonObject = feignClient.savePmWatchVideoRecord(params);
|
||||||
if (jsonObject.getBool("success") != null && jsonObject.getBool("success")) {
|
if (jsonObject.getBool("success") != null && jsonObject.getBool("success")) {
|
||||||
personService.update(new LambdaUpdateWrapper<TenPersonEntity>()
|
personService.update(new LambdaUpdateWrapper<TenPersonEntity>()
|
||||||
|
@ -358,9 +351,8 @@ public class RtspFrameGrabber {
|
||||||
.eq(TenPersonEntity::getPersonId, userCompareInfo.getFaceId()));
|
.eq(TenPersonEntity::getPersonId, userCompareInfo.getFaceId()));
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
log.error("图片不合格,未检测到人脸");
|
log.error("图片不合格,未检测到人脸");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
package net.shapelight.modules.iCq.controller;
|
package net.shapelight.modules.iCq.controller;
|
||||||
|
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.arcsoft.face.ActiveDeviceInfo;
|
||||||
|
import com.arcsoft.face.FaceEngine;
|
||||||
|
import com.arcsoft.face.enums.ErrorInfo;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import io.minio.MinioClient;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import net.shapelight.common.config.GlobalValue;
|
||||||
import net.shapelight.common.utils.R;
|
import net.shapelight.common.utils.R;
|
||||||
import net.shapelight.modules.iCq.dal.mysql.enter.CqEnterConfigCellMapper;
|
import net.shapelight.modules.iCq.dal.mysql.enter.CqEnterConfigCellMapper;
|
||||||
import net.shapelight.modules.iCq.dal.mysql.enter.CqEnterConfigMapper;
|
import net.shapelight.modules.iCq.dal.mysql.enter.CqEnterConfigMapper;
|
||||||
|
@ -16,6 +21,9 @@ import net.shapelight.modules.ten.entity.TenCellEntity;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import net.shapelight.modules.face.factory.FaceEngineFactory;
|
||||||
|
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("cq/demo")
|
@RequestMapping("cq/demo")
|
||||||
|
@ -32,8 +40,11 @@ public class DemoController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private TenCellDao tenCellDao;
|
private TenCellDao tenCellDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private GlobalValue globalValue;
|
||||||
|
|
||||||
@GetMapping("/save1")
|
@GetMapping("/save1")
|
||||||
public void saveSupplier(){
|
public void saveSupplier(String type){
|
||||||
/* System.out.println("测试开始");
|
/* System.out.println("测试开始");
|
||||||
|
|
||||||
TenCellEntity tenCellEntity = tenCellDao.selectOne(new QueryWrapper<TenCellEntity>().eq("cell_id", "1255898969448382468"));
|
TenCellEntity tenCellEntity = tenCellDao.selectOne(new QueryWrapper<TenCellEntity>().eq("cell_id", "1255898969448382468"));
|
||||||
|
@ -75,9 +86,98 @@ public class DemoController {
|
||||||
|
|
||||||
task.save(jsonObject, tenCellEntity);*/
|
task.save(jsonObject, tenCellEntity);*/
|
||||||
|
|
||||||
task.getPmInternalPersonnelList2();
|
task.getPmInternalPersonnelList2(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/offline")
|
||||||
|
public R activeOffline() {
|
||||||
|
FaceEngine faceEngine;
|
||||||
|
String USER_HOME = System.getProperty("user.home");
|
||||||
|
System.out.println(USER_HOME);
|
||||||
|
String jvmName = System.getProperty("java.vm.name", "").toLowerCase();
|
||||||
|
String osName = System.getProperty("os.name", "").toLowerCase();
|
||||||
|
String osArch = System.getProperty("os.arch", "").toLowerCase();
|
||||||
|
String abiType = System.getProperty("sun.arch.abi", "").toLowerCase();
|
||||||
|
String libPath = System.getProperty("sun.boot.library.path", "").toLowerCase();
|
||||||
|
USER_HOME = System.getProperty("user.home");
|
||||||
|
if (jvmName.startsWith("dalvik") && osName.startsWith("linux")) {
|
||||||
|
osName = "android";
|
||||||
|
} else if (jvmName.startsWith("robovm") && osName.startsWith("darwin")) {
|
||||||
|
osName = "ios";
|
||||||
|
osArch = "arm";
|
||||||
|
} else if (osName.startsWith("mac os x") || osName.startsWith("darwin")) {
|
||||||
|
osName = "macosx";
|
||||||
|
} else {
|
||||||
|
int spaceIndex = osName.indexOf(' ');
|
||||||
|
if (spaceIndex > 0) {
|
||||||
|
osName = osName.substring(0, spaceIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (osArch.equals("i386") || osArch.equals("i486") || osArch.equals("i586") || osArch.equals("i686")) {
|
||||||
|
osArch = "x86";
|
||||||
|
} else if (osArch.equals("amd64") || osArch.equals("x86-64") || osArch.equals("x64")) {
|
||||||
|
osArch = "x86_64";
|
||||||
|
} else if (osArch.startsWith("aarch64") || osArch.startsWith("armv8") || osArch.startsWith("arm64")) {
|
||||||
|
osArch = "arm64";
|
||||||
|
} else if ((osArch.startsWith("arm")) && ((abiType.equals("gnueabihf")) || (libPath.contains("openjdk-armhf")))) {
|
||||||
|
osArch = "armhf";
|
||||||
|
} else if (osArch.startsWith("arm")) {
|
||||||
|
osArch = "arm";
|
||||||
|
}
|
||||||
|
String PLATFORM = osName + "-" + osArch;
|
||||||
|
|
||||||
|
System.out.println("PLATFORM = " + PLATFORM);
|
||||||
|
|
||||||
|
String CACHE_LIB_FOLDER = USER_HOME + "/.arcface/cache/" + "4.1" + "/" + PLATFORM + "/";
|
||||||
|
|
||||||
|
System.out.println("CACHE_LIB_FOLDER = " + CACHE_LIB_FOLDER);
|
||||||
|
|
||||||
|
if (Pattern.matches("windows.*", osName)) {
|
||||||
|
|
||||||
|
System.out.println("osName = " + osName);
|
||||||
|
faceEngine = new FaceEngine(CACHE_LIB_FOLDER);
|
||||||
|
}else{
|
||||||
|
// faceEngine = new FaceEngine("D:\\00_桌面\\ArcSoft_ArcFacePro_windows_x64_java_V4.1\\libs\\WIN64");
|
||||||
|
faceEngine = new FaceEngine(CACHE_LIB_FOLDER);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ActiveDeviceInfo activeDeviceInfo = new ActiveDeviceInfo();
|
||||||
|
int code = faceEngine.getActiveDeviceInfo(activeDeviceInfo);
|
||||||
|
|
||||||
|
// System.out.println("\n设备信息:" + activeDeviceInfo.toString() + "\n"); // 这个(com.arcsoft.face.model.ActiveDeviceInfo@4ad9b7b)并不是设备信息
|
||||||
|
System.out.println("设备信息:" + activeDeviceInfo.getDeviceInfo() + "\n"); // 这个的结果才是设备信息
|
||||||
|
|
||||||
|
|
||||||
|
return R.ok().put("data", activeDeviceInfo.getDeviceInfo());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/changeBucketPolicy")
|
||||||
|
public R changeBucketPolicy() {
|
||||||
|
String info;
|
||||||
|
try {
|
||||||
|
MinioClient minioClient = new MinioClient(
|
||||||
|
globalValue.getMinioEndpoint(), // MinIO 服务器的 URL
|
||||||
|
globalValue.getMinioAccessKey(), // 访问密钥
|
||||||
|
globalValue.getMinioSecretKey() // 密钥
|
||||||
|
);
|
||||||
|
|
||||||
|
String bucketName = "cell"; // 替换为你的桶名
|
||||||
|
String policy = "{ \"Version\": \"2012-10-17\", \"Statement\": [ { \"Effect\": \"Allow\", \"Principal\": { \"AWS\": [ \"*\" ] }, \"Action\": [ \"s3:GetObject\", \"s3:ListBucket\" ], \"Resource\": [ \"arn:aws:s3:::" + bucketName + "\", \"arn:aws:s3:::" + bucketName + "/*\" ] } ] }";
|
||||||
|
// 设置桶策略
|
||||||
|
minioClient.setBucketPolicy(bucketName, policy);
|
||||||
|
info = "Bucket policy set successfully";
|
||||||
|
} catch (Exception e) {
|
||||||
|
info = "Error occurred";
|
||||||
|
}
|
||||||
|
return R.ok().put("data", info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -4,13 +4,17 @@ import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.shapelight.common.utils.R;
|
import net.shapelight.common.utils.R;
|
||||||
|
import net.shapelight.modules.iCq.controller.enter.dto.ChangeTypeStatesDto;
|
||||||
import net.shapelight.modules.iCq.dal.mysql.enter.CqEnterConfigCellMapper;
|
import net.shapelight.modules.iCq.dal.mysql.enter.CqEnterConfigCellMapper;
|
||||||
import net.shapelight.modules.iCq.dal.mysql.enter.CqEnterConfigMapper;
|
import net.shapelight.modules.iCq.dal.mysql.enter.CqEnterConfigMapper;
|
||||||
import net.shapelight.modules.iCq.dal.mysql.enter.CqEnterConfigTypeMapper;
|
import net.shapelight.modules.iCq.dal.mysql.enter.CqEnterConfigTypeMapper;
|
||||||
import net.shapelight.modules.iCq.service.enter.CqEnterServiceImpl;
|
import net.shapelight.modules.iCq.service.enter.CqEnterServiceImpl;
|
||||||
import net.shapelight.modules.job.task.PersonSynchronousTask;
|
import net.shapelight.modules.job.task.PersonSynchronousTask;
|
||||||
|
import oracle.jdbc.proxy.annotation.Post;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("cq/enterConfig")
|
@RequestMapping("cq/enterConfig")
|
||||||
|
@ -45,10 +49,10 @@ public class CqEnterController {
|
||||||
return R.ok().put("data", cqEnterService.rulesByType(typeId, cellId));
|
return R.ok().put("data", cqEnterService.rulesByType(typeId, cellId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/changeState/{ruleId}")
|
@PostMapping("/changeState")
|
||||||
@ApiOperation(value = "改变配置状态")
|
@ApiOperation(value = "改变配置状态")
|
||||||
public R changeState(@PathVariable int ruleId){
|
public R changeState(@RequestBody ChangeTypeStatesDto data){
|
||||||
if (cqEnterService.changeState(ruleId)){
|
if (cqEnterService.changeState(data.getRuleId(), data.getCellId(), data.getTypeId())){
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}else {
|
}else {
|
||||||
return R.error();
|
return R.error();
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package net.shapelight.modules.iCq.controller.enter.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ChangeTypeStatesDto {
|
||||||
|
private Integer ruleId;
|
||||||
|
private String cellId;
|
||||||
|
private Integer typeId;
|
||||||
|
}
|
|
@ -86,7 +86,11 @@ public class CqSafeVideoController {
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@ApiOperation(value = "更新视频接口")
|
@ApiOperation(value = "更新视频接口")
|
||||||
public R update(@RequestBody UpdateVideoDto updateVideoDto) {
|
public R update(@RequestBody UpdateVideoDto updateVideoDto,
|
||||||
|
@RequestHeader(value = "X-HTTP-Method-Override", required = false) String methodOverride) {
|
||||||
|
|
||||||
|
System.out.println("methodOverride = " + methodOverride);
|
||||||
|
|
||||||
if (cqSafeVideoService.update(updateVideoDto) == 1) {
|
if (cqSafeVideoService.update(updateVideoDto) == 1) {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package net.shapelight.modules.iCq.controller.video.vo;
|
package net.shapelight.modules.iCq.controller.video.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import com.arcsoft.face.Rect;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
@ -30,6 +31,11 @@ public class FaceVideoVo {
|
||||||
*/
|
*/
|
||||||
private String imageUrl;
|
private String imageUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员头像坐标
|
||||||
|
*/
|
||||||
|
private Rect rect;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,33 +113,20 @@ public class CqEnterServiceImpl {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
public boolean changeState(int ruleId) {
|
public boolean changeState(int ruleId, String cellId, int typeId) {
|
||||||
|
|
||||||
TenEnterConfigCell id = cqEnterConfigCellMapper
|
|
||||||
.selectOne(new QueryWrapper<TenEnterConfigCell>().eq("id", ruleId));
|
|
||||||
System.out.println(id);
|
|
||||||
|
|
||||||
|
|
||||||
//多传递一个cellId
|
|
||||||
/* if(cellId == '1'){
|
|
||||||
ruleId = ruleId % 6 + 1;
|
|
||||||
}else{
|
|
||||||
ruleId = ruleId % 6 + 7;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
return cqEnterConfigCellMapper.update(
|
return cqEnterConfigCellMapper.update(
|
||||||
null,
|
null,
|
||||||
new UpdateWrapper<TenEnterConfigCell>()
|
new UpdateWrapper<TenEnterConfigCell>()
|
||||||
.eq("enter_config_id", cqEnterConfigCellMapper
|
.eq("enter_config_id", ruleId)
|
||||||
.selectOne(new QueryWrapper<TenEnterConfigCell>().eq("id", (ruleId % 6) + 1))
|
.eq("cell_id", cellId)
|
||||||
.getEnterConfigId())
|
|
||||||
.eq("cell_id", cqEnterConfigCellMapper
|
|
||||||
.selectOne(new QueryWrapper<TenEnterConfigCell>().eq("id", (ruleId % 6) + 1)).getCellId())
|
|
||||||
.set("operate_time", new Date())) > 0
|
.set("operate_time", new Date())) > 0
|
||||||
&& cqEnterConfigTypeMapper.update(
|
&& cqEnterConfigTypeMapper.update(
|
||||||
null,
|
null,
|
||||||
new UpdateWrapper<TenEnterConfigType>()
|
new UpdateWrapper<TenEnterConfigType>()
|
||||||
.eq("id", ruleId)
|
.eq("enter_config_id", ruleId)
|
||||||
|
.eq("type_id", typeId)
|
||||||
|
.eq("cell_id", cellId)
|
||||||
.setSql("state = 1 - state")) > 0;
|
.setSql("state = 1 - state")) > 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package net.shapelight.modules.job.task;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.json.JSONArray;
|
import cn.hutool.json.JSONArray;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.arcsoft.face.FaceEngine;
|
||||||
import com.arcsoft.face.FaceInfo;
|
import com.arcsoft.face.FaceInfo;
|
||||||
import com.arcsoft.face.enums.ExtractType;
|
import com.arcsoft.face.enums.ExtractType;
|
||||||
import com.arcsoft.face.toolkit.ImageFactory;
|
import com.arcsoft.face.toolkit.ImageFactory;
|
||||||
|
@ -39,6 +40,7 @@ import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.logging.SimpleFormatter;
|
import java.util.logging.SimpleFormatter;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@Component("personSynchronousTask")
|
@Component("personSynchronousTask")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@ -149,8 +151,16 @@ public class PersonSynchronousTask extends AbstractController implements ITask {
|
||||||
System.out.println("cssssssssssssssssssssss" + data);
|
System.out.println("cssssssssssssssssssssss" + data);
|
||||||
JSONArray dataList = data.getJSONArray("list");
|
JSONArray dataList = data.getJSONArray("list");
|
||||||
List<JSONObject> list1 = dataList.toList(JSONObject.class);
|
List<JSONObject> list1 = dataList.toList(JSONObject.class);
|
||||||
String filePath = "C:\\zhihuiyuanqu\\firePerson.txt";
|
|
||||||
|
String osName = System.getProperty("os.name", "").toLowerCase();
|
||||||
|
|
||||||
// 创建一个File对象
|
// 创建一个File对象
|
||||||
|
String filePath;
|
||||||
|
if (Pattern.matches("windows.*", osName)) {
|
||||||
|
filePath = "C:\\zhihuiyuanqu\\firePerson.txt";
|
||||||
|
}else{
|
||||||
|
filePath = "zhihuiyuanqu/firePerson.txt";
|
||||||
|
}
|
||||||
File file = new File(filePath);
|
File file = new File(filePath);
|
||||||
// 确保父目录存在
|
// 确保父目录存在
|
||||||
if (file.getParentFile() != null) {
|
if (file.getParentFile() != null) {
|
||||||
|
@ -159,7 +169,7 @@ public class PersonSynchronousTask extends AbstractController implements ITask {
|
||||||
try (FileWriter writer = new FileWriter(file)) {
|
try (FileWriter writer = new FileWriter(file)) {
|
||||||
// 写入数据
|
// 写入数据
|
||||||
list1.forEach(person -> {
|
list1.forEach(person -> {
|
||||||
String msg = save(person, item);
|
String msg = save(person, item, type);
|
||||||
System.out.println("msg = " + msg);
|
System.out.println("msg = " + msg);
|
||||||
if (!msg.isEmpty()) {
|
if (!msg.isEmpty()) {
|
||||||
try {
|
try {
|
||||||
|
@ -186,7 +196,7 @@ public class PersonSynchronousTask extends AbstractController implements ITask {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void getPmInternalPersonnelList2() {
|
public void getPmInternalPersonnelList2(String type) {
|
||||||
List<TenCellEntity> list = tenCellService.list();
|
List<TenCellEntity> list = tenCellService.list();
|
||||||
list.forEach(item -> {
|
list.forEach(item -> {
|
||||||
int pageIndex = 1;
|
int pageIndex = 1;
|
||||||
|
@ -262,7 +272,7 @@ public class PersonSynchronousTask extends AbstractController implements ITask {
|
||||||
"}\n";*/
|
"}\n";*/
|
||||||
|
|
||||||
|
|
||||||
String jsonString = "{\n" +
|
/*String jsonString = "{\n" +
|
||||||
" \"data\": {\n" +
|
" \"data\": {\n" +
|
||||||
" \"list\": [\n" +
|
" \"list\": [\n" +
|
||||||
" {\n" +
|
" {\n" +
|
||||||
|
@ -289,7 +299,74 @@ public class PersonSynchronousTask extends AbstractController implements ITask {
|
||||||
" \"errCode\": \"0\",\n" +
|
" \"errCode\": \"0\",\n" +
|
||||||
" \"resCode\": 1,\n" +
|
" \"resCode\": 1,\n" +
|
||||||
" \"timestamp\": 1729497503\n" +
|
" \"timestamp\": 1729497503\n" +
|
||||||
"}";
|
"}";*/
|
||||||
|
|
||||||
|
|
||||||
|
String jsonString = "{\n" +
|
||||||
|
" \"success\": true,\n" +
|
||||||
|
" \"message\": null,\n" +
|
||||||
|
" \"errCode\": \"0\",\n" +
|
||||||
|
" \"resCode\": 1,\n" +
|
||||||
|
" \"apiVersion\": \"1\",\n" +
|
||||||
|
" \"timestamp\": 1726651433,\n" +
|
||||||
|
" \"data\": {\n" +
|
||||||
|
" \"apiVersion\": null,\n" +
|
||||||
|
" \"list\": [\n" +
|
||||||
|
" {\n" +
|
||||||
|
" \"pmContractorId\": \"73e92ad1ec104074a791540f65db99af\", \n" +
|
||||||
|
" \"orgId\": \"ORGACQ100008461\", \n" +
|
||||||
|
" \"orgName\": \"第二采油厂\\\\城壕采油作业区\", \n" +
|
||||||
|
" \"contractorName\": \"赵刚\", \n" +
|
||||||
|
" \"contractorCardId\": \"610501198910191210\", \n" +
|
||||||
|
" \"dictSex\": \"0\", \n" +
|
||||||
|
" \"dictSexName\": \"男\", \n" +
|
||||||
|
" \"validPeriodSta\": \"2024-09-03 00:00:00\",\n" +
|
||||||
|
" \"validPeriodEnd\": \"2024-10-31 00:00:00\",\n" +
|
||||||
|
" \"dictNation\": \"01\", \n" +
|
||||||
|
" \"dicPolitical\": \"1\",\n" +
|
||||||
|
" \"dictNationName\": \"汉族\",\n" +
|
||||||
|
" \"dicPoliticalName\": \"中共党员\",\n" +
|
||||||
|
" \"mobile\": \"13772488873\", \n" +
|
||||||
|
" \"belongContractor\": \"21C0E54714D20F1DE06344A44E0ADD89\", \n" +
|
||||||
|
" \"belongTeam\": \"十多个的防火防盗\",\n" +
|
||||||
|
" \"certificateType\": \"特种作业人员\",\n" +
|
||||||
|
" \"isEnterSulfurArea\": \"是\", \n" +
|
||||||
|
" \"isProtectDevice\": \"否\",\n" +
|
||||||
|
" \"isBlacklistPersonnel\": \"否\",\n" +
|
||||||
|
" \"isWatchSafeVideo\": \"未观看\",\n" +
|
||||||
|
" \"belongContractorName\": \"测试承包商\", \n" +
|
||||||
|
" \"attachment\": null, \n" +
|
||||||
|
" \"pmContractorCertDatas\": [ \n" +
|
||||||
|
" {\n" +
|
||||||
|
" \"pmContractorId\": \"73e92ad1ec104074a791540f65db99af\",\n" +
|
||||||
|
" \"pmContractorCertId\":\"c4316aba1e9c49cca03d7cd95832bf6a\",\n" +
|
||||||
|
" \t\t\t\t\t \"category\": null, \n" +
|
||||||
|
" \"certName\": \"333\", \n" +
|
||||||
|
" \"issueUnit\": \"3333\",\n" +
|
||||||
|
" \"certObtainDate\": \"2024-09-03\",\n" +
|
||||||
|
" \"effectiveDate\": \"2024-09-27\",\n" +
|
||||||
|
" \"certType\": \"特种作业人员\" ,\n" +
|
||||||
|
"\"attachment\": null \n" +
|
||||||
|
" }\n" +
|
||||||
|
" ],\n" +
|
||||||
|
" \"pmContractorTrainDatas\": [ \n" +
|
||||||
|
" {\n" +
|
||||||
|
" \"pmContractorId\": \"73e92ad1ec104074a791540f65db99af\",\n" +
|
||||||
|
" \"pmContractorTrainId\": \"75b9b3e6d16944ff8297e5fa04890c39\",\n" +
|
||||||
|
" \"trainContent\": \"问题而光伏发电\", \n" +
|
||||||
|
" \"trainStartDate\": \"2024-09-03\",\n" +
|
||||||
|
"\"trainEndDate\": \"2024-09-30\",\n" +
|
||||||
|
"\"theoreticalScore\": \"null\",\n" +
|
||||||
|
"\"practiceScore\": \"null\",\n" +
|
||||||
|
" \"personnelType\": \"特种作业人员\",\n" +
|
||||||
|
" \"isQualified\": \"是\" \n" +
|
||||||
|
" }\n" +
|
||||||
|
" ]\n" +
|
||||||
|
" }\n" +
|
||||||
|
" ],\n" +
|
||||||
|
" \"total\": 1\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}\n";
|
||||||
|
|
||||||
JSONObject jsonOne = new JSONObject(jsonString);
|
JSONObject jsonOne = new JSONObject(jsonString);
|
||||||
|
|
||||||
|
@ -328,7 +405,7 @@ public class PersonSynchronousTask extends AbstractController implements ITask {
|
||||||
// 写入数据
|
// 写入数据
|
||||||
list1.forEach(person -> {
|
list1.forEach(person -> {
|
||||||
System.out.println("开始保存");
|
System.out.println("开始保存");
|
||||||
String msg = save(person, item);
|
String msg = save(person, item, type);
|
||||||
if (!msg.isEmpty()) {
|
if (!msg.isEmpty()) {
|
||||||
try {
|
try {
|
||||||
writer.write(msg);
|
writer.write(msg);
|
||||||
|
@ -354,7 +431,7 @@ public class PersonSynchronousTask extends AbstractController implements ITask {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String save(JSONObject person, TenCellEntity cellEntity) {
|
public String save(JSONObject person, TenCellEntity cellEntity, String type) {
|
||||||
|
|
||||||
|
|
||||||
/*System.out.println("personcscscs= " + person);*/
|
/*System.out.println("personcscscs= " + person);*/
|
||||||
|
@ -371,6 +448,16 @@ public class PersonSynchronousTask extends AbstractController implements ITask {
|
||||||
tenPerson.setCreateTime(now);
|
tenPerson.setCreateTime(now);
|
||||||
tenPerson.setLastUpdateTime(now);
|
tenPerson.setLastUpdateTime(now);
|
||||||
|
|
||||||
|
//type
|
||||||
|
if (type.equals("Person")) {
|
||||||
|
tenPerson.setPersonType(5000);
|
||||||
|
} else if (type.equals("Contractor")) {//承包商
|
||||||
|
tenPerson.setPersonType(5001);
|
||||||
|
} else {
|
||||||
|
tenPerson.setPersonType(5002);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//tenPerson.setCellId(person.getStr("orgId") != null ? Long.parseLong(UserRamGroup.getOrgCellMap(person.getStr("orgId"))) : null);
|
//tenPerson.setCellId(person.getStr("orgId") != null ? Long.parseLong(UserRamGroup.getOrgCellMap(person.getStr("orgId"))) : null);
|
||||||
/* tenPerson.setCellId(person.getStr("orgId") != null ?
|
/* tenPerson.setCellId(person.getStr("orgId") != null ?
|
||||||
tenCellService.getOne(new QueryWrapper<TenCellEntity>().eq("org_id", person.getStr("orgId"))).getCellId() : null);*/
|
tenCellService.getOne(new QueryWrapper<TenCellEntity>().eq("org_id", person.getStr("orgId"))).getCellId() : null);*/
|
||||||
|
@ -381,7 +468,6 @@ public class PersonSynchronousTask extends AbstractController implements ITask {
|
||||||
|
|
||||||
|
|
||||||
tenPerson.setCellId(1L);
|
tenPerson.setCellId(1L);
|
||||||
/* System.out.println("id = " + id);*/
|
|
||||||
tenPerson.setOrgId(cellEntity.getOrgId());
|
tenPerson.setOrgId(cellEntity.getOrgId());
|
||||||
|
|
||||||
|
|
||||||
|
@ -393,9 +479,6 @@ public class PersonSynchronousTask extends AbstractController implements ITask {
|
||||||
}
|
}
|
||||||
if (person.getStr("personnelName") != null){
|
if (person.getStr("personnelName") != null){
|
||||||
|
|
||||||
/* if(person.getStr("personnelName").equals("邢严")){
|
|
||||||
System.out.println("person水水水水水水水水水水水水水水水水水" + person);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
tenPerson.setName(person.getStr("personnelName"));
|
tenPerson.setName(person.getStr("personnelName"));
|
||||||
}
|
}
|
||||||
|
@ -721,8 +804,9 @@ public class PersonSynchronousTask extends AbstractController implements ITask {
|
||||||
|
|
||||||
if(tenPersonService.getOne(new QueryWrapper<TenPersonEntity>()
|
if(tenPersonService.getOne(new QueryWrapper<TenPersonEntity>()
|
||||||
.eq("open_id", tenPerson.getOpenId())) != null) {
|
.eq("open_id", tenPerson.getOpenId())) != null) {
|
||||||
|
//MyBatis-Plus会优先使用 personId 作为主键,因为它更具体地定义了主键的生成策略。
|
||||||
tenPersonService.removeById(tenPersonService.getOne(new QueryWrapper<TenPersonEntity>()
|
tenPersonService.removeById(tenPersonService.getOne(new QueryWrapper<TenPersonEntity>()
|
||||||
.eq("open_id", tenPerson.getOpenId())).getMemberId());
|
.eq("open_id", tenPerson.getOpenId())).getPersonId());
|
||||||
}
|
}
|
||||||
tenPersonService.saveTenPerson(tenPerson);
|
tenPersonService.saveTenPerson(tenPerson);
|
||||||
System.out.println("新增成功" + tenPerson);
|
System.out.println("新增成功" + tenPerson);
|
||||||
|
|
|
@ -50,6 +50,7 @@ import net.shapelight.modules.ten.service.*;
|
||||||
import net.shapelight.modules.ten.vo.PersonExcelModel;
|
import net.shapelight.modules.ten.vo.PersonExcelModel;
|
||||||
import net.shapelight.modules.vo.TenDeviceVo;
|
import net.shapelight.modules.vo.TenDeviceVo;
|
||||||
import net.shapelight.modules.vo.TenPersonOperationVo;
|
import net.shapelight.modules.vo.TenPersonOperationVo;
|
||||||
|
import net.shapelight.modules.vo.TenPersonVo;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||||
|
@ -346,6 +347,10 @@ public class TenPersonController extends AbstractController {
|
||||||
}
|
}
|
||||||
params.put("isBlacklistPersonnel", 1);
|
params.put("isBlacklistPersonnel", 1);
|
||||||
PageUtils page = tenPersonService.queryPage(params);
|
PageUtils page = tenPersonService.queryPage(params);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return R.ok().put("data", page);
|
return R.ok().put("data", page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,10 @@ public class TenPersonServiceImpl extends ServiceImpl<TenPersonDao,TenPersonEnti
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils queryPage(Map<String, Object> params) {
|
public PageUtils queryPage(Map<String, Object> params) {
|
||||||
|
|
||||||
|
|
||||||
|
System.out.println("params = " + params);
|
||||||
|
|
||||||
List<Long> cellIds = new ArrayList<>();
|
List<Long> cellIds = new ArrayList<>();
|
||||||
// cellIds.add(709832651506188289L);
|
// cellIds.add(709832651506188289L);
|
||||||
|
|
||||||
|
@ -369,6 +373,8 @@ public class TenPersonServiceImpl extends ServiceImpl<TenPersonDao,TenPersonEnti
|
||||||
@CacheEvict(value = "TenPerson", allEntries = true)
|
@CacheEvict(value = "TenPerson", allEntries = true)
|
||||||
public int saveTenPerson(TenPersonEntity entity) {
|
public int saveTenPerson(TenPersonEntity entity) {
|
||||||
String userFileUrl = globalValue.getImagesDir() + "/org/";
|
String userFileUrl = globalValue.getImagesDir() + "/org/";
|
||||||
|
|
||||||
|
System.out.println("userFileUrl = " + userFileUrl);
|
||||||
try {
|
try {
|
||||||
//保存原始图片
|
//保存原始图片
|
||||||
String tempOrgImageFile = entity.getOrgImageTemp();
|
String tempOrgImageFile = entity.getOrgImageTemp();
|
||||||
|
@ -398,9 +404,11 @@ public class TenPersonServiceImpl extends ServiceImpl<TenPersonDao,TenPersonEnti
|
||||||
byte[] bytes = outputStream.toByteArray();
|
byte[] bytes = outputStream.toByteArray();
|
||||||
outputStream.close();
|
outputStream.close();
|
||||||
tempInputStream.close();
|
tempInputStream.close();
|
||||||
|
System.out.println("测试打印");
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
ImageInfo rgbData = ImageFactory.getRGBData(bytes);
|
ImageInfo rgbData = ImageFactory.getRGBData(bytes);
|
||||||
List<FaceInfo> faceInfoList = faceEngineService.detectFaces(rgbData);
|
List<FaceInfo> faceInfoList = faceEngineService.detectFaces(rgbData);
|
||||||
|
System.out.println("--测试打印--");
|
||||||
if (CollectionUtil.isNotEmpty(faceInfoList)) {
|
if (CollectionUtil.isNotEmpty(faceInfoList)) {
|
||||||
FaceInfo faceInfo = faceInfoList.get(0);
|
FaceInfo faceInfo = faceInfoList.get(0);
|
||||||
FaceRecognitionResDTO faceRecognitionResDTO = new FaceRecognitionResDTO();
|
FaceRecognitionResDTO faceRecognitionResDTO = new FaceRecognitionResDTO();
|
||||||
|
|
|
@ -335,6 +335,10 @@
|
||||||
is_check_cert,
|
is_check_cert,
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<if test="belongContractorName != null">
|
||||||
|
belong_contractor_name,
|
||||||
|
</if>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</trim>
|
</trim>
|
||||||
|
@ -527,6 +531,9 @@
|
||||||
<if test=" isCheckCert != null">
|
<if test=" isCheckCert != null">
|
||||||
#{isCheckCert},
|
#{isCheckCert},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="belongContractorName != null">
|
||||||
|
#{belongContractorName},
|
||||||
|
</if>
|
||||||
|
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
@ -902,6 +909,9 @@
|
||||||
<if test="params.liveEnd != null and params.liveEnd!=''">
|
<if test="params.liveEnd != null and params.liveEnd!=''">
|
||||||
and p.live_end < #{params.liveEnd}
|
and p.live_end < #{params.liveEnd}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.isBlacklistPersonnel != null and params.isBlacklistPersonnel!=''">
|
||||||
|
and p.is_blacklist_personnel = #{params.isBlacklistPersonnel}
|
||||||
|
</if>
|
||||||
order by p.create_time desc
|
order by p.create_time desc
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue