From ba820c27d8b84475b5e8b54ec7efcd3a649d13d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AF=85?= <97163845@qq.com> Date: Thu, 24 Apr 2025 15:53:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=B0=E5=B0=BC-=E5=B7=A1=E8=A7=86=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E8=BF=94=E5=9B=9E=E6=8E=A5=E5=8F=A3=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=8E=92=E5=BA=8F=20=E5=8D=8E=E4=B8=BA1800?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AD=90=E8=AE=BE=E5=A4=87=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=B8=BA2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ivs/controller/IvsDeviceController.java | 23 +++++++++---------- .../mapper/task/PatrolResultMapper.xml | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/inspect-ivs/src/main/java/com/inspect/ivs/controller/IvsDeviceController.java b/inspect-ivs/src/main/java/com/inspect/ivs/controller/IvsDeviceController.java index a494eb0..6f6b218 100644 --- a/inspect-ivs/src/main/java/com/inspect/ivs/controller/IvsDeviceController.java +++ b/inspect-ivs/src/main/java/com/inspect/ivs/controller/IvsDeviceController.java @@ -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> radiometryRuleList = new ArrayList<>(); JSONObject radiometryRule = new JSONObject(); Map localParam = new HashMap<>(); List> alarmSettingList = new ArrayList<>(); Map 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 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)); } diff --git a/inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml b/inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml index 419f279..9bef46e 100644 --- a/inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml +++ b/inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml @@ -1018,7 +1018,7 @@ and bd.device_id = #{componentId} and ra.result_type = #{resultType} - LIMIT #{pageSize} OFFSET #{offset} + LIMIT #{pageSize} OFFSET #{offset} order by pr.time desc