Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VideoAIBatchTaskConsumerService
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
VideoAIService
VideoAIBatchTaskConsumerService
Commits
8de39672
Commit
8de39672
authored
Jul 21, 2021
by
yzm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化后的发布版本3
parent
38d3544b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
src/main/java/com/cx/cn/cxquartz/controller/ExtController.java
...ain/java/com/cx/cn/cxquartz/controller/ExtController.java
+14
-8
src/main/resources/application.yml
src/main/resources/application.yml
+3
-1
src/main/resources/logback-spring.xml
src/main/resources/logback-spring.xml
+1
-0
No files found.
src/main/java/com/cx/cn/cxquartz/controller/ExtController.java
View file @
8de39672
...
...
@@ -59,6 +59,10 @@ public class ExtController {
@Value
(
"${countryside.callbackurl}"
)
private
String
callbackurl
;
@Value
(
"${web.url}"
)
private
String
weburl
;
@Autowired
...
...
@@ -155,17 +159,19 @@ public class ExtController {
return
ResultUtil
.
success
();
}
@RequestMapping
(
value
=
"/getDeviceSnapshotAndRecognize"
,
method
=
RequestMethod
.
POST
)
public
String
getDeviceSnapshotAndRecognize
(
@RequestBody
String
devicecode
)
{
public
String
getDeviceSnapshotAndRecognize
(
@RequestBody
String
taskno
)
{
//根据判断监控是否存在,该监控检测的事件是什么
List
<
QuartzTaskInformations
>
mapList
=
sbtdspsrService
.
selectRecogByRtsp
(
devicecode
);
List
<
QuartzTaskInformations
>
mapList
=
sbtdspsrService
.
selectRecogByRtsp
(
taskno
);
String
model
=
"1"
;
//图片框选出来的范围
Long
[]
roiarray
;
String
devicecode
=
""
;
if
(
null
!=
mapList
&&
!
mapList
.
equals
(
""
)
&&
mapList
.
size
()
>
0
)
{
//查询该监控下面还没有经过分析的数据
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"sbbh"
,
devicecode
);
//
Map<String, Object> map = new HashMap<>();
//
map.put("sbbh", devicecode);
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON_UTF8
);
...
...
@@ -177,7 +183,7 @@ public class ExtController {
roiarray
[
1
]
=
new
Long
(
taskinfo
.
getObjecty
());
roiarray
[
2
]
=
new
Long
(
taskinfo
.
getObjectw
());
roiarray
[
3
]
=
new
Long
(
taskinfo
.
getObjecth
());
devicecode
=
taskinfo
.
getExecuteparamter
();
// roiarray[0] = new Long(0);
// roiarray[1] = new Long(0);
// roiarray[2] = new Long(0);
...
...
@@ -185,9 +191,9 @@ public class ExtController {
// for (TraffAlarmRecord transferRecord : traffalarmrecordlist) {
mapparam
.
put
(
"deviceCode"
,
devicecode
);
mapparam
.
put
(
"model"
,
model
);
//
mapparam.put("roi", roiarray);
mapparam
.
put
(
"roi"
,
roiarray
);
// logger.info("recogurl="+recogurl);
Map
objectList
=
restTemplate
.
getForObject
(
recogurl
+
"?deviceCode={deviceCode}&model={model}&roi=
[]
"
,
Map
.
class
,
mapparam
);
Map
objectList
=
restTemplate
.
getForObject
(
recogurl
+
"?deviceCode={deviceCode}&model={model}&roi=
{roi}
"
,
Map
.
class
,
mapparam
);
if
(
String
.
valueOf
(
objectList
.
get
(
"ret"
)).
equals
(
"0"
))
{
//变成为已分析
...
...
@@ -221,7 +227,7 @@ public class ExtController {
String
filename
=
devicecode
+
"_"
+
DateUtils
.
formatCurrDateNoSign
()+
"_result.jpg"
;
eventWriteService
.
uploadPicture
(
traffpictureParamresult
,
imageurl
,
points
,
basepath
,
filename
);
String
filenameurl
=
File
.
separator
+
outpath
+
File
.
separator
+
basepath
+
File
.
separator
+
filename
;
jobTjParam
.
setImageUrl
(
filenameurl
);
jobTjParam
.
setImageUrl
(
weburl
+
filenameurl
);
// logger.info("file path:{}",filenameurl);
traffpictureParamresult
.
setImagedata
(
filenameurl
);
traffpictureParamresult
.
setProcessstatus
(
"-1"
);
...
...
src/main/resources/application.yml
View file @
8de39672
spring
:
profiles
:
active
:
test
active
:
local
mybatis
:
type-aliases-package
:
com.cx.cn.cxquartz.bean
...
...
@@ -23,3 +23,5 @@ redis:
countryside
:
callbackurl
:
http://kvideo.51iwifi.com/hesc-mq/hesc/mq/receive/aiCallback
web
:
url
:
http://zjh189.ncpoi.cc:20000
src/main/resources/logback-spring.xml
View file @
8de39672
...
...
@@ -2,6 +2,7 @@
<configuration
debug=
"false"
scan=
"false"
>
<springProperty
scop=
"context"
name=
"spring.application.name"
source=
"spring.application.name"
defaultValue=
""
/>
<property
name=
"log.path"
value=
"/home/ubuntu/tar/zjdxtest/logs/${spring.application.name}"
/>
<!--<property name="log.path" value="/home/prod/deploy/HZDXService/logs/${spring.application.name}"/>-->
<!-- 彩色日志格式 -->
<property
name=
"CONSOLE_LOG_PATTERN"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"
/>
...
...
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