Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
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
jinan
traffic-signal-platform
Commits
c31ae3fd
Commit
c31ae3fd
authored
Mar 27, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 诱导屏添加上屏日志
parent
37ececdd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
InduceSendServiceImpl.java
.../wanji/opt/service/induce/impl/InduceSendServiceImpl.java
+5
-4
InducesMonitorTask.java
.../src/main/java/net/wanji/opt/task/InducesMonitorTask.java
+2
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/induce/impl/InduceSendServiceImpl.java
View file @
c31ae3fd
...
...
@@ -94,7 +94,7 @@ public class InduceSendServiceImpl implements InduceSendService {
param
.
setResolutionWidth
(
deviceInduces
.
getResolutionWidth
().
intValue
());
param
.
setResolutionHeight
(
deviceInduces
.
getResolutionHeight
().
intValue
());
}
log
.
info
(
"发送
诱导
屏诱导屏编号信息:{}"
,
deviceInduces
);
log
.
info
(
"发送
上
屏诱导屏编号信息:{}"
,
deviceInduces
);
// 获取图片字节数组
BufferedImage
image
=
null
;
try
{
...
...
@@ -119,7 +119,7 @@ public class InduceSendServiceImpl implements InduceSendService {
createImageWithText
(
induceTemplate
,
image
,
param
.
getContents
(),
true
,
topLeftX
,
topLeftY
,
bottomRightX
,
bottomRightY
);
}
}
catch
(
Exception
ex
)
{
log
.
error
(
"
诱导
屏通过模版生成图片异常:{}"
,
ex
.
getMessage
());
log
.
error
(
"
发送上
屏通过模版生成图片异常:{}"
,
ex
.
getMessage
());
}
// 测试阶段保存图片到本地
// ImageIO.write(image, "bmp", new File("D:\\tmp\\" + induceTemplate.getFileName()));
...
...
@@ -135,7 +135,7 @@ public class InduceSendServiceImpl implements InduceSendService {
if
(
Objects
.
nonNull
(
greenwaveinduces
))
{
greenwaveinduces
.
setSourceId
(
PATH
+
dirName
+
"/"
+
fileName
);
}
log
.
info
(
"上传文件至ftp-filePath:{}"
,
param
.
getFtpPath
());
log
.
info
(
"
发送上屏
上传文件至ftp-filePath:{}"
,
param
.
getFtpPath
());
induceTemplateService
.
updateById
(
induceTemplate
);
}
...
...
@@ -171,7 +171,7 @@ public class InduceSendServiceImpl implements InduceSendService {
try
{
rabbitTemplate
.
convertAndSend
(
""
,
queueName
,
message
);
}
catch
(
Exception
e
)
{
log
.
error
(
"rabbit发送诱导屏信息失败- queueName:{},message:{}"
,
queueName
,
message
);
log
.
error
(
"
发送上屏
rabbit发送诱导屏信息失败- queueName:{},message:{}"
,
queueName
,
message
);
}
}
log
.
info
(
"mqtt发送信息-topic:{},queueName:{},message:{}"
,
queueName
,
message
);
...
...
@@ -225,6 +225,7 @@ public class InduceSendServiceImpl implements InduceSendService {
log
.
info
(
"ftp服务器上传文件{}失败"
,
fileName
);
return
null
;
}
catch
(
Exception
e
)
{
log
.
error
(
"ftp服务连接异常:{}"
,
e
);
log
.
error
(
e
.
getMessage
());
return
null
;
}
finally
{
...
...
signal-optimize-service/src/main/java/net/wanji/opt/task/InducesMonitorTask.java
View file @
c31ae3fd
...
...
@@ -248,6 +248,7 @@ public class InducesMonitorTask {
}
induceSendService
.
send
(
messageParam
);
Thread
.
sleep
(
10000
);
log
.
info
(
"发送上屏信息成功,上屏内容:{}"
,
messageParam
);
}
}
greenwaveInducesHist
.
setStatus
(
1
);
...
...
@@ -333,7 +334,7 @@ public class InducesMonitorTask {
messageParam
.
setFlg
(
2
);
messageParam
.
setType
(
"TFMH"
);
induceSendService
.
send
(
messageParam
);
log
.
info
(
"当前绿波:{}, 诱导屏编号:{},
下屏成功"
,
greenId
,
equipCod
e
);
log
.
info
(
"当前绿波:{}, 诱导屏编号:{},
当前绿波结束时间:{}, 下屏成功"
,
greenId
,
equipCode
,
endTim
e
);
Thread
.
sleep
(
500
);
}
}
...
...
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