From a4bfa94e3d97406c410e6975d9ab1b625ed05fe1 Mon Sep 17 00:00:00 2001 From: huliguo <2023611923@qq.com> Date: 星期三, 28 五月 2025 18:00:22 +0800 Subject: [PATCH] 新增任务管理、任务记录等搜索字段,可重复审核,添加导出任务记录字段 --- guns-admin/src/main/java/com/stylefeng/guns/modular/api/PatrolTaskController.java | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/guns-admin/src/main/java/com/stylefeng/guns/modular/api/PatrolTaskController.java b/guns-admin/src/main/java/com/stylefeng/guns/modular/api/PatrolTaskController.java index cc99c2d..4a780a5 100644 --- a/guns-admin/src/main/java/com/stylefeng/guns/modular/api/PatrolTaskController.java +++ b/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 { @@ -206,6 +210,7 @@ String userId = JwtTokenUtil.getPrivateClaimFromToken(token, "userId"); return taskDetailService.manualAudit(vo, userId); } + @@ -215,18 +220,19 @@ @ApiImplicitParam(value = "列表数据id,多个逗号分隔", name = "ids", dataType = "String"), @ApiImplicitParam(value = "状态(1=待执行,2=进行中,3=成功,4=失败)", name = "status", dataType = "int"), @ApiImplicitParam(value = "规则编号", name = "code", dataType = "String"), + @ApiImplicitParam(value = "系统审核状态(1=未执行,2=正常,3=异常)", name = "sysStatus", dataType = "int"), }) - public void downloadTaskRecord(String ids, String code, Integer status, HttpServletResponse response){ + public void downloadTaskRecord(String ids, String code, Integer status,Integer sysStatus, HttpServletResponse response){ List<String> id = null; if(ToolUtil.isNotEmpty(ids)){ String[] split = ids.split(","); id = Arrays.asList(split); } - taskDetailService.downloadTaskRecord(id, code, status, response); + taskDetailService.downloadTaskRecord(id, code, status,sysStatus, response); } - @PutMapping("/base/patrolTask/vehicleSpeed") + @PostMapping("/base/patrolTask/vehicleSpeed") @ApiOperation(value = "变更车辆状态", tags = {"互联互通接口"}) @ApiImplicitParams({ @ApiImplicitParam(value = "车牌号", name = "vehicleNum", dataType = "String", required = true), @@ -237,8 +243,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(); } } -- Gitblit v1.7.1