develop
hanrenchun 9 months ago
parent d0d838b7be
commit dcf9829a1d

@ -77,4 +77,24 @@ public class DevopsVideoInfoController {
}
}
@Scheduled(initialDelay = 100, fixedDelay = 3000)
public void drjc(){
if (!"true".equals(ConfigParam.JCVideoInfoSwitch)) {
return;
}
DevopsVideoInfoDto villageDeviceInfo = new DevopsVideoInfoDto();
String res = "error";
try {
res = devopsVideoInfoService.drjc(villageDeviceInfo);
if (res.contains("success")) {
logger.info("导入成功");
} else {
logger.info("导入失败");
}
} catch (Exception e) {
logger.error(StringKit.getTrace(e) + "导入出现错误");
}
}
}

@ -27,7 +27,7 @@ public class MetaImpUserModelInfo implements Serializable {
/**
* ??̬??Ϣ???
*/
private Integer dataType;
private String dataType;
/**
* ?ص???С?

@ -55,7 +55,7 @@ public class TransitImpUserRecord implements Serializable {
/**
*
*/
private String userPic;
private String personPic;
/**
*

@ -1,7 +1,8 @@
package com.ssf.mysqloracletest.domain.vo;
import com.ssf.mysqloracletest.core.model.BaseEntity;
import com.ssf.mysqloracletest.domain.BaseEntity;
import lombok.Data;
/**

@ -38,4 +38,5 @@ public interface DevopsVideoInfoService0 extends IService<DevopsVideoInfo0> {
public List<DevopsVideoInfoVo> listPoliceVehicle(DevopsVideoInfo0 bean);
public String drzfjly(DevopsVideoInfoDto bean);
public String drjc(DevopsVideoInfoDto bean);
}

@ -315,4 +315,67 @@ public class DevopsVideoInfoServiceImpl extends ServiceImpl<DevopsVideoInfoMappe
return "error-类型不正确";
}
}
public String drjc(DevopsVideoInfoDto bean){
String type = StringKit.toString(bean.getType());
type = "gbs";
if ("".equals(type)) {
return "error-导入类型未设置";
}
if ("gbs".equals(type)) {
int count = 0;
String gbsip = PropertiesUtil.queryPropertiesByKey("gbsIp");
String gbsport = PropertiesUtil.queryPropertiesByKey("gbsPort");
String loginurl = "http://" + gbsip + ":" + gbsport + "/api/v1/login?username=admin&password=af7548eedff8e737c0e4b2a669497290#&url_token_only=true";
String res = JsoupUtils.getJsoupDocGet(loginurl);
JSONObject loginResJson = JSON.parseObject(res);
String urlToken = "";
if (loginResJson != null) {
urlToken = StringKit.toString(loginResJson.get("URLToken"));
}
//如果urltoken获取失败直接结束方法
if ("".equals(urlToken)) {
return "urltoken 获取失败!请检查配置文件是否正确";
}
List<DevopsVideoStatus> list = videoStatusService.lambdaQuery().like(DevopsVideoStatus::getDeviceName, "苏J").list();
logger.info("警车:"+list.size());
for (DevopsVideoStatus devopsVideoStatus : list){
String channellistUrl = "http://" + gbsip + ":" + gbsport + "/api/v1/stream/start?token=" + urlToken + "&serial=32092400002005063063&code="+devopsVideoStatus.getGbsChannelNo();
logger.info("channellistUrl"+ channellistUrl);
String channellistRes = JsoupUtils.getJsoupDocGet(channellistUrl);
if ("".equals(StringKit.toString(channellistRes)) || (StringKit.toString(channellistRes)).contains("error")) {
logger.info("视频流读取失败");
devopsVideoStatus.setIsOnline(2);
QueryWrapper<DevopsVideoStatus> devopsVideoStatusQueryWrapper = new QueryWrapper<>();
devopsVideoStatusQueryWrapper.eq("gbs_channel_no",StringKit.toString(devopsVideoStatus.getGbsChannelNo()));
videoStatusService.update(devopsVideoStatus,devopsVideoStatusQueryWrapper);
logger.info("修改成功:" + devopsVideoStatus.getGbsChannelNo());
continue;
}
logger.info("视频流读取成功" + devopsVideoStatus.getGbsChannelNo());
if (channellistRes != null && channellistRes.contains("ChannelName")) {
String channelUrl = "http://" + gbsip + ":" + gbsport + "/api/v1/stream/stop?token=" + urlToken + "&serial=32092400002005063063&code="+devopsVideoStatus.getGbsChannelNo();
logger.info("channelUrl"+ channelUrl);
String channelRes = JsoupUtils.getJsoupDocGet(channellistUrl);
if ("OK".equals(channelRes)){
logger.info("视频流关闭");
}
devopsVideoStatus.setIsOnline(1);
QueryWrapper<DevopsVideoStatus> devopsVideoStatusQueryWrapper = new QueryWrapper<>();
devopsVideoStatusQueryWrapper.eq("gbs_channel_no",StringKit.toString(devopsVideoStatus.getGbsChannelNo()));
videoStatusService.update(devopsVideoStatus,devopsVideoStatusQueryWrapper);
logger.info("修改成功:" + devopsVideoStatus.getGbsChannelNo());
} else {
return "结果集为空请检查gbs是否配置。";
}
}
return "success-" + count;
} else {
return "error-类型不正确";
}
}
}

@ -25,7 +25,7 @@ import java.util.concurrent.Executors;
@Component
public class DevopeDeviceTask {
private static final Logger logger = LoggerFactory.getLogger(RentalHousingTask.class);
private static final Logger logger = LoggerFactory.getLogger(DevopeDeviceTask.class);
@Resource
private TJksbglMysqlService jksbglMysqlService;
@Resource
@ -102,8 +102,12 @@ public class DevopeDeviceTask {
}
deviceStatus.setHeartbeatTime(System.currentTimeMillis()/1000);
deviceInfo.setDeviceAddress(jksbglMysqlCp.getAzdz());
boolean a = devopsDeviceInfoService.save(deviceInfo);
boolean b = deviceStatusService.save(deviceStatus);
boolean a = devopsDeviceInfoService.lambdaUpdate()
.eq(DevopsDeviceInfo::getGbsChannelNo, deviceInfo.getGbsChannelNo())
.update(deviceInfo);
boolean b = deviceStatusService.lambdaUpdate()
.eq(DevopsDeviceStatus::getGbsChannelNo, deviceInfo.getGbsChannelNo())
.update(deviceStatus);
if (a && b) {
jksbglMysqlCp.setStatus("1");

@ -1,6 +1,8 @@
package com.ssf.mysqloracletest.task;
import com.ssf.mysqloracletest.domain.DevopsDeviceInfo;
import com.ssf.mysqloracletest.domain.DevopsVideoInfo0;
import com.ssf.mysqloracletest.service.DevopsDeviceInfoService;
import com.ssf.mysqloracletest.service.DevopsVideoInfoService0;
import com.ssf.mysqloracletest.utils.ConfigParam;
import lombok.RequiredArgsConstructor;
@ -9,6 +11,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.util.List;
@Component
@ -17,12 +20,13 @@ public class DevopsVideoInfoTask {
private static final Logger logger = LoggerFactory.getLogger(DevopsVideoInfoTask.class);
private final DevopsVideoInfoService0 videoInfoService0;
private final DevopsDeviceInfoService devopsDeviceInfoService;
//偏移量
Double offset = 0.0001;
//查找用偏移量
Double offset1 = 0.00005;
Double offset1 = 0.00002;
//视频设备经纬度偏移
@Scheduled(initialDelay = 100, fixedDelay = 3000)
@ -66,4 +70,61 @@ public class DevopsVideoInfoTask {
}
}
}
@Scheduled(initialDelay = 100, fixedDelay = 3000)
public void devicePosition(){
if (!"true".equals(ConfigParam.devicePositionSwitch)) {
return;
}
//找出经纬度正常的设备
List<DevopsDeviceInfo> list = devopsDeviceInfoService.lambdaQuery()
.ne(DevopsDeviceInfo::getLongitude,0.000000)
.ne(DevopsDeviceInfo::getLatitude,0.000000)
.list();
for (DevopsDeviceInfo devopsDeviceInfo : list){
Double latitude = devopsDeviceInfo.getLatitude().doubleValue();
Double longitude = devopsDeviceInfo.getLongitude().doubleValue();
//根据一个设备的经纬度,找出该设备偏移范围内的所有设备
List<DevopsDeviceInfo> devopsDeviceInfos = devopsDeviceInfoService.lambdaQuery()
.ne(DevopsDeviceInfo::getGbsChannelNo,devopsDeviceInfo.getGbsChannelNo())
.between(DevopsDeviceInfo::getLatitude, latitude - offset1, latitude + offset1)
.between(DevopsDeviceInfo::getLongitude, longitude - offset1, longitude + offset1)
.list();
if (!devopsDeviceInfos.isEmpty()) {
double angleOffset = 360.0 / devopsDeviceInfos.size();
if (devopsDeviceInfos.size() == 1){
for (DevopsDeviceInfo deviceInfo:devopsDeviceInfos){
double newLatitude = deviceInfo.getLatitude().doubleValue() + offset;
double newLongitude = deviceInfo.getLongitude().doubleValue() + offset;
deviceInfo.setLatitude(BigDecimal.valueOf(newLatitude));
deviceInfo.setLongitude(BigDecimal.valueOf(newLongitude));
boolean update = devopsDeviceInfoService.lambdaUpdate()
.eq(DevopsDeviceInfo::getGbsChannelNo, deviceInfo.getGbsChannelNo())
.update(deviceInfo);
if (update){
logger.info("修改成功");
}
}
continue;
}
for (int i = 0; i < devopsDeviceInfos.size(); i++) {
double angle = i * angleOffset;
DevopsDeviceInfo deviceInfo = devopsDeviceInfos.get(i);
// 将极坐标转换为直角坐标
double newLatitude = deviceInfo.getLatitude().doubleValue() + (offset * Math.cos(Math.toRadians(angle)));
double newLongitude = deviceInfo.getLongitude().doubleValue() + (offset * Math.sin(Math.toRadians(angle)));
deviceInfo.setLatitude(BigDecimal.valueOf(newLatitude));
deviceInfo.setLongitude(BigDecimal.valueOf(newLongitude));
boolean update = devopsDeviceInfoService.lambdaUpdate()
.eq(DevopsDeviceInfo::getGbsChannelNo, deviceInfo.getGbsChannelNo())
.update(deviceInfo);
if (update){
logger.info("修改成功");
}
}
}
}
}
}

@ -67,14 +67,14 @@ public class JcjCjxxTask {
cjxxTag = true;
int count = countcjxx / oncesCounts;
CountDownLatch latch = new CountDownLatch(count);
ExecutorService cjxxPool = Executors.newFixedThreadPool(50);
// CountDownLatch latch = new CountDownLatch(count);
// ExecutorService cjxxPool = Executors.newFixedThreadPool(50);
for (int i = 0; i <= count; i++) {
Map cjxxMap = new HashMap();
cjxxMap.put("rowStart", i * oncesCounts);
cjxxMap.put("rowEnd", (i + 1) * oncesCounts);
cjxxPool.submit(() -> {
// cjxxPool.submit(() -> {
try {
List<JcjCjxxViewOracle> cjxxs = cjxxOracleService.getCjxxList(cjxxMap);
for (JcjCjxxViewOracle cjxx : cjxxs) {
@ -110,19 +110,19 @@ public class JcjCjxxTask {
} catch (Exception e) {
logger.info("cjxxs:" + e.getMessage());
}
latch.countDown();
});
// latch.countDown();
// });
logger.info("cjxxMap数据总量:" + countcjxx + "," + "当前处理下标:" + cjxxMap.get("rowStart") + "/" + cjxxMap.get("rowEnd"));
}
try {
// Wait for all threads to complete
latch.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
//
// try {
// // Wait for all threads to complete
// latch.await();
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
// 关闭线程池
cjxxPool.shutdown();
// cjxxPool.shutdown();
}
} catch (Exception e) {

@ -64,14 +64,14 @@ public class JcjJjxxTask {
JjxxTag = true;
int count = countJjxx / oncesCounts;
CountDownLatch latch = new CountDownLatch(count);
ExecutorService JjxxPool = Executors.newFixedThreadPool(50);
// CountDownLatch latch = new CountDownLatch(count);
// ExecutorService JjxxPool = Executors.newFixedThreadPool(50);
for (int i = 0; i <= count; i++) {
Map JjxxMap = new HashMap();
JjxxMap.put("rowStart", i * oncesCounts);
JjxxMap.put("rowEnd", (i + 1) * oncesCounts);
JjxxPool.submit(() -> {
// JjxxPool.submit(() -> {
try {
List<JcjJjxxViewOracle> Jjxxs = jcjJjxxViewOracleService.getJjxxList(JjxxMap);
for (JcjJjxxViewOracle Jjxx : Jjxxs) {
@ -90,19 +90,19 @@ public class JcjJjxxTask {
} catch (Exception e) {
logger.info("Jjxxs:" + StringKit.getTrace(e));
}
latch.countDown();
});
// latch.countDown();
// });
logger.info("JjxxMap数据总量:" + countJjxx + "," + "当前处理下标:" + JjxxMap.get("rowStart") + "/" + JjxxMap.get("rowEnd"));
}
try {
// Wait for all threads to complete
latch.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
// try {
// // Wait for all threads to complete
// latch.await();
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
// 关闭线程池
JjxxPool.shutdown();
// JjxxPool.shutdown();
}
} catch (Exception e) {

@ -48,23 +48,23 @@ public class MetaHandleAlarmTask {
queryWrapper.isNull("status");
Page<JcjCjxxViewMysql> page = new Page<>(1, 1000);
List<JcjCjxxViewMysql> resultList = jcjCjxxViewMysqlService.page(page, queryWrapper).getRecords();
CountDownLatch latch = new CountDownLatch(resultList.size());
// CountDownLatch latch = new CountDownLatch(resultList.size());
// ExecutorService cjxxPool = Executors.newFixedThreadPool(5);
for (JcjCjxxViewMysql bean : resultList) {
// cjxxPool.submit(() -> {
cleanCjxx(bean);
latch.countDown();
// latch.countDown();
// });
}
try {
// Wait for all threads to complete
latch.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
// try {
// // Wait for all threads to complete
// latch.await();
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
// 关闭线程池
// cjxxPool.shutdown();

@ -36,13 +36,12 @@ public class MetaImpUserModelInfoTask {
// final int oncesCounts = NumKit.checkInt(ConfigParam.oncesCounts) == 0 ? 1000 : NumKit.checkInt(ConfigParam.oncesCounts);
@Scheduled(initialDelay = 100, fixedDelay = 3000)
public void transswzdry() {
if (!"true".equals(ConfigParam.SwzdrySwitch)) {
return;
}
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
LocalDateTime now = LocalDateTime.now();
String format = now.format(formatter);
@ -51,18 +50,22 @@ public class MetaImpUserModelInfoTask {
try {
QueryWrapper<SwzdryView> wrapper = new QueryWrapper<>();
wrapper.between("HDFSSJ", format1, format);
wrapper.between("YJFBSJ", format1, format);
List<SwzdryView> list = swzdryViewService.list(wrapper);
for (SwzdryView Info : list) {
MetaImpUserModelInfo modelInfo = new MetaImpUserModelInfo();
modelInfo.setWarning_id(Info.getZDRYYJXXID());
modelInfo.setDataType(Integer.parseInt(Info.getDTXXLB()));
modelInfo.setDataType(Info.getDTXXLB());
modelInfo.setImpUserSubType(Info.getZDRYXL());
modelInfo.setImpUserName(Info.getZDRYXM());
modelInfo.setImpUserIdCard(Info.getZDRYSFZH());
modelInfo.setLongitude(Info.getHDFSDJDZB());
modelInfo.setLatitude(Info.getHDFSDWDZB());
modelInfo.setActivityTime(Info.getHDFSSJ());
String hdfssj = Info.getHDFSSJ();
String yjfbsjString = Info.getYJFBSJ();
LocalDateTime hdfssjTime = LocalDateTime.parse(hdfssj, formatter);
LocalDateTime yjfbsjTime = LocalDateTime.parse(yjfbsjString, formatter);
modelInfo.setActivityTime(hdfssjTime.format(outputFormatter));
modelInfo.setActivityDeviceAddress(Info.getHDFSCSDM());
modelInfo.setActivityDeviceCode(Info.getHDFSCSDM());
modelInfo.setActivityPoliceStationCode(Info.getHDFSDSSGAJGDM());
@ -74,9 +77,7 @@ public class MetaImpUserModelInfoTask {
modelInfo.setDisposalStatus(Integer.parseInt(Info.getFKZT()));// 反馈状态 0未反馈 1已反馈
modelInfo.setSignPoliceStation(Info.getYJJSDWMC());
modelInfo.setSignPoliceCode(Info.getYJJSDW());
String yjfbsjString = Info.getYJFBSJ();
Date yjfbsjDate = dateFormat.parse(yjfbsjString);
modelInfo.setWarningTime(StringKit.toString(yjfbsjDate));
modelInfo.setWarningTime(yjfbsjTime.format(outputFormatter));
modelInfo.setIsImpAddress(Info.getSFZDDW());
modelInfo.setKey1(Info.getKEY1());
modelInfo.setKey2(Info.getKEY2());

@ -48,10 +48,10 @@ public class SlryYjxxOracleTask {
return;
}
int countSlry = tSlryRyjbxxYjxxOracleService.countSlry();
Map slryMap = new HashMap();
slryMap.put("rowStart", 1);
slryMap.put("rowEnd", 100);
slryMap.put("rowEnd", countSlry);
try {
List<TSlryRyjbxxYjxx> slryList = tSlryRyjbxxYjxxOracleService.getSlryList(slryMap);
for (TSlryRyjbxxYjxx slry : slryList) {
@ -74,7 +74,7 @@ public class SlryYjxxOracleTask {
transitHuntersUserModelRecord.setFirstPassTime(String.valueOf(dateFormat.parse(slry.getVALUE1()).getTime()/1000));
transitHuntersUserModelRecord.setFirstDeviceCode(slry.getVALUE3());
transitHuntersUserModelRecord.setFirstDeviceAddress(slry.getVALUE2());
DevopsDeviceInfo one = devopsDeviceInfoService.lambdaQuery().eq(DevopsDeviceInfo::getGbsChannelNo, slry.getVALUE3()).one();
DevopsDeviceInfo one = devopsDeviceInfoService.lambdaQuery().eq(DevopsDeviceInfo::getGbsChannelNo, slry.getVALUE3()).list().get(0);
transitHuntersUserModelRecord.setFirstLongitude(one.getLongitude());
transitHuntersUserModelRecord.setFirstLatitude(one.getLatitude());
transitHuntersUserModelRecord.setEndGlobalPic(slry.getVALUE10());
@ -82,7 +82,7 @@ public class SlryYjxxOracleTask {
transitHuntersUserModelRecord.setEndPassTime(String.valueOf(dateFormat.parse(slry.getVALUE6()).getTime()/1000));
transitHuntersUserModelRecord.setEndDeviceCode(slry.getVALUE8());
transitHuntersUserModelRecord.setEndDeviceAddress(slry.getVALUE7());
DevopsDeviceInfo one1 = devopsDeviceInfoService.lambdaQuery().eq(DevopsDeviceInfo::getGbsChannelNo, slry.getVALUE8()).one();
DevopsDeviceInfo one1 = devopsDeviceInfoService.lambdaQuery().eq(DevopsDeviceInfo::getGbsChannelNo, slry.getVALUE8()).list().get(0);
transitHuntersUserModelRecord.setEndLatitude(one1.getLatitude());
transitHuntersUserModelRecord.setEndLongitude(one1.getLongitude());
transitHuntersUserModelRecord.setCaptureFrequency(NumKit.checkInt(slry.getVALUE11()));
@ -91,7 +91,8 @@ public class SlryYjxxOracleTask {
transitHuntersUserModelRecord.setHabitationPoliceStationCode(slry.getXZDZRQDM());
transitHuntersUserModelRecord.setHabitationPoliceStationName(slry.getXZDZRQ());
transitHuntersUserModelRecord.setPartitionField(dateFormat.parse(slry.getYJSJ()));
TransitHuntersUserModelRecord modelRecord = transitHuntersUserModelRecordService.lambdaQuery().eq(TransitHuntersUserModelRecord::getFirstGlobalPic, slry.getVALUE5()).one();
TransitHuntersUserModelRecord modelRecord = transitHuntersUserModelRecordService.lambdaQuery().eq(TransitHuntersUserModelRecord::getFirstGlobalPic, slry.getVALUE5())
.eq(TransitHuntersUserModelRecord::getPartitionField,dateFormat.parse(slry.getYJSJ())).one();
//确定一个数据是否唯一
if (modelRecord == null) {
boolean save = transitHuntersUserModelRecordService.save(transitHuntersUserModelRecord);

@ -121,7 +121,6 @@ public class TMotorvehicleTask {
}
try {
dateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
LambdaQueryWrapper<TransitVehicleRecord> queryWrapper = Wrappers.lambdaQuery();
queryWrapper.orderByDesc(TransitVehicleRecord::getPartitionField);
queryWrapper.last("LIMIT 1");
@ -133,14 +132,14 @@ public class TMotorvehicleTask {
//计算2天前的日期
Calendar calendar = Calendar.getInstance();
calendar.setTime(maxDate);
calendar.add(Calendar.DAY_OF_MONTH, -2);
calendar.add(Calendar.DAY_OF_MONTH, -7);
Date twoDaysAgo = calendar.getTime();
//构造删除条件
LambdaQueryWrapper<TransitVehicleRecord> deleteWrapper = Wrappers.lambdaQuery();
deleteWrapper.le(TransitVehicleRecord::getPartitionField, twoDaysAgo);
//int countTM = vehicleRecordervice.count(deleteWrapper);
boolean result = vehicleRecordService.remove(deleteWrapper.last("LIMIT 10000"));
boolean result = vehicleRecordService.remove(deleteWrapper.last("LIMIT 1000"));
if (result) {
System.out.println("删除成功! ");

@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.ssf.mysqloracletest.domain.DevopsDeviceInfo;
import com.ssf.mysqloracletest.domain.TStrhEntityInfoKs;
import com.ssf.mysqloracletest.domain.TransitUserRecord;
import com.ssf.mysqloracletest.service.DevopsDeviceInfoService;
import com.ssf.mysqloracletest.service.TStrhEntityInfoKsService;
import com.ssf.mysqloracletest.service.TransitUserRecordService;
import com.ssf.mysqloracletest.utils.ConfigParam;
@ -36,6 +38,9 @@ public class TStrhEntityInfoKsTask {
@Resource
private TransitUserRecordService transitUserRecordService;
@Resource
private DevopsDeviceInfoService devopsDeviceInfoService;
String maxTime = "2023-12-09 00:00:00";
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@ -79,6 +84,8 @@ public class TStrhEntityInfoKsTask {
List<TStrhEntityInfoKs> resultList = tStrhEntityInfoKsService.list(Wrapper);
for (TStrhEntityInfoKs entityInfoKs : resultList) {
TransitUserRecord transitUserRecord = new TransitUserRecord();
DevopsDeviceInfo one2 = devopsDeviceInfoService.lambdaQuery().eq(DevopsDeviceInfo::getGbsChannelNo, entityInfoKs.getCameraidx()).list().get(0);
transitUserRecord.setDeviceName(one2.getDeviceName());
transitUserRecord.setDeviceCode(entityInfoKs.getCameraidx());
transitUserRecord.setPassTime(dateFormat.parse(entityInfoKs.getCapturetime()).getTime() / 1000);
transitUserRecord.setPartitionField(dateFormat.parse(entityInfoKs.getCapturetime()));
@ -143,7 +150,7 @@ public class TStrhEntityInfoKsTask {
deleteWrapper.le(TransitUserRecord::getPartitionField, sevenDaysAgo);
// 执行删除操作
boolean result = transitUserRecordService.remove(deleteWrapper);
boolean result = transitUserRecordService.remove(deleteWrapper.last("LIMIT 1000"));
if (result) {
System.out.println("删除成功!");

@ -49,7 +49,7 @@ public class VLgryGjxxTask {
*
* //
*/
@Scheduled(initialDelay = 100, fixedDelay = 3000)
@Scheduled(initialDelay = 100, fixedDelay = 1800000)
public void translgry() {
if (!"true".equals(ConfigParam.LgrySwitch)) {
@ -129,7 +129,7 @@ public class VLgryGjxxTask {
transitImpUserRecord.setLatitude(NumKit.checkBigDecimal(lgry.getYJWDZB()));
transitImpUserRecord.setDeviceAddress(lgry.getHDFSDD());
transitImpUserRecord.setGlobalPic(lgry.getZPDT());
transitImpUserRecord.setUserPic(lgry.getZPXT());
transitImpUserRecord.setPersonPic(lgry.getZPXT());
transitImpUserRecord.setSimilarity(lgry.getVALUE2());
transitImpUserRecord.setOwnerName(lgry.getYJDXMC());
transitImpUserRecord.setIdCard(lgry.getYJDXHM());

@ -50,7 +50,7 @@ public class VSwryGjxxTask {
*
* //
*/
@Scheduled(initialDelay = 100, fixedDelay = 3000)
@Scheduled(initialDelay = 100, fixedDelay = 1800000)
public void transSwry() {
if (!"true".equals(ConfigParam.SwrySwitch)) {
@ -125,7 +125,7 @@ public class VSwryGjxxTask {
transitImpUserRecord.setLatitude(NumKit.checkBigDecimal(swry.getWDZB()));
transitImpUserRecord.setDeviceAddress(swry.getVALUE1());
transitImpUserRecord.setGlobalPic(swry.getVALUE4());
transitImpUserRecord.setUserPic(swry.getVALUE3());
transitImpUserRecord.setPersonPic(swry.getVALUE3());
transitImpUserRecord.setSimilarity(swry.getVALUE2());
transitImpUserRecord.setOwnerName(swry.getZDRYXM());
transitImpUserRecord.setIdCard(swry.getZDRYSFZH());

@ -65,5 +65,13 @@ public class ConfigParam {
public static String DeleteOldVehicleSwtich = StringKit.toString(PropertiesUtil.queryPropertiesByKey("DeleteOldVehicleSwtich"));
public static String DevopeVideoInfoSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("DevopeVideoInfoSwitch"));
public static String vehicleFlowSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("vehicleFlowSwitch"));
public static String PeopleFlowSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("PeopleFlowSwitch"));
public static String vehicleHourSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("vehicleHourSwitch"));
public static String peopleHourSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("peopleHourSwitch"));
public static String videoPositionSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("videoPositionSwitch"));
public static String ZfjlyVideoInfoSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("ZfjlyVideoInfoSwitch"));
public static String devicePositionSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("devicePositionSwitch"));
public static String SwzdrySwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("SwzdrySwitch"));
public static String JCVideoInfoSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("JCVideoInfoSwitch"));
}

Loading…
Cancel
Save