suntianwu 3 年 前
コミット
d59fd5a677

+ 1 - 1
src/main/java/com/iden/bms/controller/CameraController.java

@@ -53,7 +53,7 @@ public class CameraController {
                                                  @RequestParam(value = "type", required = true) String type,
                                                  @RequestParam(value = "district", required = false) String district,
                                                  @RequestParam(value = "subdistrict", required = false) String subdistrict,
-                                                 @RequestParam(value = "communityId", required = false) String communityId,
+                                                 @RequestParam(value = "communityId", required = false) Long communityId,
                                                  @RequestParam(value = "name", required = false) String name,
                                                  PageReqVO pageReqVo){
         try {

+ 163 - 0
src/main/java/com/iden/bms/controller/PersonController.java

@@ -0,0 +1,163 @@
+package com.iden.bms.controller;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.iden.bms.service.PersonService;
+import com.iden.common.annotation.Permission;
+import com.iden.common.exception.BDException;
+import com.iden.common.util.PageResult;
+import com.iden.common.util.Result;
+import com.iden.common.util.WebPageUtils;
+import com.iden.common.vo.PersonVO;
+import com.iden.common.vo.PageReqVO;
+import com.iden.common.vo.UserLogindConvertVO;
+import io.swagger.annotations.*;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+/**
+ * @Author: lilt
+ * @Date: 2021/5/26
+ * @Desc:
+ */
+@RestController
+@Api(value = "PersonController", tags = { "人员管理" })
+@Slf4j
+@RequestMapping("/bms/person")
+@Permission
+public class PersonController {
+
+    @Autowired
+    private PersonService personService;
+
+
+
+    @GetMapping("/listPerson")
+    @ApiOperation(value = "人员列表分页 ")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(paramType = "query", name = "type", value = "类型:1、重点人员,2、小区人员"),
+            @ApiImplicitParam(paramType = "query", name = "nameOrCred", value = "名称/身份证"),
+            @ApiImplicitParam(paramType = "query", name = "district", value = "所属区域"),
+            @ApiImplicitParam(paramType = "query", name = "subdistrict", value = "所属街道"),
+            @ApiImplicitParam(paramType = "query", name = "communityId", value = "小区ID"),
+            @ApiImplicitParam(paramType = "query", name = "crowdId", value = "人群id"),
+            @ApiImplicitParam(paramType = "query", name = "address", value = "详细地址"),
+            @ApiImplicitParam(paramType = "query", name = "gender", value = "性别:M:男 W:女"),
+            @ApiImplicitParam(paramType = "query", name = "personType", value = "人员类型:1:常住人口 2:暂住人口 3:境外长住人口 4:流动人口 5:寄住人口 6: 临时住宿人口 99其他")
+    })
+    public PageResult<List<PersonVO>> listPerson(HttpServletRequest request, @RequestHeader(value = "token") String token,
+                                                 @RequestParam(value = "type", required = true) String type,
+                                                 @RequestParam(value = "nameOrCred", required = false) String nameOrCred,
+                                                 @RequestParam(value = "district", required = false) String district,
+                                                 @RequestParam(value = "subdistrict", required = false) String subdistrict,
+                                                 @RequestParam(value = "communityId", required = false) Long communityId,
+                                                 @RequestParam(value = "crowdId", required = false) Long crowdId,
+                                                 @RequestParam(value = "address", required = false) String address,
+                                                 @RequestParam(value = "gender", required = false) String gender,
+                                                 @RequestParam(value = "personType", required = false) String personType,
+                                                 PageReqVO pageReqVo){
+        try {
+            UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
+            IPage<PersonVO> pageResponse = this.personService.listPerson(type,nameOrCred,district,subdistrict,communityId,crowdId,address,gender,personType,loginUser ,pageReqVo);
+            return PageResult.success(pageResponse.getRecords(),pageResponse.getCurrent(),pageResponse.getSize(),pageResponse.getTotal());
+        }catch (BDException e) {
+            log.error("人员列表查询-分页列表出现异常",e);
+            return  PageResult.error(e.getMessage());
+        } catch (Exception e) {
+            log.error("人员管理: 人员列表查询出现异常",e);
+            return PageResult.error( "获取列表失败");
+        }
+    }
+
+    @ApiOperation(value = "图像上传")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "token", value = "放在请求头中的令牌",
+                    dataType = "String", paramType = "header",
+                    required = true)
+    })
+    @CrossOrigin
+    @PostMapping(value = "/uploadImage", headers="content-type=multipart/form-data",produces = "application/json;charset=UTF-8")
+    public Result<String> uploadImage( @ApiParam(value="图像",required=true) MultipartFile file,
+                                     @RequestHeader(name = "token") String token) {
+        try {
+            String url = personService.uploadImage(file);
+            return  Result.success("上传成功!",url);
+        } catch (BDException e) {
+            log.error("logo图片上传出现异常",e);
+            return Result.error(e.getMessage());
+        } catch (Exception e) {
+            log.error("机构管理: logo图片上传出现异常",e);
+            return Result.error("logo图片上传失败!");
+        }
+    }
+
+    @PostMapping("/addPerson")
+    @ApiOperation(value = "新增人员")
+    public Result<Object> addPerson(HttpServletRequest request,@RequestHeader("token") String token,
+                                   @RequestBody PersonVO vo){
+        try {
+
+            UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
+            int flag = this.personService.createPerson(vo,loginUser);
+            if (flag == 1) {
+                return  Result.error("证件号码已存在!");
+            }  else if (flag == 0) {
+                return  Result.success("新增成功!");
+            } else {
+                return  Result.error("新增失败!");
+            }
+
+        }catch (BDException e) {
+            log.error("新增人员-出现异常",e);
+            return Result.error(e.getMessage());
+        } catch (Exception e) {
+            log.error("人员管理: 新增人员出现异常",e);
+            return Result.error("新增失败!");
+        }
+    }
+
+    @PostMapping("/updatePerson")
+    @ApiOperation(value = "修改人员")
+    public Result<Object> updatePerson(HttpServletRequest request,@RequestHeader("token") String token,
+                                 @RequestBody PersonVO vo){
+        try {
+            this.personService.updatePerson(vo);
+            return  Result.success("修改成功!");
+        }catch (BDException e) {
+            log.error("修改人员-出现异常",e);
+            return Result.error(e.getMessage());
+        } catch (Exception e) {
+            log.error("人员管理: 修改人员出现异常",e);
+            return Result.error("修改失败!");
+        }
+    }
+
+    @GetMapping("/getPersonInfo/{id}")
+    @ApiOperation(value = "人员详情")
+    public Result<PersonVO> getPersonInfo(HttpServletRequest request, @RequestHeader("token") String token, @PathVariable("id") Long id){
+        PersonVO orderInfo = this.personService.getPersonById(id);
+        return  Result.success("查询成功!",orderInfo);
+    }
+
+    @PostMapping("/deletePerson/{id}")
+    @ApiOperation(value = "删除人员")
+    public Result<Object> deletePerson(HttpServletRequest request,@RequestHeader("token") String token,
+                                 @PathVariable("id") Long id){
+        try {
+            if( this.personService.deleteById(id)){
+                return  Result.success("删除成功!");
+            } else {
+                return Result.error("人员被引用,删除失败!");
+            }
+
+        } catch (Exception e) {
+            log.error("人员管理: 删除出现异常",e);
+            return Result.error("删除失败!");
+        }
+    }
+}

+ 6 - 4
src/main/java/com/iden/bms/face/FaceIdenService.java

@@ -45,6 +45,8 @@ public class FaceIdenService {
 
     @Value("${iden.root:#{null}}")
     private String idenRoot;
+    @Value("${file.url:#{null}}")
+    private String fileUrl;
 
     private static final Logger logger = LogManager.getLogger(FaceIdenService.class);
 
@@ -56,15 +58,15 @@ public class FaceIdenService {
     public void exe() throws Exception {
         logger.info("FaceIdenService.exe start...");
 
-        File srcImageDirFile = new File(idenRoot + "data/origin/image");
+        File originImageDirFile = new File(idenRoot + "data/origin/image");
         //初始化引擎
         FaceMonitor faceMonitor = new FaceMonitor();
         faceMonitor.init(idenRoot + "face/model", 0);
 
         //使用摄像头编码做目录名,里面图像或视频的名称上加上拍照时间,
         // 比如  20211217123023.jpg     20211217123023~20211217123323.mp4
-        if (srcImageDirFile.isDirectory()) {
-            File[]  cameraCodeDirs = srcImageDirFile.listFiles();
+        if (originImageDirFile.isDirectory()) {
+            File[]  cameraCodeDirs = originImageDirFile.listFiles();
             if(cameraCodeDirs != null && cameraCodeDirs.length > 0){
                 logger.info("FaceIdenService.exe ...1");
                 for(File cameraCodedir : cameraCodeDirs) {
@@ -117,7 +119,7 @@ public class FaceIdenService {
 
                                 imgFile.renameTo(finalImgFile);//移动到最终目录
 
-                                idenImageStore.setImage(finalImgFile.getAbsolutePath());
+                                idenImageStore.setImage( fileUrl + cameraCode + "/" + finalImgFile.getName());
 
                                 //TODO 关联personId
 

+ 4 - 2
src/main/java/com/iden/bms/service/CameraService.java

@@ -40,13 +40,13 @@ public class CameraService {
      * 查询摄像头列表
      * @return
              */
-    public IPage<CameraVO> listCamera(String type,String district, String subdistrict,String communityId, String name, UserLogindConvertVO loginUser, PageReqVO pageReqVo) {
+    public IPage<CameraVO> listCamera(String type,String district, String subdistrict,Long communityId, String name, UserLogindConvertVO loginUser, PageReqVO pageReqVo) {
             IPage<IdenCamera> page = new Page<>(pageReqVo.getCurrent(), pageReqVo.getPageSize());
             QueryWrapper<IdenCamera> queryWrapper = new QueryWrapper<>();
             queryWrapper.lambda().like(StrUtil.isNotEmpty(name),IdenCamera::getName,name)
                     .eq(StrUtil.isNotEmpty(district),IdenCamera::getDistrict,district)
                     .eq(StrUtil.isNotEmpty(subdistrict),IdenCamera::getSubdistrict,subdistrict)
-                    .eq(StrUtil.isNotEmpty(subdistrict),IdenCamera::getCommunityId,communityId)
+                    .eq(communityId != null,IdenCamera::getCommunityId,communityId)
                     .eq(StrUtil.isNotEmpty(type),IdenCamera::getType,type)
                     .orderByAsc(IdenCamera::getCode);
 
@@ -85,6 +85,8 @@ public class CameraService {
         if (idenCamera!=null){
             CameraVO resVO = new CameraVO();
             BeanUtil.copyProperties(idenCamera,resVO);
+            resVO.setStatusName(ConnectStatusEnum.getValueToName(resVO.getCode()));
+            resVO.setTypeName(CameraTypeEnum.getValueToName(resVO.getType()));
             return resVO;
         }
         return null;

+ 228 - 0
src/main/java/com/iden/bms/service/PersonService.java

@@ -0,0 +1,228 @@
+package com.iden.bms.service;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.iden.common.entity.IdenCrowd;
+import com.iden.common.entity.IdenPerson;
+
+import com.iden.common.entity.IdenPersonCrowdRef;
+import com.iden.common.enums.PersonType2Enum;
+import com.iden.common.enums.PersonTypeEnum;
+import com.iden.common.exception.BDException;
+import com.iden.common.service.IdenCrowdService;
+import com.iden.common.service.IdenPersonCrowdRefService;
+import com.iden.common.service.IdenPersonService;
+import com.iden.common.util.ImgUtil;
+import com.iden.common.util.MyBeanUtils;
+import com.iden.common.vo.PersonVO;
+import com.iden.common.vo.PageReqVO;
+import com.iden.common.vo.UserLogindConvertVO;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.io.FileOutputStream;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+/**
+ *
+ * @author makejava
+ * @since 2021-05-21 00:08:38
+ */
+@Service
+public class PersonService {
+
+    @Resource
+    private IdenPersonService idenPersonService;
+
+    @Resource
+    private IdenPersonCrowdRefService idenPersonCrowdRefService;
+    @Resource
+    private IdenCrowdService idenCrowdService;
+
+    @Value("${iden.root:#{null}}")
+    private String idenRoot;
+    @Value("${file.url:#{null}}")
+    private String fileUrl;
+
+    /**
+     * 查询人员列表
+     * @return
+             */
+    public IPage<PersonVO> listPerson(String type,String nameOrCred, String district, String subdistrict, Long communityId, Long crowdId, String address, String gender, String personType, UserLogindConvertVO loginUser, PageReqVO pageReqVo) {
+            IPage<IdenPerson> page = new Page<>(pageReqVo.getCurrent(), pageReqVo.getPageSize());
+
+            QueryWrapper<IdenPerson> queryWrapper = new QueryWrapper<>();
+            queryWrapper.lambda().like(IdenPerson::getType,type)
+                    .like(StrUtil.isNotEmpty(address), IdenPerson::getAddress,address)
+                    .eq(StrUtil.isNotEmpty(gender),IdenPerson::getGender,gender)
+                    .eq(StrUtil.isNotEmpty(personType),IdenPerson::getPersonType,personType)
+                    .eq(StrUtil.isNotEmpty(district),IdenPerson::getDistrict,district)
+                    .eq(StrUtil.isNotEmpty(subdistrict),IdenPerson::getSubdistrict,subdistrict)
+                    .eq(communityId != null,IdenPerson::getCommunityId,communityId)
+                    .and(StrUtil.isNotEmpty(nameOrCred),wrapper -> wrapper.like(IdenPerson::getName,nameOrCred)
+                    .or().like(IdenPerson::getCredentialsCode,nameOrCred))
+                    .orderByDesc(IdenPerson::getModifyTime)
+                    .orderByDesc(IdenPerson::getCreateTime);
+
+            if (crowdId != null) {
+                queryWrapper.apply(" in ( select person_id from iden_person_crowd_ref ipcr where ipcr.crowd_id = "+ crowdId + ")");
+            }
+
+            IPage<IdenPerson> pageRes = this.idenPersonService.page(page, queryWrapper);
+            IPage<PersonVO> results = new Page<>(pageRes.getCurrent(),pageRes.getSize(),pageRes.getTotal());
+            if(CollUtil.isNotEmpty(pageRes.getRecords())){
+                List<PersonVO> list = new ArrayList<>();
+                pageRes.getRecords().forEach(item -> {
+                    PersonVO resVO = new PersonVO();
+                    BeanUtils.copyProperties(item,resVO);
+                    resVO.setPersonTypeName(PersonTypeEnum.getValueToName(resVO.getPersonType()));
+                    resVO.setTypeName(PersonType2Enum.getValueToName(resVO.getType()));
+
+                    QueryWrapper<IdenPersonCrowdRef> queryWrapper1 = new QueryWrapper<>();
+                    queryWrapper1.lambda().eq(IdenPersonCrowdRef::getPersonId,resVO.getId());
+                    List<IdenPersonCrowdRef> listIdenPersonCrowdRef = idenPersonCrowdRefService.list(queryWrapper1);
+                    StringBuilder sb = new StringBuilder();
+                    if (CollUtil.isNotEmpty(listIdenPersonCrowdRef)) {
+                       for(IdenPersonCrowdRef idenPersonCrowdRef : listIdenPersonCrowdRef){
+                           IdenCrowd idenCrowd = idenCrowdService.getById(idenPersonCrowdRef.getCrowdId());
+                           if(idenCrowd != null) {
+                               sb.append(idenCrowd.getName()).append(",");
+                           }
+                       }
+                    }
+                    String crowdName = sb.toString();
+                    if(crowdName != null && crowdName.endsWith(",")) {
+                        crowdName = crowdName.substring(0, crowdName.length() - 1);
+                    }
+                    resVO.setCrowdName(crowdName);
+                    list.add(resVO);
+                });
+                results.setRecords(list);
+            }
+            return results;
+    }
+
+    /**
+     * 删除人员
+     * @param id
+     * @return
+     */
+    public boolean deleteById(Long id){
+        return this.idenPersonService.removeById(id);
+    }
+
+    /**
+     * 详情
+     * @param id
+     * @return
+     */
+    public PersonVO getPersonById(Long id){
+        IdenPerson idenPerson = this.idenPersonService.getById(id);
+        if (idenPerson!=null){
+            PersonVO resVO = new PersonVO();
+            BeanUtil.copyProperties(idenPerson,resVO);
+            resVO.setPersonTypeName(PersonTypeEnum.getValueToName(resVO.getPersonType()));
+            resVO.setTypeName(PersonType2Enum.getValueToName(resVO.getType()));
+
+            QueryWrapper<IdenPersonCrowdRef> queryWrapper1 = new QueryWrapper<>();
+            queryWrapper1.lambda().eq(IdenPersonCrowdRef::getPersonId,resVO.getId());
+            List<IdenPersonCrowdRef> listIdenPersonCrowdRef = idenPersonCrowdRefService.list(queryWrapper1);
+            StringBuilder sb = new StringBuilder();
+            if (CollUtil.isNotEmpty(listIdenPersonCrowdRef)) {
+                for(IdenPersonCrowdRef idenPersonCrowdRef : listIdenPersonCrowdRef){
+                    IdenCrowd idenCrowd = idenCrowdService.getById(idenPersonCrowdRef.getCrowdId());
+                    if(idenCrowd != null) {
+                        sb.append(idenCrowd.getName()).append(",");
+                    }
+                }
+            }
+            String crowdName = sb.toString();
+            if(crowdName != null && crowdName.endsWith(",")) {
+                crowdName = crowdName.substring(0, crowdName.length() - 1);
+            }
+            resVO.setCrowdName(crowdName);
+            return resVO;
+        }
+        return null;
+    }
+
+    /**
+     * 上传图像
+     * @param file
+     * @return  访问URL
+     */
+    public String uploadImage(MultipartFile file) throws BDException {
+        String logo = null;
+        try {
+            if (file != null) {
+                //获取文件名
+                String fileName = file.getOriginalFilename();
+                if (org.springframework.util.StringUtils.isEmpty(fileName) || file.getSize() == 0) {
+                    throw new BDException("图像文件不能为空!");
+                }
+                //验证文件名是否合格
+                if (!ImgUtil.isImg(fileName)) {
+                    throw new BDException("图像文件必须是图片格式!");
+                }
+                String saveFileName = UUID.randomUUID().toString() + "_" + fileName;
+                String picFullFileName = idenRoot + "data/final/image/person/" + saveFileName;
+                FileOutputStream fos = new FileOutputStream(picFullFileName);
+                fos.write(file.getBytes());
+                logo = fileUrl + "person/" + saveFileName;
+            } else {
+                throw new BDException("上传失败");
+            }
+        } catch (Exception e) {
+            throw new BDException("上传失败",e);
+        }
+
+        return logo;
+    }
+
+
+    /**
+     * 保存人员
+     * @param vo
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public int createPerson(PersonVO vo, UserLogindConvertVO loginUser){
+        QueryWrapper<IdenPerson> queryWrapper = new QueryWrapper<>();
+        queryWrapper.lambda().eq(IdenPerson::getCredentialsCode,vo.getCredentialsCode());
+        if(idenPersonService.count(queryWrapper) > 0){
+            return 1;
+        }
+        //保存人员
+        IdenPerson idenPerson = new IdenPerson();
+        BeanUtil.copyProperties(vo,idenPerson);
+        idenPerson.setCreateTime(new Date());
+
+        this.idenPersonService.save(idenPerson);
+        return 0;
+    }
+
+    /**
+     * 修改人员
+     * @param vo
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void updatePerson(PersonVO vo){
+        //保存人员
+        IdenPerson idenPerson = this.idenPersonService.getById(vo.getId());
+        MyBeanUtils.copyProperties(vo,idenPerson);
+        idenPerson.setModifyTime(new Date());
+        this.idenPersonService.updateById(idenPerson);
+
+    }
+
+}

+ 6 - 3
src/main/java/com/iden/common/entity/IdenPerson.java

@@ -72,9 +72,9 @@ public class IdenPerson implements Serializable {
     private String phone;
 
 
-    @ApiModelProperty("人员类型:1:常住人口 2:暂住人口 3:境外长住人口 4:流动人口 5:寄住人口 6: 临时住宿人口")
-    @TableField("PERSON_TYOE")
-    private String personTyoe;
+    @ApiModelProperty("人员类型:1:常住人口 2:暂住人口 3:境外长住人口 4:流动人口 5:寄住人口 6: 临时住宿人口 99其他")
+    @TableField("PERSON_TYPE")
+    private String personType;
 
 
     @ApiModelProperty("民族")
@@ -101,6 +101,9 @@ public class IdenPerson implements Serializable {
     @TableField("DISTRICT")
     private String district;
 
+    @ApiModelProperty("所属街道")
+    @TableField("SUBDISTRICT")
+    private String subdistrict;
 
     @ApiModelProperty("所属小区id")
     @TableField("COMMUNITY_ID")

+ 48 - 0
src/main/java/com/iden/common/enums/PersonType2Enum.java

@@ -0,0 +1,48 @@
+package com.iden.common.enums;
+
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * @Author:java
+ * @Date: 2021/05/27
+ */
+public enum PersonType2Enum {
+    /**
+     * 人员类型
+     */
+    KEYNOTE("1","重点人员"),
+    COMMUNITY("2","小区人员");
+    private String value;
+    private String name;
+    PersonType2Enum(String value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+    public String getValue() {
+        return value;
+    }
+
+    public static String getValueToName(String code){
+        if (StrUtil.isEmpty(code)){
+            return null;
+        }
+
+        String names = "";
+        String[] types = code.split(",");
+        if(types.length > 0){
+            for(String type : types){
+                if (KEYNOTE.getValue().equals(type)){
+                    names += KEYNOTE.name + ",";
+                } else if (COMMUNITY.getValue().equals(type)){
+                    names += COMMUNITY.name + ",";
+                }
+            }
+        }
+        if(names.endsWith(",")) {
+            names = names.substring(0,names.length() - 1);
+        }
+      return names;
+
+    }
+}

+ 53 - 0
src/main/java/com/iden/common/enums/PersonTypeEnum.java

@@ -0,0 +1,53 @@
+package com.iden.common.enums;
+
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * @Author:java
+ * @Date: 2021/05/27
+ */
+public enum PersonTypeEnum {
+    /**
+     * 人员类型
+     */
+    CHANGZHU("1","常住人口"),
+    ZANZHU("2","暂住人口"),
+    JINGWAICHANGZHU("3","境外长住人口"),
+    LIUDONG("4","流动人口"),
+    JIZHU("5","寄住人口"),
+    LINSHIZHUSU("6","临时住宿人口"),
+    OTHER("99","其他");
+    private String value;
+    private String name;
+    PersonTypeEnum(String value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+    public String getValue() {
+        return value;
+    }
+
+    public static String getValueToName(String code){
+        if (StrUtil.isEmpty(code)){
+            return null;
+        }
+        if (CHANGZHU.getValue().equals(code)){
+            return  CHANGZHU.name;
+        } else if (ZANZHU.getValue().equals(code)){
+            return  ZANZHU.name;
+        } else if (JINGWAICHANGZHU.getValue().equals(code)){
+            return  JINGWAICHANGZHU.name;
+        } else if (LIUDONG.getValue().equals(code)){
+            return  LIUDONG.name;
+        } else if (JIZHU.getValue().equals(code)){
+            return  JIZHU.name;
+        } else if (LINSHIZHUSU.getValue().equals(code)){
+            return  LINSHIZHUSU.name;
+        } else if (OTHER.getValue().equals(code)){
+            return  OTHER.name;
+        }
+
+        return null;
+    }
+}

+ 121 - 0
src/main/java/com/iden/common/vo/PersonVO.java

@@ -0,0 +1,121 @@
+package com.iden.common.vo;
+
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 人员表(IdenPerson)实体类
+ *
+ * @author makejava
+ * @since 2021-12-22 17:23:47
+ */
+
+@Data
+@ApiModel(value = "人员表", description = "")
+public class PersonVO implements Serializable {
+    private static final long serialVersionUID = -95513090380191735L;
+
+    private Long id;
+
+
+    @ApiModelProperty("人脸特征ID")
+    private String featPtr;
+
+
+    @ApiModelProperty("姓名")
+    private String name;
+
+
+    @ApiModelProperty("图像")
+    private String image;
+
+
+    @ApiModelProperty("性别:M:男 W:女")
+    private String gender;
+
+
+    @ApiModelProperty("证件类型:1:身份证 2:护照  3 军官证")
+    private String credentialsTyoe;
+
+
+    @ApiModelProperty("证件号码")
+    private String credentialsCode;
+
+
+    @ApiModelProperty("手机号码")
+    private String phone;
+
+
+    @ApiModelProperty("人员类型:1:常住人口 2:暂住人口 3:境外长住人口 4:流动人口 5:寄住人口 6: 临时住宿人口 99其他")
+    private String personType;
+
+    @ApiModelProperty("人员类型:1:常住人口 2:暂住人口 3:境外长住人口 4:流动人口 5:寄住人口 6: 临时住宿人口 99其他")
+    private String personTypeName;
+
+    @ApiModelProperty("民族")
+    private String nation;
+
+
+    @ApiModelProperty("政治面貌")
+    private String policitalStatus;
+
+
+    @ApiModelProperty("婚姻")
+    private String marriage;
+
+
+    @ApiModelProperty("口音")
+    private String voice;
+
+
+    @ApiModelProperty("所属区域")
+    private String district;
+
+    @ApiModelProperty("所属街道")
+    private String subdistrict;
+
+    @ApiModelProperty("所属小区id")
+    private Long communityId;
+
+
+    @ApiModelProperty("地址")
+    private String address;
+
+
+    @ApiModelProperty("工作单位")
+    private String workPlace;
+
+
+    @ApiModelProperty("单位地址")
+    private String workAddress;
+
+
+    @ApiModelProperty("类型:1、重点人员,2、小区人员,多个用逗号分割")
+    private String type;
+
+    @ApiModelProperty("类型名:1、重点人员,2、小区人员,多个用逗号分割")
+    private String typeName;
+
+    @ApiModelProperty("人群类型,多个用逗号分割")
+    private String crowdName;
+
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    @ApiModelProperty("createTime")
+    private Date createTime;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    @ApiModelProperty("modifyTime")
+    private Date modifyTime;
+
+
+}

+ 2 - 0
src/main/resources/application-dev.properties

@@ -32,3 +32,5 @@ spring.redis.jedis.pool.min-idle=5
 #服务部署根目录
 iden.root=/data/iden/
 
+file.url=https://iden.106tec.com/iden-file/
+