Commit 4c9f495f authored by 赵啸非's avatar 赵啸非

添加显示控制

parent be143af3
...@@ -30,3 +30,11 @@ ALTER TABLE mortals_xhx_device ADD COLUMN `hallName` varchar(256) default '' ...@@ -30,3 +30,11 @@ ALTER TABLE mortals_xhx_device ADD COLUMN `hallName` varchar(256) default ''
ALTER TABLE mortals_xhx_device_alarm_info ADD COLUMN `deviceCode` varchar(256) default '' COMMENT '设备编码' AFTER alarmDevice; ALTER TABLE mortals_xhx_device_alarm_info ADD COLUMN `deviceCode` varchar(256) default '' COMMENT '设备编码' AFTER alarmDevice;
ALTER TABLE mortals_xhx_device_alarm_info ADD COLUMN `deviceName` varchar(256) default '' COMMENT '设备名称' AFTER deviceCode; ALTER TABLE mortals_xhx_device_alarm_info ADD COLUMN `deviceName` varchar(256) default '' COMMENT '设备名称' AFTER deviceCode;
-- ----------------------------
2023-05-11
-- ----------------------------
ALTER TABLE mortals_xhx_device ADD COLUMN `showSms` tinyint(2) DEFAULT '1' COMMENT '是否显示短信(0.否,1.是)' AFTER hallName;
ALTER TABLE mortals_xhx_device ADD COLUMN `showPrint` tinyint(2) DEFAULT '1' COMMENT '是否显示打印机(0.否,1.是)' AFTER showSms;
ALTER TABLE mortals_xhx_device ADD COLUMN `showWechatQrCode` tinyint(2) DEFAULT '1' COMMENT '是否显示小程序二维码(0.否,1.是)' AFTER showPrint;
...@@ -8,7 +8,7 @@ import java.util.Date; ...@@ -8,7 +8,7 @@ import java.util.Date;
* 设备实体对象 * 设备实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-26 * @date 2023-05-11
*/ */
@Data @Data
public class DeviceEntity extends DeviceVo { public class DeviceEntity extends DeviceVo {
...@@ -186,6 +186,18 @@ public class DeviceEntity extends DeviceVo { ...@@ -186,6 +186,18 @@ public class DeviceEntity extends DeviceVo {
* 大厅名称 * 大厅名称
*/ */
private String hallName; private String hallName;
/**
* 是否显示短信(0.否,1.是)
*/
private Integer showSms;
/**
* 是否显示打印机(0.否,1.是)
*/
private Integer showPrint;
/**
* 是否显示小程序二维码(0.否,1.是)
*/
private Integer showWechatQrCode;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -230,7 +242,7 @@ public class DeviceEntity extends DeviceVo { ...@@ -230,7 +242,7 @@ public class DeviceEntity extends DeviceVo {
this.homeUrl = ""; this.homeUrl = "";
this.deviceFirmId = 1L; this.deviceFirmId = null;
this.deviceFirmname = ""; this.deviceFirmname = "";
...@@ -289,5 +301,11 @@ public class DeviceEntity extends DeviceVo { ...@@ -289,5 +301,11 @@ public class DeviceEntity extends DeviceVo {
this.hallId = null; this.hallId = null;
this.hallName = ""; this.hallName = "";
this.showSms = 1;
this.showPrint = 1;
this.showWechatQrCode = 1;
} }
} }
\ No newline at end of file
...@@ -95,6 +95,9 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe ...@@ -95,6 +95,9 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
this.addDict(model, "deviceStatus", DeviceStatusEnum.getEnumMap()); this.addDict(model, "deviceStatus", DeviceStatusEnum.getEnumMap());
this.addDict(model, "enabled", EnabledEnum.getEnumMap()); this.addDict(model, "enabled", EnabledEnum.getEnumMap());
this.addDict(model, "source", DeviceSourceEnum.getEnumMap()); this.addDict(model, "source", DeviceSourceEnum.getEnumMap());
this.addDict(model, "showSms", YesNoEnum.getEnumMap());
this.addDict(model, "showPrint", YesNoEnum.getEnumMap());
this.addDict(model, "source", YesNoEnum.getEnumMap());
//返回产品列表及其样式 //返回产品列表及其样式
//productService.find(new ProductEntity()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getProductName())). //productService.find(new ProductEntity()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getProductName())).
if (platFormType.equalsIgnoreCase(PlatformTypeEnum.CLOUD.getValue())) { if (platFormType.equalsIgnoreCase(PlatformTypeEnum.CLOUD.getValue())) {
......
...@@ -14,6 +14,251 @@ BigDecimal|小数类型|545.256 ...@@ -14,6 +14,251 @@ BigDecimal|小数类型|545.256
object|对象类型|{"name":"zhang3"} object|对象类型|{"name":"zhang3"}
arrays|数组类型|[{"name":"zhang3"},{"name":"zhang2"}] arrays|数组类型|[{"name":"zhang3"},{"name":"zhang2"}]
## 设备
### 查询设备列表
**请求URL:** m/device/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询设备
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
page|Integer|否|当前页
size|Integer|否|每页条数,值为-1,查询所有记录
deviceCode|String|否|设备编码查询设备
**请求样例:**
```
{
"deviceCode":"a1-b1-c1",
"page":1,
"size":10
}
```
**响应参数:**
参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;per_page|Integer|每页条数
&emsp;total|Integer|总条数
&emsp;last_page|Integer|总页数
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|主键ID,主键,自增长
&emsp;&emsp;deviceName|String|设备名称
&emsp;&emsp;deviceCode|String|设备编码,SN码等,默认为MAC地址
&emsp;&emsp;deviceMac|String|设备的MAC地址
&emsp;&emsp;siteId|Long|站点Id,来源基础服务平台
&emsp;&emsp;siteCode|String|站点编号,来源基础服务平台
&emsp;&emsp;siteName|String|站点名称
&emsp;&emsp;platformId|Long|平台系统Id
&emsp;&emsp;platformName|String|平台系统名称
&emsp;&emsp;productId|Long|产品Id
&emsp;&emsp;productName|String|产品名称
&emsp;&emsp;skinId|Long|皮肤id
&emsp;&emsp;skinName|String|皮肤名称
&emsp;&emsp;homeUrl|String|首页地址
&emsp;&emsp;deviceFirmId|Long|设备生产厂商ID
&emsp;&emsp;deviceFirmname|String|设备生产厂商名称
&emsp;&emsp;deviceSrc|Integer|设备来源(0.子设备,1.网关设备,2.直连设备)
&emsp;&emsp;deviceDataSourceWay|Integer|数据获取方式(0.主动上报,1.被动拉取)
&emsp;&emsp;lon|String|经度
&emsp;&emsp;lati|String|经度
&emsp;&emsp;deviceInBuilding|Integer|所属楼栋
&emsp;&emsp;deviceInFloor|Integer|所属楼层
&emsp;&emsp;defectsLiabilityPeriod|Date|保修期至
&emsp;&emsp;leadingOfficial|String|负责人
&emsp;&emsp;leadingOfficialTelephone|String|联系电话
&emsp;&emsp;isReceiveMess|Integer|是否接收异常短(0.否,1.是)
&emsp;&emsp;devicePhotoPath|String|设备图片
&emsp;&emsp;ip|String|设备访问ip
&emsp;&emsp;centernum|String|中心设备编码
&emsp;&emsp;port|String|端口
&emsp;&emsp;deviceTopic|String|设备topic信息
&emsp;&emsp;deviceStatus|Integer|设备状态 (0.未激活,1.离线,2.在线)
&emsp;&emsp;enabled|Integer|启用状态 (0.停止,1.启用)
&emsp;&emsp;deviceAuthCode|String|设备授权码
&emsp;&emsp;deviceRemark|String|备注
&emsp;&emsp;onlineTime|Date|最近上线时间
&emsp;&emsp;offlineTime|Date|最近离线时间
&emsp;&emsp;deleted|Integer|是否删除(0.否,1.是)
&emsp;&emsp;source|Integer|设备来源(0.旧设备,1.新设备)
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|更新时间
&emsp;&emsp;deviceSN|String|设备SN码
&emsp;&emsp;deviceVersion|String|设备版本
&emsp;&emsp;productCode|String|产品编码
&emsp;&emsp;hallId|Long|大厅Id
&emsp;&emsp;hallName|String|大厅名称
&emsp;&emsp;showSms|Integer|是否显示短信(0.否,1.是)
&emsp;&emsp;showPrint|Integer|是否显示打印机(0.否,1.是)
&emsp;&emsp;showWechatQrCode|Integer|是否显示小程序二维码(0.否,1.是)
**响应消息样例:**
```
{
"code":1,
"data":{
}
}
```
### 查看设备
**请求URL:** m/device/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看设备,返回实例详细信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|Long|是|ID
**请求样例:**
```
http://localhost/device/info?id=549
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|主键ID,主键,自增长
&emsp;deviceName|String|设备名称
&emsp;deviceCode|String|设备编码,SN码等,默认为MAC地址
&emsp;deviceMac|String|设备的MAC地址
&emsp;siteId|Long|站点Id,来源基础服务平台
&emsp;siteCode|String|站点编号,来源基础服务平台
&emsp;siteName|String|站点名称
&emsp;platformId|Long|平台系统Id
&emsp;platformName|String|平台系统名称
&emsp;productId|Long|产品Id
&emsp;productName|String|产品名称
&emsp;skinId|Long|皮肤id
&emsp;skinName|String|皮肤名称
&emsp;homeUrl|String|首页地址
&emsp;deviceFirmId|Long|设备生产厂商ID
&emsp;deviceFirmname|String|设备生产厂商名称
&emsp;deviceSrc|Integer|设备来源(0.子设备,1.网关设备,2.直连设备)
&emsp;deviceDataSourceWay|Integer|数据获取方式(0.主动上报,1.被动拉取)
&emsp;lon|String|经度
&emsp;lati|String|经度
&emsp;deviceInBuilding|Integer|所属楼栋
&emsp;deviceInFloor|Integer|所属楼层
&emsp;defectsLiabilityPeriod|Date|保修期至
&emsp;leadingOfficial|String|负责人
&emsp;leadingOfficialTelephone|String|联系电话
&emsp;isReceiveMess|Integer|是否接收异常短(0.否,1.是)
&emsp;devicePhotoPath|String|设备图片
&emsp;ip|String|设备访问ip
&emsp;centernum|String|中心设备编码
&emsp;port|String|端口
&emsp;deviceTopic|String|设备topic信息
&emsp;deviceStatus|Integer|设备状态 (0.未激活,1.离线,2.在线)
&emsp;enabled|Integer|启用状态 (0.停止,1.启用)
&emsp;deviceAuthCode|String|设备授权码
&emsp;deviceRemark|String|备注
&emsp;onlineTime|Date|最近上线时间
&emsp;offlineTime|Date|最近离线时间
&emsp;deleted|Integer|是否删除(0.否,1.是)
&emsp;source|Integer|设备来源(0.旧设备,1.新设备)
&emsp;createUserId|Long|创建用户
&emsp;createTime|Date|创建时间
&emsp;updateUserId|Long|更新用户
&emsp;updateTime|Date|更新时间
&emsp;deviceSN|String|设备SN码
&emsp;deviceVersion|String|设备版本
&emsp;productCode|String|产品编码
&emsp;hallId|Long|大厅Id
&emsp;hallName|String|大厅名称
&emsp;showSms|Integer|是否显示短信(0.否,1.是)
&emsp;showPrint|Integer|是否显示打印机(0.否,1.是)
&emsp;showWechatQrCode|Integer|是否显示小程序二维码(0.否,1.是)
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":7358,
"deviceName":"erph19",
"deviceCode":"ntgta3",
"deviceMac":"znt3id",
"siteId":9517,
"siteCode":"4559rn",
"siteName":"7ao5ir",
"platformId":2690,
"platformName":"munkr2",
"productId":4970,
"productName":"s74o2p",
"skinId":3594,
"skinName":"mfzk6x",
"homeUrl":"smt540",
"deviceFirmId":4500,
"deviceFirmname":"gu43rw",
"deviceSrc":4826,
"deviceDataSourceWay":1120,
"lon":"yrgkye",
"lati":"qoexqr",
"deviceInBuilding":7864,
"deviceInFloor":5044,
"defectsLiabilityPeriod":"2023-05-11",
"leadingOfficial":"2rde5a",
"leadingOfficialTelephone":"myuu2u",
"isReceiveMess":3164,
"devicePhotoPath":"0tys3c",
"ip":"3gzlpg",
"centernum":"kdxfpx",
"port":"immaf4",
"deviceTopic":"kum049",
"deviceStatus":4767,
"enabled":6533,
"deviceAuthCode":"ynopdq",
"deviceRemark":"l6ak87",
"onlineTime":"2023-05-11",
"offlineTime":"2023-05-11",
"deleted":8884,
"source":4089,
"createUserId":1410,
"createTime":"2023-05-11",
"updateUserId":846,
"updateTime":"2023-05-11",
"deviceSN":"jsbvj4",
"deviceVersion":"9mgt52",
"productCode":"iah2ld",
"hallId":6781,
"hallName":"gfi3zw",
"showSms":1994,
"showPrint":2841,
"showWechatQrCode":9531
}
}
```
## 设备终端接口服务 ## 设备终端接口服务
### 服务端地址获取 ### 服务端地址获取
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment