From 89cdad921246815919d1e4b5fa2a2d01e9dc96ce Mon Sep 17 00:00:00 2001 From: gongjiale <942894820@qq.com> Date: Mon, 2 Dec 2024 17:37:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E9=AA=8C=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/task/EquTask.java | 4 ++-- .../com/ruoyi/framework/aspectj/DataScopeAspect.java | 4 +++- .../com/ruoyi/project/oil/mapper/OilMonitorMapper.java | 4 ++-- .../ruoyi/project/oil/service/IOilMonitorService.java | 2 +- .../src/main/resources/mybatis/oil/HomeMapper.xml | 2 +- .../main/resources/mybatis/system/SysDeptMapper.xml | 7 ++++++- .../main/resources/mybatis/system/SysUserMapper.xml | 9 ++++++++- ruoyi-ui/src/views/demostrate/alarm/sendMsg.vue | 10 +--------- ruoyi-ui/src/views/remoteControl/bound/msg-dialog.vue | 10 +--------- 9 files changed, 25 insertions(+), 27 deletions(-) diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/common/task/EquTask.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/common/task/EquTask.java index 8ae2a85..6f4d45b 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/common/task/EquTask.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/common/task/EquTask.java @@ -36,7 +36,7 @@ public class EquTask { /** * 港口原有设备对接 */ - @Scheduled(fixedRate = 100000) + @Scheduled(fixedRate = 3600) public void equ(){ String hash = "16EA8A305FB58BE0730DD67F04F022F4"; @@ -48,7 +48,7 @@ public class EquTask { JSONObject dataByJson = tokenByJson.getJSONObject("data"); String token = dataByJson.getString("token"); ThDevice thDevice = new ThDevice(); - thDevice.setDeptId(5l); + // thDevice.setDeptId(5l); List equLists = thDeviceMapper.selectDeviceList(thDevice); equLists.forEach(e->{ HashMap map = new HashMap<>(); diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java index 8138fea..b65f303 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java @@ -135,7 +135,9 @@ public class DataScopeAspect } else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope)) { - sqlString.append(StringUtils.format(" {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or FIND_IN_SET ( {} ,ancestors ) <> 0 )", deptAlias, user.getDeptId(), user.getDeptId())); + sqlString.append(StringUtils.format(" {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} OR INSTR(',' || ancestors || ',', ',' || {} || ',') > 0 )", deptAlias, user.getDeptId(), user.getDeptId())); + + // sqlString.append(StringUtils.format(" {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or FIND_IN_SET ( {} ,ancestors ) <> 0 )", deptAlias, user.getDeptId(), user.getDeptId())); } else if (DATA_SCOPE_SELF.equals(dataScope)) { diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/mapper/OilMonitorMapper.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/mapper/OilMonitorMapper.java index 6e988b6..696b47e 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/mapper/OilMonitorMapper.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/mapper/OilMonitorMapper.java @@ -36,9 +36,9 @@ public interface OilMonitorMapper { /** * 删除 - * @param ids + * @param id */ - void deleteOilMonitorByIds(@Param("ids") Long ids); + void deleteOilMonitorByIds(@Param("id") Long id); /** * 获取检测地图 diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/IOilMonitorService.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/IOilMonitorService.java index 1108416..bee0d78 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/IOilMonitorService.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/IOilMonitorService.java @@ -18,7 +18,7 @@ public interface IOilMonitorService { int updateOilMonitor(OilMonitor oilMonitor); - int deleteOilMonitorByIds(Long ids); + int deleteOilMonitorByIds(Long id); /** * 查询检测设备地图列表 diff --git a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/HomeMapper.xml b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/HomeMapper.xml index 2dff2cb..1097df9 100644 --- a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/HomeMapper.xml +++ b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/HomeMapper.xml @@ -73,7 +73,7 @@ WHERE d.dept_id IN (SELECT dept_id FROM sys_dept START WITH dept_id = #{deptId} CONNECT BY PRIOR dept_id = parent_id)) - AND r.REPORT_TIME = TO_DATE(#{date}, 'YYYY-MM-DD') + AND TRUNC(r.REPORT_TIME) = TO_DATE(#{date}, 'YYYY-MM-DD') group by dp.dept_name \ No newline at end of file diff --git a/RuoYi-Vue-Oracle/src/main/resources/mybatis/system/SysDeptMapper.xml b/RuoYi-Vue-Oracle/src/main/resources/mybatis/system/SysDeptMapper.xml index 3d642a4..9e5b440 100644 --- a/RuoYi-Vue-Oracle/src/main/resources/mybatis/system/SysDeptMapper.xml +++ b/RuoYi-Vue-Oracle/src/main/resources/mybatis/system/SysDeptMapper.xml @@ -80,7 +80,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"