Pu Zhibing
2025-02-28 173428adf09179860a3cb1a88f46378fd98473b2
guns-admin/src/main/java/com/stylefeng/guns/modular/api/PatrolTaskController.java
@@ -30,7 +30,7 @@
 * @Date 2024/12/17 20:18
 */
@RestController
@RequestMapping("/base/patrolTask")
@RequestMapping("")
public class PatrolTaskController extends BaseController {
   @Resource
@@ -41,7 +41,7 @@
   
   
   
   @GetMapping("/getTaskDetailList")
   @GetMapping("/api/patrolTask/getTaskDetailList")
   @ApiOperation(value = "获取任务列表数据", tags = {"任务管理"})
   public PageInfoBT<TaskDetailList> getTaskDetailList(TaskDetailListVo vo){
      Page<TaskDetailList> pageInfo = new Page(vo.getLimit(), vo.getOffset());
@@ -55,7 +55,7 @@
   
   
   
   @DeleteMapping("/delTaskDetail")
   @DeleteMapping("/api/patrolTask/delTaskDetail")
   @ApiOperation(value = "删除任务", tags = {"任务管理"})
   public ResultUtil delTaskDetail(String ids){
      List<String> id = Arrays.asList(ids.split(","));
@@ -65,7 +65,7 @@
   
   
   
   @PostMapping("/addPatrolTask")
   @PostMapping("/api/patrolTask/addPatrolTask")
   @ApiOperation(value = "添加巡查任务", tags = {"任务管理"})
   public ResultUtil addPatrolTask(@RequestBody PatrolTaskVo vo, HttpServletRequest request){
      String token = request.getHeader(JwtConstants.AUTH_HEADER);
@@ -77,7 +77,7 @@
      return ResultUtil.success();
   }
   
   @GetMapping("/getImageModel")
   @GetMapping("/api/patrolTask/getImageModel")
   @ApiOperation(value = "获取图片模型", tags = {"任务管理"})
   public ResultUtil<List<Map<String, Object>>> getImageModel(){
      ImageModelEnum[] values = ImageModelEnum.values();
@@ -95,7 +95,7 @@
   
   
   
   @GetMapping("/getVideoChannel")
   @GetMapping("/api/patrolTask/getVideoChannel")
   @ApiOperation(value = "获取视频通道", tags = {"任务管理"})
   public ResultUtil<List<Map<String, Object>>> getVideoChannel(){
      VideoChannelEnum[] values = VideoChannelEnum.values();
@@ -112,7 +112,7 @@
   }
   
   
   @GetMapping("/getVehicleList")
   @GetMapping("/api/patrolTask/getVehicleList")
   @ApiOperation(value = "获取车辆列表", tags = {"任务管理"})
   public ResultUtil<List<Vehicle>> getVehicleList(Integer year){
      List<Vehicle> vehicleList = VideoGateway.getVehicleList(null, null, null, 0);
@@ -132,7 +132,7 @@
   
   
   
   @GetMapping("/getShipList")
   @GetMapping("/api/patrolTask/getShipList")
   @ApiOperation(value = "获取船舶列表", tags = {"任务管理"})
   public ResultUtil<List<Ship>> getShipList(Integer year){
      List<Ship> shipList = VideoGateway.getShipList(null, null, null, 0);
@@ -152,7 +152,7 @@
   
   
   
   @GetMapping("/getTaskRecordList")
   @GetMapping("/api/patrolTask/getTaskRecordList")
   @ApiOperation(value = "获取任务记录列表", tags = {"任务记录"})
   public PageInfoBT<TaskRecordList> getTaskRecordList(TaskRecordListVo vo){
      Page<TaskRecordList> pageInfo = new Page(vo.getLimit(), vo.getOffset());
@@ -166,14 +166,14 @@
   
   
   
   @GetMapping("/getTaskRecordInfo")
   @GetMapping("/api/patrolTask/getTaskRecordInfo")
   @ApiOperation(value = "获取任务记录详情", tags = {"任务记录"})
   public ResultUtil<TaskRecordInfo> getTaskRecordInfo(Integer id){
      TaskRecordInfo taskRecordInfo = taskDetailService.getTaskRecordInfo(id);
      return ResultUtil.success(taskRecordInfo);
   }
   
   @PostMapping("/getPictureDetailsVehicle")
   @PostMapping("/api/patrolTask/getPictureDetailsVehicle")
   @ApiOperation(value = "获取任务记录详情中的车船数据", tags = {"任务记录"})
   public ResultUtil<PictureDetailsVehicle> getPictureDetailsVehicle(@RequestBody PictureDetailsVo vo){
      PictureDetailsVehicle pictureDetailsVehicle = taskDetailService.getPictureDetailsVehicle(vo);
@@ -182,7 +182,7 @@
   
   
   
   @PostMapping("/getPictureDetails")
   @PostMapping("/api/patrolTask/getPictureDetails")
   @ApiOperation(value = "获取任务记录详情中的视频通道数据", tags = {"任务记录"})
   public PageInfoBT<PictureDetails> getPictureDetails(@RequestBody PictureDetailsVo vo){
      Page<PictureDetails> pageInfo = new Page(vo.getLimit(), vo.getOffset());
@@ -196,15 +196,20 @@
   
   
   
   @PostMapping("/manualAudit")
   @PostMapping("/api/patrolTask/manualAudit")
   @ApiOperation(value = "人工审核视频通道数据", tags = {"任务记录"})
   public ResultUtil manualAudit(@RequestBody ManualAuditVo vo){
      return taskDetailService.manualAudit(vo);
   public ResultUtil manualAudit(@RequestBody ManualAuditVo vo, HttpServletRequest request){
      String token = request.getHeader(JwtConstants.AUTH_HEADER);
      if (token != null && token.startsWith("Bearer ")) {
         token = token.substring(token.indexOf(" ") + 1);
      }
      String userId = JwtTokenUtil.getPrivateClaimFromToken(token, "userId");
      return taskDetailService.manualAudit(vo, userId);
   }
   
   
   
   @GetMapping("/downloadTaskRecord")
   @GetMapping("/api/patrolTask/downloadTaskRecord")
   @ApiOperation(value = "下载任务记录数据", tags = {"任务记录"})
   @ApiImplicitParams({
         @ApiImplicitParam(value = "列表数据id,多个逗号分隔", name = "ids", dataType = "String"),
@@ -219,4 +224,21 @@
      }
      taskDetailService.downloadTaskRecord(id, code, status, response);
   }
   @PutMapping("/base/patrolTask/vehicleSpeed")
   @ApiOperation(value = "变更车辆状态", tags = {"互联互通接口"})
   @ApiImplicitParams({
         @ApiImplicitParam(value = "车牌号", name = "vehicleNum", dataType = "String", required = true),
         @ApiImplicitParam(value = "状态(1=行驶中,2=已停止)", name = "vehicleStatus", dataType = "int", required = true),
         @ApiImplicitParam(value = "车辆类型(1=车,2=船)", name = "vehicleType", dataType = "int", required = true),
         @ApiImplicitParam(value = "通信号", name = "communicationNum", dataType = "String", required = true),
         @ApiImplicitParam(value = "gps协议", name = "vehicleGpsProtocol", dataType = "String", required = true),
         @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);
      return ResultUtil.success();
   }
}