Commit a1c53cf6 by xmh

修正

1 parent 6a0f781c
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<dependency> <dependency>
<groupId>com.viontech.keliu</groupId> <groupId>com.viontech.keliu</groupId>
<artifactId>keliu-base</artifactId> <artifactId>keliu-base</artifactId>
<version>6.0.8-SNAPSHOT</version> <version>6.0.9</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>pagehelper-spring-boot-starter</artifactId> <artifactId>pagehelper-spring-boot-starter</artifactId>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<dependency> <dependency>
<groupId>com.viontech.keliu</groupId> <groupId>com.viontech.keliu</groupId>
<artifactId>AlgApiClient</artifactId> <artifactId>AlgApiClient</artifactId>
<version>6.0.5-SNAPSHOT</version> <version>6.0.5</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>javax</groupId> <groupId>javax</groupId>
...@@ -82,6 +82,24 @@ ...@@ -82,6 +82,24 @@
</dependency> </dependency>
</dependencies> </dependencies>
<distributionManagement>
<repository>
<id>vionmaven</id>
<name>vion maven</name>
<url>http://maven.vionyun.com:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>vionmaven</id>
<name>vion maven</name>
<url>http://maven.vionyun.com:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<scm>
<developerConnection>scm:git:http://git.keliuyun.com:55676/xmh/matchPerson</developerConnection>
<tag>HEAD</tag>
</scm>
<build> <build>
<finalName>VVAS-Match</finalName> <finalName>VVAS-Match</finalName>
<plugins> <plugins>
...@@ -98,6 +116,35 @@ ...@@ -98,6 +116,35 @@
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.3</version>
<configuration>
<generateBackupPoms>false</generateBackupPoms>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<tagNameFormat>V@{project.version}</tagNameFormat>
<autoVersionSubmodules>true</autoVersionSubmodules>
<username>xmh</username>
<password>hbr25hYQDwhJ</password>
<branchName>develop</branchName>
<tagBase>http://git.keliuyun.com:55676/chenjm/DataServer/tags</tagBase>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
......
package com.viontech.match.config; package com.viontech.match.config;
/** /**
* . * 常量
* *
* @author 谢明辉 * @author 谢明辉
* @date 2020/12/2 * @version 0.0.1
*/ */
public class Constant { public class Constant {
......
package com.viontech.match.controller; package com.viontech.match.controller;
import com.viontech.keliu.model.FaceFeature;
import com.viontech.keliu.model.Person;
import com.viontech.match.entity.vo.RequestVo; import com.viontech.match.entity.vo.RequestVo;
import com.viontech.match.entity.vo.ResponseVo; import com.viontech.match.entity.vo.ResponseVo;
import com.viontech.match.service.PersonService; import com.viontech.match.service.PersonService;
...@@ -11,16 +9,12 @@ import org.springframework.web.bind.annotation.*; ...@@ -11,16 +9,12 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.IOException; import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
/** /**
* . * .
* *
* @author 谢明辉 * @author 谢明辉
* @date 2020/11/23 * @version 0.0.1
*/ */
@RestController @RestController
@RequestMapping("/alg") @RequestMapping("/alg")
......
...@@ -7,7 +7,7 @@ import lombok.Setter; ...@@ -7,7 +7,7 @@ import lombok.Setter;
* . * .
* *
* @author 谢明辉 * @author 谢明辉
* @date 2020/11/27 * @version 0.0.1
*/ */
@Getter @Getter
@Setter @Setter
......
...@@ -13,7 +13,7 @@ import java.util.List; ...@@ -13,7 +13,7 @@ import java.util.List;
* . * .
* *
* @author 谢明辉 * @author 谢明辉
* @date 2020/11/27 * @version 0.0.1
*/ */
@Getter @Getter
......
...@@ -13,7 +13,7 @@ import java.util.List; ...@@ -13,7 +13,7 @@ import java.util.List;
* . * .
* *
* @author 谢明辉 * @author 谢明辉
* @date 2020/11/27 * @version 0.0.1
*/ */
@Getter @Getter
......
...@@ -4,7 +4,7 @@ package com.viontech.match.enumeration; ...@@ -4,7 +4,7 @@ package com.viontech.match.enumeration;
* . * .
* *
* @author 谢明辉 * @author 谢明辉
* @date 2020/11/27 * @version 0.0.1
*/ */
public enum CommandEnum { public enum CommandEnum {
/** 命令 */ /** 命令 */
......
...@@ -42,7 +42,7 @@ import java.util.stream.Stream; ...@@ -42,7 +42,7 @@ import java.util.stream.Stream;
* . * .
* *
* @author 谢明辉 * @author 谢明辉
* @date 2020/11/27 * @version 0.0.1
*/ */
@Service @Service
...@@ -57,6 +57,11 @@ public class PersonService { ...@@ -57,6 +57,11 @@ public class PersonService {
/** /**
* 人员比对 * 人员比对
*
* @param requestVo rid,personPoolId,unionPersonPoolId,person
*
* @return ResponseVo
* @throws Exception --
*/ */
public ResponseVo matchPerson(RequestVo requestVo) throws Exception { public ResponseVo matchPerson(RequestVo requestVo) throws Exception {
String rid = requestVo.getRid(); String rid = requestVo.getRid();
...@@ -120,6 +125,10 @@ public class PersonService { ...@@ -120,6 +125,10 @@ public class PersonService {
/** /**
* 修改人员特征 * 修改人员特征
*
* @param requestVo rid,person, poolId,
*
* @return ResponseVo
*/ */
public ResponseVo updatePerson(RequestVo requestVo) { public ResponseVo updatePerson(RequestVo requestVo) {
String rid = requestVo.getRid(); String rid = requestVo.getRid();
...@@ -141,6 +150,12 @@ public class PersonService { ...@@ -141,6 +150,12 @@ public class PersonService {
/** /**
* 添加人员 * 添加人员
*
* @param poolId 特征池Id
* @param personPool 要添加的人员列表
*
* @return 批量添加的结果
* @throws IOException elasticsearch 所产生的异常
*/ */
public BulkResponse addPerson(String poolId, List<Person> personPool) throws IOException { public BulkResponse addPerson(String poolId, List<Person> personPool) throws IOException {
BulkRequest bulkRequest = new BulkRequest(poolId); BulkRequest bulkRequest = new BulkRequest(poolId);
...@@ -196,6 +211,10 @@ public class PersonService { ...@@ -196,6 +211,10 @@ public class PersonService {
/** /**
* 删除人员 * 删除人员
* @param poolId 特征池Id
* @param personId 人员Id,对应数据库personUnid
* @return 删除结果
* @throws IOException elasticsearch 所产生的异常
*/ */
public BulkByScrollResponse deletePerson(String poolId, String personId) throws IOException { public BulkByScrollResponse deletePerson(String poolId, String personId) throws IOException {
DeleteByQueryRequest deleteByQueryRequest = new DeleteByQueryRequest(poolId) DeleteByQueryRequest deleteByQueryRequest = new DeleteByQueryRequest(poolId)
......
...@@ -36,7 +36,7 @@ import java.util.Map; ...@@ -36,7 +36,7 @@ import java.util.Map;
* . * .
* *
* @author 谢明辉 * @author 谢明辉
* @date 2020/11/27 * @version 0.0.1
*/ */
@Service @Service
@Slf4j @Slf4j
...@@ -50,6 +50,11 @@ public class PoolService { ...@@ -50,6 +50,11 @@ public class PoolService {
/** /**
* 添加特征池 * 添加特征池
*
* @param requestVo rid,poolId,personPool
*
* @return ResponseVo
* @throws Exception --
*/ */
public ResponseVo createPool(RequestVo requestVo) throws Exception { public ResponseVo createPool(RequestVo requestVo) throws Exception {
String rid = requestVo.getRid(); String rid = requestVo.getRid();
...@@ -87,6 +92,11 @@ public class PoolService { ...@@ -87,6 +92,11 @@ public class PoolService {
/** /**
* 删除特征池 * 删除特征池
*
* @param requestVo rid,flushPool,poolId,personIds,
*
* @return ResponseVo
* @throws Exception --
*/ */
public ResponseVo deletePool(RequestVo requestVo) throws Exception { public ResponseVo deletePool(RequestVo requestVo) throws Exception {
String rid = requestVo.getRid(); String rid = requestVo.getRid();
...@@ -118,6 +128,11 @@ public class PoolService { ...@@ -118,6 +128,11 @@ public class PoolService {
/** /**
* 修改特征池(添加人员) * 修改特征池(添加人员)
*
* @param requestVo rid,poolId,personPool,updateType
*
* @return ResponseVo
* @throws Exception --
*/ */
public ResponseVo modifyPool(RequestVo requestVo) throws Exception { public ResponseVo modifyPool(RequestVo requestVo) throws Exception {
String rid = requestVo.getRid(); String rid = requestVo.getRid();
...@@ -144,6 +159,9 @@ public class PoolService { ...@@ -144,6 +159,9 @@ public class PoolService {
/** /**
* 查询特征池信息 * 查询特征池信息
* @param requestVo rid,listAll,poolId
* @return ResponseVo
* @throws Exception --
*/ */
public ResponseVo queryPool(RequestVo requestVo) throws Exception { public ResponseVo queryPool(RequestVo requestVo) throws Exception {
String rid = requestVo.getRid(); String rid = requestVo.getRid();
......
...@@ -8,7 +8,7 @@ import java.util.Arrays; ...@@ -8,7 +8,7 @@ import java.util.Arrays;
* . * .
* *
* @author 谢明辉 * @author 谢明辉
* @date 2020/11/23 * @version 0.0.1
*/ */
@Slf4j @Slf4j
@SuppressWarnings("ALL") @SuppressWarnings("ALL")
......
...@@ -7,7 +7,6 @@ import org.elasticsearch.client.Request; ...@@ -7,7 +7,6 @@ import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response; import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
import org.json.JSONException;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
...@@ -38,7 +37,7 @@ public class Test0 { ...@@ -38,7 +37,7 @@ public class Test0 {
@Test @Test
public void ttt() throws IOException, JSONException { public void ttt() throws IOException {
LinkedList<PoolInfo> poolInfos = new LinkedList<>(); LinkedList<PoolInfo> poolInfos = new LinkedList<>();
RestClient lowLevelClient = client.getLowLevelClient(); RestClient lowLevelClient = client.getLowLevelClient();
......
package com.viontech.match.util;
import com.viontech.keliu.utils.JsonUtil;
import org.json.JSONArray;
import org.json.JSONObject;
import org.junit.jupiter.api.Test;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
/**
* .
*
* @author 谢明辉
* @date 2021/4/6
*/
class UtilsTest {
@Test
void transferBodyFeature() throws Exception {
List<String> strings = Files.readAllLines(Paths.get("C:\\Users\\vion\\Desktop\\body.feature"));
String s = strings.get(0);
JSONObject jsonObject = JsonUtil.toObject(s);
JSONArray datas = jsonObject.getJSONArray("datas");
JSONObject obj = datas.getJSONObject(0);
JSONArray data = obj.getJSONArray("data");
List<Object> objects = data.toList();
Double[] feature = objects.toArray(new Double[]{});
Double[] doubles = Utils.transferBodyFeature(feature);
System.out.println(Arrays.toString(doubles));
}
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!