Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master'

zhangding 3 rokov pred
rodič
commit
ad8f2946d8

+ 23 - 9
master/src/main/java/com/ruoyi/project/aspen/domain/TElecdashboardAlarm.java

@@ -5,6 +5,8 @@ import com.ruoyi.framework.web.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
+import java.util.Date;
+
 /**
  * 电厂大屏预警对象 t_elecdashboard_alarm
  *
@@ -20,15 +22,19 @@ public class TElecdashboardAlarm extends BaseEntity
 
     /** 值 */
     @Excel(name = "值")
-    private Long alarmValue;
+    private String alarmValue;
+
+    /** 预警时间 */
+    @Excel(name = "预警时间")
+    private Date alarmTime;
 
     /** 位号 */
     @Excel(name = "位号")
-    private Long code;
+    private String code;
 
     /** 内容 */
     @Excel(name = "内容")
-    private Long description;
+    private String description;
 
     public void setId(Long id)
     {
@@ -39,34 +45,42 @@ public class TElecdashboardAlarm extends BaseEntity
     {
         return id;
     }
-    public void setAlarmValue(Long alarmValue)
+    public void setAlarmValue(String alarmValue)
     {
         this.alarmValue = alarmValue;
     }
 
-    public Long getAlarmValue()
+    public String getAlarmValue()
     {
         return alarmValue;
     }
-    public void setCode(Long code)
+    public void setCode(String code)
     {
         this.code = code;
     }
 
-    public Long getCode()
+    public String getCode()
     {
         return code;
     }
-    public void setDescription(Long description)
+    public void setDescription(String description)
     {
         this.description = description;
     }
 
-    public Long getDescription()
+    public String getDescription()
     {
         return description;
     }
 
+    public Date getAlarmTime() {
+        return alarmTime;
+    }
+
+    public void setAlarmTime(Date alarmTime) {
+        this.alarmTime = alarmTime;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 3 - 1
master/src/main/java/com/ruoyi/project/invoice/controller/TApproveReserveInvoiceController.java

@@ -188,8 +188,10 @@ public class TApproveReserveInvoiceController extends BaseController {
         }
         if ("1".equals(tApproveReserveInvoice.getIsSpecial())) {
             String managerconId="";
-            sysUser.setRoleId(20006L);//装置经理
+            sysUser.setRoleId(20013L);//装置副经理
             List<SysUser> sysUsers = iSysUserService.selectUserListByRoleAndDept(sysUser);
+            sysUser.setRoleId(20006L);//装置经理
+            sysUsers.addAll(iSysUserService.selectUserListByRoleAndDept(sysUser));
             if (CollectionUtils.isNotEmpty(sysUsers)) {
                 for (SysUser user : sysUsers) {
                     managerconId+=user.getUserId()+",";

+ 2 - 3
master/src/main/resources/mybatis/aspen/TElecdashboardAlarmMapper.xml

@@ -7,14 +7,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="TElecdashboardAlarm" id="TElecdashboardAlarmResult">
         <result property="id"    column="id"    />
         <result property="alarmValue"    column="alarm_value"    />
+        <result property="alarmTime"    column="alarm_time"    />
         <result property="code"    column="code"    />
         <result property="description"    column="description"    />
         <result property="deptName" column="dept_name" />
     </resultMap>
 
     <sql id="selectTElecdashboardAlarmVo">
-        select d.id, d.alarm_value, d.code, d.description ,s.dept_name from t_elecdashboard_alarm d
-      left join sys_dept s on s.dept_id = d.dept_id
+        select d.id, d.alarm_value, d.code, d.description, d.alarm_time from t_elecdashboard_alarm d
     </sql>
 
     <select id="selectTElecdashboardAlarmList" parameterType="TElecdashboardAlarm" resultMap="TElecdashboardAlarmResult">
@@ -23,7 +23,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="alarmValue != null "> and alarm_value = #{alarmValue}</if>
             <if test="code != null "> and code = #{code}</if>
             <if test="description != null "> and description = #{description}</if>
-            and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}

+ 9 - 9
ui/src/views/invoice/bookingworkticket/index.vue

@@ -663,7 +663,7 @@ export default {
               this.approveForm.isToday = 1;
         }
          //判断是否涉及 动火 和当日
-          if (row.workType===1||row.workType===2||row.workType===3||row.workType===15){
+          if (row.workType===1||row.workType===15){
             this.approveForm.isSpecial = 1
           }
         this.approveForm.userSupId=row.bookingworkticket.userMg;
@@ -962,14 +962,14 @@ export default {
             }else{
                    this.approveForm.isToday = 0;
             }
-            for(let i=0;i<this.ruleForm.length;i++){
-               if( this.ruleForm[i].workType===1||this.ruleForm[i].workType===2||
-               this.ruleForm[i].workType===3||this.ruleForm[i].workType===15){
-              this.approveForm.isSpecial = 1
-            }else{
-                this.approveForm.isSpecial = 0
-            }
-            }
+              for (let i = 0; i < this.ruleForm.length; i++) {
+                if (this.ruleForm[i].workType === 1 || this.ruleForm[i].workType === 15) {
+                  this.approveForm.isSpecial = 1
+                  break;
+                } else {
+                  this.approveForm.isSpecial = 0
+                }
+              }
              this.approveForm.userSupId=this.form.userMg
 
              addInvoice(this.approveForm).then(response => {

+ 31 - 33
ui/src/views/invoice/device/index.vue

@@ -276,44 +276,42 @@ export default {
       })
     this.getList();
     this.getTreeselect();
-    listPostUser({
-
-    }).then(response => {
-      this.principalList = response;
-    });
   },
   methods: {
     /** 查询装置区域管理列表 */
     getList() {
-      let _this = this
-      this.loading = true;
-      listDevice(this.queryParams).then(response => {
-        this.deviceList = response.rows;
-        this.$nextTick(() => {
-          this.$refs.deviceTable.doLayout(); // 解决表格错位
-        });
-        this.total = response.total;
-        this.loading = false;
-        this.deviceList.forEach(function (value,key,arr) {
-          var principalName = null;
-          let principal = null;
-          if (value.regionalHead != null) {
-            principal = value.regionalHead.split(",");
-            principal.forEach(function (value, key, arr) {
-              _this.principalList.forEach(function (v, k, arr){
-                if (value==v.userId){
-                  if (key != 0) {
-                    principalName = principalName + ","+v.nickName;
-                  }else if (key == 0) {
-                    principalName = v.nickName;
+      listPostUser({}).then(response => {
+        this.principalList = response;
+        let _this = this
+        this.loading = true;
+        listDevice(this.queryParams).then(response => {
+          this.deviceList = response.rows;
+          this.$nextTick(() => {
+            this.$refs.deviceTable.doLayout(); // 解决表格错位
+          });
+          this.total = response.total;
+          this.loading = false;
+          this.deviceList.forEach(function (value, key, arr) {
+            var principalName = null;
+            let principal = null;
+            if (value.regionalHead != null) {
+              principal = value.regionalHead.split(",");
+              principal.forEach(function (value, key, arr) {
+                _this.principalList.forEach(function (v, k, arr) {
+                  if (value == v.userId) {
+                    if (key != 0) {
+                      principalName = principalName + "," + v.nickName;
+                    } else if (key == 0) {
+                      principalName = v.nickName;
+                    }
                   }
-                }
-              })
-            });
-          }
-          _this.deviceList[key].regionalHead = principal;
-          _this.deviceList[key].regionalHeadName = principalName;
-        })
+                })
+              });
+            }
+            _this.deviceList[key].regionalHead = principal;
+            _this.deviceList[key].regionalHeadName = principalName;
+          })
+        });
       });
     },
      /** 查询部门下拉树结构 */

+ 32 - 0
ui/src/views/monitor/elec/elecindex.vue

@@ -139,6 +139,7 @@
             :dashboardelecdata="dashboardelecdata"
             :dashboarddata="dashboarddata"
             :latest7DayData="latest7DayData"
+            :alarmList="alarmList"
           >
           </front-elec-three>
         </div>
@@ -167,6 +168,7 @@ import {selectWeek} from "@/api/aspen/dashboarddayeleceight";
 import {getRealtimeByMaxDate} from "@/api/aspen/realtime.js";
 import {listDayLatest7, listDayLatest30} from "@/api/aspen/day.js";
 import {listHourLatest24} from "@/api/aspen/hour.js";
+import {listAlarm} from "@/api/aspen/alarm.js";
 export default {
   data() {
     return {
@@ -183,6 +185,8 @@ export default {
       bgCol0:"#0a84ff",
       wh:"3.25rem",
       tAlign:"left",
+      // 预警数据
+      alarmList: [],
       // 最近24小时的数据
       latest24HourData: [],
       // 最近7天的数据
@@ -380,6 +384,12 @@ export default {
     this.getLatest30DayData();
     // 抓取最近24小时的数据
     this.getLatest24HourData();
+    // 抓取预警数据
+    this.getAlarmData();
+    // 每隔五秒抓取一次预警数据
+    window.setInterval(() => {
+      this.getAlarmData();
+    }, 5000);
 
     // this.getList1();
     // this.getMonthList1();
@@ -417,6 +427,28 @@ export default {
     // }, 1000 * 10 * 6 * 60 * 6)
   },
   methods: {
+    /** 抓取预警数据 */
+    getAlarmData() {
+      listAlarm(null).then(response => {
+        let data = response.rows;
+        // 清空数组
+        this.alarmList = [];
+        for (let i = 0; i < data.length; i++) {
+          this.alarmList.push([
+            data[i].alarmTime.toString().substr(0, 10) + ' ' + data[i].alarmTime.toString().substr(11, 8),
+            data[i].alarmValue,
+            data[i].code,
+            data[i].description
+          ]);
+        }
+        // 不足8条数据,补空字符串,避免轮播表变形
+        if (data.length < 8) {
+          for (let i = 0; i < 8 - data.length; i++) {
+            this.alarmList.push(['', '', '', '']);
+          }
+        }
+      });
+    },
     /** 抓取最近24小时的数据 */
     getLatest24HourData() {
       listHourLatest24().then(response => {

+ 20 - 19
ui/src/views/monitor/elec/frontElecThree.vue

@@ -100,12 +100,12 @@
   import analysisTopRight from './analysisTopRight.vue';
 
   export default {
-    name: "materialBalance",
+      name: "materialBalance",
       components: {
         analysisBottomLeft1, analysisBottomLeft2, analysisBottomLeft3, analysisBottomLeft4,
         analysisTopLeft, analysisTopCenter, analysisTopRight
       },
-      props: ['dashboardelecdata'],
+      props: ['dashboardelecdata', 'alarmList'],
       data() {
         return {
           // 第一排左上角水位图配置、基准值、实测值
@@ -128,22 +128,23 @@
           dataTopRight3: this.dashboardelecdata.hrsg3NoxConvert,
           // 第二排右下角轮播表表头、表数据、表配置
           tableHeaderBottomRight: ['时间', '值', '位号', '内容'],
-          tableDataBottomRight: [
-            // ['<span class="span-rw">2022-4-2 06:22</span>', 'someData', 'QT12001', ' leakage #1HRSG DUCT BURNRE'],
-            // ['2022-4-2 13:43', 'someData', 'QT12501', ' CO leakage #1HRSG offgas system'],
-            // ['2022-4-2 15:23', 'someData', '<span>QT12502<i class="icon icon-shang"></i></span>', ' CO leakage #1HRSG offgas system'],
-            // ['2022-4-2 19:01', 'someData', 'QT22001', ' leakage #2HRSG DUCT BURNRE', ],
-            // ['2022-4-3 01:00', 'someData', 'QT22501', ' CO leakage #2HRSG offgas system', ],
-            // ['2022-4-3 04:50', 'someData', 'QT22502', ' CO leakage #2HRSG offgas system', ],
-            // ['2022-4-3 12:21', 'someData', 'QT32001', ' leakage #3HRSG DUCT BURNRE', ],
-            // ['2022-4-5 08:22', 'someData', 'AI82201', 'SC @ HRSG#1 HP DRUM BLOWDOWN', ],
-            // ['2022-4-5 12:10', 'someData', 'AI82302', 'PH @ HRSG#2 HP DRUM BLOWDOWN', ],
-            // ['2022-4-5 14:46', 'someData', 'AI82403', 'CC @ HRSG#3 HP DRUM DISCHARGE'],
-            // ['2022-4-5 14:46', 'someData', 'AI82403', 'CC @ HRSG#3 HP DRUM DISCHARGE'],
-            // ['2022-4-5 14:46', 'someData', 'AI82403', 'CC @ HRSG#3 HP DRUM DISCHARGE'],
-            // ['2022-4-5 14:46', 'someData', 'AI82403', 'CC @ HRSG#3 HP DRUM DISCHARGE'],
-            // ['2022-4-5 14:46', 'someData', 'AI82403', 'CC @ HRSG#3 HP DRUM DISCHARGE']
-          ],
+          tableDataBottomRight: this.alarmList,
+            // [
+              // ['<span class="span-rw">2022-4-2 06:22</span>', 'someData', 'QT12001', ' leakage #1HRSG DUCT BURNRE'],
+              // ['2022-4-2 13:43', 'someData', 'QT12501', ' CO leakage #1HRSG offgas system'],
+              // ['2022-4-2 15:23', 'someData', '<span>QT12502<i class="icon icon-shang"></i></span>', ' CO leakage #1HRSG offgas system'],
+              // ['2022-4-2 19:01', 'someData', 'QT22001', ' leakage #2HRSG DUCT BURNRE', ],
+              // ['2022-4-3 01:00', 'someData', 'QT22501', ' CO leakage #2HRSG offgas system', ],
+              // ['2022-4-3 04:50', 'someData', 'QT22502', ' CO leakage #2HRSG offgas system', ],
+              // ['2022-4-3 12:21', 'someData', 'QT32001', ' leakage #3HRSG DUCT BURNRE', ],
+              // ['2022-4-5 08:22', 'someData', 'AI82201', 'SC @ HRSG#1 HP DRUM BLOWDOWN', ],
+              // ['2022-4-5 12:10', 'someData', 'AI82302', 'PH @ HRSG#2 HP DRUM BLOWDOWN', ],
+              // ['2022-4-5 14:46', 'someData', 'AI82403', 'CC @ HRSG#3 HP DRUM DISCHARGE'],
+              // ['2022-4-5 14:46', 'someData', 'AI82403', 'CC @ HRSG#3 HP DRUM DISCHARGE'],
+              // ['2022-4-5 14:46', 'someData', 'AI82403', 'CC @ HRSG#3 HP DRUM DISCHARGE'],
+              // ['2022-4-5 14:46', 'someData', 'AI82403', 'CC @ HRSG#3 HP DRUM DISCHARGE'],
+              // ['2022-4-5 14:46', 'someData', 'AI82403', 'CC @ HRSG#3 HP DRUM DISCHARGE']
+            // ],
           configBottomRight: {}
         };
       },
@@ -232,7 +233,7 @@
           align: ['center', 'center', 'center', 'center'],
           columnWidth: [300, 200, 200],
           headerHeight: 50,
-          carousel: 'page'  // 'single' | 'page'
+          carousel: 'single'  // 'single' | 'page'
         };
       }      
     },