Browse Source

swagger设备离线记录

develop
lau572 2 months ago
parent
commit
3ef9463644
  1. 10
      zc-business/src/main/java/com/zc/business/controller/DcDeviceOfflineRecordController.java
  2. 16
      zc-business/src/main/java/com/zc/business/domain/DcDeviceOfflineRecord.java

10
zc-business/src/main/java/com/zc/business/controller/DcDeviceOfflineRecordController.java

@ -2,6 +2,9 @@ package com.zc.business.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -27,6 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ruoyi * @author ruoyi
* @date 2024-09-18 * @date 2024-09-18
*/ */
@Api(tags = "设备离线记录")
@RestController @RestController
@RequestMapping("/deviceOfflineRecord") @RequestMapping("/deviceOfflineRecord")
public class DcDeviceOfflineRecordController extends BaseController public class DcDeviceOfflineRecordController extends BaseController
@ -37,6 +41,7 @@ public class DcDeviceOfflineRecordController extends BaseController
/** /**
* 查询设备离线记录列表 * 查询设备离线记录列表
*/ */
@ApiOperation("查询设备离线记录列表")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DcDeviceOfflineRecord dcDeviceOfflineRecord) public TableDataInfo list(DcDeviceOfflineRecord dcDeviceOfflineRecord)
{ {
@ -48,6 +53,7 @@ public class DcDeviceOfflineRecordController extends BaseController
/** /**
* 导出设备离线记录列表 * 导出设备离线记录列表
*/ */
@ApiOperation("导出设备离线记录列表")
@Log(title = "设备离线记录", businessType = BusinessType.EXPORT) @Log(title = "设备离线记录", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DcDeviceOfflineRecord dcDeviceOfflineRecord) public void export(HttpServletResponse response, DcDeviceOfflineRecord dcDeviceOfflineRecord)
@ -60,6 +66,7 @@ public class DcDeviceOfflineRecordController extends BaseController
/** /**
* 获取设备离线记录详细信息 * 获取设备离线记录详细信息
*/ */
@ApiOperation("获取设备离线记录详细信息")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
@ -69,6 +76,7 @@ public class DcDeviceOfflineRecordController extends BaseController
/** /**
* 新增设备离线记录 * 新增设备离线记录
*/ */
@ApiOperation("新增设备离线记录")
@Log(title = "设备离线记录", businessType = BusinessType.INSERT) @Log(title = "设备离线记录", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcDeviceOfflineRecord dcDeviceOfflineRecord) public AjaxResult add(@RequestBody DcDeviceOfflineRecord dcDeviceOfflineRecord)
@ -79,6 +87,7 @@ public class DcDeviceOfflineRecordController extends BaseController
/** /**
* 修改设备离线记录 * 修改设备离线记录
*/ */
@ApiOperation("修改设备离线记录")
@Log(title = "设备离线记录", businessType = BusinessType.UPDATE) @Log(title = "设备离线记录", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcDeviceOfflineRecord dcDeviceOfflineRecord) public AjaxResult edit(@RequestBody DcDeviceOfflineRecord dcDeviceOfflineRecord)
@ -89,6 +98,7 @@ public class DcDeviceOfflineRecordController extends BaseController
/** /**
* 删除设备离线记录 * 删除设备离线记录
*/ */
@ApiOperation("删除设备离线记录")
@Log(title = "设备离线记录", businessType = BusinessType.DELETE) @Log(title = "设备离线记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)

16
zc-business/src/main/java/com/zc/business/domain/DcDeviceOfflineRecord.java

@ -1,5 +1,7 @@
package com.zc.business.domain; package com.zc.business.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
@ -11,6 +13,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ruoyi * @author ruoyi
* @date 2024-09-18 * @date 2024-09-18
*/ */
@ApiModel("设备离线记录对象")
public class DcDeviceOfflineRecord extends BaseEntity public class DcDeviceOfflineRecord extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -19,14 +22,17 @@ public class DcDeviceOfflineRecord extends BaseEntity
private Long id; private Long id;
/** 设备表id */ /** 设备表id */
@ApiModelProperty(value="设备表id")
@Excel(name = "设备表id") @Excel(name = "设备表id")
private Long deviceId; private Long deviceId;
/** 物联id */ /** 物联id */
@ApiModelProperty(value="物联id")
@Excel(name = "物联id") @Excel(name = "物联id")
private String iotDeviceId; private String iotDeviceId;
/** 设备名称 */ /** 设备名称 */
@ApiModelProperty(value="设备名称")
@Excel(name = "设备名称") @Excel(name = "设备名称")
private String deviceName; private String deviceName;
@ -49,25 +55,31 @@ public class DcDeviceOfflineRecord extends BaseEntity
16 远端机 16 远端机
*/ */
@Excel(name = "设备类型") @Excel(name = "设备类型")
@ApiModelProperty(value="设备类型")
private String deviceType; private String deviceType;
/** 所在桩号 */ /** 所在桩号 */
@Excel(name = "所在桩号") @Excel(name = "所在桩号")
@ApiModelProperty(value="所在桩号")
private String stakeMark; private String stakeMark;
/** 方向1-上行,2-中,3-下行 */ /** 方向1-上行,2-中,3-下行 */
@ApiModelProperty(value="方向")
@Excel(name = "方向1-上行,2-中,3-下行") @Excel(name = "方向1-上行,2-中,3-下行")
private String direction; private String direction;
/** 安装位置 */ /** 安装位置 */
@Excel(name = "安装位置") @Excel(name = "安装位置")
@ApiModelProperty(value="安装位置")
private String installationSite; private String installationSite;
/** 设备ip */ /** 设备ip */
@Excel(name = "设备ip") @Excel(name = "设备ip")
@ApiModelProperty(value="设备ip")
private String deviceIp; private String deviceIp;
/** 设施归属类型(0:默认1: 道路沿线2:桥梁3: 隧道4:收费广场5: 收费站6: 服务区等 */ /** 设施归属类型(0:默认1: 道路沿线2:桥梁3: 隧道4:收费广场5: 收费站6: 服务区等 */
@ApiModelProperty(value="设施归属类型(0:默认1: 道路沿线2:桥梁3: 隧道4:收费广场5: 收费站6: 服务区等")
@Excel(name = "设施归属类型", readConverterExp = "设施归属类型(0:默认1: 道路沿线2:桥梁3: 隧道4:收费广场5: 收费站6: 服务区等") @Excel(name = "设施归属类型", readConverterExp = "设施归属类型(0:默认1: 道路沿线2:桥梁3: 隧道4:收费广场5: 收费站6: 服务区等")
private String facilitiesType; private String facilitiesType;
@ -89,17 +101,21 @@ public class DcDeviceOfflineRecord extends BaseEntity
2-4 站前悬臂式可变信息标志192*160 */ 2-4 站前悬臂式可变信息标志192*160 */
@Excel(name = "子设备类型") @Excel(name = "子设备类型")
@ApiModelProperty(value="子设备类型")
private String childType; private String childType;
/** 经度 */ /** 经度 */
@Excel(name = "经度") @Excel(name = "经度")
@ApiModelProperty(value="经度")
private String longitude; private String longitude;
/** 纬度 */ /** 纬度 */
@Excel(name = "纬度") @Excel(name = "纬度")
@ApiModelProperty(value="纬度")
private String latitude; private String latitude;
/** 状态(0未处理 1已处理 2自动处理) */ /** 状态(0未处理 1已处理 2自动处理) */
@ApiModelProperty(value="状态(0未处理 1已处理 2自动处理)")
@Excel(name = "状态(0未处理 1已处理 2自动处理)") @Excel(name = "状态(0未处理 1已处理 2自动处理)")
private String status; private String status;

Loading…
Cancel
Save