Pu Zhibing
2025-03-03 05df94f5658524d5c404415ab63e95bc139d8b3f
guns-admin/src/main/java/com/stylefeng/guns/modular/api/PatrolTaskController.java
@@ -1,5 +1,6 @@
package com.stylefeng.guns.modular.api;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.core.common.constant.JwtConstants;
@@ -15,9 +16,11 @@
import com.stylefeng.guns.modular.system.util.videoGateway.VideoGateway;
import com.stylefeng.guns.modular.system.util.videoGateway.model.Ship;
import com.stylefeng.guns.modular.system.util.videoGateway.model.Vehicle;
import com.stylefeng.guns.modular.system.warpper.VehicleSpeed;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -29,6 +32,7 @@
 * @author zhibing.pu
 * @Date 2024/12/17 20:18
 */
@Slf4j
@RestController
@RequestMapping("")
public class PatrolTaskController extends BaseController {
@@ -226,7 +230,7 @@
   }
   
   
   @PutMapping("/base/patrolTask/vehicleSpeed")
   @PostMapping("/base/patrolTask/vehicleSpeed")
   @ApiOperation(value = "变更车辆状态", tags = {"互联互通接口"})
   @ApiImplicitParams({
         @ApiImplicitParam(value = "车牌号", name = "vehicleNum", dataType = "String", required = true),
@@ -237,8 +241,10 @@
         @ApiImplicitParam(value = "纬度", name = "latitude", dataType = "double", required = true),
         @ApiImplicitParam(value = "经度", name = "longitude", dataType = "double", required = true),
   })
   public ResultUtil vehicleSpeed(String vehicleNum, Integer vehicleStatus, Integer vehicleType, String communicationNum, String vehicleGpsProtocol, Double latitude, Double longitude){
      patrolTaskService.vehicleSpeed(vehicleNum, vehicleStatus, vehicleType, communicationNum, vehicleGpsProtocol, latitude, longitude);
   public ResultUtil vehicleSpeed(@RequestBody VehicleSpeed vehicleSpeed){
      log.info("推送车辆状态:{}", JSON.toJSONString(vehicleSpeed));
      patrolTaskService.vehicleSpeed(vehicleSpeed.getVehicleNum(), vehicleSpeed.getVehicleStatus(), vehicleSpeed.getVehicleType(),
            vehicleSpeed.getCommunicationNum(), vehicleSpeed.getVehicleGpsProtocol(), vehicleSpeed.getLatitude(), vehicleSpeed.getLongitude());
      return ResultUtil.success();
   }
}