Commit 8de39672 authored by yzm's avatar yzm

优化后的发布版本3

parent 38d3544b
...@@ -59,6 +59,10 @@ public class ExtController { ...@@ -59,6 +59,10 @@ public class ExtController {
@Value("${countryside.callbackurl}") @Value("${countryside.callbackurl}")
private String callbackurl; private String callbackurl;
@Value("${web.url}")
private String weburl;
@Autowired @Autowired
...@@ -155,17 +159,19 @@ public class ExtController { ...@@ -155,17 +159,19 @@ public class ExtController {
return ResultUtil.success(); return ResultUtil.success();
} }
@RequestMapping(value = "/getDeviceSnapshotAndRecognize", method = RequestMethod.POST) @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"; String model = "1";
//图片框选出来的范围 //图片框选出来的范围
Long[] roiarray; Long[] roiarray;
String devicecode="";
if (null != mapList && !mapList.equals("") && mapList.size() > 0) { if (null != mapList && !mapList.equals("") && mapList.size() > 0) {
//查询该监控下面还没有经过分析的数据 //查询该监控下面还没有经过分析的数据
Map<String, Object> map = new HashMap<>(); //Map<String, Object> map = new HashMap<>();
map.put("sbbh", devicecode); //map.put("sbbh", devicecode);
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8); headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
...@@ -177,7 +183,7 @@ public class ExtController { ...@@ -177,7 +183,7 @@ public class ExtController {
roiarray[1] = new Long(taskinfo.getObjecty()); roiarray[1] = new Long(taskinfo.getObjecty());
roiarray[2] = new Long(taskinfo.getObjectw()); roiarray[2] = new Long(taskinfo.getObjectw());
roiarray[3] = new Long(taskinfo.getObjecth()); roiarray[3] = new Long(taskinfo.getObjecth());
devicecode=taskinfo.getExecuteparamter();
// roiarray[0] = new Long(0); // roiarray[0] = new Long(0);
// roiarray[1] = new Long(0); // roiarray[1] = new Long(0);
// roiarray[2] = new Long(0); // roiarray[2] = new Long(0);
...@@ -185,9 +191,9 @@ public class ExtController { ...@@ -185,9 +191,9 @@ public class ExtController {
// for (TraffAlarmRecord transferRecord : traffalarmrecordlist) { // for (TraffAlarmRecord transferRecord : traffalarmrecordlist) {
mapparam.put("deviceCode", devicecode); mapparam.put("deviceCode", devicecode);
mapparam.put("model", model); mapparam.put("model", model);
//mapparam.put("roi", roiarray); mapparam.put("roi", roiarray);
// logger.info("recogurl="+recogurl); // 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")) { if (String.valueOf(objectList.get("ret")).equals("0")) {
//变成为已分析 //变成为已分析
...@@ -221,7 +227,7 @@ public class ExtController { ...@@ -221,7 +227,7 @@ public class ExtController {
String filename = devicecode+"_"+ DateUtils.formatCurrDateNoSign()+ "_result.jpg"; String filename = devicecode+"_"+ DateUtils.formatCurrDateNoSign()+ "_result.jpg";
eventWriteService.uploadPicture(traffpictureParamresult,imageurl, points, basepath, filename); eventWriteService.uploadPicture(traffpictureParamresult,imageurl, points, basepath, filename);
String filenameurl=File.separator+outpath+File.separator+basepath+File.separator+filename; String filenameurl=File.separator+outpath+File.separator+basepath+File.separator+filename;
jobTjParam.setImageUrl(filenameurl); jobTjParam.setImageUrl(weburl+filenameurl);
// logger.info("file path:{}",filenameurl); // logger.info("file path:{}",filenameurl);
traffpictureParamresult.setImagedata(filenameurl); traffpictureParamresult.setImagedata(filenameurl);
traffpictureParamresult.setProcessstatus("-1"); traffpictureParamresult.setProcessstatus("-1");
......
spring: spring:
profiles: profiles:
active: test active: local
mybatis: mybatis:
type-aliases-package: com.cx.cn.cxquartz.bean type-aliases-package: com.cx.cn.cxquartz.bean
...@@ -23,3 +23,5 @@ redis: ...@@ -23,3 +23,5 @@ redis:
countryside: countryside:
callbackurl: http://kvideo.51iwifi.com/hesc-mq/hesc/mq/receive/aiCallback callbackurl: http://kvideo.51iwifi.com/hesc-mq/hesc/mq/receive/aiCallback
web:
url: http://zjh189.ncpoi.cc:20000
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<configuration debug="false" scan="false"> <configuration debug="false" scan="false">
<springProperty scop="context" name="spring.application.name" source="spring.application.name" defaultValue=""/> <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/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" <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}}"/> 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}}"/>
......
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