Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hzjtpushdateService
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
建金
hzjtpushdateService
Commits
0479b1d7
Commit
0479b1d7
authored
Apr 12, 2021
by
wangjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改弹窗
parent
b191c8d0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
33 deletions
+33
-33
src/main/java/com/hzjt/config/ScheduleTaskConfig.java
src/main/java/com/hzjt/config/ScheduleTaskConfig.java
+1
-1
src/main/java/com/hzjt/controller/TraffController.java
src/main/java/com/hzjt/controller/TraffController.java
+15
-14
src/main/java/com/hzjt/listener/MyApplicationStartingEventListener.java
...com/hzjt/listener/MyApplicationStartingEventListener.java
+4
-9
src/main/java/com/hzjt/service/FtpService.java
src/main/java/com/hzjt/service/FtpService.java
+5
-1
src/main/resources/application.properties
src/main/resources/application.properties
+8
-8
No files found.
src/main/java/com/hzjt/config/ScheduleTaskConfig.java
View file @
0479b1d7
...
...
@@ -16,7 +16,7 @@ import java.net.URI;
import
java.util.Calendar
;
@Slf4j
@Component
@Configuration
@EnableScheduling
public
class
ScheduleTaskConfig
{
...
...
src/main/java/com/hzjt/controller/TraffController.java
View file @
0479b1d7
...
...
@@ -294,16 +294,17 @@ public class TraffController {
if
(
traffAlarmRecord
!=
null
&&
traffAlarmRecord
.
getRecordid
()
!=
null
)
{
traffAlarmRecordMapper
.
updateTraffAlarmRecordUrl
(
traffAlarmRecord
);
//推送给第三方
if
(!
manualStatus
.
equalsIgnoreCase
(
"1"
))
{
ResultObj
obj
=
eventWriteService
.
updateAndAutoSendEvent
(
traffAlarmRecord
);
log
.
info
(
"send to guangda:HTTP_OK"
+
obj
.
toString
());
}
//
//推送给第三方
//
if(!manualStatus.equalsIgnoreCase("1")) {
//
ResultObj obj = eventWriteService.updateAndAutoSendEvent(traffAlarmRecord);
//
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
)
{
System
.
out
.
println
(
e
.
toString
());
log
.
error
(
e
.
toString
());
...
...
@@ -318,10 +319,10 @@ public class TraffController {
}
else
{
//需要先过滤,过滤结束后推送给第三方
if
(!
manualStatus
.
equalsIgnoreCase
(
"1"
))
{
ResultObj
obj
=
eventWriteService
.
updateAndAutoSendEvent
(
traffAlarmRecord
);
log
.
info
(
"send to guangda novideopath --->response message"
+
obj
.
toString
());
}
//
if(!manualStatus.equalsIgnoreCase("1")) {
//
ResultObj obj = eventWriteService.updateAndAutoSendEvent(traffAlarmRecord);
//
log.info("send to guangda novideopath --->response message" + obj.toString());
//
}
}
...
...
@@ -534,7 +535,7 @@ public class TraffController {
String
manualStatus
=
traffAlarmRecordMapper
.
seletManualStatus
();
Alarm
alarm
=
new
Alarm
();
alarm
.
setVideo_id
(
"33_65_230_156_554_fbXdTkVe98u_ecvs_0"
);
alarm
.
setIncident_type
(
"
WRONG_DIRECTIO
N"
);
alarm
.
setIncident_type
(
"
NO_MOTOR_BA
N"
);
String
str
=
"iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAB1UlEQVRIS5WVjTEEQRBG30WACBABGSACLgJEgAicCBABIkAEiIAMkAERUG9remtua2Z3rquuam935nvTPf0zY9y2gENgH/B5Ny3/AL6AV+A5PReVZhV9xS6Bk/RdEUVzE7qXXtwDVyVQCaDoNeC3m/T7qRxkHThPvz9gnrzqlw8Bi3RyTyyoJjzkCTJcO8ApoEed5QAF74CHLDRDofwOShA9PgYOwpMAGPN34A04Grl3T6kZ/5KFJ5vAthEIgC4pLGgsLFMAoWp8pktfCFh6MZG2LQAlPLDpvS3ALDBrNhoutRUQh54LcJNhGYt9ONYKcH1XiAJ80CVTdMpWATwB6wIsEKswALpnupZsLE1dfwsorKl3WAP0hTKgCDcFTeeSWQc5YF+APcaXLSGKSq/1sBzah6h7GCmefNMqgP6SV0nTVsBSmq5SaK2A6AxdFi1V3kSxtQDMNPtal5l5s/Oy7SF2wlo/EmBIvbOS+f4ldQVBfbNzsR3Sj7p3UYG4yZBGKuaQELeLqtVNwGG6xUzwo9PJTGgxwY/p5HpYHDghJN0TrqVxaXXWQAqfpQH1nfrZ0uyuFUw+awUJcGNsVjjC9Ts2u6cqMgowhpH/IwGE2fxK99GH9R91mncY+HKoHAAAAABJRU5ErkJggg=="
;
List
arrlist
=
new
ArrayList
();
arrlist
.
add
(
str
);
...
...
@@ -554,7 +555,7 @@ public class TraffController {
traffAlarmRecord
.
setRecordid
(
Long
.
parseLong
(
"33448"
));
traffAlarmRecord
.
setChannelid
(
new
Integer
(
1
));
traffAlarmRecord
.
setFdid
(
"20200305112042989"
);
traffAlarmRecord
.
setRecordtype
(
"
ROADWORKS
"
);
traffAlarmRecord
.
setRecordtype
(
"
NO_MOTOR_BAN
"
);
// traffAlarmRecordMapper.inserTraffAlarmRecord(traffAlarmRecord);
...
...
src/main/java/com/hzjt/listener/MyApplicationStartingEventListener.java
View file @
0479b1d7
package
com
.
hzjt
.
listener
;
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
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeansException
;
...
...
@@ -23,7 +20,6 @@ public class MyApplicationStartingEventListener implements ApplicationListener<S
private
ApplicationContext
applicationContext
;
private
boolean
flag
=
false
;
private
FtpService
ftpService
;
@Autowired
public
MyApplicationStartingEventListener
()
{
...
...
@@ -35,11 +31,10 @@ public class MyApplicationStartingEventListener implements ApplicationListener<S
if
(
event
instanceof
ApplicationReadyEvent
)
{
try
{
if
(!
flag
)
{
// ThreadPoolUtil.getSchedulePool().scheduleWithFixedDelay(() -> {
// CacheLoadService cacheLoadService = applicationContext.getBean(CacheLoadService.class);
// cacheLoadService.loadFtpCache();
// }, 200, 120, TimeUnit.SECONDS);
ThreadPoolUtil
.
getSchedulePool
().
scheduleWithFixedDelay
(()
->
{
CacheLoadService
cacheLoadService
=
applicationContext
.
getBean
(
CacheLoadService
.
class
);
cacheLoadService
.
loadFtpCache
();
},
200
,
120
,
TimeUnit
.
SECONDS
);
// //判断第三方登录是否有效
// ThreadPoolUtil.getSchedulePool().scheduleWithFixedDelay(() -> {
// QingZhiLoginCacheService qingZhiLoginCacheService = applicationContext.getBean(QingZhiLoginCacheService.class);
...
...
src/main/java/com/hzjt/service/FtpService.java
View file @
0479b1d7
...
...
@@ -22,7 +22,8 @@ public class FtpService {
@Autowired
private
StringRedisTemplate
stringRedisTemplate
;
private
List
<
Ftp
>
ftpList
;
@Autowired
CacheLoadService
cacheLoadService
;
@Autowired
public
FtpService
(
StringRedisTemplate
stringRedisTemplate
)
{
try
{
...
...
@@ -34,6 +35,9 @@ public class FtpService {
public
Ftp
reloadFtp
()
{
try
{
if
(
null
==
stringRedisTemplate
.
opsForValue
().
get
(
RedisEnum
.
FTPLIST
.
getValue
())){
cacheLoadService
.
loadFtpCache
();
}
ftpList
=
getFtpList
(
stringRedisTemplate
.
opsForValue
().
get
(
RedisEnum
.
FTPLIST
.
getValue
()));
}
catch
(
Exception
e
){
log
.
error
(
"ftpListȡʧ:"
+
e
.
toString
());
...
...
src/main/resources/application.properties
View file @
0479b1d7
...
...
@@ -29,12 +29,12 @@ mybatis.configuration.default-statement-timeout=3000
#spring.datasource.dbcp2.connection-properties=characterEncoding=utf8
# 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.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
# druid
spring.datasource.type
=
com.alibaba.druid.pool.DruidDataSource
...
...
@@ -62,8 +62,8 @@ spring.datasource.useGlobalDataSourceStat=true
#redis
# Redis��������ַ
#
spring.redis.host=33.65.250.179
spring.redis.host
=
127.0.0.1
spring.redis.host
=
33.65.250.179
#
spring.redis.host=127.0.0.1
# Redis���������Ӷ˿�
spring.redis.port
=
6379
# Redis�������������루Ĭ��Ϊ�գ�
...
...
@@ -87,7 +87,7 @@ port=21
message.dept
=
33030
message.rate
=
10
ftp.host
=
33.65.2
50.179
:21:hzjt:1qaz2wsx
ftp.host
=
33.65.2
19.103
:21:hzjt:1qaz2wsx
alarm.subscribe.data.key
=
gs:traff:alarmlist
...
...
@@ -107,7 +107,7 @@ mybatis.mapper-locations=classpath:mapper/*.xml
spring.mvc.throw-exception-if-no-handler-found
=
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
alarmrecord.check.push.enable
=
1
alarmrecord.check.push.recordtype
=
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment