人脸抓拍修改

develop
hanrenchun 11 months ago
parent cbaf49e3d9
commit 9347c09ae1

@ -62,6 +62,10 @@
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<!--lombok--> <!--lombok-->
<dependency> <dependency>

@ -1,128 +1,164 @@
package com.ssf.mysqloracletest.domain; package com.ssf.mysqloracletest.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@Data @Data
@TableName(value ="t_strh_entity_info_ks")
public class TStrhEntityInfoKs { public class TStrhEntityInfoKs {
/** /**
* ID * ID
*/ */
@TableField(value = "objectid")
private String objectid; private String objectid;
/** /**
* camerIdx * camerIdx
*/ */
@TableField(value = "cameraidx")
private String cameraidx; private String cameraidx;
/** /**
* *
*/ */
@TableField(value = "capturetime")
private String capturetime; private String capturetime;
/** /**
* *
*/ */
@TableField(value = "image")
private String image; private String image;
/** /**
* IMAGE_JPEG * IMAGE_JPEG
*/ */
@TableField(value = "image_format")
private String image_format; private String image_format;
/** /**
* *
*/ */
@TableField(value = "vertices")
private String vertices; private String vertices;
/** /**
* *
*/ */
@TableField(value = "smalimage")
private String smalimage; private String smalimage;
/** /**
* IMAGE_JPEG * IMAGE_JPEG
*/ */
@TableField(value = "smalimage_format")
private String smalimage_format; private String smalimage_format;
/** /**
* id * id
*/ */
@TableField(value = "objectid_old")
private String objectid_old; private String objectid_old;
/** /**
* *
*/ */
@TableField(value = "age_lower_limit")
private String age_lower_limit; private String age_lower_limit;
/** /**
* *
*/ */
@TableField(value = "age_up_limit")
private String age_up_limit; private String age_up_limit;
@TableField(value = "black_type")
private String black_type; private String black_type;
/** /**
* *
*/ */
@TableField(value = "cap_style")
private String cap_style; private String cap_style;
/** /**
* *
*/ */
@TableField(value = "gender_code")
private String gender_code; private String gender_code;
/** /**
* *
*/ */
@TableField(value = "glass_style")
private String glass_style; private String glass_style;
/** /**
* *
*/ */
@TableField(value = "mustache_style")
private String mustache_style; private String mustache_style;
/** /**
* *
*/ */
@TableField(value = "respirator_color")
private String respirator_color; private String respirator_color;
/** /**
* *
*/ */
@TableField(value = "st_age")
private String st_age; private String st_age;
/** /**
* *
*/ */
@TableField(value = "st_age_value")
private String st_age_value; private String st_age_value;
/** /**
* *
*/ */
@TableField(value = "st_expression")
private String st_expression; private String st_expression;
/** /**
* *
*/ */
@TableField(value = "st_helmet_style")
private String st_helmet_style; private String st_helmet_style;
/** /**
* *
*/ */
@TableField(value = "rksj")
private String rksj; private String rksj;
/** /**
* *
*/ */
@TableField(value = "gxsj")
private String gxsj; private String gxsj;
/** /**
* ID * ID
*/ */
@TableField(value = "entityid")
private String entityid; private String entityid;
/** /**
* *
*/ */
@TableField(value = "entityupdatetime")
private String entityupdatetime; private String entityupdatetime;
/** /**
* *
*/ */
@TableField(value = "gender")
private String gender; private String gender;
/** /**
* *
*/ */
@TableField(value = "identityid")
private String identityid; private String identityid;
/** /**
* *
*/ */
@TableField(value = "name")
private String name; private String name;
/** /**
* *
*/ */
@TableField(value = "natives")
private String natives; private String natives;
@TableField(value = "remark")
private String remark; private String remark;
@TableField(value = "yxx")
private String yxx; private String yxx;
/** /**
* *
*/ */
@TableField(value = "storagepath")
private String storagepath; private String storagepath;
@TableField(value = "regionid")
private String regionid; private String regionid;
} }

