ly 3 éve
szülő
commit
05aff98d9b

+ 2 - 2
master/src/main/java/com/ruoyi/framework/task/PlantproglistTask.java

@@ -195,8 +195,8 @@ public class PlantproglistTask extends BaseController
         String email = "";
         for (TAlarmPrincipal a : alarmPrincipals) {
             username = a.getPrincipalName();
-//            email = a.getPrincipalEmail();
-            email = "924846500@qq.com";
+            email = a.getPrincipalEmail();
+//            email = "924846500@qq.com";
             //表html中间内容
             String prime = "";
             String firstcenter = "<tr><td><div style=\"padding:25px 35px 40px; background-color:#fff;\"><h2 style=\"margin: 5px 0px; \">" +

+ 16 - 1
master/src/main/java/com/ruoyi/project/system/service/impl/TAlarmPrincipalServiceImpl.java

@@ -1,6 +1,9 @@
 package com.ruoyi.project.system.service.impl;
 
 import java.util.List;
+
+import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.system.service.ISysUserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.project.system.mapper.TAlarmPrincipalMapper;
@@ -21,6 +24,9 @@ public class TAlarmPrincipalServiceImpl implements ITAlarmPrincipalService
     @Resource
     private TAlarmPrincipalMapper tAlarmPrincipalMapper;
 
+    @Autowired
+    ISysUserService sysUserService;
+
     /**
      * 查询预警管理负责人
      *
@@ -54,7 +60,16 @@ public class TAlarmPrincipalServiceImpl implements ITAlarmPrincipalService
     @Override
     public List<TAlarmPrincipal> selectList(TAlarmPrincipal tAlarmPrincipal)
     {
-        return tAlarmPrincipalMapper.selectList(tAlarmPrincipal);
+        List<TAlarmPrincipal> list = tAlarmPrincipalMapper.selectList(tAlarmPrincipal);
+        for (TAlarmPrincipal t: list
+        ) {
+            SysUser user = sysUserService.selectUserByStaffId(t.getStaffid());
+            if (user != null) {
+                t.setPrincipalName(user.getNickName());
+                t.setPrincipalEmail(user.getEmail());
+            }
+        }
+        return list;
     }
 
     /**

+ 17 - 1
ui/src/views/plant/organization/index.vue

@@ -262,7 +262,23 @@ export default {
               bz5: false,
               bz6: false
             }
-            this.staffmgrList[i]
+            if (this.staffmgrList[i].specialDuty) {
+              console.log(this.staffmgrList[i].specialDuty)
+              let dutyArr = this.staffmgrList[i].specialDuty.split(",")
+              for (let i = 0; i < dutyArr.length; i++) {
+                if (dutyArr[i] == "10") {
+                  nodeData.bz3 = true
+                }else if (dutyArr[i] == "12") {
+                  nodeData.bz1 = true
+                }else if (dutyArr[i] == "14") {
+                  nodeData.bz5 = true
+                }else if (dutyArr[i] == "16") {
+                  nodeData.bz6 = true
+                }else if (dutyArr[i] == "18") {
+                  nodeData.bz2 = true
+                }
+              }
+            }
             this.list2.push(nodeData)
           }
         }

+ 5 - 5
ui/src/views/sems/approve/tapprove-add.vue

@@ -614,27 +614,27 @@
       this.devList = rows
 
       listPostUser({
-        postCode: 'wxjl'
+        // postCode: 'wxjl'
       }).then(response => {
         this.wxjlOption = response;
       });
       listPostUser({
-        postCode: 'gyjl'
+        // postCode: 'gyjl'
       }).then(response => {
         this.gyjlOption = response;
       });
       listPostUser({
-        postCode: 'gyzj'
+        // postCode: 'gyzj'
       }).then(response => {
         this.gyzjOption = response;
       });
       listPostUser({
-        postCode: 'wxzj'
+        // postCode: 'wxzj'
       }).then(response => {
         this.wxzjOption = response;
       });
       listPostUser({
-        postCode: 'sems'
+        // postCode: 'sems'
       }).then(response => {
         this.zfOption = response;
       });