From 9568f7b59c05d3ac17efb54dc6b595d7373aa1ea Mon Sep 17 00:00:00 2001 From: gongjiale <942894820@qq.com> Date: Mon, 9 Sep 2024 17:22:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=AF=E5=8F=A3=E5=BC=80=E5=8F=91=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/oil/domain/monitor/ThDevice.java | 13 +++++++ .../oil/domain/monitor/ThDeviceReport.java | 34 +++++++++++++++++++ .../ruoyi/project/system/domain/SysDept.java | 14 ++++++++ .../service/impl/SysDeptServiceImpl.java | 4 +-- .../src/main/resources/application.yml | 2 ++ .../mybatis/oil/OilMonitorMapper.xml | 12 +++---- .../resources/mybatis/oil/ThDeviceMapper.xml | 5 ++- .../mybatis/system/SysDeptMapper.xml | 16 +++++---- .../views/dataStatistics/realtime/index.vue | 4 +-- .../dataStatistics/realtime/left-bottom.vue | 27 ++++++--------- .../dataStatistics/realtime/right-bottom.vue | 11 ++++-- .../dataStatistics/realtime/right-top.vue | 6 ++-- .../dataStatistics/realtime/search-bar.vue | 24 ++++++++----- ruoyi-ui/src/views/system/dept/index.vue | 6 ++++ 14 files changed, 129 insertions(+), 49 deletions(-) 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 e1debd4..ac17666 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 @@ -68,6 +68,11 @@ public class ThDevice extends BaseEntity { */ private String deptName; + /** + * 港区 + */ + private String gangqu; + /** * 经度 */ @@ -127,6 +132,14 @@ public class ThDevice extends BaseEntity { */ private BigDecimal ds; + public String getGangqu() { + return gangqu; + } + + public void setGangqu(String gangqu) { + this.gangqu = gangqu; + } + /** * 单位 */ diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/monitor/ThDeviceReport.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/monitor/ThDeviceReport.java index 48f2bc0..a9a6a93 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/monitor/ThDeviceReport.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/monitor/ThDeviceReport.java @@ -19,6 +19,14 @@ public class ThDeviceReport extends BaseEntity { * 设备sn码 */ private String sn; + /** + * 港区 + */ + private String gangqu; + + private String deptName; + + private Long deptId; /** * 上报时间 @@ -109,6 +117,32 @@ public class ThDeviceReport extends BaseEntity { return id; } + + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getGangqu() { + return gangqu; + } + + public void setGangqu(String gangqu) { + this.gangqu = gangqu; + } + public void setId(Long id) { this.id = id; } diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/domain/SysDept.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/domain/SysDept.java index e97e9e8..3f5a680 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/domain/SysDept.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/domain/SysDept.java @@ -30,6 +30,10 @@ public class SysDept extends BaseEntity /** 部门名称 */ private String deptName; + /** + * 层级 + */ + private String deptLevel; /** 显示顺序 */ private Integer orderNum; @@ -108,6 +112,14 @@ public class SysDept extends BaseEntity this.orderNum = orderNum; } + public String getDeptLevel() { + return deptLevel; + } + + public void setDeptLevel(String deptLevel) { + this.deptLevel = deptLevel; + } + public String getLeader() { return leader; @@ -141,6 +153,8 @@ public class SysDept extends BaseEntity this.email = email; } + + public String getStatus() { return status; diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/service/impl/SysDeptServiceImpl.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/service/impl/SysDeptServiceImpl.java index 2cca629..3d8feeb 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/service/impl/SysDeptServiceImpl.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/service/impl/SysDeptServiceImpl.java @@ -237,14 +237,14 @@ public class SysDeptServiceImpl implements ISysDeptService String newAncestors = newParentDept.getAncestors() + "," + newParentDept.getDeptId(); String oldAncestors = oldDept.getAncestors(); dept.setAncestors(newAncestors); - updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors); + // updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors); } int result = deptMapper.updateDept(dept); if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors()) && !StringUtils.equals("0", dept.getAncestors())) { // 如果该部门是启用状态,则启用该部门的所有上级部门 - updateParentDeptStatusNormal(dept); + // updateParentDeptStatusNormal(dept); } return result; } diff --git a/RuoYi-Vue-Oracle/src/main/resources/application.yml b/RuoYi-Vue-Oracle/src/main/resources/application.yml index 46dc514..a4859f4 100644 --- a/RuoYi-Vue-Oracle/src/main/resources/application.yml +++ b/RuoYi-Vue-Oracle/src/main/resources/application.yml @@ -74,11 +74,13 @@ spring: redis: # 地址 host: 192.168.31.105 + #host: 127.0.0.1 # 端口,默认为6379 port: 6379 # 数据库索引 database: 0 # 密码 + #password: 123456 password: admin123! # 连接超时时间 timeout: 10s diff --git a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/OilMonitorMapper.xml b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/OilMonitorMapper.xml index 6f87d78..a96ae9c 100644 --- a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/OilMonitorMapper.xml +++ b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/OilMonitorMapper.xml @@ -82,7 +82,6 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t.dept_id,d.dept_name,longitude,latitude from th_device t left join sys_dept d on t.dept_id=d.dept_id - t.status=1 and t.id=#{id} and t.name like concat('%', #{monitorName},'%') and t.sn= #{monitorNo} @@ -97,7 +96,7 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t insert into th_device - status, + name, sn, note, @@ -110,7 +109,6 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t latitude, - 1, #{monitorName}, #{monitorNo}, #{note}, @@ -141,10 +139,8 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t - update th_device - set status=0 - where id in - + delete from th_device where id in + #{id} @@ -428,7 +424,7 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t 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 a4d1407..812e296 100644 --- a/RuoYi-Vue-Oracle/src/main/resources/mybatis/system/SysDeptMapper.xml +++ b/RuoYi-Vue-Oracle/src/main/resources/mybatis/system/SysDeptMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -20,14 +20,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time + select d.dept_id,d.dept_level, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time from sys_dept d - where d.del_flag = '0' @@ -59,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + select seq_sys_dept.nextval as deptId from DUAL @@ -102,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" email, status, create_by, + dept_level, create_time )values( #{deptId}, @@ -114,11 +116,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{email}, #{status}, #{createBy}, + #{deptLevel}, sysdate ) - + update sys_dept parent_id = #{parentId}, @@ -130,6 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" email = #{email}, status = #{status}, update_by = #{updateBy}, + dept_level=#{deptLevel}, update_time = sysdate where dept_id = #{deptId} diff --git a/ruoyi-ui/src/views/dataStatistics/realtime/index.vue b/ruoyi-ui/src/views/dataStatistics/realtime/index.vue index fb04dca..12b7872 100644 --- a/ruoyi-ui/src/views/dataStatistics/realtime/index.vue +++ b/ruoyi-ui/src/views/dataStatistics/realtime/index.vue @@ -1,12 +1,12 @@ - + - - + + - + + + + 青岛港 + 日照港 + 烟台港 + 渤海湾港 + + + @@ -30,6 +33,7 @@ export default { }, data() { return { + // chooseDept:null, deptId: "", dateValue: [], normalizer(node) { @@ -59,6 +63,10 @@ export default { `${year}-${month}-${day} 23:59:59`, ]; }, + handleRadioDeptChange(value) { + this.deptId = value + this.emitChange(); + }, handleDeptChange(value) { this.deptId = value.deptId; this.emitChange(); diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/ruoyi-ui/src/views/system/dept/index.vue index e502b4e..6258275 100644 --- a/ruoyi-ui/src/views/system/dept/index.vue +++ b/ruoyi-ui/src/views/system/dept/index.vue @@ -58,6 +58,7 @@ > +