@ -2,6 +2,7 @@ package com.ssf.mysqloracletest.mapper;
import com.ssf.mysqloracletest.domain.TransitUserRecord; import com.ssf.mysqloracletest.domain.TransitUserRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/** /**
* @author 10503 * @author 10503
@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @createDate 2023-12-22 10:29:24 * @createDate 2023-12-22 10:29:24
* @Entity com.ssf.mysqloracletest.domain.TransitUserRecord * @Entity com.ssf.mysqloracletest.domain.TransitUserRecord
*/ */
@Mapper
public interface TransitUserRecordMapper extends BaseMapper<TransitUserRecord> { public interface TransitUserRecordMapper extends BaseMapper<TransitUserRecord> {
} }

@ -1,9 +1,11 @@
package com.ssf.mysqloracletest.service.impl; package com.ssf.mysqloracletest.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ssf.mysqloracletest.domain.TransitUserRecord; import com.ssf.mysqloracletest.domain.TransitUserRecord;
import com.ssf.mysqloracletest.service.TransitUserRecordService; import com.ssf.mysqloracletest.service.TransitUserRecordService;
import com.ssf.mysqloracletest.mapper.TransitUserRecordMapper; import com.ssf.mysqloracletest.mapper.TransitUserRecordMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
@ -12,6 +14,8 @@ import org.springframework.stereotype.Service;
* @createDate 2023-12-22 10:29:24 * @createDate 2023-12-22 10:29:24
*/ */
@Service @Service
@DS("mysql")
@RequiredArgsConstructor
public class TransitUserRecordServiceImpl extends ServiceImpl<TransitUserRecordMapper, TransitUserRecord> public class TransitUserRecordServiceImpl extends ServiceImpl<TransitUserRecordMapper, TransitUserRecord>
implements TransitUserRecordService{ implements TransitUserRecordService{

@ -102,6 +102,9 @@ public class MetaActualUnitUserInfoTask {
@Scheduled(initialDelay = 100, fixedDelay = 3000) @Scheduled(initialDelay = 100, fixedDelay = 3000)
public void transCyryToPic() { public void transCyryToPic() {
if (!"true".equals(ConfigParam.metaActualUnitUserInfoSwitch)) {
return;
}
List<MetaActualUnitUserInfo> impUserInfos = metaActualUnitUserInfoService.getListByPic(); List<MetaActualUnitUserInfo> impUserInfos = metaActualUnitUserInfoService.getListByPic();
for (MetaActualUnitUserInfo userInfo : impUserInfos) { for (MetaActualUnitUserInfo userInfo : impUserInfos) {
VillageActualUserInfo userInfoPara = new VillageActualUserInfo(); VillageActualUserInfo userInfoPara = new VillageActualUserInfo();

@ -107,6 +107,9 @@ public class MetaImpUserInfoTask {
@Scheduled(initialDelay = 100, fixedDelay = 3000) @Scheduled(initialDelay = 100, fixedDelay = 3000)
public void transCyryToPic() { public void transCyryToPic() {
if (!"true".equals(ConfigParam.metaImpUserSwitch)) {
return;
}
List<MetaImpUserInfo> impUserInfos = metaImpUserInfoService.getListByPic(); List<MetaImpUserInfo> impUserInfos = metaImpUserInfoService.getListByPic();
for (MetaImpUserInfo userInfo : impUserInfos) { for (MetaImpUserInfo userInfo : impUserInfos) {
VillageActualUserInfo userInfoPara = new VillageActualUserInfo(); VillageActualUserInfo userInfoPara = new VillageActualUserInfo();

@ -1,7 +1,9 @@
package com.ssf.mysqloracletest.task; package com.ssf.mysqloracletest.task;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ssf.mysqloracletest.domain.TStrhEntityInfoKs; import com.ssf.mysqloracletest.domain.TStrhEntityInfoKs;
import com.ssf.mysqloracletest.domain.TransitUserRecord; import com.ssf.mysqloracletest.domain.TransitUserRecord;
@ -36,8 +38,6 @@ public class TStrhEntityInfoKsTask {
@Resource @Resource
private TransitUserRecordService transitUserRecordService; private TransitUserRecordService transitUserRecordService;
final int oncesCounts = NumKit.checkInt(ConfigParam.oncesCounts) == 0 ? 1000 : NumKit.checkInt(ConfigParam.oncesCounts);
String maxTime = "2023-10-01 00:00:00"; String maxTime = "2023-10-01 00:00:00";
@Scheduled(initialDelay = 100, fixedDelay = 3000) @Scheduled(initialDelay = 100, fixedDelay = 3000)
@ -47,19 +47,15 @@ public class TStrhEntityInfoKsTask {
} }
try { try {
int countTStrh = tStrhEntityInfoKsService.count(); LambdaQueryWrapper<TStrhEntityInfoKs> queryWrapper = Wrappers.lambdaQuery();
queryWrapper.gt(TStrhEntityInfoKs::getCapturetime, maxTime);
int countTStrh = tStrhEntityInfoKsService.count(queryWrapper);
if (countTStrh > 0) { if (countTStrh > 0) {
int count = countTStrh / 200;
int count = countTStrh / oncesCounts;
CountDownLatch latch = new CountDownLatch(countTStrh);
for (int i = 0; i <= count; i++) { for (int i = 0; i <= count; i++) {
try { try {
QueryWrapper<TStrhEntityInfoKs> queryWrapper = new QueryWrapper<>(); Page<TStrhEntityInfoKs> page = new Page<>(i + 1, 200);
queryWrapper.ge("captureTime", maxTime); List<TStrhEntityInfoKs> resultList = tStrhEntityInfoKsService.page(page,queryWrapper).getRecords();
Page<TStrhEntityInfoKs> page = new Page<>(i + 1, 1000);
List<TStrhEntityInfoKs> resultList = tStrhEntityInfoKsService.page(page, queryWrapper).getRecords();
for (TStrhEntityInfoKs entityInfoKs : resultList) { for (TStrhEntityInfoKs entityInfoKs : resultList) {
TransitUserRecord transitUserRecord = new TransitUserRecord(); TransitUserRecord transitUserRecord = new TransitUserRecord();
transitUserRecord.setDeviceCode(entityInfoKs.getCameraidx()); transitUserRecord.setDeviceCode(entityInfoKs.getCameraidx());
@ -89,15 +85,8 @@ public class TStrhEntityInfoKsTask {
} catch (Exception e) { } catch (Exception e) {
logger.info("TSInfos:" + StringKit.getTrace(e)); logger.info("TSInfos:" + StringKit.getTrace(e));
} }
latch.countDown();
} }
try {
// Wait for all threads to complete
latch.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
} }
} catch (Exception e) { } catch (Exception e) {
logger.info(StringKit.getTrace(e)); logger.info(StringKit.getTrace(e));

@ -97,6 +97,9 @@ public class VSySydzTask {
@Scheduled(initialDelay = 100, fixedDelay = 3000) @Scheduled(initialDelay = 100, fixedDelay = 3000)
public void transSydz() { public void transSydz() {
if (!"true".equals(ConfigParam.sydzSwitch)) {
return;
}
try { try {
Map mapPara = new HashMap(); Map mapPara = new HashMap();

@ -4,6 +4,7 @@ import com.ssf.mysqloracletest.domain.MetaHuntersInfo;
import com.ssf.mysqloracletest.domain.VillageActualUserInfo; import com.ssf.mysqloracletest.domain.VillageActualUserInfo;
import com.ssf.mysqloracletest.service.MetaHuntersInfoService; import com.ssf.mysqloracletest.service.MetaHuntersInfoService;
import com.ssf.mysqloracletest.service.VillageActualUserInfoService; import com.ssf.mysqloracletest.service.VillageActualUserInfoService;
import com.ssf.mysqloracletest.utils.ConfigParam;
import com.ssf.mysqloracletest.utils.StringKit; import com.ssf.mysqloracletest.utils.StringKit;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -32,6 +33,9 @@ public class hunterToPicTask {
public void huntersToPic() { public void huntersToPic() {
if (!"true".equals(ConfigParam.sydzSwitch)) {
return;
}
List<MetaHuntersInfo> huntersInfos = huntersInfoService.getHuntersList(); List<MetaHuntersInfo> huntersInfos = huntersInfoService.getHuntersList();
for (MetaHuntersInfo huntersInfo : huntersInfos) { for (MetaHuntersInfo huntersInfo : huntersInfos) {
String idcard = huntersInfo.getIdCard(); String idcard = huntersInfo.getIdCard();

Loading…
Cancel
Save