|
|
@ -123,15 +123,14 @@ public class AlgorithmServiceImpl implements AlgorithmService { |
|
|
analyseRequest.setRequestHostIp("199.199.199.210"); |
|
|
analyseRequest.setRequestHostIp("199.199.199.210"); |
|
|
analyseRequest.setRequestHostPort("18530"); |
|
|
analyseRequest.setRequestHostPort("18530"); |
|
|
final String analyseRequestStrNew = new Gson().toJson(analyseRequest); |
|
|
final String analyseRequestStrNew = new Gson().toJson(analyseRequest); |
|
|
String result = HttpClientUtils.sendPostAgain(infraredPath, analyseRequestStrNew); |
|
|
|
|
|
log.info(Color.MAGENTA + "[BIG MODEL] FROM infrared RESULT: {}" + Color.END, result); |
|
|
|
|
|
|
|
|
String infraredResult = HttpClientUtils.sendPostAgain(infraredPath, analyseRequestStrNew); |
|
|
|
|
|
log.info(Color.MAGENTA + "[BIG MODEL] FROM infrared RESULT: {}" + Color.END, infraredResult); |
|
|
// 返回给智巡服务器 |
|
|
// 返回给智巡服务器 |
|
|
// AnalyseResult analyseResultFromInfrared = new Gson().fromJson(analyseRequestStr, AnalyseResult.class); |
|
|
|
|
|
// Call<Object> call = analysisRemoteService.picAnalyseRetNotify(analyseResultFromInfrared); |
|
|
|
|
|
// Response<Object> response = call.execute(); |
|
|
|
|
|
// Object result2 = response.body(); |
|
|
|
|
|
// System.out.println("result2: " + result2); |
|
|
|
|
|
// log.info(Color.MAGENTA + "[BIG MODEL] result2: {}" + Color.END, result2); |
|
|
|
|
|
|
|
|
AnalyseResult analyseResultFromInfrared = new Gson().fromJson(infraredResult, AnalyseResult.class); |
|
|
|
|
|
Call<Object> call = analysisRemoteService.picAnalyseRetNotify(analyseResultFromInfrared); |
|
|
|
|
|
Response<Object> response = call.execute(); |
|
|
|
|
|
Object objectFromPatrolMain = response.body(); |
|
|
|
|
|
log.info(Color.MAGENTA + "[BIG MODEL] FROM PATROL-MAIN: {}", objectFromPatrolMain); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("[BIG MODEL] continue to call infrared EXCEPTION: {}", e.getMessage()); |
|
|
log.error("[BIG MODEL] continue to call infrared EXCEPTION: {}", e.getMessage()); |
|
|
} |
|
|
} |
|
|
@ -216,18 +215,19 @@ public class AlgorithmServiceImpl implements AlgorithmService { |
|
|
|
|
|
|
|
|
log.info(Color.GREEN+"返回值打印: 是否成功(0成功;1失败)"+analyseResPoint.getValue()+ |
|
|
log.info(Color.GREEN+"返回值打印: 是否成功(0成功;1失败)"+analyseResPoint.getValue()+ |
|
|
",最高温度值"+analyseResPoint.getConf()+",返回图片路径:"+analyseResPoint.getResImageUrl()); |
|
|
",最高温度值"+analyseResPoint.getConf()+",返回图片路径:"+analyseResPoint.getResImageUrl()); |
|
|
try { |
|
|
|
|
|
// String analyseResultOutJson = JSONObject.toJSONString(analyseResult); |
|
|
|
|
|
String analyseResultOutJson = new Gson().toJson(analyseResult); |
|
|
|
|
|
System.out.println("打印返回"+analyseResultOutJson); |
|
|
|
|
|
log.info(Color.MAGENTA + "[INFRARED] irPicAnalyse: feedbackUrl={}, analyseResultOutJson={}" + Color.END, feedbackUrl, analyseResultOutJson); |
|
|
|
|
|
|
|
|
// try { |
|
|
|
|
|
//// String analyseResultOutJson = JSONObject.toJSONString(analyseResult); |
|
|
|
|
|
// String analyseResultOutJson = new Gson().toJson(analyseResult); |
|
|
|
|
|
// System.out.println("打印返回"+analyseResultOutJson); |
|
|
|
|
|
// log.info(Color.MAGENTA + "[INFRARED] irPicAnalyse: feedbackUrl={}, analyseResultOutJson={}" + Color.END, feedbackUrl, analyseResultOutJson); |
|
|
// String result = HttpClientUtils.sendPostAgain(feedbackUrl, analyseResultOutJson); |
|
|
// String result = HttpClientUtils.sendPostAgain(feedbackUrl, analyseResultOutJson); |
|
|
// log.info(Color.MAGENTA + "[INFRARED] irPicAnalyse: feedbackUrl={}, result: {}" + Color.END, feedbackUrl, result); |
|
|
// log.info(Color.MAGENTA + "[INFRARED] irPicAnalyse: feedbackUrl={}, result: {}" + Color.END, feedbackUrl, result); |
|
|
} catch (Exception e) { |
|
|
|
|
|
log.error("[INFRARED] irPicAnalyse: feedbackUrl={}, EXCEPTION: {}", feedbackUrl, e.getMessage()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return "{\"code\":\"200\"}"; |
|
|
|
|
|
|
|
|
// } catch (Exception e) { |
|
|
|
|
|
// log.error("[INFRARED] irPicAnalyse: feedbackUrl={}, EXCEPTION: {}", feedbackUrl, e.getMessage()); |
|
|
|
|
|
// } |
|
|
|
|
|
String analyseResultOutJson = new Gson().toJson(analyseResult); |
|
|
|
|
|
log.info(Color.GREEN + "[INFRARED] irPicAnalyse analyseResultOutJson: {}", analyseResultOutJson); |
|
|
|
|
|
return analyseResultOutJson; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
|