|
|
|
@ -119,10 +119,10 @@ public class IvsDeviceController { |
|
|
|
json.put("configItem", configItem); |
|
|
|
System.out.println(json); |
|
|
|
String message = JSON.toJSONString(json); |
|
|
|
String resp = ivsCommonService.sendSSLPostString(address+"/device/setdeviceconfig", message); |
|
|
|
String resp = ivsCommonService.sendSSLPostString(address + "/device/setdeviceconfig", message); |
|
|
|
JSONObject jsonObject = JSON.parseObject(resp); |
|
|
|
String resultCode = jsonObject.getString("resultCode"); |
|
|
|
if(resultCode.equals("0")){ |
|
|
|
if (resultCode.equals("0")) { |
|
|
|
return Response.ok(); |
|
|
|
} |
|
|
|
return Response.fail(); |
|
|
|
@ -131,22 +131,30 @@ public class IvsDeviceController { |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取红外数据 |
|
|
|
* |
|
|
|
* @param |
|
|
|
* @return |
|
|
|
* @throws Exception |
|
|
|
*/ |
|
|
|
@PostMapping("/temper") |
|
|
|
public String temper(@RequestBody Temp temp){ |
|
|
|
public String temper(@RequestBody Temp temp) { |
|
|
|
String cameraCode = temp.getCameraCode(); //cameraCode摄像机编码 |
|
|
|
int presetId = temp.getPresetId(); //预设位ID |
|
|
|
int ruleId = 12; //规则ID 暂时写死取12就行 |
|
|
|
// int meterType = temp.getMeterType(); |
|
|
|
String requestMsg = "presetId=" + presetId+ "&" + "ruleId=" + ruleId + "&" + "meterType=" + 3; |
|
|
|
String requestMsg = "presetId=" + presetId + "&" + "ruleId=" + ruleId + "&" + "meterType=" + 3; |
|
|
|
//发送请求 |
|
|
|
String resp = ivsCommonService.sendsslGetCookie(address+"/device/radiometry-temper/"+cameraCode, requestMsg, "UTF-8"); |
|
|
|
String resp = ivsCommonService.sendsslGetCookie(address + "/device/radiometry-temper/" + cameraCode, requestMsg, "UTF-8"); |
|
|
|
log.info( "获取红外温度: {}", resp); |
|
|
|
JSONObject jsonObject = JSON.parseObject(resp); |
|
|
|
String resultCode = jsonObject.getString("resultCode"); |
|
|
|
return "0"; |
|
|
|
String temperMax = ""; |
|
|
|
if (resultCode.equals("0")) { |
|
|
|
JSONObject radiometryInfo = (JSONObject) jsonObject.get("radiometryInfo"); |
|
|
|
temperMax = radiometryInfo.getString("temperMax"); |
|
|
|
return temperMax; |
|
|
|
} |
|
|
|
return "0"; |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping({"channelsnap"}) |
|
|
|
@ -229,7 +237,7 @@ public class IvsDeviceController { |
|
|
|
|
|
|
|
public byte[] Ivs1800channelSnap(IvsDevChanSnapVo ivsDevChanSnapVo) throws Exception { |
|
|
|
log.info("++++++++++++++++++++++++执行1800channelsnap截图接口++++++++++++++++++++++++++++++"); |
|
|
|
String url = address+"/snapshot/manualsnapshot"; |
|
|
|
String url = address + "/snapshot/manualsnapshot"; |
|
|
|
Map<String, Object> controlMap = new HashMap<>(); |
|
|
|
controlMap.put("cameraCode", ivsDevChanSnapVo.getCameraCode()); |
|
|
|
String requestMsg = JSON.toJSONString(controlMap); |
|
|
|
|