From be99d7e3e0f74f0a282e3928a012755840c4d5c1 Mon Sep 17 00:00:00 2001 From: LokerL Date: Sun, 20 Oct 2024 13:38:57 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E8=BF=9C=E7=A8=8B=E8=B0=83?= =?UTF-8?q?=E5=BA=A6-=E5=8E=82=E7=95=8C=E5=9C=A8=E7=BA=BF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=89=8D=E5=90=8E=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oil/controller/OilDeviceController.java | 7 + .../project/oil/domain/monitor/ThDevice.java | 37 ++ .../project/oil/mapper/ThDeviceMapper.java | 7 + .../oil/service/IOilDeviceService.java | 4 + .../service/impl/OilDeviceServiceImpl.java | 14 + .../system/controller/SysDeptController.java | 3 + .../resources/mybatis/oil/ThDeviceMapper.xml | 48 +++ .../mybatis/oil/ThDeviceReportMapper.xml | 1 - ruoyi-ui/src/api/remoteControl/index.js | 9 + ruoyi-ui/src/components/DeptTree/index.vue | 2 +- ruoyi-ui/src/components/SendMsg/index.vue | 167 +++++++++ .../src/views/demostrate/alarm/sendMsg.vue | 313 ++++++++-------- .../src/views/home/components/UserSelect.vue | 352 ++++++++++-------- .../src/views/remoteControl/bound/index.vue | 218 ++++++++--- .../views/remoteControl/bound/msg-dialog.vue | 199 ++++++++++ 15 files changed, 1012 insertions(+), 369 deletions(-) create mode 100644 ruoyi-ui/src/api/remoteControl/index.js create mode 100644 ruoyi-ui/src/components/SendMsg/index.vue create mode 100644 ruoyi-ui/src/views/remoteControl/bound/msg-dialog.vue diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/controller/OilDeviceController.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/controller/OilDeviceController.java index 219a0c1..d12e667 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/controller/OilDeviceController.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/controller/OilDeviceController.java @@ -8,6 +8,7 @@ import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.project.oil.domain.OilDevice; import com.ruoyi.project.oil.domain.OilDeviceDetail; +import com.ruoyi.project.oil.domain.monitor.ThDevice; import com.ruoyi.project.oil.service.IOilDeviceService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -37,6 +38,12 @@ public class OilDeviceController extends BaseController { private IOilDeviceService oilDeviceService; + @GetMapping("/thList") + public TableDataInfo list(ThDevice thDevice) { + startPage(); + List list = oilDeviceService.selectDeviceList(thDevice); + return getDataTable(list); + } /** diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/monitor/ThDevice.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/monitor/ThDevice.java index ac17666..3962ad3 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/monitor/ThDevice.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/monitor/ThDevice.java @@ -140,6 +140,43 @@ public class ThDevice extends BaseEntity { this.gangqu = gangqu; } + private String p; + private String pp; + private String ppp; + private String bjyz; + + public String getP() { + return p; + } + + public void setP(String p) { + this.p = p; + } + + public String getPp() { + return pp; + } + + public void setPp(String pp) { + this.pp = pp; + } + + public String getPpp() { + return ppp; + } + + public void setPpp(String ppp) { + this.ppp = ppp; + } + + public String getBjyz() { + return bjyz; + } + + public void setBjyz(String bjyz) { + this.bjyz = bjyz; + } + /** * 单位 */ diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/mapper/ThDeviceMapper.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/mapper/ThDeviceMapper.java index 8198d55..62a594d 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/mapper/ThDeviceMapper.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/mapper/ThDeviceMapper.java @@ -21,6 +21,13 @@ public interface ThDeviceMapper { */ List selectAllDeviceListByDeptId(Long deptId); + /** + * 查询设备列表 + * @param thDevice 设备 + * @return 设备列表 + */ + List selectDeviceList(ThDevice thDevice); + } diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/IOilDeviceService.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/IOilDeviceService.java index 38a4af0..6cf9b6e 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/IOilDeviceService.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/IOilDeviceService.java @@ -2,6 +2,7 @@ package com.ruoyi.project.oil.service; import com.ruoyi.project.oil.domain.OilDevice; import com.ruoyi.project.oil.domain.OilDeviceDetail; +import com.ruoyi.project.oil.domain.monitor.ThDevice; import java.util.List; @@ -12,6 +13,9 @@ import java.util.List; * @date 2023-07-08 */ public interface IOilDeviceService { + + List selectDeviceList(ThDevice thDevice); + /** * 查询检测设备 * diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/impl/OilDeviceServiceImpl.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/impl/OilDeviceServiceImpl.java index 04b2667..cc3775d 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/impl/OilDeviceServiceImpl.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/impl/OilDeviceServiceImpl.java @@ -4,7 +4,9 @@ import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.framework.aspectj.lang.annotation.DataScope; import com.ruoyi.project.oil.domain.OilDevice; import com.ruoyi.project.oil.domain.OilDeviceDetail; +import com.ruoyi.project.oil.domain.monitor.ThDevice; import com.ruoyi.project.oil.mapper.OilDeviceMapper; +import com.ruoyi.project.oil.mapper.ThDeviceMapper; import com.ruoyi.project.oil.service.IOilDeviceService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -30,9 +32,21 @@ public class OilDeviceServiceImpl implements IOilDeviceService { @Autowired private OilDeviceMapper oilDeviceMapper; + @Autowired + private ThDeviceMapper thDeviceMapper; + @Autowired private JdbcTemplate jdbcTemplate; + /** + * 查询检测设备列表 + * + */ + @Override + public List selectDeviceList(ThDevice thDevice) { + return thDeviceMapper.selectDeviceList(thDevice); + } + /** * 查询检测设备 * diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/controller/SysDeptController.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/controller/SysDeptController.java index 30eee7d..93ef6fe 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/controller/SysDeptController.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/controller/SysDeptController.java @@ -1,6 +1,8 @@ package com.ruoyi.project.system.controller; import java.util.List; + +import com.ruoyi.framework.aspectj.lang.annotation.DataScope; import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; @@ -39,6 +41,7 @@ public class SysDeptController extends BaseController */ @PreAuthorize("@ss.hasPermi('system:dept:list')") @GetMapping("/list") + @DataScope(deptAlias="d", permission="4") public AjaxResult list(SysDept dept) { List depts = deptService.selectDeptList(dept); diff --git a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceMapper.xml b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceMapper.xml index 101c20b..f8d3dbf 100644 --- a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceMapper.xml +++ b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceMapper.xml @@ -3,6 +3,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + + + + @@ -20,7 +25,11 @@ + + + + @@ -45,6 +54,45 @@ left join sys_dept pp on p.parent_id = pp.dept_id + +