add device filed

plp
chenshuichuan 2 years ago
parent bec2aaa930
commit 2543dd5922

@ -100,4 +100,27 @@ public class DevicePageReqVO extends PageParam {
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "数采设备类型", example = "2")
private String deviceUseType;
@Schema(description = "ap_ip")
private String apIp;
@Schema(description = "网桥ip")
private String gateBridgeIp;
@Schema(description = "串口服务器IP")
private String comServerIp;
@Schema(description = "串口服务器端口")
private String comServerPort;
@Schema(description = "PLC控制器地址")
private String plcControllerIp;
@Schema(description = "PLC触控屏地址")
private String plcScreenIp;
@Schema(description = "i机台id", example = "18776")
private Long orgMachineId;
}

@ -141,4 +141,36 @@ public class DeviceRespVO {
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "数采设备类型", example = "2")
@ExcelProperty(value = "数采设备类型", converter = DictConvert.class)
@DictFormat("iot_device_use_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private String deviceUseType;
@Schema(description = "ap_ip")
@ExcelProperty("ap_ip")
private String apIp;
@Schema(description = "网桥ip")
@ExcelProperty("网桥ip")
private String gateBridgeIp;
@Schema(description = "串口服务器IP")
@ExcelProperty("串口服务器IP")
private String comServerIp;
@Schema(description = "串口服务器端口")
@ExcelProperty("串口服务器端口")
private String comServerPort;
@Schema(description = "PLC控制器地址")
@ExcelProperty("PLC控制器地址")
private String plcControllerIp;
@Schema(description = "PLC触控屏地址")
@ExcelProperty("PLC触控屏地址")
private String plcScreenIp;
@Schema(description = "i机台id", example = "18776")
@ExcelProperty("i机台id")
private Long orgMachineId;
}

@ -96,4 +96,27 @@ public class DeviceSaveReqVO {
@NotNull(message = "是否启用不能为空")
private Boolean isEnable;
@Schema(description = "数采设备类型", example = "2")
private String deviceUseType;
@Schema(description = "ap_ip")
private String apIp;
@Schema(description = "网桥ip")
private String gateBridgeIp;
@Schema(description = "串口服务器IP")
private String comServerIp;
@Schema(description = "串口服务器端口")
private String comServerPort;
@Schema(description = "PLC控制器地址")
private String plcControllerIp;
@Schema(description = "PLC触控屏地址")
private String plcScreenIp;
@Schema(description = "i机台id", example = "18776")
private Long orgMachineId;
}

@ -155,5 +155,27 @@ public class DeviceDO extends BaseDO {
*
*/
private Boolean isEnable;
//@Schema(description = "数采设备类型", example = "2")
private String deviceUseType;
//@Schema(description = "ap_ip")
private String apIp;
//@Schema(description = "网桥ip")
private String gateBridgeIp;
//@Schema(description = "串口服务器IP")
private String comServerIp;
//@Schema(description = "串口服务器端口")
private String comServerPort;
//@Schema(description = "PLC控制器地址")
private String plcControllerIp;
//@Schema(description = "PLC触控屏地址")
private String plcScreenIp;
//@Schema(description = "i机台id", example = "18776")
private Long orgMachineId;
}

@ -34,6 +34,14 @@ CREATE TABLE IF NOT EXISTS "iot_device"
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
"deleted" bit NOT NULL DEFAULT FALSE,
"tenant_id" bigint,
"device_use_type" varchar,
"ap_ip" varchar,
"gate_bridge_ip" varchar,
"com_server_ip" varchar,
"com_server_port" varchar,
"plc_controller_ip" varchar,
"plc_screen_ip" varchar,
"org_machine_id" bigint,
PRIMARY KEY ("id")
) COMMENT '物联设备表';
CREATE TABLE IF NOT EXISTS "iot_formula"

Loading…
Cancel
Save