ly 3 лет назад
Родитель
Сommit
14506074cf

+ 9 - 0
master/src/main/java/com/ruoyi/framework/task/TSpecdevAllTask.java

@@ -91,6 +91,10 @@ public class TSpecdevAllTask extends BaseController {
     public void checkWarnFlag() {
         //获取动态处理预警级别
         TAlarmtype tAlarmtype = this.tAlarmtypeService.selectTAlarmtypeById(this.alarmtype);
+        if (tAlarmtype.getIsOpen() == 0) {
+            logger.info("特种设备预警标识定时任务未启用");
+            return;
+        }
         Long firstlevel = tAlarmtype.getFirstlevel();//1级
         Long secondlevel = tAlarmtype.getSecondlevel();//2级
         Long thirdlevel = tAlarmtype.getThirdlevel();//3级
@@ -111,6 +115,7 @@ public class TSpecdevAllTask extends BaseController {
         for (TAlarmPrincipal t : userList) {
             SysUser user = this.sysUserService.selectUserByStaffId(t.getStaffid());
             if (user != null) {
+                logger.info("发送人"+user.getNickName() + "--发送邮箱:" + user.getEmail());
                 t.setPrincipalName(user.getNickName());
                 t.setPrincipalEmail(user.getEmail());
             }
@@ -173,6 +178,7 @@ public class TSpecdevAllTask extends BaseController {
         for (TAlarmPrincipal t : userList) {
             SysUser user = this.sysUserService.selectUserByStaffId(t.getStaffid());
             if (user != null) {
+                logger.info("发送人"+user.getNickName() + "--发送邮箱:" + user.getEmail());
                 t.setPrincipalName(user.getNickName());
                 t.setPrincipalEmail(user.getEmail());
             }
@@ -231,6 +237,7 @@ public class TSpecdevAllTask extends BaseController {
         for (TAlarmPrincipal t : userList) {
             SysUser user = this.sysUserService.selectUserByStaffId(t.getStaffid());
             if (user != null) {
+                logger.info("发送人"+user.getNickName() + "--发送邮箱:" + user.getEmail());
                 t.setPrincipalName(user.getNickName());
                 t.setPrincipalEmail(user.getEmail());
             }
@@ -289,6 +296,7 @@ public class TSpecdevAllTask extends BaseController {
         for (TAlarmPrincipal t : userList) {
             SysUser user = this.sysUserService.selectUserByStaffId(t.getStaffid());
             if (user != null) {
+                logger.info("发送人"+user.getNickName() + "--发送邮箱:" + user.getEmail());
                 t.setPrincipalName(user.getNickName());
                 t.setPrincipalEmail(user.getEmail());
             }
@@ -347,6 +355,7 @@ public class TSpecdevAllTask extends BaseController {
         for (TAlarmPrincipal t : userList) {
             SysUser user = this.sysUserService.selectUserByStaffId(t.getStaffid());
             if (user != null) {
+                logger.info("发送人"+user.getNickName() + "--发送邮箱:" + user.getEmail());
                 t.setPrincipalName(user.getNickName());
                 t.setPrincipalEmail(user.getEmail());
             }

+ 2 - 2
master/src/main/java/com/ruoyi/project/system/controller/TAlarmtypeController.java

@@ -104,8 +104,8 @@ public class TAlarmtypeController extends BaseController
     @PutMapping("/changeAlarmStatus")
     public AjaxResult changeAlarmStatus(@RequestBody TAlarmtype tAlarmtype)
     {
-        TAlarmtype alarmtype = tAlarmtypeService.selectTAlarmtypeById(tAlarmtype.getId());
-        alarmtype.setIsOpen(tAlarmtype.getIsOpen());
+//        TAlarmtype alarmtype = tAlarmtypeService.selectTAlarmtypeById(tAlarmtype.getId());
+//        alarmtype.setIsOpen(tAlarmtype.getIsOpen());
         return toAjax(tAlarmtypeService.updateIsOpen(tAlarmtype));
     }
 

+ 7 - 7
master/src/main/resources/mybatis/system/TAlarmPrincipalMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.system.mapper.TAlarmPrincipalMapper">
-    
+
     <resultMap type="TAlarmPrincipal" id="TAlarmPrincipalResult">
         <result property="id"    column="id"    />
         <result property="typeId"    column="type_id"    />
@@ -22,9 +22,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTAlarmPrincipalVo">
-        select d.id, d.type_id, d.plant_code, d.staffid, d.principal_name, t.mail, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_alarm_principal d
+        select d.id, d.type_id, d.plant_code, d.staffid, d.principal_name, t.email as mail, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_alarm_principal d
       left join sys_dept s on s.dept_id = d.dept_id
-      left join t_staffmgr t on t.staffid = d.staffid
+      left join sys_user t on t.staffid = d.staffid
     </sql>
 
     <select id="selectTAlarmPrincipalList" parameterType="TAlarmPrincipal" resultMap="TAlarmPrincipalResult">
@@ -47,12 +47,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <!-- 数据范围过滤 -->
         ${params.dataScope}
     </select>
-    
+
     <select id="selectTAlarmPrincipalById" parameterType="Long" resultMap="TAlarmPrincipalResult">
         <include refid="selectTAlarmPrincipalVo"/>
         where d.id = #{id}
     </select>
-        
+
     <insert id="insertTAlarmPrincipal" parameterType="TAlarmPrincipal">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_alarm_principal.NEXTVAL as id FROM DUAL
@@ -116,5 +116,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
-    
-</mapper>
+
+</mapper>

+ 6 - 6
master/src/main/resources/mybatis/system/TAlarmtypeMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.system.mapper.TAlarmtypeMapper">
-    
+
     <resultMap type="TAlarmtype" id="TAlarmtypeResult">
         <result property="id"    column="id"    />
         <result property="plantCode"    column="plant_code"    />
@@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTAlarmtypeList" parameterType="TAlarmtype" resultMap="TAlarmtypeResult">
         <include refid="selectTAlarmtypeVo"/>
-        <where>  
+        <where>
             <if test="tableName != null  and tableName != ''"> and table_name like concat(concat('%', #{tableName}), '%')</if>
             <if test="fieldName != null  and fieldName != ''"> and field_name like concat(concat('%', #{fieldName}), '%')</if>
             and d.del_flag = 0
@@ -38,12 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <!-- 数据范围过滤 -->
         ${params.dataScope}
     </select>
-    
+
     <select id="selectTAlarmtypeById" parameterType="Long" resultMap="TAlarmtypeResult">
         <include refid="selectTAlarmtypeVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertTAlarmtype" parameterType="TAlarmtype">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_alarmtype.NEXTVAL as id FROM DUAL
@@ -124,5 +124,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
-    
-</mapper>
+
+</mapper>

BIN
ui/src/assets/image/elec/4-1.png


+ 1 - 1
ui/src/views/monitor/elec/frontElecTwo.vue

@@ -3,7 +3,7 @@
     <div class="bg-color-black">
       <div class="content-box">
         <div>
-
+        <img src="@/assets/image/elec/4-1.png" width="1880" height="950px">
 
         </div>