From be212e350c36973696345e4b0ad6cf95a2039f4d Mon Sep 17 00:00:00 2001 From: gaoben Date: Wed, 14 Aug 2024 16:38:43 +0800 Subject: [PATCH] =?UTF-8?q?v10,=E5=A4=A7=E5=B1=8F=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E6=89=B9=E9=87=8F=E4=B8=8A=E4=BC=A0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/utils/CompressZipUtils.java | 79 ++++++++++++------- .../common/utils/IDCardValidator.java | 32 ++++++++ .../excel/listener/PersonExcelListener.java | 9 +++ .../httpapi/controler/HttpApiController.java | 9 ++- .../ten/controller/TenDataViewController.java | 25 +++++- .../modules/ten/dao/TenPersonDao.java | 7 +- .../modules/ten/dao/TenRecordDao.java | 3 + .../modules/ten/entity/TenRecordEntity.java | 2 + .../modules/ten/service/TenPersonService.java | 7 +- .../modules/ten/service/TenRecordService.java | 3 + .../service/impl/TenPersonServiceImpl.java | 5 ++ .../service/impl/TenRecordServiceImpl.java | 6 ++ .../modules/vo/TenDeptPersonCount.java | 9 +++ .../modules/vo/TenTodayLabelCount.java | 9 +++ .../src/main/resources/application.yml | 10 +-- .../resources/mapper/ten/TenPersonDao.xml | 9 +++ .../resources/mapper/ten/TenRecordDao.xml | 18 ++++- 17 files changed, 195 insertions(+), 47 deletions(-) create mode 100644 shapelight-admin/src/main/java/net/shapelight/common/utils/IDCardValidator.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/vo/TenDeptPersonCount.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/vo/TenTodayLabelCount.java diff --git a/shapelight-admin/src/main/java/net/shapelight/common/utils/CompressZipUtils.java b/shapelight-admin/src/main/java/net/shapelight/common/utils/CompressZipUtils.java index b493393..5667f5d 100644 --- a/shapelight-admin/src/main/java/net/shapelight/common/utils/CompressZipUtils.java +++ b/shapelight-admin/src/main/java/net/shapelight/common/utils/CompressZipUtils.java @@ -2,19 +2,21 @@ package net.shapelight.common.utils; import com.github.junrar.Archive; import com.github.junrar.rarfile.FileHeader; +import lombok.extern.slf4j.Slf4j; +import net.coobird.thumbnailator.Thumbnails; import org.apache.commons.io.FileUtils; import org.apache.tools.zip.ZipEntry; import org.apache.tools.zip.ZipFile; import org.springframework.beans.factory.annotation.Autowired; -import java.io.File; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.OutputStream; +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.*; import java.util.*; +@Slf4j public class CompressZipUtils { -// @Autowired + // @Autowired // private static List copyFileNames = new ArrayList<>(); private static List excelFiles = new ArrayList<>(); private static List imageFiles = new ArrayList<>(); @@ -84,29 +86,30 @@ public class CompressZipUtils { 解压到指定文件夹下,然后拷贝到目标文件夹下覆盖 */ @SuppressWarnings("rawtypes") - public static Map> unZipFiles(File zipFile, String unZipDir) throws Exception { + public static Map> unZipFiles(File zipFile, String unZipDir) throws Exception { excelFiles.clear(); imageFiles.clear(); - Map> filesMap = new HashMap<>(); + Map> filesMap = new HashMap<>(); File pathFile = new File(unZipDir); - if(!pathFile.exists()){ + if (!pathFile.exists()) { pathFile.mkdirs(); } ZipFile zip = new ZipFile(zipFile); //List fileNames = new ArrayList<>(); - for(Enumeration entries = zip.getEntries();entries.hasMoreElements();){ - ZipEntry entry = (ZipEntry)entries.nextElement(); + for (Enumeration entries = zip.getEntries(); entries.hasMoreElements(); ) { + ZipEntry entry = (ZipEntry) entries.nextElement(); entry.setUnixMode(644); // 解决linux乱码 String zipEntryName = entry.getName(); InputStream in = zip.getInputStream(entry); - String outPath = (unZipDir+zipEntryName).replaceAll("\\*", "/");; + String outPath = (unZipDir + zipEntryName).replaceAll("\\*", "/"); + ; //判断路径是否存在,不存在则创建文件路径 File file = new File(outPath.substring(0, outPath.lastIndexOf('/'))); - if(!file.exists()){ + if (!file.exists()) { file.mkdirs(); } //判断文件全路径是否为文件夹,如果是上面已经上传,不需要解压 - if(new File(outPath).isDirectory()){ + if (new File(outPath).isDirectory()) { continue; } //输出文件路径信息 @@ -115,8 +118,8 @@ public class CompressZipUtils { OutputStream out = new FileOutputStream(outPath); byte[] buf1 = new byte[1024]; int len; - while((len=in.read(buf1))>0){ - out.write(buf1,0,len); + while ((len = in.read(buf1)) > 0) { + out.write(buf1, 0, len); } in.close(); out.close(); @@ -133,27 +136,46 @@ public class CompressZipUtils { // System.out.println(string); // } - filesMap.put("excel",excelFiles); - filesMap.put("image",imageFiles); + filesMap.put("excel", excelFiles); + filesMap.put("image", imageFiles); return filesMap; } - public static void listFiles(File srcDir){ + public static void listFiles(File srcDir) { // excelFiles.clear(); // imageFiles.clear(); File[] files = srcDir.listFiles(); //列出所有的子文件 - for(File file :files) - { - if(file.isFile())//如果是文件,则输出文件名字 + for (File file : files) { + if (file.isFile())//如果是文件,则输出文件名字 { String fileName = file.getAbsolutePath(); //判断jpg图片 if (fileName.endsWith("jpg") || fileName.endsWith("jpeg") || fileName.endsWith("png")) { + //-----------------------------压缩图片------------------------------------------------ + try { +// File picture = new File(orgFileStr); + BufferedImage sourceImg = ImageIO.read(new FileInputStream(file)); + int w = sourceImg.getWidth(); + int h = sourceImg.getHeight(); +// long fileSize = picture.length(); +// if(fileSize<200000l){ +// continue; +// } + if (w > 1080 || h > 1080) { + Thumbnails.of(file) + .size(1080, 1080) + .toFile(file); + } + log.error("压缩图片。。。。。。。。。。。。。。。。。。。。。。。。。。。。"); + } catch (Exception e) { + log.error(e.getMessage()); + } + //----------------------------------------------------------------------------- imageFiles.add(fileName); - }else if(fileName.endsWith("xls") || fileName.endsWith("xlsx")){ + } else if (fileName.endsWith("xls") || fileName.endsWith("xlsx")) { excelFiles.add(fileName); } - }else if(file.isDirectory())//如果是文件夹,则输出文件夹的名字,并递归遍历该文件夹 + } else if (file.isDirectory())//如果是文件夹,则输出文件夹的名字,并递归遍历该文件夹 { listFiles(file);//递归遍历 } @@ -161,7 +183,6 @@ public class CompressZipUtils { } - // public static File[] returnFiles(String strPath) { // File dir = new File(strPath); // File[] files = dir.listFiles(); // 该文件目录下文件全部放入数组 @@ -203,7 +224,7 @@ public class CompressZipUtils { // return copyFileNames; // } - public static void main(String args[]){ + public static void main(String args[]) { // try{ // File srcDir = new File("D:/images/20190909095419/2019"); // List names = copyJpgFiles(srcDir,"D:/images/20190909095419/2020"); @@ -213,16 +234,16 @@ public class CompressZipUtils { // // } - try{ + try { File srcDir = new File("D:\\project\\cell\\temp\\730349916982870023\\ab028c688f294c74a91ed4290c381afa"); listFiles(srcDir); - for(String string: CompressZipUtils.getExcelFiles()){ + for (String string : CompressZipUtils.getExcelFiles()) { System.out.println(string); } - for(String string: CompressZipUtils.getImageFiles()){ + for (String string : CompressZipUtils.getImageFiles()) { System.out.println(string); } - }catch (Exception e){ + } catch (Exception e) { } diff --git a/shapelight-admin/src/main/java/net/shapelight/common/utils/IDCardValidator.java b/shapelight-admin/src/main/java/net/shapelight/common/utils/IDCardValidator.java new file mode 100644 index 0000000..aa37c9a --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/common/utils/IDCardValidator.java @@ -0,0 +1,32 @@ +package net.shapelight.common.utils; + +public class IDCardValidator { + public static boolean isValidChineseID(String id) { + if (id == null || (id.length() != 18)) { + return false; + } + + char[] idArray = id.toCharArray(); + int[] weight = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2}; + char[] checkCode = {'1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'}; + int sum = 0; + + for (int i = 0; i < idArray.length - 1; i++) { + int num = Integer.parseInt(String.valueOf(idArray[i])); + if (num < 0 || num > 9) { + return false; + } + sum += num * weight[i]; + } + + sum = sum % 11; + char lastChar = idArray[17]; + return lastChar == checkCode[sum]; + } + + public static void main(String[] args) { + String id = "610402196509200013"; + boolean valid = isValidChineseID(id); + System.out.println("身份证号码 " + id + " 是否有效: " + valid); + } +} \ No newline at end of file diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/excel/listener/PersonExcelListener.java b/shapelight-admin/src/main/java/net/shapelight/modules/excel/listener/PersonExcelListener.java index cc6d1af..80c968f 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/excel/listener/PersonExcelListener.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/excel/listener/PersonExcelListener.java @@ -11,6 +11,7 @@ import com.arcsoft.face.toolkit.ImageInfo; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.minio.PutObjectOptions; import lombok.Getter; +import net.shapelight.common.utils.IDCardValidator; import net.shapelight.common.utils.R; import net.shapelight.common.utils.UUIDUtil; import net.shapelight.commons.engine.sdk.PicSDK; @@ -239,6 +240,12 @@ public class PersonExcelListener extends AnalysisEventListener { list.add(personModel); return; } + boolean idCardVilid = IDCardValidator.isValidChineseID(personModel.getIdCard()); + if(!idCardVilid){ + personModel.setMessage("身份证号码不合规"); + list.add(personModel); + return; + } String gender = personModel.getGender(); if(gender==null){ @@ -250,6 +257,8 @@ public class PersonExcelListener extends AnalysisEventListener { char genderCode = personModel.getIdCard().charAt(16); String g = (genderCode % 2 == 0) ? "女" : "男"; personModel.setGender(g); + }else{ + personModel.setGender("男"); } } // if (!gender.equals("男") && !gender.equals("女")) { diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/httpapi/controler/HttpApiController.java b/shapelight-admin/src/main/java/net/shapelight/modules/httpapi/controler/HttpApiController.java index cca79bf..6efc1a6 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/httpapi/controler/HttpApiController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/httpapi/controler/HttpApiController.java @@ -1545,6 +1545,7 @@ public class HttpApiController { record.setScore(Float.parseFloat(scoreString)); record.setIdCard(idCard); record.setName(name); + record.setLabelName("访客"); try { //保存图片 @@ -1608,6 +1609,7 @@ public class HttpApiController { //人脸识别成功, TenPersonEntity tenPersonEntity = tenPersonService.getByIdWithDelete(Long.parseLong(faceRecognitionResDTO.getPersonId())); + String labelName = ""; //----------------------------------------以下业务----------------------------------------------------- log.debug("人脸识别成功:"+sn); // TenDeviceEntity deviceEntity = tenDeviceService.findBySn(sn); @@ -1615,7 +1617,7 @@ public class HttpApiController { if(tenPersonEntity.getPersonType() == Constant.PERSON_TYPE_GUEST){ //访客,直接判断有效期 if(now.getTime() >= tenPersonEntity.getLiveStart().getTime() && now.getTime() <= tenPersonEntity.getLiveEnd().getTime()){ - + labelName = "访客"; }else{ //不在时间段内 return R.error("不在有效期,禁止通行"); @@ -1629,6 +1631,7 @@ public class HttpApiController { TenLabelEntity personLabel = tenLabelService.getById(tenPersonEntity.getLabelId()); for(TenLabelEntity labelEntity: labelList){ if(labelEntity.getLabelId().intValue() == personLabel.getLabelId().intValue()){ + labelName = labelEntity.getName(); hasLabel = true; break; } @@ -1684,6 +1687,7 @@ public class HttpApiController { // record.setScore(faceRecognitionResDTO.getSimilar()); record.setIdCard(tenPersonEntity.getIdCard()); record.setName(tenPersonEntity.getName()); + record.setLabelName(labelName); try { //保存图片 @@ -1713,6 +1717,7 @@ public class HttpApiController { if(icCard !=null && icCard.length()>0){ // TenDeviceEntity deviceEntity = tenDeviceService.findBySn(sn); TenPersonEntity tenPersonEntity = tenPersonService.findByIcCardTop(icCard,deviceEntity.getTenantId()+""); + String labelName = ""; if(tenPersonEntity!=null){ //----------------------------------------以下业务----------------------------------------------------- @@ -1724,6 +1729,7 @@ public class HttpApiController { for(TenLabelEntity labelEntity: labelList){ if(labelEntity.getLabelId().intValue() == personLabel.getLabelId().intValue()){ hasLabel = true; + labelName = labelEntity.getName(); break; } } @@ -1758,6 +1764,7 @@ public class HttpApiController { record.setIdCard(tenPersonEntity.getIdCard()); record.setName(tenPersonEntity.getName()); record.setScore(1.0f); + record.setLabelName(labelName); // tenRecordService.saveServer(record); recordSaveSyncService.offerQueue(record); diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenDataViewController.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenDataViewController.java index 8a07594..503f8de 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenDataViewController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenDataViewController.java @@ -12,9 +12,7 @@ import net.shapelight.modules.sys.entity.SysUserEntity; import net.shapelight.modules.sys.service.SysUserRoleService; import net.shapelight.modules.ten.entity.*; import net.shapelight.modules.ten.service.*; -import net.shapelight.modules.vo.TenBuildVo; -import net.shapelight.modules.vo.TenPersonMonthCountVo; -import net.shapelight.modules.vo.TenRecordVo; +import net.shapelight.modules.vo.*; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -604,4 +602,25 @@ public class TenDataViewController extends AbstractController { private String name; private Integer value; } + + + @GetMapping("/getTodayLabelRecordCount") + @ApiOperation(value = "当天人员类型通行统计",response = Map.class) + public R getTodayLabelRecordCount(@RequestParam Map params){ + String tenantId = getUser().getTenantId()+""; + params.put("tenantId",tenantId+""); + + List countData = tenRecordService.findTodayLabelCount(tenantId); + return R.ok().put("data", countData); + } + + @GetMapping("/getDeptPersonCount") + @ApiOperation(value = "组织人员统计",response = Map.class) + public R getDeptPersonCount(@RequestParam Map params){ + String tenantId = getUser().getTenantId()+""; + params.put("tenantId",tenantId+""); + + List countData = tenPersonService.findDeptCount(tenantId); + return R.ok().put("data", countData); + } } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenPersonDao.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenPersonDao.java index a032186..625a895 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenPersonDao.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenPersonDao.java @@ -5,10 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import net.shapelight.modules.ten.entity.TenLabelEntity; import net.shapelight.modules.ten.entity.TenPersonEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import net.shapelight.modules.vo.TenPersonIdUpdateAllVo; -import net.shapelight.modules.vo.TenPersonIdUpdateVo; -import net.shapelight.modules.vo.TenPersonMonthCountVo; -import net.shapelight.modules.vo.TenPersonVo; +import net.shapelight.modules.vo.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -131,4 +128,6 @@ public interface TenPersonDao { List getAllIdCard(@Param("tenantId")String tenantId); + List findDeptCount(@Param("tenantId")String tenantId); + } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenRecordDao.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenRecordDao.java index d5fba4d..44f2424 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenRecordDao.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/dao/TenRecordDao.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import net.shapelight.modules.ten.entity.TenLabelEntity; import net.shapelight.modules.ten.entity.TenRecordEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import net.shapelight.modules.vo.TenTodayLabelCount; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -53,4 +54,6 @@ public interface TenRecordDao{ void deleteDaysIntervalRecords(@Param("days") String days, @Param("tenantId") String tenantId); List findListAll(@Param("cellIds") List cellIds, @Param("params") Map params); + + List findTodayLabelCount(@Param("tenantId") String tenantId); } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/entity/TenRecordEntity.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/entity/TenRecordEntity.java index 77a9dd6..163a4f2 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/entity/TenRecordEntity.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/entity/TenRecordEntity.java @@ -188,4 +188,6 @@ cameraParam 否 string 相机参数 private String idCard; private String name; + private String labelName; + } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/TenPersonService.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/TenPersonService.java index 360b3e8..b898577 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/TenPersonService.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/TenPersonService.java @@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import net.shapelight.common.utils.PageUtils; import net.shapelight.modules.excel.model.PersonModel; import net.shapelight.modules.ten.entity.*; -import net.shapelight.modules.vo.TenPersonIdUpdateAllVo; -import net.shapelight.modules.vo.TenPersonIdUpdateVo; -import net.shapelight.modules.vo.TenPersonMonthCountVo; -import net.shapelight.modules.vo.TenPersonVo; +import net.shapelight.modules.vo.*; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -162,5 +159,7 @@ public interface TenPersonService { List getAllIdCard(String tenantId); + List findDeptCount(String tenantId); + } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/TenRecordService.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/TenRecordService.java index ff2af45..12160ac 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/TenRecordService.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/TenRecordService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import net.shapelight.common.utils.PageUtils; import net.shapelight.modules.ten.entity.TenRecordEntity; +import net.shapelight.modules.vo.TenTodayLabelCount; import org.apache.ibatis.annotations.Param; import java.io.Serializable; @@ -54,5 +55,7 @@ public interface TenRecordService { List findListAll(Map params); + List findTodayLabelCount(String tenantId); + } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenPersonServiceImpl.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenPersonServiceImpl.java index e19619e..6f06051 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenPersonServiceImpl.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenPersonServiceImpl.java @@ -2570,4 +2570,9 @@ public class TenPersonServiceImpl implements TenPersonService { public List getAllIdCard(String tenantId) { return tenPersonDao.getAllIdCard(tenantId); } + + @Override + public List findDeptCount(String tenantId) { + return tenPersonDao.findDeptCount(tenantId); + } } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenRecordServiceImpl.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenRecordServiceImpl.java index 64ecc0e..429bdbc 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenRecordServiceImpl.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenRecordServiceImpl.java @@ -13,6 +13,7 @@ import net.shapelight.modules.ten.dao.TenLabelDao; import net.shapelight.modules.ten.entity.*; import net.shapelight.modules.ten.service.*; import net.shapelight.modules.vo.TenRecordVo; +import net.shapelight.modules.vo.TenTodayLabelCount; import org.apache.commons.io.FilenameUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.CacheEvict; @@ -556,4 +557,9 @@ public class TenRecordServiceImpl implements TenRecordService { } return page; } + + @Override + public List findTodayLabelCount(String tenantId) { + return tenRecordDao.findTodayLabelCount(tenantId); + } } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/vo/TenDeptPersonCount.java b/shapelight-admin/src/main/java/net/shapelight/modules/vo/TenDeptPersonCount.java new file mode 100644 index 0000000..5e092ed --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/vo/TenDeptPersonCount.java @@ -0,0 +1,9 @@ +package net.shapelight.modules.vo; + +import lombok.Data; + +@Data +public class TenDeptPersonCount { + private String deptName; + private Integer count; +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/vo/TenTodayLabelCount.java b/shapelight-admin/src/main/java/net/shapelight/modules/vo/TenTodayLabelCount.java new file mode 100644 index 0000000..f17bdd7 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/vo/TenTodayLabelCount.java @@ -0,0 +1,9 @@ +package net.shapelight.modules.vo; + +import lombok.Data; + +@Data +public class TenTodayLabelCount { + private String labelName; + private Integer labelCount; +} diff --git a/shapelight-admin/src/main/resources/application.yml b/shapelight-admin/src/main/resources/application.yml index 8dcee26..ced4ea3 100644 --- a/shapelight-admin/src/main/resources/application.yml +++ b/shapelight-admin/src/main/resources/application.yml @@ -61,9 +61,9 @@ global: opt_dir: opt db_bak: db_filepath: db_bak - db_name: cell_db_0511 - db_username: root - db_password: root + db_name: cell_db_v10_pv_xianyang2 + db_username: user + db_password: user@server001 db_host: localhost db_port: 3306 minio: @@ -109,8 +109,8 @@ config: sdk-key: vWbvUyStZeartSaM6QoTzPYWFpSaj4uhfDmRifSzCd6 active-key: 82G1-11QA-713Y-8NB4 active-file: - detect-pool-size: 5 - compare-pool-size: 5 + detect-pool-size: 16 + compare-pool-size: 16 rec-face-thd: 0.8 rec-id-thd: 0.5 diff --git a/shapelight-admin/src/main/resources/mapper/ten/TenPersonDao.xml b/shapelight-admin/src/main/resources/mapper/ten/TenPersonDao.xml index 967d5bd..1feb92d 100644 --- a/shapelight-admin/src/main/resources/mapper/ten/TenPersonDao.xml +++ b/shapelight-admin/src/main/resources/mapper/ten/TenPersonDao.xml @@ -1392,5 +1392,14 @@ and person_type != 5005 and tenant_id = #{tenantId} + + diff --git a/shapelight-admin/src/main/resources/mapper/ten/TenRecordDao.xml b/shapelight-admin/src/main/resources/mapper/ten/TenRecordDao.xml index a926c4f..acf9c44 100644 --- a/shapelight-admin/src/main/resources/mapper/ten/TenRecordDao.xml +++ b/shapelight-admin/src/main/resources/mapper/ten/TenRecordDao.xml @@ -37,6 +37,7 @@ + @@ -116,6 +117,9 @@ name, + + label_name, + @@ -192,6 +196,9 @@ #{name}, + + #{labelName}, + @@ -247,7 +254,10 @@ id_card = #{idCard,jdbcType=VARCHAR}, - name = #{idCard,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + + + name = #{labelName,jdbcType=VARCHAR}, where record_id = #{recordId,jdbcType=BIGINT} @@ -701,4 +711,10 @@ where DATE_SUB(CURDATE(), INTERVAL #{days} DAY) > record_time + +