Commit 0479b1d7 authored by wangjinjing's avatar wangjinjing

修改弹窗

parent b191c8d0
...@@ -16,7 +16,7 @@ import java.net.URI; ...@@ -16,7 +16,7 @@ import java.net.URI;
import java.util.Calendar; import java.util.Calendar;
@Slf4j @Slf4j
@Component
@Configuration @Configuration
@EnableScheduling @EnableScheduling
public class ScheduleTaskConfig { public class ScheduleTaskConfig {
......
...@@ -294,16 +294,17 @@ public class TraffController { ...@@ -294,16 +294,17 @@ public class TraffController {
if (traffAlarmRecord != null && traffAlarmRecord.getRecordid() != null) { if (traffAlarmRecord != null && traffAlarmRecord.getRecordid() != null) {
traffAlarmRecordMapper.updateTraffAlarmRecordUrl(traffAlarmRecord); traffAlarmRecordMapper.updateTraffAlarmRecordUrl(traffAlarmRecord);
//推送给第三方 // //推送给第三方
if(!manualStatus.equalsIgnoreCase("1")) { // if(!manualStatus.equalsIgnoreCase("1")) {
ResultObj obj = eventWriteService.updateAndAutoSendEvent(traffAlarmRecord); // ResultObj obj = eventWriteService.updateAndAutoSendEvent(traffAlarmRecord);
log.info("send to guangda:HTTP_OK" + obj.toString()); // log.info("send to guangda:HTTP_OK" + obj.toString());
} // }
} }
} else {
ResultObj obj = eventWriteService.updateAndAutoSendEvent(traffAlarmRecord);
log.info("send to guangda HttpURLConnection.HTTP_Fail--->response message:" + obj.toString());
} }
// else {
// ResultObj obj = eventWriteService.updateAndAutoSendEvent(traffAlarmRecord);
// log.info("send to guangda HttpURLConnection.HTTP_Fail--->response message:" + obj.toString());
// }
} catch (IOException e) { } catch (IOException e) {
System.out.println(e.toString()); System.out.println(e.toString());
log.error(e.toString()); log.error(e.toString());
...@@ -318,10 +319,10 @@ public class TraffController { ...@@ -318,10 +319,10 @@ public class TraffController {
} else { } else {
//需要先过滤,过滤结束后推送给第三方 //需要先过滤,过滤结束后推送给第三方
if(!manualStatus.equalsIgnoreCase("1")) { // if(!manualStatus.equalsIgnoreCase("1")) {
ResultObj obj = eventWriteService.updateAndAutoSendEvent(traffAlarmRecord); // ResultObj obj = eventWriteService.updateAndAutoSendEvent(traffAlarmRecord);
log.info("send to guangda novideopath --->response message" + obj.toString()); // log.info("send to guangda novideopath --->response message" + obj.toString());
} // }
} }
...@@ -534,7 +535,7 @@ public class TraffController { ...@@ -534,7 +535,7 @@ public class TraffController {
String manualStatus=traffAlarmRecordMapper.seletManualStatus(); String manualStatus=traffAlarmRecordMapper.seletManualStatus();
Alarm alarm=new Alarm(); Alarm alarm=new Alarm();
alarm.setVideo_id("33_65_230_156_554_fbXdTkVe98u_ecvs_0"); alarm.setVideo_id("33_65_230_156_554_fbXdTkVe98u_ecvs_0");
alarm.setIncident_type("WRONG_DIRECTION"); alarm.setIncident_type("NO_MOTOR_BAN");
String str="iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAB1UlEQVRIS5WVjTEEQRBG30WACBABGSACLgJEgAicCBABIkAEiIAMkAERUG9remtua2Z3rquuam935nvTPf0zY9y2gENgH/B5Ny3/AL6AV+A5PReVZhV9xS6Bk/RdEUVzE7qXXtwDVyVQCaDoNeC3m/T7qRxkHThPvz9gnrzqlw8Bi3RyTyyoJjzkCTJcO8ApoEed5QAF74CHLDRDofwOShA9PgYOwpMAGPN34A04Grl3T6kZ/5KFJ5vAthEIgC4pLGgsLFMAoWp8pktfCFh6MZG2LQAlPLDpvS3ALDBrNhoutRUQh54LcJNhGYt9ONYKcH1XiAJ80CVTdMpWATwB6wIsEKswALpnupZsLE1dfwsorKl3WAP0hTKgCDcFTeeSWQc5YF+APcaXLSGKSq/1sBzah6h7GCmefNMqgP6SV0nTVsBSmq5SaK2A6AxdFi1V3kSxtQDMNPtal5l5s/Oy7SF2wlo/EmBIvbOS+f4ldQVBfbNzsR3Sj7p3UYG4yZBGKuaQELeLqtVNwGG6xUzwo9PJTGgxwY/p5HpYHDghJN0TrqVxaXXWQAqfpQH1nfrZ0uyuFUw+awUJcGNsVjjC9Ts2u6cqMgowhpH/IwGE2fxK99GH9R91mncY+HKoHAAAAABJRU5ErkJggg=="; String str="iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAB1UlEQVRIS5WVjTEEQRBG30WACBABGSACLgJEgAicCBABIkAEiIAMkAERUG9remtua2Z3rquuam935nvTPf0zY9y2gENgH/B5Ny3/AL6AV+A5PReVZhV9xS6Bk/RdEUVzE7qXXtwDVyVQCaDoNeC3m/T7qRxkHThPvz9gnrzqlw8Bi3RyTyyoJjzkCTJcO8ApoEed5QAF74CHLDRDofwOShA9PgYOwpMAGPN34A04Grl3T6kZ/5KFJ5vAthEIgC4pLGgsLFMAoWp8pktfCFh6MZG2LQAlPLDpvS3ALDBrNhoutRUQh54LcJNhGYt9ONYKcH1XiAJ80CVTdMpWATwB6wIsEKswALpnupZsLE1dfwsorKl3WAP0hTKgCDcFTeeSWQc5YF+APcaXLSGKSq/1sBzah6h7GCmefNMqgP6SV0nTVsBSmq5SaK2A6AxdFi1V3kSxtQDMNPtal5l5s/Oy7SF2wlo/EmBIvbOS+f4ldQVBfbNzsR3Sj7p3UYG4yZBGKuaQELeLqtVNwGG6xUzwo9PJTGgxwY/p5HpYHDghJN0TrqVxaXXWQAqfpQH1nfrZ0uyuFUw+awUJcGNsVjjC9Ts2u6cqMgowhpH/IwGE2fxK99GH9R91mncY+HKoHAAAAABJRU5ErkJggg==";
List arrlist=new ArrayList(); List arrlist=new ArrayList();
arrlist.add(str); arrlist.add(str);
...@@ -554,7 +555,7 @@ public class TraffController { ...@@ -554,7 +555,7 @@ public class TraffController {
traffAlarmRecord.setRecordid(Long.parseLong("33448")); traffAlarmRecord.setRecordid(Long.parseLong("33448"));
traffAlarmRecord.setChannelid(new Integer(1)); traffAlarmRecord.setChannelid(new Integer(1));
traffAlarmRecord.setFdid("20200305112042989"); traffAlarmRecord.setFdid("20200305112042989");
traffAlarmRecord.setRecordtype("ROADWORKS"); traffAlarmRecord.setRecordtype("NO_MOTOR_BAN");
// traffAlarmRecordMapper.inserTraffAlarmRecord(traffAlarmRecord); // traffAlarmRecordMapper.inserTraffAlarmRecord(traffAlarmRecord);
......
package com.hzjt.listener; package com.hzjt.listener;
import com.hzjt.service.CacheLoadService; import com.hzjt.service.CacheLoadService;
import com.hzjt.service.FLVCacheService;
import com.hzjt.service.FtpService;
import com.hzjt.service.QingZhiLoginCacheService;
import com.hzjt.util.ThreadPoolUtil; import com.hzjt.util.ThreadPoolUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
...@@ -23,7 +20,6 @@ public class MyApplicationStartingEventListener implements ApplicationListener<S ...@@ -23,7 +20,6 @@ public class MyApplicationStartingEventListener implements ApplicationListener<S
private ApplicationContext applicationContext; private ApplicationContext applicationContext;
private boolean flag = false; private boolean flag = false;
private FtpService ftpService;
@Autowired @Autowired
public MyApplicationStartingEventListener() { public MyApplicationStartingEventListener() {
...@@ -35,11 +31,10 @@ public class MyApplicationStartingEventListener implements ApplicationListener<S ...@@ -35,11 +31,10 @@ public class MyApplicationStartingEventListener implements ApplicationListener<S
if (event instanceof ApplicationReadyEvent) { if (event instanceof ApplicationReadyEvent) {
try { try {
if (!flag) { if (!flag) {
// ThreadPoolUtil.getSchedulePool().scheduleWithFixedDelay(() -> { ThreadPoolUtil.getSchedulePool().scheduleWithFixedDelay(() -> {
// CacheLoadService cacheLoadService = applicationContext.getBean(CacheLoadService.class); CacheLoadService cacheLoadService = applicationContext.getBean(CacheLoadService.class);
// cacheLoadService.loadFtpCache(); cacheLoadService.loadFtpCache();
// }, 200, 120, TimeUnit.SECONDS); }, 200, 120, TimeUnit.SECONDS);
// //判断第三方登录是否有效 // //判断第三方登录是否有效
// ThreadPoolUtil.getSchedulePool().scheduleWithFixedDelay(() -> { // ThreadPoolUtil.getSchedulePool().scheduleWithFixedDelay(() -> {
// QingZhiLoginCacheService qingZhiLoginCacheService = applicationContext.getBean(QingZhiLoginCacheService.class); // QingZhiLoginCacheService qingZhiLoginCacheService = applicationContext.getBean(QingZhiLoginCacheService.class);
......
...@@ -22,7 +22,8 @@ public class FtpService { ...@@ -22,7 +22,8 @@ public class FtpService {
@Autowired @Autowired
private StringRedisTemplate stringRedisTemplate; private StringRedisTemplate stringRedisTemplate;
private List<Ftp> ftpList; private List<Ftp> ftpList;
@Autowired
CacheLoadService cacheLoadService;
@Autowired @Autowired
public FtpService(StringRedisTemplate stringRedisTemplate) { public FtpService(StringRedisTemplate stringRedisTemplate) {
try { try {
...@@ -34,6 +35,9 @@ public class FtpService { ...@@ -34,6 +35,9 @@ public class FtpService {
public Ftp reloadFtp() { public Ftp reloadFtp() {
try { try {
if(null==stringRedisTemplate.opsForValue().get(RedisEnum.FTPLIST.getValue())){
cacheLoadService.loadFtpCache();
}
ftpList = getFtpList(stringRedisTemplate.opsForValue().get(RedisEnum.FTPLIST.getValue())); ftpList = getFtpList(stringRedisTemplate.opsForValue().get(RedisEnum.FTPLIST.getValue()));
}catch (Exception e){ }catch (Exception e){
log.error("ftpListȡʧ:"+e.toString()); log.error("ftpListȡʧ:"+e.toString());
......
...@@ -29,12 +29,12 @@ mybatis.configuration.default-statement-timeout=3000 ...@@ -29,12 +29,12 @@ mybatis.configuration.default-statement-timeout=3000
#spring.datasource.dbcp2.connection-properties=characterEncoding=utf8 #spring.datasource.dbcp2.connection-properties=characterEncoding=utf8
# Mysql���ݿ�-����Դ���� # Mysql���ݿ�-����Դ����
spring.datasource.username=hzjt
spring.datasource.password=hzjt
spring.datasource.url=jdbc:oracle:thin:@192.168.168.212:1523:helowin
#spring.datasource.username=hzjt #spring.datasource.username=hzjt
#spring.datasource.password=hzjt #spring.datasource.password=hzjt
#spring.datasource.url=jdbc:oracle:thin:@33.65.250.179:1521:helowin #spring.datasource.url=jdbc:oracle:thin:@192.168.168.212:1523:helowin
spring.datasource.username=hzjt
spring.datasource.password=hzjt
spring.datasource.url=jdbc:oracle:thin:@33.65.250.179:1521:helowin
spring.datasource.driverClassName=oracle.jdbc.OracleDriver spring.datasource.driverClassName=oracle.jdbc.OracleDriver
# druid # druid
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
...@@ -62,8 +62,8 @@ spring.datasource.useGlobalDataSourceStat=true ...@@ -62,8 +62,8 @@ spring.datasource.useGlobalDataSourceStat=true
#redis #redis
# Redis��������ַ # Redis��������ַ
#spring.redis.host=33.65.250.179 spring.redis.host=33.65.250.179
spring.redis.host=127.0.0.1 #spring.redis.host=127.0.0.1
# Redis���������Ӷ˿� # Redis���������Ӷ˿�
spring.redis.port=6379 spring.redis.port=6379
# Redis�������������루Ĭ��Ϊ�գ� # Redis�������������루Ĭ��Ϊ�գ�
...@@ -87,7 +87,7 @@ port=21 ...@@ -87,7 +87,7 @@ port=21
message.dept=33030 message.dept=33030
message.rate=10 message.rate=10
ftp.host=33.65.250.179:21:hzjt:1qaz2wsx ftp.host=33.65.219.103:21:hzjt:1qaz2wsx
alarm.subscribe.data.key=gs:traff:alarmlist alarm.subscribe.data.key=gs:traff:alarmlist
...@@ -107,7 +107,7 @@ mybatis.mapper-locations=classpath:mapper/*.xml ...@@ -107,7 +107,7 @@ mybatis.mapper-locations=classpath:mapper/*.xml
spring.mvc.throw-exception-if-no-handler-found=true spring.mvc.throw-exception-if-no-handler-found=true
spring.resources.add-mappings=true spring.resources.add-mappings=true
gs.traff.cloud.web.fileagent.url=ftp://reader:reader@33.65.250.179:21/gstraff/ gs.traff.cloud.web.fileagent.url=ftp://hzjt:1qaz2wsx@33.65.219.103:21/gstraff/
jms.queueName=demo_queue jms.queueName=demo_queue
alarmrecord.check.push.enable=1 alarmrecord.check.push.enable=1
alarmrecord.check.push.recordtype=1 alarmrecord.check.push.recordtype=1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment