大日志改成debug打印
This commit is contained in:
parent
57f6611fe7
commit
e5ecb37376
@ -36,7 +36,7 @@ public class LocationApiController {
|
|||||||
@ApiOperation(value = "上传全量人员定位实时数据", notes = "上传全量人员定位实时数据", httpMethod = "POST")
|
@ApiOperation(value = "上传全量人员定位实时数据", notes = "上传全量人员定位实时数据", httpMethod = "POST")
|
||||||
@PostMapping(value = "/api/uploadLocationDataList")
|
@PostMapping(value = "/api/uploadLocationDataList")
|
||||||
public JiLianDaRt uploadLocationDataList(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
public JiLianDaRt uploadLocationDataList(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||||
log.info("uploadLocationDataList:{}", JSON.toJSONString(paramMap));
|
log.debug("uploadLocationDataList:{}", JSON.toJSONString(paramMap));
|
||||||
return locationDataService.uploadLocationDataList(paramMap);
|
return locationDataService.uploadLocationDataList(paramMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,31 +77,31 @@ public class HatAlarmServerController {
|
|||||||
if (dev == null) {
|
if (dev == null) {
|
||||||
throw new OpenAlertException(MessageUtil.get("EquipmentNumIncorrectErr"));
|
throw new OpenAlertException(MessageUtil.get("EquipmentNumIncorrectErr"));
|
||||||
}
|
}
|
||||||
JSONObject additional = alarmInfo.getJSONObject("additional");
|
|
||||||
AiAnalyseHardWareAlarmRecord aiAnalyseHardWareAlarmRecord = new AiAnalyseHardWareAlarmRecord();
|
|
||||||
aiAnalyseHardWareAlarmRecord.setCreateTime(DateUtil.formatDateTime(new Date(additional.getLong("alarm_time"))));
|
|
||||||
DictionaryItem dict = dictionaryItemService.getDictByRemark("ai_analyse_hard_ware_alarm_record_type", additional.getString("alarm_minor"), dev.getProjectSn());
|
|
||||||
aiAnalyseHardWareAlarmRecord.setAlarmType(Optional.ofNullable(dict).map(m -> Integer.valueOf(m.getData())).orElse(null));
|
|
||||||
aiAnalyseHardWareAlarmRecord.setHardwareId(dev.getHardwareId());
|
|
||||||
aiAnalyseHardWareAlarmRecord.setHardwareName(dev.getHardwareName());
|
|
||||||
List<VideoItem> videoItems = videoItemService.list(new LambdaQueryWrapper<VideoItem>()
|
|
||||||
.eq(VideoItem::getHatAiVideoId, additional.getInt("stream_id"))
|
|
||||||
.eq(VideoItem::getAiHardwareId, deviceSn)
|
|
||||||
.last(Cts.IGNORE_DATA_SCOPE_CONDITION)
|
|
||||||
);
|
|
||||||
if (CollUtil.isNotEmpty(videoItems)) {
|
|
||||||
aiAnalyseHardWareAlarmRecord.setLocation(videoItems.get(0).getVideoName());
|
|
||||||
aiAnalyseHardWareAlarmRecord.setAlarmDesc(videoItems.get(0).getVideoName());
|
|
||||||
}
|
|
||||||
aiAnalyseHardWareAlarmRecord.setProjectSn(dev.getProjectSn());
|
|
||||||
aiAnalyseHardWareAlarmRecord.setStatus(1);
|
|
||||||
byte[] data = pics[1].getBytes();
|
|
||||||
String uuid = alarmInfo.getJSONObject("global_info").getString("data_uuid");
|
|
||||||
String fileName = uuid.replace(':', '_');
|
|
||||||
File dir = new File(PathUtil.getBasePath(), "/hat_ai_http_alarm");
|
|
||||||
dir.mkdir();
|
|
||||||
String name = "/" + fileName + "_" + 1 + ".jpg";
|
|
||||||
try {
|
try {
|
||||||
|
JSONObject additional = alarmInfo.getJSONObject("additional");
|
||||||
|
AiAnalyseHardWareAlarmRecord aiAnalyseHardWareAlarmRecord = new AiAnalyseHardWareAlarmRecord();
|
||||||
|
aiAnalyseHardWareAlarmRecord.setCreateTime(DateUtil.formatDateTime(new Date(additional.getLong("alarm_time"))));
|
||||||
|
DictionaryItem dict = dictionaryItemService.getDictByRemark("ai_analyse_hard_ware_alarm_record_type", additional.getString("alarm_minor"), dev.getProjectSn());
|
||||||
|
aiAnalyseHardWareAlarmRecord.setAlarmType(Optional.ofNullable(dict).map(m -> Integer.valueOf(m.getData())).orElse(null));
|
||||||
|
aiAnalyseHardWareAlarmRecord.setHardwareId(dev.getHardwareId());
|
||||||
|
aiAnalyseHardWareAlarmRecord.setHardwareName(dev.getHardwareName());
|
||||||
|
List<VideoItem> videoItems = videoItemService.list(new LambdaQueryWrapper<VideoItem>()
|
||||||
|
.eq(VideoItem::getHatAiVideoId, additional.getInt("stream_id"))
|
||||||
|
.eq(VideoItem::getAiHardwareId, deviceSn)
|
||||||
|
.last(Cts.IGNORE_DATA_SCOPE_CONDITION)
|
||||||
|
);
|
||||||
|
if (CollUtil.isNotEmpty(videoItems)) {
|
||||||
|
aiAnalyseHardWareAlarmRecord.setLocation(videoItems.get(0).getVideoName());
|
||||||
|
aiAnalyseHardWareAlarmRecord.setAlarmDesc(videoItems.get(0).getVideoName());
|
||||||
|
}
|
||||||
|
aiAnalyseHardWareAlarmRecord.setProjectSn(dev.getProjectSn());
|
||||||
|
aiAnalyseHardWareAlarmRecord.setStatus(1);
|
||||||
|
byte[] data = pics[1].getBytes();
|
||||||
|
String uuid = alarmInfo.getJSONObject("global_info").getString("data_uuid");
|
||||||
|
String fileName = uuid.replace(':', '_');
|
||||||
|
File dir = new File(PathUtil.getBasePath(), "/hat_ai_http_alarm");
|
||||||
|
dir.mkdir();
|
||||||
|
String name = "/" + fileName + "_" + 1 + ".jpg";
|
||||||
fos = new FileOutputStream(dir + name, false);
|
fos = new FileOutputStream(dir + name, false);
|
||||||
fos.write(data);
|
fos.write(data);
|
||||||
aiAnalyseHardWareAlarmRecord.setImageUrl("hat_ai_http_alarm" + name);
|
aiAnalyseHardWareAlarmRecord.setImageUrl("hat_ai_http_alarm" + name);
|
||||||
@ -110,7 +110,8 @@ public class HatAlarmServerController {
|
|||||||
//将数据通过MQTT转发到前台
|
//将数据通过MQTT转发到前台
|
||||||
asyncAiAnalyse.sendAiAnalyse(aiAnalyseHardWareAlarmRecord, Cts.PROJECT_LEVEL);
|
asyncAiAnalyse.sendAiAnalyse(aiAnalyseHardWareAlarmRecord, Cts.PROJECT_LEVEL);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("华安泰获取ai报警错误", e);
|
log.error("华安泰获取ai报警错误:{}", e.getMessage());
|
||||||
|
log.debug("华安泰获取ai报警错误", e);
|
||||||
} finally {
|
} finally {
|
||||||
if (fos != null) {
|
if (fos != null) {
|
||||||
fos.close();
|
fos.close();
|
||||||
|
|||||||
@ -76,7 +76,7 @@ public class UfaceCallbackController {
|
|||||||
@ApiOperation(value = "芊熠人脸识别回调", notes = "芊熠人脸识别回调", httpMethod = "POST")
|
@ApiOperation(value = "芊熠人脸识别回调", notes = "芊熠人脸识别回调", httpMethod = "POST")
|
||||||
@PostMapping(value = "/ufaceQYCallbackUrl", produces = {"application/json;charset=UTF-8"})
|
@PostMapping(value = "/ufaceQYCallbackUrl", produces = {"application/json;charset=UTF-8"})
|
||||||
public String ufaceQyCallbackUrl(@RequestBody final JSONObject json) {
|
public String ufaceQyCallbackUrl(@RequestBody final JSONObject json) {
|
||||||
log.info("-------芊熠人脸识别回调------:"+json.toJSONString());
|
log.debug("-------芊熠人脸识别回调------:"+json.toJSONString());
|
||||||
workerAttendanceService.ufaceQyCallbackUrl(json.getJSONObject("body"));
|
workerAttendanceService.ufaceQyCallbackUrl(json.getJSONObject("body"));
|
||||||
JSONObject rtn = new JSONObject();
|
JSONObject rtn = new JSONObject();
|
||||||
rtn.put(TYPE,json.getString(TYPE));
|
rtn.put(TYPE,json.getString(TYPE));
|
||||||
|
|||||||
@ -332,7 +332,7 @@ public class QYUfaceUtil {
|
|||||||
if (resp.getStatusLine().getStatusCode() == 200) {
|
if (resp.getStatusLine().getStatusCode() == 200) {
|
||||||
HttpEntity he = resp.getEntity();
|
HttpEntity he = resp.getEntity();
|
||||||
String s = EntityUtils.toString(he, "UTF-8");
|
String s = EntityUtils.toString(he, "UTF-8");
|
||||||
log.info("sendHttpPostWithJson的rs:{}", s);
|
log.debug("sendHttpPostWithJson的rs:{}", s);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -61,7 +61,7 @@ public class StandardDevUtil {
|
|||||||
String urlString = url + "/app/GetDeviceData";
|
String urlString = url + "/app/GetDeviceData";
|
||||||
log.info("url:{},param:{},headerMap:{}", urlString, param, headerMap);
|
log.info("url:{},param:{},headerMap:{}", urlString, param, headerMap);
|
||||||
String result = get(urlString, param, headerMap);
|
String result = get(urlString, param, headerMap);
|
||||||
log.info("result:{}", result);
|
log.debug("result:{}", result);
|
||||||
if (StringUtils.isNotEmpty(result)) {
|
if (StringUtils.isNotEmpty(result)) {
|
||||||
log.info("------------获取标样室实时数据结果---------");
|
log.info("------------获取标样室实时数据结果---------");
|
||||||
JSONObject object = JSONObject.parseObject(result);
|
JSONObject object = JSONObject.parseObject(result);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user