diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java index 84e085d0..def55cde 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java @@ -43,15 +43,15 @@ public class RyTask */ public void expiredTowerData() { - Calendar cal = Calendar.getInstance(); - Date date = new Date(); - cal.setTime(date); - cal.add(Calendar.DATE,-15); - String dateStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,cal.getTime()); - Long maxId = taskService.findTowerMaxIdByDate(dateStr); - if(maxId!=null){ - taskService.deleteDevTowerDataRunByMaxId(maxId); - } +// Calendar cal = Calendar.getInstance(); +// Date date = new Date(); +// cal.setTime(date); +// cal.add(Calendar.DATE,-15); +// String dateStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,cal.getTime()); +// Long maxId = taskService.findTowerMaxIdByDate(dateStr); +// if(maxId!=null){ + taskService.deleteDevTowerDataRunByMaxId(0L); +// } } /** diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/TaskMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/TaskMapper.xml index 25322924..69972013 100644 --- a/ruoyi-quartz/src/main/resources/mapper/quartz/TaskMapper.xml +++ b/ruoyi-quartz/src/main/resources/mapper/quartz/TaskMapper.xml @@ -150,7 +150,7 @@ - delete from dev_tower_data_run where id #{id} and + delete from dev_tower_data_run where create_time CURDATE() - INTERVAL 15 DAY; diff --git a/ruoyi-ui/public/favicon.ico b/ruoyi-ui/public/favicon.ico new file mode 100644 index 00000000..6113ef82 Binary files /dev/null and b/ruoyi-ui/public/favicon.ico differ diff --git a/ruoyi-ui/public/logo/logo.png b/ruoyi-ui/public/logo/logo.png index b94b5f3f..615ce899 100644 Binary files a/ruoyi-ui/public/logo/logo.png and b/ruoyi-ui/public/logo/logo.png differ diff --git a/ruoyi-ui/src/api/device/iotConfig.js b/ruoyi-ui/src/api/device/iotConfig.js new file mode 100644 index 00000000..734fc1ae --- /dev/null +++ b/ruoyi-ui/src/api/device/iotConfig.js @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +// 查询配电箱配置列表 +export function listIotConfig(query) { + return request({ + url: '/device/iotConfig/list', + method: 'get', + params: query + }) +} + +// 查询配电箱配置详细 +export function getIotConfig(id) { + return request({ + url: '/device/iotConfig/' + id, + method: 'get' + }) +} + +// 配电箱配的点位信息 +export function findIotConfigPoint(id) { + return request({ + url: '/device/iotConfig/findIotConfigPoint/' + id, + method: 'get' + }) +} + +// 新增配电箱配置 +export function addIotConfig(data) { + return request({ + url: '/device/iotConfig', + method: 'post', + data: data + }) +} + +// 修改配电箱配置 +export function updateIotConfig(data) { + return request({ + url: '/device/iotConfig', + method: 'put', + data: data + }) +} + +// 删除配电箱配置 +export function delIotConfig(id) { + return request({ + url: '/device/iotConfig/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/device/iotConfigPoint.js b/ruoyi-ui/src/api/device/iotConfigPoint.js new file mode 100644 index 00000000..f17607eb --- /dev/null +++ b/ruoyi-ui/src/api/device/iotConfigPoint.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询配电箱配置列表 +export function listIotConfigPoint(query) { + return request({ + url: '/device/iotConfigPoint/list', + method: 'get', + params: query + }) +} + +// 查询配电箱配置详细 +export function getIotConfigPoint(id) { + return request({ + url: '/device/iotConfigPoint/' + id, + method: 'get' + }) +} + +// 新增配电箱配置 +export function addIotConfigPoint(data) { + return request({ + url: '/device/iotConfigPoint', + method: 'post', + data: data + }) +} + +// 修改配电箱配置 +export function updateIotConfigPoint(data) { + return request({ + url: '/device/iotConfigPoint', + method: 'put', + data: data + }) +} + +// 删除配电箱配置 +export function delIotConfigPoint(id) { + return request({ + url: '/device/iotConfigPoint/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/device/iotDatas.js b/ruoyi-ui/src/api/device/iotDatas.js new file mode 100644 index 00000000..fbf72b21 --- /dev/null +++ b/ruoyi-ui/src/api/device/iotDatas.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询配电箱数据列表 +export function listIotDatas(query) { + return request({ + url: '/device/iotDatas/list', + method: 'get', + params: query + }) +} + +// 查询配电箱数据详细 +export function getIotDatas(id) { + return request({ + url: '/device/iotDatas/' + id, + method: 'get' + }) +} + +// 新增配电箱数据 +export function addIotDatas(data) { + return request({ + url: '/device/iotDatas', + method: 'post', + data: data + }) +} + +// 修改配电箱数据 +export function updateIotDatas(data) { + return request({ + url: '/device/iotDatas', + method: 'put', + data: data + }) +} + +// 删除配电箱数据 +export function delIotDatas(id) { + return request({ + url: '/device/iotDatas/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/device/iotWarning.js b/ruoyi-ui/src/api/device/iotWarning.js new file mode 100644 index 00000000..64f533b0 --- /dev/null +++ b/ruoyi-ui/src/api/device/iotWarning.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询配电箱预警列表 +export function listIotWarning(query) { + return request({ + url: '/device/iotWarning/list', + method: 'get', + params: query + }) +} + +// 查询配电箱预警详细 +export function getIotWarning(id) { + return request({ + url: '/device/iotWarning/' + id, + method: 'get' + }) +} + +// 新增配电箱预警 +export function addIotWarning(data) { + return request({ + url: '/device/iotWarning', + method: 'post', + data: data + }) +} + +// 修改配电箱预警 +export function updateIotWarning(data) { + return request({ + url: '/device/iotWarning', + method: 'put', + data: data + }) +} + +// 删除配电箱预警 +export function delIotWarning(id) { + return request({ + url: '/device/iotWarning/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/assets/logo/logo.png b/ruoyi-ui/src/assets/logo/logo.png index b94b5f3f..615ce899 100644 Binary files a/ruoyi-ui/src/assets/logo/logo.png and b/ruoyi-ui/src/assets/logo/logo.png differ diff --git a/ruoyi-ui/src/assets/logo/logo_min.png b/ruoyi-ui/src/assets/logo/logo_min.png index d856a1b3..460a6842 100644 Binary files a/ruoyi-ui/src/assets/logo/logo_min.png and b/ruoyi-ui/src/assets/logo/logo_min.png differ diff --git a/ruoyi-ui/src/directive/index.js b/ruoyi-ui/src/directive/index.js index 1c1772d9..65d4c24a 100644 --- a/ruoyi-ui/src/directive/index.js +++ b/ruoyi-ui/src/directive/index.js @@ -1,5 +1,6 @@ import hasRole from './permission/hasRole' import hasPermi from './permission/hasPermi' +import notHasPermi from './permission/notHasPermi' import dialogDrag from './dialog/drag' import dialogDragWidth from './dialog/dragWidth' import dialogDragHeight from './dialog/dragHeight' @@ -9,6 +10,7 @@ import Move from './move' const install = function(Vue) { Vue.directive('hasRole', hasRole) Vue.directive('hasPermi', hasPermi) + Vue.directive('notHasPermi', notHasPermi) Vue.directive('clipboard', clipboard) Vue.directive('dialogDrag', dialogDrag) Vue.directive('dialogDragWidth', dialogDragWidth) @@ -19,7 +21,8 @@ const install = function(Vue) { if (window.Vue) { window['hasRole'] = hasRole - window['hasPermi'] = hasPermi + window['hasPermi'] = hasPermi + window['notHasPermi'] = hasPermi Vue.use(install); // eslint-disable-line } diff --git a/ruoyi-ui/src/directive/permission/notHasPermi.js b/ruoyi-ui/src/directive/permission/notHasPermi.js new file mode 100644 index 00000000..b645fb5e --- /dev/null +++ b/ruoyi-ui/src/directive/permission/notHasPermi.js @@ -0,0 +1,28 @@ + /** + * v-hasPermi 操作权限处理 + * Copyright (c) 2019 ruoyi + */ + +import useUserStore from '@/store/modules/user' + +export default { + mounted(el, binding, vnode) { + const { value } = binding + const all_permission = "*:*:*"; + const permissions = useUserStore().permissions + + if (value && value instanceof Array && value.length > 0) { + const permissionFlag = value + + const hasPermissions = permissions.some(permission => { + return !(all_permission === permission || permissionFlag.includes(permission)) + }) + + if (!hasPermissions) { + el.parentNode && el.parentNode.removeChild(el) + } + } else { + throw new Error(`请设置操作权限标签值`) + } + } +} diff --git a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue b/ruoyi-ui/src/layout/components/Sidebar/Logo.vue index 34aa6d01..b2e4926c 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/Logo.vue @@ -2,16 +2,12 @@ - - + + - - + + diff --git a/ruoyi-ui/src/views/device/iotConfig/index.vue b/ruoyi-ui/src/views/device/iotConfig/index.vue new file mode 100644 index 00000000..43b13168 --- /dev/null +++ b/ruoyi-ui/src/views/device/iotConfig/index.vue @@ -0,0 +1,456 @@ + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + 刷新设备 + + + + + + + 1、新增的配置自动刷新设备。 + 2、修改配置后手动刷新设备或等待设备心跳后更新点位。 + 3、初始化失败的配置,常见原因为通信账号、通信密码不匹配! + + + + + + + + + + + + + + + + + + + 初始化失败 + + + + + + 初始化失败 + + + + + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/device/iotConfigPoint/index.vue b/ruoyi-ui/src/views/device/iotConfigPoint/index.vue new file mode 100644 index 00000000..8b8218ad --- /dev/null +++ b/ruoyi-ui/src/views/device/iotConfigPoint/index.vue @@ -0,0 +1,590 @@ + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + 1、配电箱点位依赖于配电箱配置。 + 2、手动新增的设备可能获取不到数据。 + 3、配电箱点位每小时获取设备心跳、获取不到心跳则设备自动离线! + + + + + + + + + + + + + + + {{ scope.row.contactPerson }} + {{ scope.row.contactPersonPhone }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} + + + + + 修改 + 删除 + + + + + + + + + + + {{ form.projectName }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/device/iotDatas/index.vue b/ruoyi-ui/src/views/device/iotDatas/index.vue new file mode 100644 index 00000000..d5f0c129 --- /dev/null +++ b/ruoyi-ui/src/views/device/iotDatas/index.vue @@ -0,0 +1,444 @@ + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + {{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }} + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-ui/src/views/device/iotWarning/index.vue b/ruoyi-ui/src/views/device/iotWarning/index.vue new file mode 100644 index 00000000..f1df79e4 --- /dev/null +++ b/ruoyi-ui/src/views/device/iotWarning/index.vue @@ -0,0 +1,303 @@ + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-ui/src/views/device/towerDataWarning/index.vue b/ruoyi-ui/src/views/device/towerDataWarning/index.vue index 85675ad7..07bce238 100644 --- a/ruoyi-ui/src/views/device/towerDataWarning/index.vue +++ b/ruoyi-ui/src/views/device/towerDataWarning/index.vue @@ -9,14 +9,6 @@ @keyup.enter.native="handleQuery" /> - - - - - - - - - - + + + - - - - - - - - - - {{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }} - - + left join sur_project_userinfo spu on spu.project_id = sp.id - sp.isDel = 0 and sp.deptId like concat('%', #{deptId}, '%') and sp.projectName like concat('%', #{projectName}, '%') and sp.projectCode = #{projectCode} @@ -125,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and spui.unitId = #{nowDept} and spu.user_id = #{nowUser} and spu.is_del=0 + and sp.isDel = 0 order by sp.projectSort ASC,sp.projectName