ly 3 жил өмнө
parent
commit
b034f62021

+ 4 - 4
master/src/main/java/com/ruoyi/project/system/controller/TAlarmPrincipalController.java

@@ -85,10 +85,10 @@ public class TAlarmPrincipalController extends BaseController
     {
         tAlarmPrincipal.setCreaterCode(getUserId().toString());
         //人员信息对应
-        TStaffmgr staffmgr = tStaffmgrService.selectTStaffmgrByStaffId(tAlarmPrincipal.getStaffid());
-        tAlarmPrincipal.setPrincipalName(staffmgr.getName());
-        tAlarmPrincipal.setPrincipalEmail(staffmgr.getMail());
-        tAlarmPrincipal.setDeptId(staffmgr.getDeptId());
+//        TStaffmgr staffmgr = tStaffmgrService.selectTStaffmgrByStaffId(tAlarmPrincipal.getStaffid());
+//        tAlarmPrincipal.setPrincipalName(staffmgr.getName());
+//        tAlarmPrincipal.setPrincipalEmail(staffmgr.getMail());
+//        tAlarmPrincipal.setDeptId(staffmgr.getDeptId());
         return toAjax(tAlarmPrincipalService.insertTAlarmPrincipal(tAlarmPrincipal));
     }
 

+ 1 - 1
master/src/main/resources/mybatis/system/SysUserMapper.xml

@@ -146,7 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		left join sys_role r on r.role_id = ur.role_id
 		LEFT JOIN SYS_USER_POST sp on u.USER_ID = sp.USER_ID
 		LEFT JOIN SYS_POST p on p.POST_ID = sp.POST_ID
-		where u.del_flag = '0'
+		where u.del_flag = '0' and u.staffid is not null
 		<if test="postCode != null and postCode != ''">
 			and p.POST_CODE = #{postCode}
 		</if>

+ 4 - 3
ui/src/views/system/principal/index.vue

@@ -93,7 +93,7 @@
               v-for="dict in stffmgrOptions"
               :key="dict.userId"
               :label="dict.nickName"
-              :value="dict.userId">
+              :value="dict.staffId">
               <span style="float: left">{{ dict.nickName }}</span>
               <span style="float: right; color: #8492a6; font-size: 13px">{{ dict.staffid }}</span>
             </el-option>
@@ -264,7 +264,8 @@ export default {
         updaterCode: null,
         updatedate: null,
         deptId: null,
-        remarks: null
+        remarks: null,
+        name: null
       };
       this.resetForm("form");
     },
@@ -274,7 +275,7 @@ export default {
       this.staffmgrQueryParams.staffid = val
       console.log(val)
       this.stffmgrOptions.forEach(function (item, index) {
-        if (item.userId == val) {
+        if (item.staffId == val) {
           _this.stffmgrEmail = item.email
         }
       })