|
@@ -6,6 +6,7 @@ import com.gis.common.deyuan.util.ResultUtils;
|
|
import com.gis.common.util.DoorUtils;
|
|
import com.gis.common.util.DoorUtils;
|
|
import com.gis.common.util.IOTUtils;
|
|
import com.gis.common.util.IOTUtils;
|
|
import com.gis.common.util.Result;
|
|
import com.gis.common.util.Result;
|
|
|
|
+import com.gis.web.dto.VideoDto;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -19,12 +20,12 @@ import java.text.SimpleDateFormat;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
|
@Log4j2
|
|
@Log4j2
|
|
-@Api(tags = "云平台-社区监控")
|
|
|
|
|
|
+@Api(tags = "云平台-社区监控、街道监控")
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("communityMonitor")
|
|
@RequestMapping("communityMonitor")
|
|
public class CommunityMonitor {
|
|
public class CommunityMonitor {
|
|
@Autowired
|
|
@Autowired
|
|
- NewResultUtils resultUtils;
|
|
|
|
|
|
+ ResultUtils resultUtils;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
ConfigConstant configConstant;
|
|
ConfigConstant configConstant;
|
|
@@ -80,7 +81,11 @@ public class CommunityMonitor {
|
|
@GetMapping("peopleEntrance/{code}/{startTime}/{endTime}")
|
|
@GetMapping("peopleEntrance/{code}/{startTime}/{endTime}")
|
|
public Result peopleEntrance(@PathVariable String code,@PathVariable String startTime,@PathVariable String endTime){
|
|
public Result peopleEntrance(@PathVariable String code,@PathVariable String startTime,@PathVariable String endTime){
|
|
String apiUrl = "/open/api/v1/device/peopleEntrance";
|
|
String apiUrl = "/open/api/v1/device/peopleEntrance";
|
|
- return getTimeCount(apiUrl,code,startTime,endTime);
|
|
|
|
|
|
+ HashMap<String, Object> param = new HashMap<>();
|
|
|
|
+ param.put("residentialCode", code);
|
|
|
|
+ param.put("startTime", startTime);
|
|
|
|
+ param.put("endTime", endTime);
|
|
|
|
+ return resultUtils.doGetResult(apiUrl, param);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -115,15 +120,7 @@ public class CommunityMonitor {
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
|
|
- private Result getTimeCount(String url,String code,String time1,String time2){
|
|
|
|
- HashMap<String, Object> param = new HashMap<>();
|
|
|
|
- param.put("residentialCode", code);
|
|
|
|
- param.put("startTime", time1);
|
|
|
|
- param.put("endTime", time2);
|
|
|
|
- Result residentialResult= resultUtils.doGetResult(url, param);
|
|
|
|
|
|
|
|
- return residentialResult;
|
|
|
|
- }
|
|
|
|
// /*
|
|
// /*
|
|
// * 根据社区编码获取社区所有小区编码
|
|
// * 根据社区编码获取社区所有小区编码
|
|
// * @param code 社区编码
|
|
// * @param code 社区编码
|
|
@@ -151,9 +148,10 @@ public class CommunityMonitor {
|
|
|
|
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParam(name = "code", value = "组织机构编码 如:510114001017240", dataType = "String"),
|
|
@ApiImplicitParam(name = "code", value = "组织机构编码 如:510114001017240", dataType = "String"),
|
|
|
|
+ @ApiImplicitParam(name = "type", value = "组织机构编码 如:1.雪亮工程 2. 电梯梯控 3.普通监控4.热成像设备", dataType = "int"),
|
|
})
|
|
})
|
|
- @ApiOperation("视频列表数据")
|
|
|
|
- @GetMapping("videoList/{code}")
|
|
|
|
|
|
+ @ApiOperation("视频列表数据(get)")
|
|
|
|
+ @GetMapping("videoListGet/{code}/{type}")
|
|
public Result videoList(@PathVariable String code) throws Exception {
|
|
public Result videoList(@PathVariable String code) throws Exception {
|
|
String apiUrl =configConstant.apiVideo+"/bi/findVideoInfo";
|
|
String apiUrl =configConstant.apiVideo+"/bi/findVideoInfo";
|
|
System.out.println("apiUrl: "+apiUrl);
|
|
System.out.println("apiUrl: "+apiUrl);
|
|
@@ -163,6 +161,20 @@ public class CommunityMonitor {
|
|
return DoorUtils.doPostDecrypt(apiUrl,param);
|
|
return DoorUtils.doPostDecrypt(apiUrl,param);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ @ApiOperation("视频列表数据(post)")
|
|
|
|
+ @PostMapping("videoListPost")
|
|
|
|
+ public Result videoList(@RequestBody VideoDto videoDto) throws Exception {
|
|
|
|
+ String apiUrl =configConstant.apiVideo+"/bi/findVideoInfo";
|
|
|
|
+ System.out.println("apiUrl: "+apiUrl);
|
|
|
|
+ TreeMap<String, Object> param = new TreeMap<>();
|
|
|
|
+ param.put("code", videoDto.getCode());
|
|
|
|
+ param.put("pageSize", videoDto.getPageSize());
|
|
|
|
+ param.put("pageNum", videoDto.getPageNum());
|
|
|
|
+ param.put("type", videoDto.getType());
|
|
|
|
+ return DoorUtils.doPostDecrypt(apiUrl,param);
|
|
|
|
+ }
|
|
|
|
+
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParam(name = "id", value = "视频id ", dataType = "String"),
|
|
@ApiImplicitParam(name = "id", value = "视频id ", dataType = "String"),
|
|
@ApiImplicitParam(name = "code", value = "小区组织机构编码 如:510114001017240", dataType = "String"),
|
|
@ApiImplicitParam(name = "code", value = "小区组织机构编码 如:510114001017240", dataType = "String"),
|