|  | @@ -8,6 +8,7 @@ import com.usky.common.core.util.StringUtils;
 | 
											
												
													
														|  |  import com.usky.common.security.utils.SecurityUtils;
 |  |  import com.usky.common.security.utils.SecurityUtils;
 | 
											
												
													
														|  |  import com.usky.iot.service.BaseAlarmService;
 |  |  import com.usky.iot.service.BaseAlarmService;
 | 
											
												
													
														|  |  import com.usky.iot.service.DmpDataInfoService;
 |  |  import com.usky.iot.service.DmpDataInfoService;
 | 
											
												
													
														|  | 
 |  | +import com.usky.iot.service.DmpDeviceInfoService;
 | 
											
												
													
														|  |  import com.usky.iot.service.DmpDeviceStatusService;
 |  |  import com.usky.iot.service.DmpDeviceStatusService;
 | 
											
												
													
														|  |  import com.usky.backend.domain.request.DmpDeviceDataRequestVO;
 |  |  import com.usky.backend.domain.request.DmpDeviceDataRequestVO;
 | 
											
												
													
														|  |  import com.usky.transfer.RemoteTransferService;
 |  |  import com.usky.transfer.RemoteTransferService;
 | 
											
										
											
												
													
														|  | @@ -36,6 +37,9 @@ public class DeviceHttpController {
 | 
											
												
													
														|  |      @Autowired
 |  |      @Autowired
 | 
											
												
													
														|  |      private RemoteTransferService remoteTransferService;
 |  |      private RemoteTransferService remoteTransferService;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +    @Autowired
 | 
											
												
													
														|  | 
 |  | +    private DmpDeviceInfoService dmpDeviceInfoService;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      @GetMapping(value = "/status")
 |  |      @GetMapping(value = "/status")
 | 
											
												
													
														|  |      public ApiResult<Void> status(){
 |  |      public ApiResult<Void> status(){
 | 
											
												
													
														|  |          baseAlarmService.status();
 |  |          baseAlarmService.status();
 | 
											
										
											
												
													
														|  | @@ -60,18 +64,11 @@ public class DeviceHttpController {
 | 
											
												
													
														|  |      public ApiResult<Map<String,Object>> control(@RequestParam("productCode") String productCode,
 |  |      public ApiResult<Map<String,Object>> control(@RequestParam("productCode") String productCode,
 | 
											
												
													
														|  |                                                   @RequestParam("deviceId") String deviceId,
 |  |                                                   @RequestParam("deviceId") String deviceId,
 | 
											
												
													
														|  |                                                   @RequestParam("commandCode") String commandCode,
 |  |                                                   @RequestParam("commandCode") String commandCode,
 | 
											
												
													
														|  | -                                                 @RequestParam("commandValue") String commandValue){
 |  | 
 | 
											
												
													
														|  | -        Integer tenantId = SecurityUtils.getTenantId();
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -        Map<String,Object> map = new HashMap<>();
 |  | 
 | 
											
												
													
														|  | -        map.put("method","control");
 |  | 
 | 
											
												
													
														|  | -        Map<String,Object> map1 = new HashMap<>();
 |  | 
 | 
											
												
													
														|  | -        map1.put("device_id",deviceId);
 |  | 
 | 
											
												
													
														|  | -        map1.put("commandCode",commandCode);
 |  | 
 | 
											
												
													
														|  | -        map1.put("commandValue",commandValue);
 |  | 
 | 
											
												
													
														|  | -        map.put("params",map1);
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -        return ApiResult.success(remoteTransferService.deviceControl(productCode,deviceId,JSON.toJSONString(map),tenantId));
 |  | 
 | 
											
												
													
														|  | 
 |  | +                                                 @RequestParam("commandValue") String commandValue,
 | 
											
												
													
														|  | 
 |  | +                                                 @RequestParam(value = "domain",required = false) String domain,
 | 
											
												
													
														|  | 
 |  | +                                                 @RequestParam(value = "userId",required = false) Long userId,
 | 
											
												
													
														|  | 
 |  | +                                                 @RequestParam(value = "userName",required = false) String userName){
 | 
											
												
													
														|  | 
 |  | +        return ApiResult.success(dmpDeviceInfoService.control(productCode,deviceId,commandCode,commandValue,domain,userId,userName));
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -92,6 +89,8 @@ public class DeviceHttpController {
 | 
											
												
													
														|  |                                                           @RequestParam("protocol") String protocol,
 |  |                                                           @RequestParam("protocol") String protocol,
 | 
											
												
													
														|  |                                                           @RequestParam("transmode") Integer transmode){
 |  |                                                           @RequestParam("transmode") Integer transmode){
 | 
											
												
													
														|  |          Integer tenantId = SecurityUtils.getTenantId();
 |  |          Integer tenantId = SecurityUtils.getTenantId();
 | 
											
												
													
														|  | 
 |  | +        Long userId = SecurityUtils.getUserId();
 | 
											
												
													
														|  | 
 |  | +        String userName = SecurityUtils.getUsername();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          Map<String,Object> map = new HashMap<>();
 |  |          Map<String,Object> map = new HashMap<>();
 | 
											
												
													
														|  |          map.put("method","streamControl");
 |  |          map.put("method","streamControl");
 | 
											
										
											
												
													
														|  | @@ -102,7 +101,7 @@ public class DeviceHttpController {
 | 
											
												
													
														|  |          map1.put("transmode",transmode);
 |  |          map1.put("transmode",transmode);
 | 
											
												
													
														|  |          map.put("params",map1);
 |  |          map.put("params",map1);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        return ApiResult.success(remoteTransferService.deviceControl(productCode,deviceId, JSON.toJSONString(map),tenantId));
 |  | 
 | 
											
												
													
														|  | 
 |  | +        return ApiResult.success(remoteTransferService.deviceControl(productCode,deviceId, JSON.toJSONString(map),tenantId,userId,userName));
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      /**
 |  |      /**
 | 
											
										
											
												
													
														|  | @@ -119,6 +118,8 @@ public class DeviceHttpController {
 | 
											
												
													
														|  |                                                            @RequestParam(value = "pageNo") Integer pageNo,
 |  |                                                            @RequestParam(value = "pageNo") Integer pageNo,
 | 
											
												
													
														|  |                                                            @RequestParam(value = "pageSize") Integer pageSize){
 |  |                                                            @RequestParam(value = "pageSize") Integer pageSize){
 | 
											
												
													
														|  |          Integer tenantId = SecurityUtils.getTenantId();
 |  |          Integer tenantId = SecurityUtils.getTenantId();
 | 
											
												
													
														|  | 
 |  | +        Long userId = SecurityUtils.getUserId();
 | 
											
												
													
														|  | 
 |  | +        String userName = SecurityUtils.getUsername();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          Map<String,Object> map = new HashMap<>();
 |  |          Map<String,Object> map = new HashMap<>();
 | 
											
												
													
														|  |          map.put("method","driverRecordControl");
 |  |          map.put("method","driverRecordControl");
 | 
											
										
											
												
													
														|  | @@ -133,7 +134,27 @@ public class DeviceHttpController {
 | 
											
												
													
														|  |          map1.put("pageSize",pageSize);
 |  |          map1.put("pageSize",pageSize);
 | 
											
												
													
														|  |          map.put("params",map1);
 |  |          map.put("params",map1);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        return ApiResult.success(remoteTransferService.deviceControl("501_HGHK","0001",JSON.toJSONString(map),tenantId));
 |  | 
 | 
											
												
													
														|  | 
 |  | +        return ApiResult.success(remoteTransferService.deviceControl("501_HGHK","0001",JSON.toJSONString(map),tenantId,userId,userName));
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    /**
 | 
											
												
													
														|  | 
 |  | +     * 查询停车库剩余车位数
 | 
											
												
													
														|  | 
 |  | +     * @param parkSyscode
 | 
											
												
													
														|  | 
 |  | +     * @return
 | 
											
												
													
														|  | 
 |  | +     */
 | 
											
												
													
														|  | 
 |  | +    @GetMapping("parkRemainSpaceList")
 | 
											
												
													
														|  | 
 |  | +    public ApiResult<Map<String,Object>> parkRemainSpaceList(@RequestParam(value = "parkSyscode") String parkSyscode){
 | 
											
												
													
														|  | 
 |  | +        Integer tenantId = SecurityUtils.getTenantId();
 | 
											
												
													
														|  | 
 |  | +        Long userId = SecurityUtils.getUserId();
 | 
											
												
													
														|  | 
 |  | +        String userName = SecurityUtils.getUsername();
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        Map<String,Object> map = new HashMap<>();
 | 
											
												
													
														|  | 
 |  | +        map.put("method","parkRemainSpaceControl");
 | 
											
												
													
														|  | 
 |  | +        Map<String,Object> map1 = new HashMap<>();
 | 
											
												
													
														|  | 
 |  | +        map1.put("parkSyscode",parkSyscode);
 | 
											
												
													
														|  | 
 |  | +        map.put("params",map1);
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        return ApiResult.success(remoteTransferService.deviceControl("501_HGHK","0002",JSON.toJSONString(map),tenantId,userId,userName));
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 |