| 
					
				 | 
			
			
				@ -7,6 +7,7 @@ import com.yihu.jw.care.service.common.PermissionService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.device.DeviceManageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.device.NetworkCardService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.device.PatientDeviceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.device.YsDeviceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.security.SecurityMonitoringOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.statistics.DetectionPlatformService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.ResponseContant; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -46,6 +47,8 @@ public class DetectionPlatformEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private DeviceManageService deviceManageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private PermissionService permissionService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private YsDeviceService ysDeviceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation("环境信息") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -463,38 +466,23 @@ public class DetectionPlatformEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    @PostMapping(value = "testDownloadVideoUrl") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    @ApiOperation(value = "下载m3u8") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    public ObjEnvelop downM3u8Video(@RequestParam String url) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            return platformService.downM3u8Video(url); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        return ObjEnvelop.getSuccess("1111",""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    public static void main(String[] args) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        String originUrlpath = "http://videocdn.renrenjiang.cn/Act-ss-m3u8-sd/1037359_1546064640169/1037359_1546064640169.m3u8"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        String preUrlPath = originUrlpath.substring(0, originUrlpath.lastIndexOf("/")+1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        String rootPath = "E:\\videodir"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        String fileName = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        HlsDownloader downLoader = new HlsDownloader(originUrlpath, preUrlPath, rootPath); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        //downLoader.setThreadQuantity(10); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        try{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            fileName = downLoader.download(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        if(StringUtils.isBlank(fileName)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            System.out.println("下载失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            System.err.println("下载成功"+fileName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            System.out.println("完整路径:"+rootPath+"\\"+fileName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation("获取播放地址--协议") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = "getDeviceLiveAddress2") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop getDeviceLiveAddress2( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name="deviceSerial",required = false,value="设备序列号") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "deviceSerial",required = false) String deviceSerial, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name="channelNo",required = false,value="设备通道号,默认为1") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "channelNo",required = false,defaultValue = "1") Integer channelNo 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    ){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            JSONObject result = ysDeviceService.getDeviceLiveAddress2(deviceSerial,channelNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return ObjEnvelop.getError(result.getString(ResponseContant.resultMsg)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return ObjEnvelop.getSuccess("查询成功",result.get(ResponseContant.resultMsg)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return failedObjEnvelopException2(e); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |