diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/monitor/ThAlarm.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/monitor/ThAlarm.java index 47916e4..5bef869 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/monitor/ThAlarm.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/monitor/ThAlarm.java @@ -28,6 +28,10 @@ public class ThAlarm extends BaseEntity { */ private String sn; + private Long deptId; + + private String deptName; + /** *是否处理 @@ -50,9 +54,7 @@ public class ThAlarm extends BaseEntity { */ private String power; - private String factoryName; - private Long factoryId; /** * 温度 */ @@ -133,21 +135,7 @@ public class ThAlarm extends BaseEntity { @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date dealTime; - public String getFactoryName() { - return factoryName; - } - public void setFactoryName(String factoryName) { - this.factoryName = factoryName; - } - - public Long getFactoryId() { - return factoryId; - } - - public void setFactoryId(Long factoryId) { - this.factoryId = factoryId; - } public Long getReportId() { return reportId; @@ -161,6 +149,22 @@ public class ThAlarm extends BaseEntity { return isDeal; } + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + public void setIsDeal(String isDeal) { this.isDeal = isDeal; } 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 e53ca10..6f87d78 100644 --- a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/OilMonitorMapper.xml +++ b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/OilMonitorMapper.xml @@ -65,8 +65,8 @@ - - + + @@ -86,7 +86,7 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t and t.id=#{id} and t.name like concat('%', #{monitorName},'%') and t.sn= #{monitorNo} - and t.dep_id= #{fadeptIdctoryId} + and t.dept_id= #{deptId} @@ -216,36 +216,35 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t th_device_report.latitude, th_device_report.longitude, cgq, - report_content, - report_content ->> '$[0].ds' AS ds, - report_content ->> '$[0].dw' AS dw, - report_content ->> '$[0].lc' AS lc, - report_content ->> '$[0].zl' AS zl, - report_content ->> '$[0].zt' AS zt, - report_content ->> '$[0].dbz' AS dbz, - report_content ->> '$[0].gbz' AS gbz, + th_device_report.ds AS ds, + th_device_report.dw AS dw, + th_device_report.zl AS zl, + th_device_report.zt AS zt, + th_device_report.dbz AS dbz, + th_device_report.gbz AS gbz, t.NAME, + t.dept_id, + dept.dept_name, d.id as dealId, d.deal_way, d.is_deal, d.deal_time, d.reason, - d.deal_user, - t.factory_id, - f.factory_name + d.deal_user FROM th_device_report LEFT JOIN th_device t ON th_device_report.sn = t.sn - LEFT JOIN sys_factory f on t.factory_id=f.factory_id + LEFT JOIN sys_dept dept on t.dept_id=dept.dept_id LEFT JOIN th_device_deal d ON th_device_report.id = d.report_id - (report_content ->> '$[0].zt' ='一级报警' ||report_content ->> '$[0].zt' ='二级报警' ) + ( th_device_report.zt='一级报警' or th_device_report.zt='二级报警') + and report_time > #{startTime,jdbcType=TIMESTAMP} and report_time < #{endTime,jdbcType=TIMESTAMP} and th_device_report.sn= #{sn} and t.name like concat('%', #{name}, '%') and d.dealUser like concat('%', #{dealUser}, '%') - and t.factory_id=#{factoryId} + and t.dept_id=#{deptId} and d.is_deal='1' @@ -332,34 +331,28 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t th_device_report.latitude, th_device_report.longitude, cgq, - report_content, - report_content ->> '$[0].ds' AS ds, - report_content ->> '$[0].dw' AS dw, - report_content ->> '$[0].lc' AS lc, - report_content ->> '$[0].zl' AS zl, - report_content ->> '$[0].zt' AS zt, - report_content ->> '$[0].dbz' AS dbz, - report_content ->> '$[0].gbz' AS gbz, + th_device_report.ds AS ds, + th_device_report.dw AS dw, + th_device_report.zl AS zl, + th_device_report.zt AS zt, + th_device_report.dbz AS dbz, + th_device_report.gbz AS gbz, t.NAME, - d.id as dealId, - d.deal_way, - d.is_deal, - d.deal_time, - d.deal_user, - t.factory_id, - f.factory_name + t.dept_id, + dept.dept_name + FROM th_device_report LEFT JOIN th_device t ON th_device_report.sn = t.sn - LEFT JOIN sys_factory f on t.factory_id=f.factory_id - LEFT JOIN th_device_deal d ON th_device_report.id = d.report_id + LEFT JOIN sys_dept dept on t.dept_id=dept.dept_id + and report_time >= #{startTime,jdbcType=TIMESTAMP} and report_time <= #{endTime,jdbcType=TIMESTAMP} and th_device_report.sn= #{sn} and t.name like concat('%', #{name}, '%') - and t.factory_id=#{factoryId} + and t.dept_id=#{deptId} ${params.dataScope} order by th_device_report.report_time desc diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index 13c6cf2..4230ec4 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -37,7 +37,7 @@ import DictTag from '@/components/DictTag' import VueMeta from 'vue-meta' // 字典数据组件 import DictData from '@/components/DictData' - +import BaiduMap from 'vue-baidu-map' // 全局方法挂载 Vue.prototype.getDicts = getDicts Vue.prototype.getConfigKey = getConfigKey @@ -57,7 +57,10 @@ Vue.component('Editor', Editor) Vue.component('FileUpload', FileUpload) Vue.component('ImageUpload', ImageUpload) Vue.component('ImagePreview', ImagePreview) - +Vue.use(BaiduMap, { + // ak密钥 + ak: 'cGGHoaL28hAugwgCpH4AGrqBVh3FAzbf', +}) Vue.use(directive) Vue.use(plugins) Vue.use(VueMeta) diff --git a/ruoyi-ui/src/views/alarmMonitor/bound/index.vue b/ruoyi-ui/src/views/alarmMonitor/bound/index.vue index ea772f1..abe00a2 100644 --- a/ruoyi-ui/src/views/alarmMonitor/bound/index.vue +++ b/ruoyi-ui/src/views/alarmMonitor/bound/index.vue @@ -1,11 +1,8 @@