From 734a6860c25e4666f1c474503bc5497c0981db75 Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Mon, 25 Dec 2023 20:34:44 +0800
Subject: [PATCH] =?UTF-8?q?=E6=83=85=E6=8A=A5=E6=9D=BF=E6=A8=A1=E6=9D=BF?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-system/pom.xml | 18 +
.../system/service/ISysDictDataService.java | 6 +
.../service/impl/SysDictDataServiceImpl.java | 7 +
.../IotBoardTemplateContentController.java | 96 ++
.../IotBoardTemplateController.java | 72 ++
.../java/com/zc/domain/IotBoardBrand.java | 35 +
.../java/com/zc/domain/IotBoardTemplate.java | 233 +++++
.../zc/domain/IotBoardTemplateContent.java | 177 ++++
.../java/com/zc/domain/IotDeviceType.java | 210 ++++
.../main/java/com/zc/domain/SdDevices.java | 990 ++++++++++++++++++
.../main/java/com/zc/domain/SdIotDevice.java | 680 ++++++++++++
.../mapper/IotBoardTemplateContentMapper.java | 72 ++
.../com/zc/mapper/IotBoardTemplateMapper.java | 54 +
.../IIotBoardTemplateContentService.java | 62 ++
.../zc/service/IIotBoardTemplateService.java | 43 +
.../IotBoardTemplateContentServiceImpl.java | 178 ++++
.../impl/IotBoardTemplateServiceImpl.java | 155 +++
.../system/IotBoardTemplateContentMapper.xml | 105 ++
.../mapper/system/IotBoardTemplateMapper.xml | 161 +++
.../src/views/information/board/addinfo.vue | 79 +-
.../src/views/information/board/editInfo.vue | 84 +-
.../src/views/information/board/index.vue | 28 +-
22 files changed, 3527 insertions(+), 18 deletions(-)
create mode 100644 ruoyi-system/src/main/java/com/zc/controller/IotBoardTemplateContentController.java
create mode 100644 ruoyi-system/src/main/java/com/zc/controller/IotBoardTemplateController.java
create mode 100644 ruoyi-system/src/main/java/com/zc/domain/IotBoardBrand.java
create mode 100644 ruoyi-system/src/main/java/com/zc/domain/IotBoardTemplate.java
create mode 100644 ruoyi-system/src/main/java/com/zc/domain/IotBoardTemplateContent.java
create mode 100644 ruoyi-system/src/main/java/com/zc/domain/IotDeviceType.java
create mode 100644 ruoyi-system/src/main/java/com/zc/domain/SdDevices.java
create mode 100644 ruoyi-system/src/main/java/com/zc/domain/SdIotDevice.java
create mode 100644 ruoyi-system/src/main/java/com/zc/mapper/IotBoardTemplateContentMapper.java
create mode 100644 ruoyi-system/src/main/java/com/zc/mapper/IotBoardTemplateMapper.java
create mode 100644 ruoyi-system/src/main/java/com/zc/service/IIotBoardTemplateContentService.java
create mode 100644 ruoyi-system/src/main/java/com/zc/service/IIotBoardTemplateService.java
create mode 100644 ruoyi-system/src/main/java/com/zc/service/impl/IotBoardTemplateContentServiceImpl.java
create mode 100644 ruoyi-system/src/main/java/com/zc/service/impl/IotBoardTemplateServiceImpl.java
create mode 100644 ruoyi-system/src/main/resources/mapper/system/IotBoardTemplateContentMapper.xml
create mode 100644 ruoyi-system/src/main/resources/mapper/system/IotBoardTemplateMapper.xml
diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml
index e55e2a83..f5a1d638 100644
--- a/ruoyi-system/pom.xml
+++ b/ruoyi-system/pom.xml
@@ -23,6 +23,24 @@
ruoyi-common
+
+ io.springfox
+ springfox-boot-starter
+ ${swagger.version}
+
+
+ io.swagger
+ swagger-models
+
+
+
+
+ net.java.dev.jna
+ jna
+ 5.11.0
+ compile
+
+
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java
index b786b337..52b97083 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java
@@ -56,4 +56,10 @@ public interface ISysDictDataService
* @return 结果
*/
public int updateDictData(SysDictData dictData);
+
+
+ /**
+ * 根据字典类型查询数据集
+ * */
+ public List getSysDictDataByDictType(String dictType);
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java
index dceae6b9..81290bb8 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java
@@ -107,4 +107,11 @@ public class SysDictDataServiceImpl implements ISysDictDataService
}
return row;
}
+
+
+ @Override
+ public List getSysDictDataByDictType(String dictType) {
+ List dictDatas = dictDataMapper.selectDictDataByType(dictType);
+ return dictDatas;
+ }
}
diff --git a/ruoyi-system/src/main/java/com/zc/controller/IotBoardTemplateContentController.java b/ruoyi-system/src/main/java/com/zc/controller/IotBoardTemplateContentController.java
new file mode 100644
index 00000000..a5e8287d
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/controller/IotBoardTemplateContentController.java
@@ -0,0 +1,96 @@
+package com.zc.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.zc.domain.IotBoardTemplateContent;
+import com.zc.service.IIotBoardTemplateContentService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 发布模板内容Controller
+ *
+ * @date 2022-03-22
+ */
+@RestController
+@RequestMapping("/system/content")
+public class IotBoardTemplateContentController extends BaseController
+{
+ @Autowired
+ private IIotBoardTemplateContentService iotBoardTemplateContentService;
+
+ /**
+ * 查询发布模板内容列表
+ */
+// @PreAuthorize("@ss.hasPermi('system:content:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(IotBoardTemplateContent iotBoardTemplateContent)
+ {
+ startPage();
+ List list = iotBoardTemplateContentService.selectSdVmsTemplateContentList(iotBoardTemplateContent);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出发布模板内容列表
+ */
+// @PreAuthorize("@ss.hasPermi('system:content:export')")
+ @Log(title = "发布模板内容", businessType = BusinessType.EXPORT)
+ @GetMapping("/export")
+ public AjaxResult export(IotBoardTemplateContent iotBoardTemplateContent)
+ {
+ List list = iotBoardTemplateContentService.selectSdVmsTemplateContentList(iotBoardTemplateContent);
+ ExcelUtil util = new ExcelUtil(IotBoardTemplateContent.class);
+ return util.exportExcel(list, "发布模板内容数据");
+ }
+
+ /**
+ * 获取发布模板内容详细信息
+ */
+// @PreAuthorize("@ss.hasPermi('system:content:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return AjaxResult.success(iotBoardTemplateContentService.selectSdVmsTemplateContentById(id));
+ }
+
+ /**
+ * 新增发布模板内容
+ */
+// @PreAuthorize("@ss.hasPermi('system:content:add')")
+ @Log(title = "发布模板内容", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody JSONObject jsonObject)
+ {
+ return toAjax(iotBoardTemplateContentService.insertSdVmsTemplateContent(jsonObject));
+ }
+
+ /**
+ * 修改发布模板内容
+ */
+// @PreAuthorize("@ss.hasPermi('system:content:edit')")
+ @Log(title = "发布模板内容", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody JSONObject jsonObject)
+ {
+ return toAjax(iotBoardTemplateContentService.updateSdVmsTemplateContent(jsonObject));
+ }
+
+ /**
+ * 删除发布模板内容
+ */
+// @PreAuthorize("@ss.hasPermi('system:content:remove')")
+ @Log(title = "发布模板内容", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(iotBoardTemplateContentService.deleteSdVmsTemplateContentByIds(ids));
+ }
+}
diff --git a/ruoyi-system/src/main/java/com/zc/controller/IotBoardTemplateController.java b/ruoyi-system/src/main/java/com/zc/controller/IotBoardTemplateController.java
new file mode 100644
index 00000000..21248749
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/controller/IotBoardTemplateController.java
@@ -0,0 +1,72 @@
+package com.zc.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.zc.domain.IotBoardTemplate;
+import com.zc.service.IIotBoardTemplateService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 情报板模板Controller
+ *
+ * @author 刘方堃
+ * @date 2021-11-30
+ */
+@RestController
+@RequestMapping("/system/template")
+public class IotBoardTemplateController extends BaseController
+{
+ @Autowired
+ private IIotBoardTemplateService iotBoardTemplateService;
+
+
+
+ @GetMapping("/getAllVmsTemplate")
+ public AjaxResult getAllVmsTemplate(String category, String devicePixel) {
+ return AjaxResult.success(iotBoardTemplateService.getAllVmsTemplate(category, devicePixel));
+ }
+
+ /**
+ * 新增情报板模板
+ */
+// @PreAuthorize("@ss.hasPermi('system:templateConfig:add')")
+ @Log(title = "情报板模板", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody JSONObject jsonObject)
+ {
+ return AjaxResult.success(iotBoardTemplateService.insertSdVmsTemplate(jsonObject));
+ }
+
+ /**
+ * 修改情报板模板
+ */
+// @PreAuthorize("@ss.hasPermi('system:templateConfig:edit')")
+ @Log(title = "情报板模板", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody JSONObject jsonObject)
+ {
+ return toAjax(iotBoardTemplateService.updateSdVmsTemplate(jsonObject));
+ }
+
+ /**
+ * 删除情报板模板
+ */
+ @PreAuthorize("@ss.hasPermi('system:templateConfig:remove')")
+ @Log(title = "情报板模板", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(iotBoardTemplateService.deleteSdVmsTemplateByIds(ids));
+ }
+
+
+}
diff --git a/ruoyi-system/src/main/java/com/zc/domain/IotBoardBrand.java b/ruoyi-system/src/main/java/com/zc/domain/IotBoardBrand.java
new file mode 100644
index 00000000..de0be487
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/domain/IotBoardBrand.java
@@ -0,0 +1,35 @@
+package com.zc.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+public class IotBoardBrand {
+ /**
+ * 设备id
+ */
+ private Long brandId;
+ /**
+ * 设备名称
+ */
+ private String brandName;
+ public Long getBrandId() {
+ return brandId;
+ }
+ public void setBrandId(Long brandId) {
+ this.brandId = brandId;
+ }
+ public String getBrandName() {
+ return brandName;
+ }
+ public void setBrandName(String brandName) {
+ this.brandName = brandName;
+ }
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("brandId", getBrandId())
+ .append("brandName", getBrandName())
+ .toString();
+ }
+
+}
diff --git a/ruoyi-system/src/main/java/com/zc/domain/IotBoardTemplate.java b/ruoyi-system/src/main/java/com/zc/domain/IotBoardTemplate.java
new file mode 100644
index 00000000..7f321388
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/domain/IotBoardTemplate.java
@@ -0,0 +1,233 @@
+package com.zc.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.annotation.Excels;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.List;
+
+/**
+ * 情报板模板对象
+ *
+ * @author 刘方堃
+ * @date 2021-11-30
+ */
+public class IotBoardTemplate extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 模板ID */
+ private Long id;
+
+ /** 屏幕尺寸 */
+ @Excel(name = "屏幕尺寸")
+ private String screenSize;
+
+ /** 入屏方式 */
+ private String inScreenMode;
+ @Excel(name = "入屏方式")
+ private String screenMode;
+
+ /** 滚动速度/毫秒 */
+ /* @Excel(name = "滚动速度/毫秒")*/
+ private Long rollSpeed;
+
+ /** 停留时间/秒 */
+ @Excel(name = "停留时间/毫秒")
+ private Long stopTime;
+
+ /** 适用类型 */
+ @Excel(name = "适用类型")
+ private String applyType;
+
+ /** 是否为通用模板 */
+ /* @Excel(name = "是否为通用模板")*/
+ private Integer isCurrency;
+
+ /** 模板类型 */
+ /*@Excel(name = "模板类型")*/
+ private Integer templateType;
+
+ /** 情报板类型 */
+ /*@Excel(name = "情报板类型")*/
+ private String vmsType;
+
+ private String category;
+
+ private String dictLable;
+ @Excel(name = "备注")
+ private String remark;
+
+
+ private String ids;
+
+ @Excels({
+ @Excel(name = "模板内容", targetAttr = "content", type = Excel.Type.EXPORT),
+ })
+
+ private IotBoardTemplateContent tcontent;
+
+ public String getScreenMode() {
+ return this.screenMode;
+ }
+
+ public void setScreenMode( String screenMode) {
+ this.screenMode = screenMode;
+ }
+
+ public String getIds() {
+ return this.ids;
+ }
+
+ public void setIds( String ids) {
+ this.ids = ids;
+ }
+
+ @Override
+ public String getRemark() {
+ return this.remark;
+ }
+
+ @Override
+ public void setRemark( String remark) {
+ this.remark = remark;
+ }
+
+ private List tcontents;
+
+ public List getTcontents() {
+ return tcontents;
+ }
+
+ public void setTcontents(List tcontents) {
+ this.tcontents = tcontents;
+ }
+
+ public String getDictLable() {
+ return dictLable;
+ }
+
+ public void setDictLable(String dictLable) {
+ this.dictLable = dictLable;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public IotBoardTemplateContent getTcontent() {
+ if (tcontent == null) {
+ tcontent = new IotBoardTemplateContent();
+ }
+ return tcontent;
+ }
+
+ public void setTcontent(IotBoardTemplateContent tcontent) {
+ this.tcontent = tcontent;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+ public void setScreenSize(String screenSize)
+ {
+ this.screenSize = screenSize;
+ }
+
+ public String getScreenSize()
+ {
+ return screenSize;
+ }
+ public void setInScreenMode(String inScreenMode)
+ {
+ this.inScreenMode = inScreenMode;
+ }
+
+ public String getInScreenMode()
+ {
+ return inScreenMode;
+ }
+ public void setRollSpeed(Long rollSpeed)
+ {
+ this.rollSpeed = rollSpeed;
+ }
+
+ public Long getRollSpeed()
+ {
+ return rollSpeed;
+ }
+ public void setStopTime(Long stopTime)
+ {
+ this.stopTime = stopTime;
+ }
+
+ public Long getStopTime()
+ {
+ return stopTime;
+ }
+ public void setApplyType(String applyType)
+ {
+ this.applyType = applyType;
+ }
+
+ public String getApplyType()
+ {
+ return applyType;
+ }
+ public void setIsCurrency(Integer isCurrency)
+ {
+ this.isCurrency = isCurrency;
+ }
+
+ public Integer getIsCurrency()
+ {
+ return isCurrency;
+ }
+ public void setTemplateType(Integer templateType)
+ {
+ this.templateType = templateType;
+ }
+
+ public Integer getTemplateType()
+ {
+ return templateType;
+ }
+ public void setVmsType(String vmsType)
+ {
+ this.vmsType = vmsType;
+ }
+
+ public String getVmsType()
+ {
+ return vmsType;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("screenSize", getScreenSize())
+ .append("inScreenMode", getInScreenMode())
+ .append("rollSpeed", getRollSpeed())
+ .append("stopTime", getStopTime())
+ .append("applyType", getApplyType())
+ .append("isCurrency", getIsCurrency())
+ .append("templateType", getTemplateType())
+ .append("vmsType", getVmsType())
+ .append("remark", getRemark())
+ .append("tcontent", getTcontent())
+ .toString();
+ }
+}
diff --git a/ruoyi-system/src/main/java/com/zc/domain/IotBoardTemplateContent.java b/ruoyi-system/src/main/java/com/zc/domain/IotBoardTemplateContent.java
new file mode 100644
index 00000000..584f664c
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/domain/IotBoardTemplateContent.java
@@ -0,0 +1,177 @@
+package com.zc.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 发布模板内容对象
+ *
+ * @author ruoyi
+ * @date 2022-03-22
+ */
+public class IotBoardTemplateContent extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** $column.columnComment */
+ private Long id;
+
+ /** 模板ID */
+ @Excel(name = "模板ID")
+ private String templateId;
+
+ /** 内容 */
+ @Excel(name = "内容")
+ private String content;
+
+ /** 字体颜色 */
+ @Excel(name = "字体颜色")
+ private String fontColor;
+
+ /** 字体大小 */
+ @Excel(name = "字体大小")
+ private Long fontSize;
+
+ /** 字体类型 */
+ @Excel(name = "字体类型")
+ private String fontType;
+
+ /** 字体间距/px */
+ @Excel(name = "字体间距/px")
+ private Long fontSpacing;
+
+ /** 起始点位置;前3位代表x点的位值,后3位代表y点的位置 */
+ @Excel(name = "起始点位置;前3位代表x点的位值,后3位代表y点的位置")
+ private String coordinate;
+
+ /** 图片地址 */
+ @Excel(name = "图片地址")
+ private String imageUrl;
+
+ /** 图片高度 */
+ @Excel(name = "图片高度")
+ private String height;
+
+ /** 图片宽度 */
+ @Excel(name = "图片宽度")
+ private String width;
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+ public void setTemplateId(String templateId)
+ {
+ this.templateId = templateId;
+ }
+
+ public String getTemplateId()
+ {
+ return templateId;
+ }
+ public void setContent(String content)
+ {
+ this.content = content;
+ }
+
+ public String getContent()
+ {
+ return content;
+ }
+ public void setFontColor(String fontColor)
+ {
+ this.fontColor = fontColor;
+ }
+
+ public String getFontColor()
+ {
+ return fontColor;
+ }
+ public void setFontSize(Long fontSize)
+ {
+ this.fontSize = fontSize;
+ }
+
+ public Long getFontSize()
+ {
+ return fontSize;
+ }
+ public void setFontType(String fontType)
+ {
+ this.fontType = fontType;
+ }
+
+ public String getFontType()
+ {
+ return fontType;
+ }
+ public void setFontSpacing(Long fontSpacing)
+ {
+ this.fontSpacing = fontSpacing;
+ }
+
+ public Long getFontSpacing()
+ {
+ return fontSpacing;
+ }
+ public void setCoordinate(String coordinate)
+ {
+ this.coordinate = coordinate;
+ }
+
+ public String getCoordinate()
+ {
+ return coordinate;
+ }
+ public void setImageUrl(String imageUrl)
+ {
+ this.imageUrl = imageUrl;
+ }
+
+ public String getImageUrl()
+ {
+ return imageUrl;
+ }
+ public void setHeight(String height)
+ {
+ this.height = height;
+ }
+
+ public String getHeight()
+ {
+ return height;
+ }
+ public void setWidth(String width)
+ {
+ this.width = width;
+ }
+
+ public String getWidth()
+ {
+ return width;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("templateId", getTemplateId())
+ .append("content", getContent())
+ .append("fontColor", getFontColor())
+ .append("fontSize", getFontSize())
+ .append("fontType", getFontType())
+ .append("fontSpacing", getFontSpacing())
+ .append("coordinate", getCoordinate())
+ .append("imageUrl", getImageUrl())
+ .append("height", getHeight())
+ .append("width", getWidth())
+ .toString();
+ }
+}
diff --git a/ruoyi-system/src/main/java/com/zc/domain/IotDeviceType.java b/ruoyi-system/src/main/java/com/zc/domain/IotDeviceType.java
new file mode 100644
index 00000000..80c48b78
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/domain/IotDeviceType.java
@@ -0,0 +1,210 @@
+package com.zc.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 设备类型编号对象 iot_board_type
+ *
+ * @author yangqichao
+ * @date 2020-03-26
+ */
+public class IotDeviceType extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 类型编号 */
+ private Long deviceTypeId;
+
+ /** 设备类型 */
+ @Excel(name = "设备类型")
+ private String deviceTypeNumber;
+
+ /** 设备状态 */
+ @Excel(name = "设备状态")
+ private String states;
+
+ /** 设备类型名称 */
+ @Excel(name = "设备类型名称")
+ private String deviceTypeName;
+
+ /** URl */
+ @Excel(name = "URl")
+ private String url;
+
+ /** 正常图标样式 */
+ @Excel(name = "正常图标样式")
+ private String normalCssClass;
+
+ /** 故障图标样式 */
+ @Excel(name = "故障图标样式")
+ private String abnormalCssClass;
+
+ /** 离线图标样式 */
+ @Excel(name = "离线图标样式")
+ private String faultCssClass;
+
+ /** 推送图标 */
+ @Excel(name = "推送图标")
+ private String pushCssClass;
+
+ /** 刷新时间 */
+ @Excel(name = "刷新时间")
+ private String refreshTime;
+
+ /** 是否可用 */
+ @Excel(name = "是否可用")
+ private Integer visible;
+
+ /** 是否需要推送 */
+ @Excel(name = "是否需要推送")
+ private Integer ispush;
+
+ /** 排序 */
+ @Excel(name = "排序")
+ private Integer sort;
+
+ public void setDeviceTypeId(Long deviceTypeId)
+ {
+ this.deviceTypeId = deviceTypeId;
+ }
+
+ public Long getDeviceTypeId()
+ {
+ return deviceTypeId;
+ }
+ public void setDeviceTypeNumber(String deviceTypeNumber)
+ {
+ this.deviceTypeNumber = deviceTypeNumber;
+ }
+
+ public String getDeviceTypeNumber()
+ {
+ return deviceTypeNumber;
+ }
+ public void setStates(String states)
+ {
+ this.states = states;
+ }
+
+ public String getStates()
+ {
+ return states;
+ }
+ public void setDeviceTypeName(String deviceTypeName)
+ {
+ this.deviceTypeName = deviceTypeName;
+ }
+
+ public String getDeviceTypeName()
+ {
+ return deviceTypeName;
+ }
+ public void setUrl(String url)
+ {
+ this.url = url;
+ }
+
+ public String getUrl()
+ {
+ return url;
+ }
+ public void setNormalCssClass(String normalCssClass)
+ {
+ this.normalCssClass = normalCssClass;
+ }
+
+ public String getNormalCssClass()
+ {
+ return normalCssClass;
+ }
+ public void setAbnormalCssClass(String abnormalCssClass)
+ {
+ this.abnormalCssClass = abnormalCssClass;
+ }
+
+ public String getAbnormalCssClass()
+ {
+ return abnormalCssClass;
+ }
+ public void setFaultCssClass(String faultCssClass)
+ {
+ this.faultCssClass = faultCssClass;
+ }
+
+ public String getFaultCssClass()
+ {
+ return faultCssClass;
+ }
+ public void setPushCssClass(String pushCssClass)
+ {
+ this.pushCssClass = pushCssClass;
+ }
+
+ public String getPushCssClass()
+ {
+ return pushCssClass;
+ }
+ public void setRefreshTime(String refreshTime)
+ {
+ this.refreshTime = refreshTime;
+ }
+
+ public String getRefreshTime()
+ {
+ return refreshTime;
+ }
+ public void setVisible(Integer visible)
+ {
+ this.visible = visible;
+ }
+
+ public Integer getVisible()
+ {
+ return visible;
+ }
+ public void setIspush(Integer ispush)
+ {
+ this.ispush = ispush;
+ }
+
+ public Integer getIspush()
+ {
+ return ispush;
+ }
+ public void setSort(Integer sort)
+ {
+ this.sort = sort;
+ }
+
+ public Integer getSort()
+ {
+ return sort;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("deviceTypeId", getDeviceTypeId())
+ .append("deviceTypeNumber", getDeviceTypeNumber())
+ .append("states", getStates())
+ .append("deviceTypeName", getDeviceTypeName())
+ .append("url", getUrl())
+ .append("normalCssClass", getNormalCssClass())
+ .append("abnormalCssClass", getAbnormalCssClass())
+ .append("faultCssClass", getFaultCssClass())
+ .append("pushCssClass", getPushCssClass())
+ .append("refreshTime", getRefreshTime())
+ .append("visible", getVisible())
+ .append("ispush", getIspush())
+ .append("sort", getSort())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .append("remark", getRemark())
+ .toString();
+ }
+}
diff --git a/ruoyi-system/src/main/java/com/zc/domain/SdDevices.java b/ruoyi-system/src/main/java/com/zc/domain/SdDevices.java
new file mode 100644
index 00000000..9167f5cf
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/domain/SdDevices.java
@@ -0,0 +1,990 @@
+package com.zc.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.annotation.Excels;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 设备对象 sd_devices
+ *
+ * @author ruoyi
+ * @date 2022-07-22
+ */
+
+public class SdDevices extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 设备ID
+ */
+ @Excel(name = "设备ID")
+ @ApiModelProperty("设备ID")
+ private String eqId;
+
+ @ApiModelProperty("设备ID集合")
+ private List eqIds;
+
+ /**
+ * plc主机
+ */
+ @Excel(name = "plc主机",type = Excel.Type.IMPORT)
+ @ApiModelProperty("plc主机")
+ private String fEqId;
+
+ @ApiModelProperty("部门id")
+ private String deptId;
+ @ApiModelProperty("部门名称")
+ private String deptName;
+
+ /**
+ * 设备名称
+ */
+ @Excel(name = "设备名称")
+ @ApiModelProperty("设备名称")
+ private String eqName;
+
+
+ /**
+ * 设备类型
+ */
+ @ApiModelProperty("设备类型")
+ @Excel(name = "设备类型",type= Excel.Type.IMPORT)
+ private Long eqType;
+
+
+ private Long[] eqTypes;
+
+
+ /**
+ * 设备品牌
+ */
+ @Excel(name = "设备品牌ID",type = Excel.Type.IMPORT)
+ @ApiModelProperty("设备品牌")
+ private String brandId;
+
+ /**
+ * 设备品牌
+ */
+ @Excel(name = "设备品牌")
+ @ApiModelProperty("设备品牌")
+ private String brandName;
+
+
+
+ public String getBrandName() {
+ return brandName;
+ }
+
+ public void setBrandName(String brandName) {
+ this.brandName = brandName;
+ }
+
+ /**
+ * 设备型号
+ */
+ @Excel(name = "设备型号")
+ @ApiModelProperty("设备型号")
+ private String eqModel;
+
+
+
+ /**
+ * 外部系统ID
+ */
+ @Excel(name = "外部系统",type= Excel.Type.IMPORT)
+ @ApiModelProperty("外部系统")
+ private Long externalSystemId;
+
+
+ /**
+ * 设备大类
+ */
+ /* @Excel(name = "设备大类",type= Excel.Type.IMPORT)*/
+ @ApiModelProperty("设备大类")
+ private Long fEqType;
+
+ /**
+ * 设备大类
+ */
+ @Excel(name = "设备大类",type= Excel.Type.IMPORT)
+ @ApiModelProperty("设备大类")
+ private Long FEqType;
+
+ /**
+ * 所属道路方向(上行、下行)
+ */
+ @Excel(name = "设备方向", dictType = "sd_direction")
+ @ApiModelProperty("设备方向")
+ private String eqDirection;
+
+
+ @Excel(name = "设备方向:1-潍坊方向 2-济南方向",type= Excel.Type.IMPORT)
+ @ApiModelProperty("设备方向:1-潍坊方向 2-济南方向")
+ private String direction;
+
+ public String getDirection() {
+ return this.direction;
+ }
+
+ public void setDirection( String direction) {
+ this.direction = direction;
+ }
+
+ /**
+ * 设备所属车道
+ */
+ @Excel(name = "所属车道",type= Excel.Type.IMPORT)
+ @ApiModelProperty("所属车道")
+ private String lane;
+
+ /**
+ * 设备IP
+ */
+ @Excel(name = "设备IP")
+ @ApiModelProperty("设备IP")
+ private String ip;
+
+ /**
+ * 设备端口号
+ */
+ @Excel(name = "设备端口号")
+ @ApiModelProperty("设备端口号")
+ private String port;
+
+ /**
+ * 设备桩号
+ */
+ @Excel(name = "桩号")
+ @ApiModelProperty("桩号")
+ private String pile;
+
+ @Excel(name = "备注")
+ private String remark;
+
+
+
+ /**
+ * 设备整形桩号
+ */
+ @Excel(name = "设备整形桩号",type= Excel.Type.IMPORT)
+ @ApiModelProperty("设备整形桩号")
+ private Long pileNum;
+
+ /**
+ * 纬度
+ */
+ @Excel(name = "纬度",type= Excel.Type.IMPORT)
+ @ApiModelProperty("纬度")
+ private String lat;
+
+ /**
+ * 经度
+ */
+ @Excel(name = "经度",type= Excel.Type.IMPORT)
+ @ApiModelProperty("经度")
+ private String lng;
+
+
+
+ /**
+ * 设备密钥
+ */
+ @Excel(name = "设备密钥",type= Excel.Type.IMPORT)
+ @ApiModelProperty("设备密钥")
+ private String secureKey;
+
+ /**
+ * 设备用户名
+ */
+ @Excel(name = "设备用户名",type= Excel.Type.IMPORT)
+ @ApiModelProperty("设备用户名")
+ private String eqUser;
+
+ /**
+ * 设备密码
+ */
+ @Excel(name = "设备密码",type= Excel.Type.IMPORT)
+ @ApiModelProperty("设备密码")
+ private String eqPwd;
+
+ /**
+ * 协议类型(tcp/udp/api)
+ */
+ @Excel(name = "协议类型",type= Excel.Type.IMPORT)
+ @ApiModelProperty("协议类型")
+ private String commProtocol;
+
+ /**
+ * 出厂时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty("出厂时间")
+ @Excel(name = "出厂时间", width = 30, dateFormat = "yyyy-MM-dd",type= Excel.Type.IMPORT)
+ private Date deliveryTime;
+
+ /**
+ * 维保截止时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty("维保截止时间")
+ @Excel(name = "维保截止时间", width = 30, dateFormat = "yyyy-MM-dd",type= Excel.Type.IMPORT)
+ private Date warrantyEndTime;
+
+ @Excel(name = "安装位置 0 隧道 1弱电室 2高压室 3低压室 4柴发室",type= Excel.Type.IMPORT)
+ @ApiModelProperty("安装位置 0 隧道 1弱电室 2高压室 3低压室 4柴发室")
+ private String installAddr;
+
+ /**
+ * 设备安装时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty("设备安装时间")
+ @Excel(name = "设备安装时间", width = 30, dateFormat = "yyyy-MM-dd",type= Excel.Type.IMPORT)
+ private Date installTime;
+
+ /**
+ * 预期寿命/设计寿命,单位为年
+ */
+ @Excel(name = "预期寿命",type= Excel.Type.IMPORT)
+ @ApiModelProperty("预期寿命/设计寿命,单位为年")
+ private String useLife;
+
+ /**
+ * 使用状态:1-在用 2-停用 3-备用
+ */
+ @Excel(name = "使用状态:1-在用 2-停用 3-备用",type= Excel.Type.IMPORT)
+ @ApiModelProperty("使用状态:1-在用 2-停用 3-备用")
+ private String useStatus;
+
+ /**
+ * 是否监控
+ */
+ @ApiModelProperty("是否监控")
+ @Excel(name = "是否监控:0=是 1=否",type= Excel.Type.IMPORT)
+ private Long isMonitor;
+
+ /**
+ * 端口状态
+ */
+ @Excel(name = "端口状态",type= Excel.Type.IMPORT)
+ @ApiModelProperty("端口状态")
+ private String portStatus;
+
+ /**
+ * 端口状态更新时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty("端口状态更新时间")
+ @Excel(name = "端口状态更新时间 ", width = 30, dateFormat = "yyyy-MM-dd",type= Excel.Type.IMPORT)
+ private Date portStatusTime;
+
+ /**
+ * 网关与设备连通状态 1-在线,2-离线
+ */
+ @Excel(name = "网关与设备连通状态 1-在线,2-离线",type= Excel.Type.IMPORT)
+ @ApiModelProperty("网关与设备连通状态\t1-在线,2-离线")
+ private String gatewayNetstatus;
+
+ /**
+ * 网关状态更新时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "网关状态更新时间 ", width = 30, dateFormat = "yyyy-MM-dd",type= Excel.Type.IMPORT)
+ @ApiModelProperty("网关状态更新时间")
+ private Date gatewayNetstatusTime;
+
+ /**
+ * 设备状态 1-故障,2-告警
+ */
+ @Excel(name = "设备状态",dictType = "sd_monitor_state",type= Excel.Type.ALL)
+ @ApiModelProperty("设备状态")
+ private String eqStatus;
+
+ /**
+ * 设备状态更新时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty("设备状态更新时间")
+ @Excel(name = "设备状态更新时间 ", width = 30, dateFormat = "yyyy-MM-dd",type= Excel.Type.IMPORT)
+ private Date eqStatusTime;
+
+ /**
+ * 控制点位地址
+ */
+ @Excel(name = "控制点位地址",type= Excel.Type.IMPORT)
+ @ApiModelProperty("控制点位地址")
+ private String controlPointAddress;
+
+ /**
+ * 点位地址1
+ */
+ @Excel(name = "点位地址",type= Excel.Type.IMPORT)
+ @ApiModelProperty("点位地址")
+ private String queryPointAddress;
+
+ /**
+ * 是否更新
+ */
+ private boolean updateSupport;
+
+
+
+ /** 图片id */
+ @Excel(name = "图片id",type= Excel.Type.IMPORT)
+ private String iconFileId;
+
+ @ApiModelProperty("设备类型图片")
+ private List iFileList;
+
+ public void setEqId(String eqId) {
+ this.eqId = eqId;
+ }
+
+
+ public String getInstallAddr() {
+ return installAddr;
+ }
+
+ public void setInstallAddr(String installAddr) {
+ this.installAddr = installAddr;
+ }
+
+ /**
+ * 指令模式
+ */
+ private String instruction;
+ /**
+ * 机位
+ **/
+ private String seat;
+ /**
+ * 查询个数
+ **/
+ private String qNumber;
+
+ /**
+ * 消息协议(Mobdus/Fins/API/自定义)
+ * */
+ private String messageProtocol;
+
+ /**
+ * 协议ID
+ * */
+ private Long protocolId;
+
+ /**
+ * road_id路段ID
+ * */
+ private String roadId;
+
+ /**
+ * 设备唯一标识码
+ * */
+ private String sn;
+
+ /**
+ * 外部设备ID
+ **/
+ private String externalDeviceId;
+
+ /**
+ * 导出设备ID
+ **/
+ private String exportIds;
+
+ /**
+ * 区分标志位
+ */
+ private String rlModel;
+
+ public String getRlModel() {
+ return rlModel;
+ }
+
+ public void setRlModel(String rlModel) {
+ this.rlModel = rlModel;
+ }
+
+ public Long[] getEqTypes() {
+ return eqTypes;
+ }
+
+ public void setEqTypes(Long[] eqTypes) {
+ this.eqTypes = eqTypes;
+ }
+
+ public Long getFEqType() {
+ return this.FEqType;
+ }
+
+ public void setFEqType( Long FEqType) {
+ this.FEqType = FEqType;
+ }
+
+ public String getExportIds() {
+ return this.exportIds;
+ }
+
+ public void setExportIds(final String exportIds) {
+ this.exportIds = exportIds;
+ }
+
+ @Override
+ public String getRemark() {
+ return this.remark;
+ }
+
+ @Override
+ public void setRemark(final String remark) {
+ this.remark = remark;
+ }
+
+ /**
+ * 关联设备ID(关联iot_board中device_id字段)
+ * */
+ private Long associatedDeviceId;
+
+ public Long getAssociatedDeviceId() {
+ return associatedDeviceId;
+ }
+
+ public void setAssociatedDeviceId(Long associatedDeviceId) {
+ this.associatedDeviceId = associatedDeviceId;
+ }
+
+ public String getExternalDeviceId() {
+
+ return externalDeviceId;
+ }
+
+ public void setExternalDeviceId(String externalDeviceId) {
+ this.externalDeviceId = externalDeviceId;
+ }
+
+ public String getSn() {
+ return sn;
+ }
+
+ public void setSn(String sn) {
+ this.sn = sn;
+ }
+
+ public String getRoadId() {
+ return roadId;
+ }
+
+ public void setRoadId(String roadId) {
+ this.roadId = roadId;
+ }
+
+ public Long getProtocolId() {
+ return protocolId;
+ }
+ /**
+ * 在线数量
+ **/
+ private Integer zxNum;
+
+ /**
+ * 离线数量
+ **/
+ private Integer lxNum;
+
+ /**
+ * 运行状态
+ **/
+ private String runStatus;
+
+
+ private String runState;
+
+ private String eqState;
+ //摄像机类型
+ private String camType;
+
+ //设备 当前数据
+ private String data;
+
+ /** 设备数据项id */
+ private Integer itemId;
+
+ public String getRunState() {
+ return this.runState;
+ }
+
+ public void setRunState(final String runState) {
+ this.runState = runState;
+ }
+
+ public String getEqState() {
+ return this.eqState;
+ }
+
+ public void setEqState(final String eqState) {
+ this.eqState = eqState;
+ }
+
+ public Integer getItemId() {
+ return itemId;
+ }
+
+ public void setItemId(Integer itemId) {
+ this.itemId = itemId;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getCamType() {
+ return camType;
+ }
+
+ public void setCamType(String camType) {
+ this.camType = camType;
+ }
+
+ public String getRunStatus() {
+ return this.runStatus;
+ }
+
+ public void setRunStatus(final String runStatus) {
+ this.runStatus = runStatus;
+ }
+
+ public Integer getZxNum() {
+ return this.zxNum;
+ }
+
+ public void setZxNum(final Integer zxNum) {
+ this.zxNum = zxNum;
+ }
+
+ public Integer getLxNum() {
+ return this.lxNum;
+ }
+
+ public void setLxNum(final Integer lxNum) {
+ this.lxNum = lxNum;
+ }
+
+ public void setProtocolId(Long protocolId) {
+ this.protocolId = protocolId;
+ }
+
+ public String getMessageProtocol() {
+ return messageProtocol;
+ }
+
+ public void setMessageProtocol(String messageProtocol) {
+ this.messageProtocol = messageProtocol;
+ }
+
+ public String getInstruction() {
+ return instruction;
+ }
+
+ public void setInstruction(String instruction) {
+ this.instruction = instruction;
+ }
+
+ public String getSeat() {
+ return seat;
+ }
+
+ public void setSeat(String seat) {
+ this.seat = seat;
+ }
+
+ public String getqNumber() {
+ return qNumber;
+ }
+
+ public void setqNumber(String qNumber) {
+ this.qNumber = qNumber;
+ }
+
+
+ public String getEqId() {
+ return eqId;
+ }
+
+ public List getEqIds() {
+ return eqIds;
+ }
+
+ public void setEqIds(List eqIds) {
+ this.eqIds = eqIds;
+ }
+
+ public String getFEqId() {
+ return fEqId;
+ }
+
+ public void setFEqId(String fEqId) {
+ this.fEqId = fEqId;
+ }
+
+ public void setEqName(String eqName) {
+ this.eqName = eqName;
+ }
+
+ public String getDeptId() {
+ return deptId;
+ }
+
+ public void setDeptId(String deptId) {
+ this.deptId = deptId;
+ }
+
+ public String getDeptName() {
+ return deptName;
+ }
+
+ public void setDeptName(String deptName) {
+ this.deptName = deptName;
+ }
+
+
+ public String getEqName() {
+ return eqName;
+ }
+
+ public void setEqType(Long eqType) {
+ this.eqType = eqType;
+ }
+
+ public Long getEqType() {
+ return eqType;
+ }
+
+ public void setEqModel(String eqModel) {
+ this.eqModel = eqModel;
+ }
+
+
+ public String getEqModel() {
+ return eqModel;
+ }
+
+ public void setBrandId(String brandId) {
+ this.brandId = brandId;
+ }
+
+ public String getBrandId() {
+ return brandId;
+ }
+
+ public void setEqDirection(String eqDirection) {
+ this.eqDirection = eqDirection;
+ }
+
+ public String getEqDirection() {
+ return eqDirection;
+ }
+
+ public void setLane(String lane) {
+ this.lane = lane;
+ }
+
+ public String getLane() {
+ return lane;
+ }
+
+ public void setPile(String pile) {
+ this.pile = pile;
+ }
+
+ public String getPile() {
+ return pile;
+ }
+
+ public void setPileNum(Long pileNum) {
+ this.pileNum = pileNum;
+ }
+
+ public Long getPileNum() {
+ return pileNum;
+ }
+
+ public void setLat(String lat) {
+ this.lat = lat;
+ }
+
+ public String getLat() {
+ return lat;
+ }
+
+ public void setLng(String lng) {
+ this.lng = lng;
+ }
+
+ public String getLng() {
+ return lng;
+ }
+
+ public void setIp(String ip) {
+ this.ip = ip;
+ }
+
+ public String getIp() {
+ return ip;
+ }
+
+ public void setPort(String port) {
+ this.port = port;
+ }
+
+ public String getPort() {
+ return port;
+ }
+
+ public void setSecureKey(String secureKey) {
+ this.secureKey = secureKey;
+ }
+
+ public String getSecureKey() {
+ return secureKey;
+ }
+
+ public void setEqUser(String eqUser) {
+ this.eqUser = eqUser;
+ }
+
+ public String getEqUser() {
+ return eqUser;
+ }
+
+ public void setEqPwd(String eqPwd) {
+ this.eqPwd = eqPwd;
+ }
+
+ public String getEqPwd() {
+ return eqPwd;
+ }
+
+ public void setCommProtocol(String commProtocol) {
+ this.commProtocol = commProtocol;
+ }
+
+ public String getCommProtocol() {
+ return commProtocol;
+ }
+
+ public void setDeliveryTime(Date deliveryTime) {
+ this.deliveryTime = deliveryTime;
+ }
+
+ public Date getDeliveryTime() {
+ return deliveryTime;
+ }
+
+ public void setWarrantyEndTime(Date warrantyEndTime) {
+ this.warrantyEndTime = warrantyEndTime;
+ }
+
+ public Date getWarrantyEndTime() {
+ return warrantyEndTime;
+ }
+
+ public void setInstallTime(Date installTime) {
+ this.installTime = installTime;
+ }
+
+ public Date getInstallTime() {
+ return installTime;
+ }
+
+ public void setUseLife(String useLife) {
+ this.useLife = useLife;
+ }
+
+ public String getUseLife() {
+ return useLife;
+ }
+
+ public void setUseStatus(String useStatus) {
+ this.useStatus = useStatus;
+ }
+
+ public String getUseStatus() {
+ return useStatus;
+ }
+
+ public void setPortStatus(String portStatus) {
+ this.portStatus = portStatus;
+ }
+
+ public Long getIsMonitor() {
+ return isMonitor;
+ }
+
+ public void setIsMonitor(Long isMonitor) {
+ this.isMonitor = isMonitor;
+ }
+
+ public String getPortStatus() {
+ return portStatus;
+ }
+
+ public void setPortStatusTime(Date portStatusTime) {
+ this.portStatusTime = portStatusTime;
+ }
+
+ public Date getPortStatusTime() {
+ return portStatusTime;
+ }
+
+ public void setGatewayNetstatus(String gatewayNetstatus) {
+ this.gatewayNetstatus = gatewayNetstatus;
+ }
+
+ public String getGatewayNetstatus() {
+ return gatewayNetstatus;
+ }
+
+ public void setGatewayNetstatusTime(Date gatewayNetstatusTime) {
+ this.gatewayNetstatusTime = gatewayNetstatusTime;
+ }
+
+ public Date getGatewayNetstatusTime() {
+ return gatewayNetstatusTime;
+ }
+
+ public void setEqStatus(String eqStatus) {
+ this.eqStatus = eqStatus;
+ }
+
+ public String getEqStatus() {
+ return eqStatus;
+ }
+
+ public void setEqStatusTime(Date eqStatusTime) {
+ this.eqStatusTime = eqStatusTime;
+ }
+
+ public Date getEqStatusTime() {
+ return eqStatusTime;
+ }
+
+ public void setControlPointAddress(String controlPointAddress) {
+ this.controlPointAddress = controlPointAddress;
+ }
+
+ public String getControlPointAddress() {
+ return controlPointAddress;
+ }
+
+ public void setQueryPointAddress(String queryPointAddress) {
+ this.queryPointAddress = queryPointAddress;
+ }
+
+ public String getQueryPointAddress() {
+ return queryPointAddress;
+ }
+
+ public String getfEqId() {
+ return fEqId;
+ }
+
+ public void setfEqId(String fEqId) {
+ this.fEqId = fEqId;
+ }
+
+ public boolean isUpdateSupport() {
+ return updateSupport;
+ }
+
+ public void setUpdateSupport(boolean updateSupport) {
+ this.updateSupport = updateSupport;
+ }
+
+ public Long getExternalSystemId() {
+ return externalSystemId;
+ }
+
+ public void setExternalSystemId(Long externalSystemId) {
+ this.externalSystemId = externalSystemId;
+ }
+
+ public Long getfEqType() {
+ return fEqType;
+ }
+
+ public void setfEqType(Long fEqType) {
+ this.fEqType = fEqType;
+ }
+
+ public String getIconFileId() {
+ return this.iconFileId;
+ }
+
+ public void setIconFileId(final String iconFileId) {
+ this.iconFileId = iconFileId;
+ }
+
+ public List getiFileList() {
+ return this.iFileList;
+ }
+
+ public void setiFileList(final List iFileList) {
+ this.iFileList = iFileList;
+ }
+
+
+ @Override
+ public String toString() {
+ return "SdDevices{" +
+ "eqId='" + eqId + '\'' +
+ ", eqIds=" + eqIds +
+ ", fEqId='" + fEqId + '\'' +
+ ", deptId=" + deptId +
+ ", deptName='" + deptName + '\'' +
+ ", eqName='" + eqName + '\'' +
+ ", eqType=" + eqType +
+ ", eqModel='" + eqModel + '\'' +
+ ", brandId=" + brandId +
+ ", externalSystemId=" + externalSystemId +
+ ", fEqType=" + fEqType +
+ ", eqDirection='" + eqDirection + '\'' +
+ ", lane='" + lane + '\'' +
+ ", pile='" + pile + '\'' +
+ ", pileNum=" + pileNum +
+ ", lat='" + lat + '\'' +
+ ", lng='" + lng + '\'' +
+ ", ip='" + ip + '\'' +
+ ", port='" + port + '\'' +
+ ", secureKey='" + secureKey + '\'' +
+ ", eqUser='" + eqUser + '\'' +
+ ", eqPwd='" + eqPwd + '\'' +
+ ", commProtocol='" + commProtocol + '\'' +
+ ", deliveryTime=" + deliveryTime +
+ ", warrantyEndTime=" + warrantyEndTime +
+ ", installTime=" + installTime +
+ ", useLife='" + useLife + '\'' +
+ ", useStatus='" + useStatus + '\'' +
+ ", isMonitor=" + isMonitor +
+ ", portStatus='" + portStatus + '\'' +
+ ", portStatusTime=" + portStatusTime +
+ ", gatewayNetstatus='" + gatewayNetstatus + '\'' +
+ ", gatewayNetstatusTime=" + gatewayNetstatusTime +
+ ", eqStatus='" + eqStatus + '\'' +
+ ", eqStatusTime=" + eqStatusTime +
+ ", controlPointAddress='" + controlPointAddress + '\'' +
+ ", queryPointAddress='" + queryPointAddress + '\'' +
+ ", instruction='" + instruction + '\'' +
+ ", seat='" + seat + '\'' +
+ ", qNumber='" + qNumber + '\'' +
+ ", updateSupport='" + updateSupport + '\'' +
+ '}';
+ }
+}
diff --git a/ruoyi-system/src/main/java/com/zc/domain/SdIotDevice.java b/ruoyi-system/src/main/java/com/zc/domain/SdIotDevice.java
new file mode 100644
index 00000000..dce94ba3
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/domain/SdIotDevice.java
@@ -0,0 +1,680 @@
+package com.zc.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.annotation.Excels;
+import com.ruoyi.common.core.domain.BaseEntity;
+import com.sun.jna.NativeLong;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+/**
+ * 设备列表对象 iot_board
+ *
+ * @author yangqichao
+ * @date 2020-03-25
+ */
+public class SdIotDevice extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 设备编号 */
+ @Excel(name = "设备编号")
+ private Long deviceId;
+
+ /** 设备名称 */
+ @Excel(name = "设备名称")
+ private String deviceName;
+
+ /** 品牌id */
+ @Excel(name = "品牌id")
+ private Long brandId;
+ /** 品牌列表对象 */
+ @Excels({
+ @Excel(name = "iotBoardBrandName", targetAttr = "iotBoardBrandName"),
+ })
+ private IotBoardBrand iotBoardBrandName;
+ /**
+ * 设备类型对象
+ */
+ @Excels({
+ @Excel(name = "IotDeviceType", targetAttr = "IotDeviceType"),
+ })
+ private IotDeviceType IotDeviceType;
+ public IotDeviceType getIotDeviceType() {
+ return IotDeviceType;
+ }
+ public void setIotDeviceType(IotDeviceType iotDeviceType) {
+ IotDeviceType = iotDeviceType;
+ }
+
+ /** 线路id */
+ @Excel(name = "线路id")
+ private Long routeId;
+
+ /** 路段方向 */
+ @Excel(name = "路段方向")
+ private String routeDirection;
+
+ /** 设备标识名称 */
+ @Excel(name = "设备标识名称")
+ private String deviceMarkingName;
+
+ /** 设备类型 */
+ @Excel(name = "设备类型")
+ private Long deviceTypeId;
+
+ /** 设备类型 */
+ @Excel(name = "详细设备类型")
+ private Long deviceTypeNumber;
+
+ /** 设备型号 */
+ @Excel(name = "设备型号")
+ private Long deviceModelId;
+
+ /** 所属仓库 */
+ @Excel(name = "所属仓库")
+ private String factoryLibrary;
+
+ /** 使用单位 */
+ @Excel(name = "使用单位")
+ private Long userUnitId;
+
+ /** 经办人 */
+ @Excel(name = "经办人")
+ private Long operatorId;
+
+ /** 经度 */
+ @Excel(name = "经度")
+ private String longitude;
+
+ /** 纬度 */
+ @Excel(name = "纬度")
+ private String latitude;
+
+ /** 生产商 */
+ @Excel(name = "生产商")
+ private Long firmId;
+
+ /** 购买日期 */
+ @Excel(name = "购买日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date purchaseDate;
+
+ /** 保修年限 */
+ @Excel(name = "保修年限")
+ private Integer warrantyYears;
+
+ /** 单价 */
+ @Excel(name = "单价")
+ private Long unitPrice;
+
+ /** 运行状态 */
+ @Excel(name = "运行状态")
+ private Integer runStatus;
+
+ /** 设备状态 */
+ @Excel(name = "隧道ID")
+ private String tunnelId;
+
+ /** 设备状态 */
+ @Excel(name = "设备状态")
+ private String deviceStatus;
+
+ /** 安装时间 */
+ @Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date installDate;
+
+ /** 维护商 */
+ @Excel(name = "维护商")
+ private Long maintainId;
+
+ /** 领用机构 */
+ @Excel(name = "领用机构")
+ private Long collarAgencyId;
+
+ /** 桩号 */
+ @Excel(name = "桩号")
+ private String pileNumber;
+
+ /** 管理单位 */
+ @Excel(name = "管理单位")
+ private String manageAgencyId;
+
+ /** 生产日期 */
+ @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date producteDate;
+
+ /** 保修到期日 */
+ @Excel(name = "保修到期日", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date repairDate;
+
+ /** 操作日期 */
+ @Excel(name = "操作日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date operateDate;
+
+ /** 使用年限 */
+ @Excel(name = "使用年限")
+ private Integer serviceLife;
+
+ /** 入库时间 */
+ @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date storageDate;
+
+ /** 是否监控 */
+ @Excel(name = "是否监控")
+ private Integer isMonitor;
+ /** 是否配置*/
+ @Excel(name = "是否配置")
+ private Integer isConfig;
+
+ /** 位置信息 */
+ @Excel(name = "位置信息")
+ private Integer localInfo;
+
+ /** 路段编号 */
+ private String routeNumber;
+
+ /** 路段名称 */
+ private String routeName;
+
+ /** 设备IP */
+ private String deviceIp;
+
+ /** 设备端口 */
+ private String devicePort;
+ /*设备分辨率*/
+ private String devicePixel;
+ /** 用户名 */
+ private String userName;
+
+ /** 密码 */
+ private String passWord;
+
+ /** 协议版本 */
+ private String protocolName;
+
+
+ /** 协议版本 */
+ private String deviceTypeIds;
+
+ private NativeLong lUserID;
+
+ private NativeLong lAlarmHandle;//报警布防句柄
+
+ private String lUserIDStr;
+
+ private String lAlarmHandleStr;
+
+ private String eqDirection;
+
+ public String getEqDirection() {
+ return eqDirection;
+ }
+
+ public void setEqDirection(String eqDirection) {
+ this.eqDirection = eqDirection;
+ }
+
+ public String getRouteNumber() {
+ return routeNumber;
+ }
+ public void setDeviceId(Long deviceId)
+ {
+ this.deviceId = deviceId;
+ }
+
+ public String getRouteName() {
+ return routeName;
+ }
+ public void setRouteNumber(String routeNumber) {
+ this.routeNumber = routeNumber;
+ }
+
+ public String getDeviceIp() {
+ return deviceIp;
+ }
+ public void setDeviceIp(String deviceIp) {
+ this.deviceIp = deviceIp;
+ }
+
+ public String getDevicePort() {
+ return devicePort;
+ }
+ public void setDevicePort(String devicePort) {
+ this.devicePort = devicePort;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public String getPassWord() {
+ return passWord;
+ }
+
+ public void setPassWord(String passWord) {
+ this.passWord = passWord;
+ }
+
+ public String getProtocolName() {
+ return protocolName;
+ }
+ public void setProtocolName(String protocolName) {
+ this.protocolName = protocolName;
+ }
+
+ public void setRouteName(String routeName) {
+ this.routeName = routeName;
+ }
+
+ public Long getDeviceId()
+ {
+ return deviceId;
+ }
+ public void setDeviceName(String deviceName)
+ {
+ this.deviceName = deviceName;
+ }
+
+ public String getDeviceName()
+ {
+ return deviceName;
+ }
+ public void setBrandId(Long brandId)
+ {
+ this.brandId = brandId;
+ }
+
+ public Long getBrandId()
+ {
+ return brandId;
+ }
+ public IotBoardBrand getIotBoardBrandName() {
+ return iotBoardBrandName;
+ }
+ public void setIotBoardBrandName(IotBoardBrand iotBoardBrandName) {
+ this.iotBoardBrandName = iotBoardBrandName;
+ }
+ public void setRouteId(Long routeId)
+ {
+ this.routeId = routeId;
+ }
+
+ public Long getRouteId()
+ {
+ return routeId;
+ }
+ public void setRouteDirection(String routeDirection)
+ {
+ this.routeDirection = routeDirection;
+ }
+
+ public String getRouteDirection()
+ {
+ return routeDirection;
+ }
+ public void setDeviceMarkingName(String deviceMarkingName)
+ {
+ this.deviceMarkingName = deviceMarkingName;
+ }
+
+ public String getDeviceMarkingName()
+ {
+ return deviceMarkingName;
+ }
+ public void setDeviceTypeId(Long deviceTypeId)
+ {
+ this.deviceTypeId = deviceTypeId;
+ }
+
+ public Long getDeviceTypeId()
+ {
+ return deviceTypeId;
+ }
+ public void setDeviceTypeNumber(Long deviceTypeNumber) {
+ this.deviceTypeNumber = deviceTypeNumber;
+ }
+
+ public Long getDeviceTypeNumber() {
+ return deviceTypeNumber;
+ }
+ public void setDeviceModelId(Long deviceModelId)
+ {
+ this.deviceModelId = deviceModelId;
+ }
+
+ public Long getDeviceModelId()
+ {
+ return deviceModelId;
+ }
+ public void setFactoryLibrary(String factoryLibrary)
+ {
+ this.factoryLibrary = factoryLibrary;
+ }
+
+ public String getFactoryLibrary()
+ {
+ return factoryLibrary;
+ }
+ public void setUserUnitId(Long userUnitId)
+ {
+ this.userUnitId = userUnitId;
+ }
+
+ public Long getUserUnitId()
+ {
+ return userUnitId;
+ }
+ public void setOperatorId(Long operatorId)
+ {
+ this.operatorId = operatorId;
+ }
+
+ public Long getOperatorId()
+ {
+ return operatorId;
+ }
+ public void setLongitude(String longitude)
+ {
+ this.longitude = longitude;
+ }
+
+ public String getLongitude()
+ {
+ return longitude;
+ }
+ public void setLatitude(String latitude)
+ {
+ this.latitude = latitude;
+ }
+
+ public String getLatitude()
+ {
+ return latitude;
+ }
+ public void setFirmId(Long firmId)
+ {
+ this.firmId = firmId;
+ }
+
+ public Long getFirmId()
+ {
+ return firmId;
+ }
+ public void setPurchaseDate(Date purchaseDate)
+ {
+ this.purchaseDate = purchaseDate;
+ }
+
+ public Date getPurchaseDate()
+ {
+ return purchaseDate;
+ }
+ public void setWarrantyYears(Integer warrantyYears)
+ {
+ this.warrantyYears = warrantyYears;
+ }
+
+ public Integer getWarrantyYears()
+ {
+ return warrantyYears;
+ }
+ public void setUnitPrice(Long unitPrice)
+ {
+ this.unitPrice = unitPrice;
+ }
+
+ public Long getUnitPrice()
+ {
+ return unitPrice;
+ }
+ public void setDeviceStatus(String deviceStatus)
+ {
+ this.deviceStatus = deviceStatus;
+ }
+
+ public Integer getRunStatus() {
+ return runStatus;
+ }
+
+ public void setRunStatus(Integer runStatus) {
+ this.runStatus = runStatus;
+ }
+
+ public String getDeviceStatus()
+ {
+ return deviceStatus;
+ }
+ public void setInstallDate(Date installDate)
+ {
+ this.installDate = installDate;
+ }
+
+ public Date getInstallDate()
+ {
+ return installDate;
+ }
+ public void setMaintainId(Long maintainId)
+ {
+ this.maintainId = maintainId;
+ }
+
+ public Long getMaintainId()
+ {
+ return maintainId;
+ }
+ public void setCollarAgencyId(Long collarAgencyId)
+ {
+ this.collarAgencyId = collarAgencyId;
+ }
+
+ public Long getCollarAgencyId()
+ {
+ return collarAgencyId;
+ }
+ public void setPileNumber(String pileNumber)
+ {
+ this.pileNumber = pileNumber;
+ }
+
+ public String getPileNumber()
+ {
+ return pileNumber;
+ }
+ public void setManageAgencyId(String manageAgencyId)
+ {
+ this.manageAgencyId = manageAgencyId;
+ }
+
+ public String getManageAgencyId()
+ {
+ return manageAgencyId;
+ }
+ public void setProducteDate(Date producteDate)
+ {
+ this.producteDate = producteDate;
+ }
+
+ public Date getProducteDate()
+ {
+ return producteDate;
+ }
+ public void setRepairDate(Date repairDate)
+ {
+ this.repairDate = repairDate;
+ }
+
+ public Date getRepairDate()
+ {
+ return repairDate;
+ }
+ public void setOperateDate(Date operateDate)
+ {
+ this.operateDate = operateDate;
+ }
+
+ public Date getOperateDate()
+ {
+ return operateDate;
+ }
+ public void setServiceLife(Integer serviceLife)
+ {
+ this.serviceLife = serviceLife;
+ }
+
+ public Integer getServiceLife()
+ {
+ return serviceLife;
+ }
+ public void setStorageDate(Date storageDate)
+ {
+ this.storageDate = storageDate;
+ }
+
+ public Date getStorageDate()
+ {
+ return storageDate;
+ }
+ public void setIsMonitor(Integer isMonitor)
+ {
+ this.isMonitor = isMonitor;
+ }
+
+ public Integer getIsMonitor()
+ {
+ return isMonitor;
+ }
+ public void setLocalInfo(Integer localInfo)
+ {
+ this.localInfo = localInfo;
+ }
+
+ public Integer getLocalInfo()
+ {
+ return localInfo;
+ }
+
+ public String getDeviceTypeIds() {
+ return deviceTypeIds;
+ }
+
+ public void setDeviceTypeIds(String deviceTypeIds) {
+ this.deviceTypeIds = deviceTypeIds;
+ }
+
+ public Integer getIsConfig() {
+ return isConfig;
+ }
+
+ public void setIsConfig(Integer isConfig) {
+ this.isConfig = isConfig;
+ }
+
+ public String getDevicePixel() {
+ return devicePixel;
+ }
+
+ public void setDevicePixel(String devicePixel) {
+ this.devicePixel = devicePixel;
+ }
+
+ public NativeLong getlUserID() {
+ return lUserID;
+ }
+
+ public void setlUserID(NativeLong lUserID) {
+ this.lUserID = lUserID;
+ }
+
+ public NativeLong getlAlarmHandle() {
+ return lAlarmHandle;
+ }
+
+ public void setlAlarmHandle(NativeLong lAlarmHandle) {
+ this.lAlarmHandle = lAlarmHandle;
+ }
+
+ public String getlUserIDStr() {
+ return lUserIDStr;
+ }
+
+ public void setlUserIDStr(String lUserIDStr) {
+ this.lUserIDStr = lUserIDStr;
+ }
+
+ public String getlAlarmHandleStr() {
+ return lAlarmHandleStr;
+ }
+
+ public void setlAlarmHandleStr(String lAlarmHandleStr) {
+ this.lAlarmHandleStr = lAlarmHandleStr;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("deviceId", getDeviceId())
+ .append("deviceName", getDeviceName())
+ .append("brandId", getBrandId())
+ .append("iotBoardBrandName", getIotBoardBrandName())
+ .append("iotDeviceType", getIotDeviceType())
+ .append("routeId", getRouteId())
+ .append("routeDirection", getRouteDirection())
+ .append("deviceMarkingName", getDeviceMarkingName())
+ .append("deviceTypeId", getDeviceTypeId())
+ .append("deviceModelId", getDeviceModelId())
+ .append("factoryLibrary", getFactoryLibrary())
+ .append("userUnitId", getUserUnitId())
+ .append("operatorId", getOperatorId())
+ .append("longitude", getLongitude())
+ .append("latitude", getLatitude())
+ .append("firmId", getFirmId())
+ .append("purchaseDate", getPurchaseDate())
+ .append("warrantyYears", getWarrantyYears())
+ .append("unitPrice", getUnitPrice())
+ .append("deviceStatus", getDeviceStatus())
+ .append("installDate", getInstallDate())
+ .append("maintainId", getMaintainId())
+ .append("collarAgencyId", getCollarAgencyId())
+ .append("pileNumber", getPileNumber())
+ .append("manageAgencyId", getManageAgencyId())
+ .append("producteDate", getProducteDate())
+ .append("repairDate", getRepairDate())
+ .append("operateDate", getOperateDate())
+ .append("serviceLife", getServiceLife())
+ .append("storageDate", getStorageDate())
+ .append("isMonitor", getIsMonitor())
+ .append("localInfo", getLocalInfo())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .append("remark", getRemark())
+ .append("deviceIp", getDeviceIp())
+ .append("devicePort", getDevicePort())
+ .append("devicePixel", getDevicePixel())
+ .append("routeName", getRouteName())
+ .append("routeNumber", getRouteNumber())
+ .append("userName", getUserName())
+ .append("passWord", getPassWord())
+ .append("isConfig", getIsConfig())
+ .append("lUserID", getlUserID())
+ .append("lAlarmHandle", getlAlarmHandle())
+ .append("lUserIDStr", getlUserIDStr())
+ .append("lAlarmHandleStr", getlAlarmHandleStr())
+ .toString();
+ }
+
+ public String getTunnelId() {
+ return tunnelId;
+ }
+
+ public void setTunnelId(String tunnelId) {
+ this.tunnelId = tunnelId;
+ }
+}
diff --git a/ruoyi-system/src/main/java/com/zc/mapper/IotBoardTemplateContentMapper.java b/ruoyi-system/src/main/java/com/zc/mapper/IotBoardTemplateContentMapper.java
new file mode 100644
index 00000000..9ce23d66
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/mapper/IotBoardTemplateContentMapper.java
@@ -0,0 +1,72 @@
+package com.zc.mapper;
+
+import com.zc.domain.IotBoardTemplateContent;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 发布模板内容Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-03-22
+ */
+public interface IotBoardTemplateContentMapper
+{
+
+ /**
+ * 查询发布模板内容
+ *
+ * @param id 发布模板内容主键
+ * @return 发布模板内容
+ */
+ public IotBoardTemplateContent selectSdVmsTemplateContentById(Long id);
+
+ /**
+ * 查询发布模板内容列表
+ *
+ * @param iotBoardTemplateContent 发布模板内容
+ * @return 发布模板内容集合
+ */
+ public List selectSdVmsTemplateContentList(IotBoardTemplateContent iotBoardTemplateContent);
+
+ public int deleteContentByTemplateId(@Param("templateId") String templateId);
+
+
+
+ /**
+ * 删除发布模板内容
+ *
+ * @param id 发布模板内容主键
+ * @return 结果
+ */
+ public int deleteSdVmsTemplateContentById(Long id);
+
+
+ /**
+ * 新增发布模板内容
+ *
+ * @param iotBoardTemplateContent 发布模板内容
+ * @return 结果
+ */
+ public int insertSdVmsTemplateContent(IotBoardTemplateContent iotBoardTemplateContent);
+
+ /**
+ * 修改发布模板内容
+ *
+ * @param iotBoardTemplateContent 发布模板内容
+ * @return 结果
+ */
+ public int updateSdVmsTemplateContent(IotBoardTemplateContent iotBoardTemplateContent);
+
+
+ /**
+ * 批量删除发布模板内容
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteSdVmsTemplateContentByIds(Long[] ids);
+
+
+}
diff --git a/ruoyi-system/src/main/java/com/zc/mapper/IotBoardTemplateMapper.java b/ruoyi-system/src/main/java/com/zc/mapper/IotBoardTemplateMapper.java
new file mode 100644
index 00000000..1c68eb07
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/mapper/IotBoardTemplateMapper.java
@@ -0,0 +1,54 @@
+package com.zc.mapper;
+
+
+import com.zc.domain.IotBoardTemplate;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 情报板模板Mapper接口
+ *
+ * @author 刘方堃
+ * @date 2021-11-30
+ */
+public interface IotBoardTemplateMapper
+{
+
+ public List selectTemplateList(@Param("category") String category, @Param("devicePixel") String devicePixel);
+
+ /**
+ * 新增情报板模板
+ *
+ * @param iotBoardTemplate 情报板模板
+ * @return 结果
+ */
+ public int insertSdVmsTemplate(IotBoardTemplate iotBoardTemplate);
+
+ /**
+ * 修改情报板模板
+ *
+ * @param iotBoardTemplate 情报板模板
+ * @return 结果
+ */
+ public int updateSdVmsTemplate(IotBoardTemplate iotBoardTemplate);
+
+ /**
+ * 删除情报板模板
+ *
+ * @param id 情报板模板ID
+ * @return 结果
+ */
+ public int deleteSdVmsTemplateById(Long id);
+
+ /**
+ * 批量删除情报板模板
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteSdVmsTemplateByIds(Long[] ids);
+
+ public Long selectSdVmsTemplateId();
+
+}
diff --git a/ruoyi-system/src/main/java/com/zc/service/IIotBoardTemplateContentService.java b/ruoyi-system/src/main/java/com/zc/service/IIotBoardTemplateContentService.java
new file mode 100644
index 00000000..1a54cc5b
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/service/IIotBoardTemplateContentService.java
@@ -0,0 +1,62 @@
+package com.zc.service;
+
+import com.alibaba.fastjson.JSONObject;
+import com.zc.domain.IotBoardTemplateContent;
+
+import java.util.List;
+
+/**
+ * 发布模板内容Service接口
+ *
+ * @author ruoyi
+ * @date 2022-03-22
+ */
+public interface IIotBoardTemplateContentService {
+ /**
+ * 查询发布模板内容
+ *
+ * @param id 发布模板内容主键
+ * @return 发布模板内容
+ */
+ IotBoardTemplateContent selectSdVmsTemplateContentById(Long id);
+
+ /**
+ * 查询发布模板内容列表
+ *
+ * @param iotBoardTemplateContent 发布模板内容
+ * @return 发布模板内容集合
+ */
+ List selectSdVmsTemplateContentList(IotBoardTemplateContent iotBoardTemplateContent);
+
+ /**
+ * 新增发布模板内容
+ *
+ * @param sdVmsTemplateContent 发布模板内容
+ * @return 结果
+ */
+ int insertSdVmsTemplateContent(JSONObject jsonObject);
+
+ /**
+ * 修改发布模板内容
+ *
+ * @param jsonObject 发布模板内容
+ * @return 结果
+ */
+ int updateSdVmsTemplateContent(JSONObject jsonObject);
+
+ /**
+ * 批量删除发布模板内容
+ *
+ * @param ids 需要删除的发布模板内容主键集合
+ * @return 结果
+ */
+ int deleteSdVmsTemplateContentByIds(Long[] ids);
+
+ /**
+ * 删除发布模板内容信息
+ *
+ * @param id 发布模板内容主键
+ * @return 结果
+ */
+ int deleteSdVmsTemplateContentById(Long id);
+}
diff --git a/ruoyi-system/src/main/java/com/zc/service/IIotBoardTemplateService.java b/ruoyi-system/src/main/java/com/zc/service/IIotBoardTemplateService.java
new file mode 100644
index 00000000..c2eca680
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/service/IIotBoardTemplateService.java
@@ -0,0 +1,43 @@
+package com.zc.service;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.zc.domain.IotBoardTemplate;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 情报板模板Service接口
+ *
+ * @author 刘方堃
+ * @date 2021-11-30
+ */
+public interface IIotBoardTemplateService {
+
+ Map> getAllVmsTemplate(String category, String devicePixel);
+
+ /**
+ * 新增情报板模板
+ *
+ * @param jsonObject 情报板模板
+ * @return 结果
+ */
+ Long insertSdVmsTemplate(JSONObject jsonObject);
+
+ /**
+ * 修改情报板模板
+ *
+ * @param jsonObject 情报板模板
+ * @return 结果
+ */
+ int updateSdVmsTemplate(JSONObject jsonObject);
+
+ /**
+ * 批量删除情报板模板
+ *
+ * @param ids 需要删除的情报板模板ID
+ * @return 结果
+ */
+ int deleteSdVmsTemplateByIds(Long[] ids);
+}
diff --git a/ruoyi-system/src/main/java/com/zc/service/impl/IotBoardTemplateContentServiceImpl.java b/ruoyi-system/src/main/java/com/zc/service/impl/IotBoardTemplateContentServiceImpl.java
new file mode 100644
index 00000000..14933583
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/service/impl/IotBoardTemplateContentServiceImpl.java
@@ -0,0 +1,178 @@
+package com.zc.service.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.common.utils.StringUtils;
+import com.zc.domain.IotBoardTemplateContent;
+import com.zc.mapper.IotBoardTemplateContentMapper;
+import com.zc.service.IIotBoardTemplateContentService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 发布模板内容Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-03-22
+ */
+@Service
+public class IotBoardTemplateContentServiceImpl implements IIotBoardTemplateContentService {
+ @Autowired
+ private IotBoardTemplateContentMapper iotBoardTemplateContentMapper;
+
+ /**
+ * 查询发布模板内容
+ *
+ * @param id 发布模板内容主键
+ * @return 发布模板内容
+ */
+ @Override
+ public IotBoardTemplateContent selectSdVmsTemplateContentById(Long id) {
+ return iotBoardTemplateContentMapper.selectSdVmsTemplateContentById(id);
+ }
+
+ /**
+ * 查询发布模板内容列表
+ *
+ * @param iotBoardTemplateContent 发布模板内容
+ * @return 发布模板内容
+ */
+ @Override
+ public List selectSdVmsTemplateContentList(IotBoardTemplateContent iotBoardTemplateContent) {
+ return iotBoardTemplateContentMapper.selectSdVmsTemplateContentList(iotBoardTemplateContent);
+ }
+
+ /**
+ * 新增发布模板内容
+ *
+ * @param jsonObject 发布模板内容
+ * @return 结果
+ */
+ @Override
+ public int insertSdVmsTemplateContent(JSONObject jsonObject) {
+ if (!jsonObject.isEmpty()) {
+ String templateId = jsonObject.getJSONObject("templateId").get("data").toString();
+ JSONArray templateContent = jsonObject.getJSONArray("templateContent");
+ Boolean flag = false;
+// List iotBoardVocabularies = iotBoardVocabularyService.selectIotBoardVocabularyList(null);
+ if (templateContent.size() > 0) {
+ int count = 0;
+ for (int i = 0; i < templateContent.size(); i++) {
+ JSONObject tempContent = templateContent.getJSONObject(i);
+ IotBoardTemplateContent iotBoardTemplateContent = new IotBoardTemplateContent();
+ iotBoardTemplateContent.setTemplateId(templateId);
+ String content = tempContent.get("content").toString();
+ String word = "";
+ /*for (int g = 0;g < iotBoardVocabularies.size();g++) {
+ word = iotBoardVocabularies.get(i).getWord();
+ if (!word.equals("") && content.contains(word)) {
+ flag = true;
+ content = content.replaceAll(word, "");
+// break;
+ }
+ }*/
+ if (flag) {
+ content = content.replaceAll(word, "");
+ }
+ iotBoardTemplateContent.setContent(content);
+ iotBoardTemplateContent.setCoordinate(tempContent.get("coordinate").toString());
+ iotBoardTemplateContent.setFontColor(tempContent.get("fontColor").toString());
+ iotBoardTemplateContent.setFontSize(Long.parseLong(tempContent.get("fontSize").toString()));
+ iotBoardTemplateContent.setFontType(tempContent.get("fontType").toString());
+ iotBoardTemplateContent.setFontSpacing(Long.parseLong(tempContent.get("fontSpacing").toString()));
+ /* iotBoardTemplateContent.setImageUrl(tempContent.get("img").toString());*/
+ iotBoardTemplateContentMapper.insertSdVmsTemplateContent(iotBoardTemplateContent);
+ count++;
+ }
+ return count;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * 修改发布模板内容
+ *
+ * @param jsonObject 发布模板内容
+ * @return 结果
+ */
+ @Override
+ public int updateSdVmsTemplateContent(JSONObject jsonObject) {
+ if (!jsonObject.isEmpty()) {
+ String templateId = jsonObject.get("templateId").toString();
+ JSONArray templateContent = jsonObject.getJSONArray("templateContent");
+ JSONArray templateDelContent = jsonObject.getJSONArray("templateDelContent");
+ if(templateDelContent.size() > 0){
+ for(int i = 0; i < templateDelContent.size(); i++){
+ JSONObject jsonObject1 = templateDelContent.getJSONObject(i);
+ iotBoardTemplateContentMapper.deleteSdVmsTemplateContentById(Long.valueOf(jsonObject1.get("id").toString()));
+ }
+ }
+ if (templateContent.size() > 0) {
+ int count = 0;
+ Boolean flag = false;
+// List iotBoardVocabularies = iotBoardVocabularyService.selectIotBoardVocabularyList(null);
+ for (int i = 0; i < templateContent.size(); i++) {
+ JSONObject tempContent = templateContent.getJSONObject(i);
+ IotBoardTemplateContent iotBoardTemplateContent = new IotBoardTemplateContent();
+ iotBoardTemplateContent.setTemplateId(templateId);
+ String content = tempContent.get("content").toString();
+ String word = "";
+ /*for (int g = 0;g < iotBoardVocabularies.size();g++) {
+ word = iotBoardVocabularies.get(i).getWord();
+ if (!word.equals("") && content.contains(word)) {
+ flag = true;
+ break;
+ }
+ }*/
+ if (flag) {
+ content = content.replaceAll(word, "");
+ }
+ iotBoardTemplateContent.setContent(content);
+ iotBoardTemplateContent.setCoordinate(tempContent.get("coordinate").toString());
+ iotBoardTemplateContent.setFontColor(tempContent.get("fontColor").toString());
+ iotBoardTemplateContent.setFontSize(Long.parseLong(tempContent.get("fontSize").toString()));
+ iotBoardTemplateContent.setFontType(tempContent.get("fontType").toString());
+ iotBoardTemplateContent.setFontSpacing(Long.parseLong(tempContent.get("fontSpacing").toString()));
+ /* if(tempContent.containsKey("img") && tempContent.get("img") != null){
+ iotBoardTemplateContent.setImageUrl(tempContent.get("img").toString());
+ }*/
+ Object id = tempContent.get("id");
+ if(StringUtils.isNotNull(id)){
+ iotBoardTemplateContent.setId(Long.parseLong(tempContent.get("id").toString()));
+ iotBoardTemplateContentMapper.updateSdVmsTemplateContent(iotBoardTemplateContent);
+ }else {
+ iotBoardTemplateContentMapper.insertSdVmsTemplateContent(iotBoardTemplateContent);
+ }
+ count++;
+ }
+ return count;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * 批量删除发布模板内容
+ *
+ * @param ids 需要删除的发布模板内容主键
+ * @return 结果
+ */
+ @Override
+ public int deleteSdVmsTemplateContentByIds(Long[] ids) {
+ return iotBoardTemplateContentMapper.deleteSdVmsTemplateContentByIds(ids);
+ }
+
+ /**
+ * 删除发布模板内容信息
+ *
+ * @param id 发布模板内容主键
+ * @return 结果
+ */
+ @Override
+ public int deleteSdVmsTemplateContentById(Long id) {
+ return iotBoardTemplateContentMapper.deleteSdVmsTemplateContentById(id);
+ }
+}
diff --git a/ruoyi-system/src/main/java/com/zc/service/impl/IotBoardTemplateServiceImpl.java b/ruoyi-system/src/main/java/com/zc/service/impl/IotBoardTemplateServiceImpl.java
new file mode 100644
index 00000000..d6e6ec9c
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/zc/service/impl/IotBoardTemplateServiceImpl.java
@@ -0,0 +1,155 @@
+package com.zc.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.common.core.domain.entity.SysDictData;
+import com.ruoyi.system.service.ISysDictDataService;
+import com.zc.domain.IotBoardTemplate;
+import com.zc.domain.IotBoardTemplateContent;
+import com.zc.mapper.IotBoardTemplateContentMapper;
+import com.zc.mapper.IotBoardTemplateMapper;
+import com.zc.service.IIotBoardTemplateService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 情报板模板Service业务层处理
+ *
+ * @author 刘方堃
+ * @date 2021-11-30
+ */
+@Service
+public class IotBoardTemplateServiceImpl implements IIotBoardTemplateService {
+ @Autowired
+ private IotBoardTemplateMapper iotBoardTemplateMapper;
+
+ @Autowired
+ private IotBoardTemplateContentMapper iotBoardTemplateContentMapper;
+
+ @Autowired
+ private ISysDictDataService sysDictDataService;
+
+
+
+ @Override
+ public Map> getAllVmsTemplate(String category, String devicePixel) {
+ Map> map = new HashMap<>();
+ List categorys = sysDictDataService.getSysDictDataByDictType("iot_template_category");
+ List iotBoardTemplates = iotBoardTemplateMapper.selectTemplateList(null, devicePixel);
+ List iotBoardTemplateContents = iotBoardTemplateContentMapper.selectSdVmsTemplateContentList(null);
+ List contents = new ArrayList<>();
+ List template = new ArrayList<>();
+ if (!categorys.isEmpty()) {
+ for (int i = 0;i < categorys.size();i++) {
+ template = new ArrayList<>();
+ String dictValue = categorys.get(i).getDictValue();
+ for (int j = 0; j < iotBoardTemplates.size(); j++) {
+ contents = new ArrayList<>();
+ IotBoardTemplate iotBoardTemplate = iotBoardTemplates.get(j);
+ if (!dictValue.equals(iotBoardTemplate.getCategory())) {
+ continue;
+ }
+ Long id = iotBoardTemplate.getId();
+ for (int z = 0; z < iotBoardTemplateContents.size(); z++) {
+ IotBoardTemplateContent iotBoardTemplateContent = iotBoardTemplateContents.get(z);
+ if (iotBoardTemplateContent.getTemplateId().equals("") || iotBoardTemplateContent.getTemplateId() == null) {
+ continue;
+ }
+ Long templateId = Long.parseLong(iotBoardTemplateContent.getTemplateId());
+ if (id.longValue() == templateId.longValue()) {
+ contents.add(iotBoardTemplateContent);
+ }
+ }
+ if (contents.isEmpty()) {
+ continue;
+ }
+ iotBoardTemplate.setTcontents(contents);
+ template.add(iotBoardTemplate);
+ }
+ map.put(dictValue, template);
+ }
+ }
+ return map;
+ }
+
+ /**
+ * 新增情报板模板
+ *
+ * @param jsonObject 情报板模板
+ * @return 结果
+ */
+ @Override
+ public Long insertSdVmsTemplate(JSONObject jsonObject) {
+// Map templatesMap = new HashMap<>();
+// for (Map.Entry entry : templatesMap.entrySet()) {
+// templatesMap.put(entry.getKey(), entry.getValue());
+// }
+ IotBoardTemplate iotBoardTemplate = new IotBoardTemplate();
+ iotBoardTemplate.setScreenSize(jsonObject.get("screenSize").toString());
+ iotBoardTemplate.setInScreenMode(jsonObject.get("inScreenMode").toString());
+// sdVmsTemplate.setRollSpeed(Long.parseLong(jsonObject.get("rollSpeed").toString()));
+ iotBoardTemplate.setStopTime(Long.parseLong(jsonObject.get("stopTime").toString()));
+ iotBoardTemplate.setApplyType(jsonObject.get("applyType").toString());
+ if (jsonObject.get("category") == null || jsonObject.get("category").toString().equals("")) {
+ throw new RuntimeException("情报板所属类别不能为空");
+ }
+ iotBoardTemplate.setCategory(jsonObject.get("category").toString());
+ /* sdVmsTemplate.setIsCurrency(Integer.parseInt(jsonObject.get("isCurrency").toString()));
+ sdVmsTemplate.setTemplateType(Integer.parseInt(jsonObject.get("templateType").toString()));*/
+ iotBoardTemplate.setVmsType(jsonObject.get("vmsType").toString());
+ iotBoardTemplate.setRemark(jsonObject.get("remark").toString());
+ int template = iotBoardTemplateMapper.insertSdVmsTemplate(iotBoardTemplate);
+ if (template > 0) {
+ Long id = iotBoardTemplateMapper.selectSdVmsTemplateId();
+ return id;
+ }
+ return -1L;
+ }
+
+ /**
+ * 修改情报板模板
+ *
+ * @param templatesMap 情报板模板
+ * @return 结果
+ */
+ @Override
+ public int updateSdVmsTemplate(JSONObject templatesMap) {
+ IotBoardTemplate iotBoardTemplate = new IotBoardTemplate();
+ iotBoardTemplate.setScreenSize(templatesMap.get("screenSize").toString());
+ iotBoardTemplate.setInScreenMode(templatesMap.get("inScreenMode").toString());
+// sdVmsTemplate.setRollSpeed(Long.parseLong(templatesMap.get("rollSpeed").toString()));
+ iotBoardTemplate.setStopTime(Long.parseLong(templatesMap.get("stopTime").toString()));
+ iotBoardTemplate.setApplyType(templatesMap.get("applyType").toString());
+ if (templatesMap.get("category") == null || templatesMap.get("category").toString().equals("")) {
+ throw new RuntimeException("情报板所属类别不能为空");
+ }
+ iotBoardTemplate.setCategory(templatesMap.get("category").toString());
+ /* sdVmsTemplate.setIsCurrency(Integer.parseInt(templatesMap.get("isCurrency").toString()));
+ sdVmsTemplate.setTemplateType(Integer.parseInt(templatesMap.get("templateType").toString()));*/
+ iotBoardTemplate.setVmsType(templatesMap.get("vmsType").toString());
+ iotBoardTemplate.setId(Long.valueOf(templatesMap.get("id").toString()));
+ iotBoardTemplate.setRemark(templatesMap.get("remark").toString());
+ return iotBoardTemplateMapper.updateSdVmsTemplate(iotBoardTemplate);
+ }
+
+ /**
+ * 批量删除情报板模板
+ *
+ * @param ids 需要删除的情报板模板ID
+ * @return 结果
+ */
+ @Override
+ public int deleteSdVmsTemplateByIds(Long[] ids) {
+ for (int i = 0; i < ids.length; i++) {
+ Long templateId = ids[i];
+ //获取要删除的ID后先删除模板内容数据
+ iotBoardTemplateContentMapper.deleteContentByTemplateId(templateId.toString());
+ }
+ return iotBoardTemplateMapper.deleteSdVmsTemplateByIds(ids);
+ }
+
+}
diff --git a/ruoyi-system/src/main/resources/mapper/system/IotBoardTemplateContentMapper.xml b/ruoyi-system/src/main/resources/mapper/system/IotBoardTemplateContentMapper.xml
new file mode 100644
index 00000000..a423782a
--- /dev/null
+++ b/ruoyi-system/src/main/resources/mapper/system/IotBoardTemplateContentMapper.xml
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select id, template_id, content, font_color, font_size, font_type, font_spacing, coordinate, image_url, height, width from iot_board_template_content
+
+
+
+
+
+
+
+ insert into iot_board_template_content
+
+ template_id,
+ content,
+ font_color,
+ font_size,
+ font_type,
+ font_spacing,
+ coordinate,
+ image_url,
+ height,
+ width,
+
+
+ #{templateId},
+ #{content},
+ #{fontColor},
+ #{fontSize},
+ #{fontType},
+ #{fontSpacing},
+ #{coordinate},
+ #{imageUrl},
+ #{height},
+ #{width},
+
+
+
+
+ update iot_board_template_content
+
+ template_id = #{templateId},
+ content = #{content},
+ font_color = #{fontColor},
+ font_size = #{fontSize},
+ font_type = #{fontType},
+ font_spacing = #{fontSpacing},
+ coordinate = #{coordinate},
+ image_url = #{imageUrl},
+ height = #{height},
+ width = #{width},
+
+ where id = #{id}
+
+
+
+ delete from iot_board_template_content where id = #{id}
+
+
+
+ delete from iot_board_template_content where id in
+
+ #{id}
+
+
+
+
+ delete from iot_board_template_content where template_id = #{templateId}
+
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/IotBoardTemplateMapper.xml b/ruoyi-system/src/main/resources/mapper/system/IotBoardTemplateMapper.xml
new file mode 100644
index 00000000..f4efd1b0
--- /dev/null
+++ b/ruoyi-system/src/main/resources/mapper/system/IotBoardTemplateMapper.xml
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select a.id, a.screen_size, a.in_screen_mode, a.roll_speed, a.stop_time, a.apply_type, a.is_currency,
+ a.template_type, a.vms_type, a.remark, b.id, b.template_id, b.content, b.font_color, b.font_size,
+ b.font_type, b.font_spacing, b.coordinate, b.image_url, b.height, b.width, a.category, c.dict_label,d.dict_label screenMode
+ from iot_board_template a
+ left join iot_board_template_content b on a.id = b.template_id
+ left join sys_dict_data c on c.dict_type = "iot_template_category" and a.category = c.dict_value
+ left join sys_dict_data d on d.dict_type = "iot_device_font_inScreen_mode" and a.in_screen_mode = d.dict_value
+
+
+
+
+
+
+
+
+
+ insert into iot_board_template
+
+ screen_size,
+ in_screen_mode,
+ roll_speed,
+ stop_time,
+ apply_type,
+ is_currency,
+ template_type,
+ vms_type,
+ remark,
+ category,
+
+
+ #{screenSize},
+ #{inScreenMode},
+ #{rollSpeed},
+ #{stopTime},
+ #{applyType},
+ #{isCurrency},
+ #{templateType},
+ #{vmsType},
+ #{remark},
+ #{category},
+
+
+
+
+ update iot_board_template
+
+ screen_size = #{screenSize},
+ in_screen_mode = #{inScreenMode},
+ roll_speed = #{rollSpeed},
+ stop_time = #{stopTime},
+ apply_type = #{applyType},
+ is_currency = #{isCurrency},
+ vms_type = #{vmsType},
+ remark = #{remark},
+ category = #{category},
+
+ where id = #{id}
+
+
+
+ delete from iot_board_template where id = #{id}
+
+
+
+ delete from iot_board_template where id in
+
+ #{id}
+
+
+
+
+
+
+
+
+
diff --git a/ruoyi-ui/src/views/information/board/addinfo.vue b/ruoyi-ui/src/views/information/board/addinfo.vue
index 5ca0c4b8..b9243130 100644
--- a/ruoyi-ui/src/views/information/board/addinfo.vue
+++ b/ruoyi-ui/src/views/information/board/addinfo.vue
@@ -539,7 +539,7 @@ export default {
return this.$modal.msgError('情报板所属类别不能为空')
}
//走接口检验内容是否包含敏感字段
- checkIotBoardContent(this.dataForm.CONTENT).then(response => {
+ /*checkIotBoardContent(this.dataForm.CONTENT).then(response => {
if (response.data == 0) {
return this.$modal.msgError('当前发布内容包含敏感字段,请修改')
} else if (response.data == 2) {
@@ -620,7 +620,82 @@ export default {
var textBoard2 = document.getElementsByClassName('textBoard2')
textBoard2[0].style.position = 'absolute'
}
- })
+ })*/
+
+ this.loading = true
+ // let templateId = "";
+ let method = 'put'
+ if (this.isAdd) {
+ if (this.infoType == 1) {
+ // 不走接口 存到待下发信息里
+ this.dataForm.STAY = Number(this.dataForm.STAY) * 100
+ this.$emit('addInfo', this.dataForm)
+ } else {
+ // 走接口 存到信息模板里
+ const params1 = {
+ applyType: '',
+ category: this.dataForm.category,
+ coordinate: '',
+ height: '',
+ id: '',
+ imageUrl: '',
+ imgSizeFrom: '',
+ inScreenMode: this.dataForm.ACTION,
+ remark: '',
+ screenSize: this.dataForm.screenSize,
+ stopTime: Number(this.dataForm.STAY) * 100,
+ vmsType: '',
+ width: ''
+ }
+ const templateContent = []
+ templateContent.push({
+ content: this.dataForm.CONTENT,
+ coordinate: this.dataForm.COORDINATE,
+ fontColor: this.getColorStyle(this.dataForm.COLOR),
+ fontSize: this.dataForm.FONT_SIZE.substring(0, 2),
+ fontSpacing: this.dataForm.SPEED,
+ fontType: this.getFontStyle(this.dataForm.FONT)
+ })
+ // this.$emit("addInfoMode", this.dataForm);
+ addTemplate(params1, method).then(data => {
+ console.log(data, '新增口')
+ let params2 = {
+ templateContent: templateContent,
+ templateId: data
+ }
+ addTemplateContent(params2)
+ .then(res => {
+ if (res.code == 200) {
+ this.$emit('getActiveNames')
+ this.$message.success('添加成功')
+ }
+ })
+ .catch(err => {
+ throw err
+ })
+ })
+ }
+ } else {
+ // // 修改
+ // editTemplate(this.dataForm).then((data) => {});
+ // this.templateContent.forEach((e) => {
+ // e.img = e.imageName;
+ // });
+ // var params = {
+ // templateContent: this.templateContent,
+ // templateId: this.dataForm.id,
+ // templateDelContent: this.templateDelContent,
+ // };
+ // editTemplateContent(params).then((response) => {
+ // // console.log(response, "返回结果");
+ // });
+ }
+ this.loading = false
+ this.dialogVisible = false
+ this.isAdd = false
+ this.$emit('refreshDataList', this.dataForm)
+ var textBoard2 = document.getElementsByClassName('textBoard2')
+ textBoard2[0].style.position = 'absolute'
},
/*********************************************业务代码***********************************************/
getFontStyle(font) {
diff --git a/ruoyi-ui/src/views/information/board/editInfo.vue b/ruoyi-ui/src/views/information/board/editInfo.vue
index 103eca03..f1179164 100644
--- a/ruoyi-ui/src/views/information/board/editInfo.vue
+++ b/ruoyi-ui/src/views/information/board/editInfo.vue
@@ -586,7 +586,87 @@ export default {
if (!this.dataForm.CONTENT.trim()) {
return this.$modal.msgError('当前输入内容为空')
}
- checkIotBoardContent(this.dataForm.CONTENT).then(response => {
+ this.loading = true
+ console.log(this.dataForm, '点击修改 表单')
+
+ this.loading = false
+ this.isAdd = false
+ if (this.dataForm.type == 1) {
+ this.dataForm.STAY = Number(this.dataForm.STAY) * 100
+ this.$emit('receiveForm', this.dataForm)
+ console.log(this.dataForm, 'this.dataForm修改后给父组件传表单内容')
+ } else {
+ const tcontent = {
+ content: this.dataForm.CONTENT,
+ text: this.dataForm.CONTENT,
+ coordinate: this.dataForm.COORDINATE,
+ createBy: null,
+ createTime: null,
+ fontColor: this.dataForm.COLOR,
+ fontSize: this.dataForm.FONT_SIZE.substring(0, 2),
+ fontSpacing: this.dataForm.SPEED,
+ fontType: this.dataForm.FONT,
+ height: null,
+ id: this.dataForm.id,
+ imageUrl: null,
+ params: {},
+ remark: null,
+ searchValue: null,
+ templateId: this.dataForm.id,
+ updateBy: null,
+ updateTime: null,
+ width: null
+ }
+ const param = {
+ applyType: '',
+ category: this.dataForm.category,
+ createBy: null,
+ createTime: null,
+ dictLable: null,
+ id: this.dataForm.id,
+ inScreenMode: this.dataForm.ACTION,
+ isCurrency: null,
+ params: {},
+ remark: '',
+ screenSize: this.dataForm.screenSize,
+ searchValue: null,
+ stopTime: Number(this.dataForm.STAY) * 100,
+ tcontents: null,
+ templateType: null,
+ updateBy: null,
+ updateTime: null,
+ vmsType: '',
+ tcontent: tcontent,
+ templateId: this.dataForm.id
+ }
+ editTemplate(param).then(data => {})
+ let templateContent = []
+ templateContent.push({
+ content: this.dataForm.CONTENT,
+ fontColor: this.dataForm.COLOR,
+ fontSize: this.dataForm.FONT_SIZE.substring(0, 2),
+ fontType: this.dataForm.FONT,
+ fontSpacing: this.dataForm.SPEED,
+ coordinate: this.dataForm.COORDINATE,
+ id: this.dataForm.tcontentsId,
+ templateId: this.dataForm.id
+ })
+
+ var params = {
+ templateContent: templateContent,
+ templateId: this.dataForm.id,
+ templateDelContent: []
+ }
+ console.log(params, 'params')
+ editTemplateContent(params).then(response => {
+ console.log(response, '返回结果')
+ this.$modal.msgSuccess('修改成功')
+ })
+ this.$forceUpdate()
+ }
+ this.closeDialog()
+
+ /*checkIotBoardContent(this.dataForm.CONTENT).then(response => {
if (response.data == 0) {
return this.$modal.msgError('当前发布内容包含敏感字段,请修改')
} else if (response.data == 2) {
@@ -672,7 +752,7 @@ export default {
}
this.closeDialog()
}
- })
+ })*/
},
getFontStyle(font) {
if (font == '宋体') {
diff --git a/ruoyi-ui/src/views/information/board/index.vue b/ruoyi-ui/src/views/information/board/index.vue
index 8f50e690..c587378c 100644
--- a/ruoyi-ui/src/views/information/board/index.vue
+++ b/ruoyi-ui/src/views/information/board/index.vue
@@ -1271,7 +1271,7 @@
devicePixel: this.form.devicePixel,
};
//TODO 测试数据 需删除走接口
- let data = []
+ /*let data = []
if( this.form.devicePixel == '768*64'){
data = {
"0": [
@@ -3122,10 +3122,10 @@
if (type != "no") {
this.activeNames = jArr;
}
- this.$forceUpdate();
+ this.$forceUpdate();*/
//TODO 接口
- /*getAllVmsTemplate(param).then((res) => {
+ getAllVmsTemplate(param).then((res) => {
let data = res.data;
console.log(res, "情报板管理右侧查询接口");
let jArr = [];
@@ -3141,7 +3141,7 @@
}
this.$forceUpdate();
console.log(this.iotTemplateCategoryList, "新模板");
- });*/
+ });
},
// 删除中间模板
@@ -3320,20 +3320,20 @@
// 转报文 字体
getFontValue(font) {
- if (font == "黑体" || font == "SimHei") return "h";
- if (font == "楷体" || font == "KaiTi") return "k";
- if (font == "仿宋" || font == "FangSong") return "f";
- if (font == "隶书" || font == "LiSu") return "l";
- else return "s";
+ if (font == "黑体" || font == "SimHei") return "1";
+ if (font == "楷体" || font == "KaiTi") return "2";
+ if (font == "仿宋" || font == "FangSong") return "4";
+ if (font == "隶书" || font == "LiSu") return "5";
+ else return "3"; //宋体
},
// 转报文 色号
getColorValue(color) {
- if (color == "蓝色" || color == "blue") return "000000255000";
- if (color == "绿色" || color == "#00FF00" || color == "GreenYellow") return "000255000000";
- if (color == "透明色") return "t";
- if (color == "红色" || color == "red") return "255000000000";
- return "255255000000"; //黄色
+ if (color == "蓝色" || color == "blue") return "0000FF";
+ if (color == "绿色" || color == "#00FF00" || color == "GreenYellow") return "00FF00";
+ if (color == "红色" || color == "red") return "FF0000";
+ if (color == "黄色" || color == "yellow") return "FFFF00";
+ return "FFFFFF"; //白色
},
// 向内容显示区域添加一条信息