Browse Source

印尼-巡视结果返回接口根据时间排序 华为1800获取子设备列表参数为2

master
王寅 8 months ago
parent
commit
ba820c27d8
2 changed files with 12 additions and 13 deletions
  1. +11
    -12
      inspect-ivs/src/main/java/com/inspect/ivs/controller/IvsDeviceController.java
  2. +1
    -1
      inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml

+ 11
- 12
inspect-ivs/src/main/java/com/inspect/ivs/controller/IvsDeviceController.java View File

@ -22,6 +22,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
@ -71,16 +72,13 @@ public class IvsDeviceController {
ruleItem.put("usefReflectedTemp", false);//写死
ruleItem.put("alarmSettingList", alarmSettingListEx);//写死
radiometryRuleExList.add(ruleItem);
// 设置 configItem
configItem.put("radiometryRuleExList", radiometryRuleExList);
List<Map<String, Object>> radiometryRuleList = new ArrayList<>();
JSONObject radiometryRule = new JSONObject();
Map<String, Object> localParam = new HashMap<>();
List<Map<String, Object>> alarmSettingList = new ArrayList<>();
Map<String, Object> alarmSetting = new HashMap<>();
radiometryRule.put("areaSubType", 1);//区域测温的子类型 1矩形
radiometryRule.put("enable", 1);//使能
radiometryRule.put("meterType", 3);//区域
@ -88,13 +86,11 @@ public class IvsDeviceController {
radiometryRule.put("ruleId", 12);//自己取最大没人用的
radiometryRule.put("samplePeriod", 3);//
radiometryRule.put("name", tempConfiguration.getName());// 定义一个名字
//设置localParam
localParam.put("enable", 1);
localParam.put("objectDistance", 4);
localParam.put("objectEmissivity", 0.9700000286102295);
localParam.put("refalectedTemp", 25);
//设置alarmSettingList
alarmSetting.put("alarmCondition", 1);
alarmSetting.put("duration", 30);
@ -104,17 +100,12 @@ public class IvsDeviceController {
alarmSetting.put("resultType", 2);
alarmSetting.put("threshold", 20.1);
alarmSettingList.add(alarmSetting);
radiometryRule.put("alarmSettingList", alarmSettingList);
radiometryRule.put("localParam", localParam);
//
radiometryRule.put("polygonList", tempConfiguration.getPolygonList());
radiometryRuleList.add(radiometryRule);
configItem.put("radiometryRuleList", radiometryRuleList);
json.put("deviceCode", tempConfiguration.getCameraCode());//
json.put("deviceCode", tempConfiguration.getCameraCode().split("#")[0]);//
json.put("configType", 500);//写死500
json.put("configItem", configItem);
System.out.println(json);
@ -138,7 +129,7 @@ public class IvsDeviceController {
*/
@PostMapping("/temper")
public String temper(@RequestBody Temp temp) {
String cameraCode = temp.getCameraCode(); //cameraCode摄像机编码
String cameraCode = temp.getCameraCode().split("#")[0]; //cameraCode摄像机编码
int presetId = temp.getPresetId(); //预设位ID
int ruleId = 12; //规则ID 暂时写死取12就行
// int meterType = temp.getMeterType();
@ -157,6 +148,8 @@ public class IvsDeviceController {
return "0";
}
@GetMapping({"channelsnap"})
public ResponseEntity<InputStreamResource> channelSnap(IvsDevChanSnapVo ivsDevChanSnapVo) throws Exception {
if (version.equals("1800")) {
@ -298,11 +291,17 @@ public class IvsDeviceController {
@GetMapping({"channellist"})
public SipbDeviceListView channelList(IvsDevChanListVo ivsDevChanListVo) {
if(version.equals("1800")){
ivsDevChanListVo.setDeviceType(2);
}
return ivsCommonService.get(UriUtils.parse(IvsConst.URI_DEVICE_LIST, ivsDevChanListVo), SipbDeviceListView.class);
}
@GetMapping({"channellistJson"})
public JSONObject channelListJson(IvsDevChanListVo ivsDevChanListVo) {
if(version.equals("1800")){
ivsDevChanListVo.setDeviceType(2);
}
return ivsCommonService.getResultJson(UriUtils.parse(IvsConst.URI_DEVICE_LIST, ivsDevChanListVo));
}


+ 1
- 1
inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml View File

@ -1018,7 +1018,7 @@
<if test="componentId != null ">and bd.device_id = #{componentId}</if>
<if test="resultType != null ">and ra.result_type = #{resultType}</if>
</where>
LIMIT #{pageSize} OFFSET #{offset}
LIMIT #{pageSize} OFFSET #{offset} order by pr.time desc
</select>
<select id="selectPatrolResultListByMainIds" resultMap="PatrolResultResult">


Loading…
Cancel
Save