From ccc03b8cb1301a90ea77709f4512e8c271bad67b Mon Sep 17 00:00:00 2001 From: coco1986509808 <1986509808@qq.com> Date: Fri, 21 Apr 2023 16:56:05 +0800 Subject: [PATCH] 4.21 --- .../com/dkha/common/modules/vo/CompareFaceList.java | 11 +++-------- .../dkha/common/modules/vo/face/FaceResEntity.java | 2 +- .../com/dkha/server/controllers/IndexContral.java | 3 ++- .../com/dkha/server/controllers/WebSocketContral.java | 11 +++++++---- .../com/dkha/server/modules/entities/FaceLibrary.java | 1 - face-server/src/main/resources/application-dev.yml | 1 + 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/face-common/src/main/java/com/dkha/common/modules/vo/CompareFaceList.java b/face-common/src/main/java/com/dkha/common/modules/vo/CompareFaceList.java index 15211ef..cc38a40 100644 --- a/face-common/src/main/java/com/dkha/common/modules/vo/CompareFaceList.java +++ b/face-common/src/main/java/com/dkha/common/modules/vo/CompareFaceList.java @@ -17,8 +17,9 @@ public class CompareFaceList { @ApiModelProperty(value = "时间") private String time; - - @ApiModelProperty(value = "原始人脸地址") + @ApiModelProperty(value = "视频解帧大图地址") + private String jzphoto; + @ApiModelProperty(value = "原始待人脸地址") private String cphoto; @ApiModelProperty(value = "比对最相似的人脸地址") private String rphoto; @@ -26,12 +27,6 @@ public class CompareFaceList { private double xsd; @ApiModelProperty(value = "姓名") private String name; -// @ApiModelProperty(value = "性别") -// private String sex; -// @ApiModelProperty(value = "身份证号码") -// private String idCard; -// @ApiModelProperty(value = "年龄") -// private Integer age; @ApiModelProperty(value = "库名称") private String libName; // @ApiModelProperty(value = "库id") diff --git a/face-common/src/main/java/com/dkha/common/modules/vo/face/FaceResEntity.java b/face-common/src/main/java/com/dkha/common/modules/vo/face/FaceResEntity.java index 990450c..3331ca0 100644 --- a/face-common/src/main/java/com/dkha/common/modules/vo/face/FaceResEntity.java +++ b/face-common/src/main/java/com/dkha/common/modules/vo/face/FaceResEntity.java @@ -12,6 +12,6 @@ import lombok.NoArgsConstructor; @ApiModel(value = "人脸库1:1比对返回", description = "人脸检索") public class FaceResEntity { private String cphoto; - //private String rphoto; + private String jzphoto; private String time; } diff --git a/face-server/src/main/java/com/dkha/server/controllers/IndexContral.java b/face-server/src/main/java/com/dkha/server/controllers/IndexContral.java index 83662a1..57348a1 100644 --- a/face-server/src/main/java/com/dkha/server/controllers/IndexContral.java +++ b/face-server/src/main/java/com/dkha/server/controllers/IndexContral.java @@ -74,7 +74,7 @@ public class IndexContral extends CommonResult{ //正常运行天数 Long a=nowdate.getTime(); Long b=InitStartDateConfig.initDate.getTime(); - System.out.println(a-b); + System.out.println("a-b"+ (a-b)); Integer daysOfOperation=(int)((nowdate.getTime()-InitStartDateConfig.initDate.getTime())/(3600000*24)+1); //人像库数量 Integer libNumber=0; @@ -93,6 +93,7 @@ public class IndexContral extends CommonResult{ // faceLibrary.setFactoryType("-1"); queryWrapper.setEntity(faceLibrary); queryWrapper.ne("factory_type","-1"); + System.out.println("人像库sql:"); libNumber=iFaceLibraryService.getBaseMapper().selectCount(queryWrapper); }catch (Exception e){} diff --git a/face-server/src/main/java/com/dkha/server/controllers/WebSocketContral.java b/face-server/src/main/java/com/dkha/server/controllers/WebSocketContral.java index 5e4951c..34e7794 100644 --- a/face-server/src/main/java/com/dkha/server/controllers/WebSocketContral.java +++ b/face-server/src/main/java/com/dkha/server/controllers/WebSocketContral.java @@ -1,6 +1,7 @@ package com.dkha.server.controllers; import java.io.IOException; +import java.text.SimpleDateFormat; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -38,6 +39,7 @@ import com.dkha.common.modules.vo.ReturnVO; import com.dkha.common.util.JsonUtil; import com.dkha.common.modules.vo.CompareFaceList; import com.google.gson.Gson; +import java.util.Date; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; @@ -70,7 +72,8 @@ public class WebSocketContral { { redisUtils =applicationContext.getBean(RedisUtils.class); this.session=session; - System.out.println("session信息:"+ session); + SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss"); + System.out.println("session信息:"+ session + " 时间:"+formatter.format(new Date())); if(myMap.containsKey(session.getId())) { try { @@ -100,7 +103,7 @@ public class WebSocketContral { // TimerData.tokens.put(session.getId(),token); webSocketSet.add(this); myMap.put(session.getId(), this); -// log.info(session.getId()+"【websocket消息】有新的连接,总数:{},{},{}",webSocketSet.size(),myMap.size(),token); + log.info(session.getId()+"【websocket消息】有新的连接,总数:{},{}",webSocketSet.size(),myMap.size()); } @OnClose @@ -112,7 +115,7 @@ public class WebSocketContral { // } myMap.remove(this.session.getId()); webSocketSet.remove(this); -// log.info("关闭成功{},{},{}",webSocketSet.size(),myMap.size(),TimerData.bayonetMap.size()); + log.info("关闭成功{},{}",webSocketSet.size(),myMap.size()); } @OnMessage public void onMessage(String message) @@ -123,7 +126,7 @@ public class WebSocketContral { if(UtilValidate.isNotEmpty(message)) { ReturnVO returnVO=gson.fromJson(message,ReturnVO.class); - System.out.println(message); + //System.out.println(message); if(returnVO.getMessage().equals("okpro")) { if (UtilValidate.isNotEmpty(returnVO.getData())) { // List facelist =gson.fromJson(gson.toJson(returnVO.getData()),List.class); diff --git a/face-server/src/main/java/com/dkha/server/modules/entities/FaceLibrary.java b/face-server/src/main/java/com/dkha/server/modules/entities/FaceLibrary.java index bc53b66..576c7c1 100644 --- a/face-server/src/main/java/com/dkha/server/modules/entities/FaceLibrary.java +++ b/face-server/src/main/java/com/dkha/server/modules/entities/FaceLibrary.java @@ -50,7 +50,6 @@ public class FaceLibrary implements Serializable { private String factoryTypeName; @ApiModelProperty(value = "是否有效 Y有效 N无效") - private String isValid; @ApiModelProperty(value = "创建时间") diff --git a/face-server/src/main/resources/application-dev.yml b/face-server/src/main/resources/application-dev.yml index ad84e57..9951bbf 100644 --- a/face-server/src/main/resources/application-dev.yml +++ b/face-server/src/main/resources/application-dev.yml @@ -92,6 +92,7 @@ mybatis-plus: cache-enabled: false call-setters-on-nulls: true jdbc-type-for-null: 'null' + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 用于控制swagger是否显示 swagger: