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 + +