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
a4f32ce4
Commit
a4f32ce4
authored
Jan 14, 2022
by
wangjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发布版本
parent
dcfe46f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
96 deletions
+0
-96
src/main/java/com/snapshot/task/Service/TaskRecog.java
src/main/java/com/snapshot/task/Service/TaskRecog.java
+0
-96
No files found.
src/main/java/com/snapshot/task/Service/TaskRecog.java
deleted
100644 → 0
View file @
dcfe46f1
package
com
.
snapshot
.
task
.
Service
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.snapshot.task.bean.GoalStructureParam
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
import
java.util.List
;
import
java.util.Map
;
@Service
public
class
TaskRecog
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
TaskRecog
.
class
);
@Value
(
"${file.recogurl}"
)
String
recogurl
;
@Autowired
RestTemplate
restTemplate
;
public
void
getRecog
(
GoalStructureParam
param
){
String
maprecogdata
=
restTemplate
.
postForObject
(
recogurl
,
param
,
String
.
class
);
try
{
List
<
Map
>
resultList
=
new
ObjectMapper
().
readValue
(
maprecogdata
,
List
.
class
);
//遍历所有返回结果
for
(
Map
result:
resultList
)
{
// if (null != result.get("ret") && result.get("ret").equals("200")) {
// //变成为已分析
// transferRecord.setProcessstatus("-1");
// traffAlarmRecordService.updateTraffAlarmRecordProcess(transferRecord);
// String recordtype = taskinfo.getRecordtype();
// JobTjParam jobTjParam = new JobTjParam();
// jobTjParam.setDeviceId(devicecode);
// jobTjParam.setDetectType(recordtype);
// String imageurl = transferRecord.getImg1path();
// List<Map> points = new ArrayList<>();
// //分析结果数据
// List<Map> objectresult = (List<Map>) result.get("ObjectList");
// if (objectresult.size() < 1) {
// logger.info(" objectresult is empty");
// continue;
// }
// //获得点位
// logger.info("获得点位");
// TraffpictureParam traffpictureParamresult = new TraffpictureParam();
// traffpictureParamresult = eventWriteService.getResult(traffpictureParamresult, Integer.parseInt(taskinfo.getMetatype())
// , roiarray, imageurl, objectresult, jobTjParam, points);
// if (null == traffpictureParamresult) {
// logger.info("人群密度未超或目标未出现");
// continue;
// }
// eventWriteService.setTraffpictureParam(recordtype, devicecode,
// transferRecord.getCreatetime(),
// traffpictureParamresult);
// //图片划线并上传
// logger.info("图片划线并上传");
// String basepath = DateUtils.formatCurrDayYM() +
// File.separator + DateUtils.formatCurrDayDD() + File.separator +
// devicecode;
// String filename = devicecode + "_" + DateUtils.parseDateToStrNoSign(transferRecord.getRecordtime()) + "_" + recordtype + "_result.jpg";
// eventWriteService.uploadPicture(traffpictureParamresult, transferRecord.getImg1urlfrom(), points, basepath, filename);
// String filenameurl = File.separator + outpath + File.separator + basepath + File.separator + filename;
// jobTjParam.setImageUrl(weburl + filenameurl);
// logger.info("file path:{}", filenameurl);
// traffpictureParamresult.setImagedata(filenameurl);
// traffpictureParamresult.setProcessstatus("-1");
// traffPictureService.updateTraffpicture(traffpictureParamresult);
//
// //回调
// logger.info("send to dianxin data:{}", jobTjParam.toString());
// eventWriteService.sendEventByCallUrl(traffpictureParamresult, jobTjParam, taskinfo.getUrl().equals("") ? callbackurl : taskinfo.getUrl());
//
// if (unionId.contains(devicecode)) {
// VoiceData voicedata = new VoiceData();
// voicedata.setAppKey(appKey);
// voicedata.setCorpId(corpId);
// Voice voice = new Voice();
// voice.setEventId(eventId);
// voice.setUnionId(unionId);
// voicedata.setRequestData(voice);
// // logger.info(" send to voice: {}", new ObjectMapper().writeValueAsString(voicedata));
// eventWriteService.sendVoice(voicedata);
// }
// //推送告警到前端
// webSocket.GroupSending(new ObjectMapper().writeValueAsString(traffpictureParamresult));
// }
}
}
catch
(
Exception
ex
)
{
logger
.
error
(
ex
.
toString
());
}
//其他数据如表
//getMetaData( objectresult );
}
}
\ No newline at end of file
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