From 6ec0370d7dda1040e23e57a21e1631a9751dbf39 Mon Sep 17 00:00:00 2001 From: zhaoxianglong Date: Mon, 26 Feb 2024 11:30:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/system/device.js | 14 +- ruoyi-ui/src/api/system/product.js | 62 ++ ruoyi-ui/src/views/system/device/index.vue | 615 ++++++++++++++---- .../java/com/zc/business/domain/DcDevice.java | 9 + .../mapper/business/DcDeviceMapper.xml | 17 +- 5 files changed, 592 insertions(+), 125 deletions(-) create mode 100644 ruoyi-ui/src/api/system/product.js diff --git a/ruoyi-ui/src/api/system/device.js b/ruoyi-ui/src/api/system/device.js index 9366e7c9..5d310ecc 100644 --- a/ruoyi-ui/src/api/system/device.js +++ b/ruoyi-ui/src/api/system/device.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 查询【请填写功能名称】列表 export function listDevice(query) { return request({ - url: '/system/device/list', + url: '/business/device/list', method: 'get', params: query }) @@ -12,7 +12,7 @@ export function listDevice(query) { // 查询【请填写功能名称】详细 export function getDevice(id) { return request({ - url: '/system/device/' + id, + url: '/business/device/' + id, method: 'get' }) } @@ -20,7 +20,7 @@ export function getDevice(id) { // 新增【请填写功能名称】 export function addDevice(data) { return request({ - url: '/system/device', + url: '/business/device', method: 'post', data: data }) @@ -29,7 +29,7 @@ export function addDevice(data) { // 修改【请填写功能名称】 export function updateDevice(data) { return request({ - url: '/system/device', + url: '/business/device', method: 'put', data: data }) @@ -38,7 +38,7 @@ export function updateDevice(data) { // 删除【请填写功能名称】 export function delDevice(id) { return request({ - url: '/system/device/' + id, + url: '/business/device/' + id, method: 'delete' }) } @@ -46,8 +46,8 @@ export function delDevice(id) { // 导出【请填写功能名称】 export function exportDevice(query) { return request({ - url: '/system/device/export', + url: '/business/device/export', method: 'get', params: query }) -} \ No newline at end of file +} diff --git a/ruoyi-ui/src/api/system/product.js b/ruoyi-ui/src/api/system/product.js new file mode 100644 index 00000000..0e5c2fdb --- /dev/null +++ b/ruoyi-ui/src/api/system/product.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listProduct(query) { + return request({ + url: '/business/product/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】列表 +export function queryProduct(query) { + return request({ + url: '/business/product/query', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getProduct(id) { + return request({ + url: '/business/product/' + id, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addProduct(data) { + return request({ + url: '/business/product', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateProduct(data) { + return request({ + url: '/business/product', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delProduct(id) { + return request({ + url: '/business/product/' + id, + method: 'delete' + }) +} + +// 导出【请填写功能名称】 +export function exportProduct(query) { + return request({ + url: '/business/product/export', + method: 'get', + params: query + }) +} diff --git a/ruoyi-ui/src/views/system/device/index.vue b/ruoyi-ui/src/views/system/device/index.vue index 9c538fe1..db22dff2 100644 --- a/ruoyi-ui/src/views/system/device/index.vue +++ b/ruoyi-ui/src/views/system/device/index.vue @@ -1,9 +1,9 @@ + + diff --git a/zc-business/src/main/java/com/zc/business/domain/DcDevice.java b/zc-business/src/main/java/com/zc/business/domain/DcDevice.java index 1b1faa72..dde7d70a 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcDevice.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcDevice.java @@ -1,6 +1,8 @@ package com.zc.business.domain; +import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -20,6 +22,7 @@ public class DcDevice { public static final String ONLINE = "1"; @ApiModelProperty("ID") + @TableId(value = "id", type = IdType.AUTO) private Long id; @ApiModelProperty("物联设备ID") private String iotDeviceId; @@ -37,6 +40,8 @@ public class DcDevice { private String deviceCode; @ApiModelProperty("设备类型") private Integer deviceType; + @ApiModelProperty("设备图片") + private String deviceImg; @ApiModelProperty("安装日期") private Date installationDate; @ApiModelProperty("生产日期") @@ -55,6 +60,10 @@ public class DcDevice { private String remark; @ApiModelProperty("设施归属类型(0:默认1: 道路沿线2:桥梁3: 隧道4:收费广场5: 收费站6: 服务区等") private String facilitiesType; + @ApiModelProperty("设备ip") + private String deviceIp; + @ApiModelProperty("范围桩号") + private String stakeMarkRange; @ApiModelProperty("创建时间") private Date createTime; @ApiModelProperty("修改时间") diff --git a/zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml b/zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml index 938e1c93..0ed20b42 100644 --- a/zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml @@ -25,6 +25,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + @@ -54,14 +58,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" other_config, remark, create_time, - update_time + update_time, + facilities_type, + device_ip, + stake_mark_range, + device_img from dc_device