报警联系人下拉列表

This commit is contained in:
quowingwang 2025-12-19 17:32:12 +08:00
parent 59d54b20a5
commit 2a983aaa97
3 changed files with 11 additions and 6 deletions

View File

@ -214,10 +214,11 @@ namespace ZR.Admin.WebApi.Controllers.System
return ExportExcel(result.Item2, result.Item1); return ExportExcel(result.Item2, result.Item1);
} }
[HttpGet("getPullDown")] [HttpGet("getAlarmPullDown")]
public ApiResult GetUserPullDown() [AllowAnonymous]
public ApiResult GetAlarmUserPullDown()
{ {
var apiResult = UserService.GetUserPullDown(); var apiResult = UserService.GetAlarmUserPullDown();
return apiResult; return apiResult;
} }
} }

View File

@ -82,6 +82,6 @@ namespace ZR.Service.System.IService
SysUser Login(LoginBodyDto user); SysUser Login(LoginBodyDto user);
void UpdateLoginInfo(LoginBodyDto user, long userId); void UpdateLoginInfo(LoginBodyDto user, long userId);
ApiResult GetUserPullDown(); ApiResult GetAlarmUserPullDown();
} }
} }

View File

@ -336,11 +336,15 @@ namespace ZR.Service
Update(new SysUser() { LoginIP = user.LoginIP, LoginDate = DateTime.Now, UserId = userId }, it => new { it.LoginIP, it.LoginDate }); Update(new SysUser() { LoginIP = user.LoginIP, LoginDate = DateTime.Now, UserId = userId }, it => new { it.LoginIP, it.LoginDate });
} }
public ApiResult GetUserPullDown() public ApiResult GetAlarmUserPullDown()
{ {
try try
{ {
var queryData = Queryable() string sql = @"select u.UserId,u.UserName from sys_user u
inner join sys_user_role ur on u.UserId = ur.user_id
inner join sys_role r on r.RoleId = ur.role_id
where r.RoleName = ''";
var queryData = SqlQueryToList(sql)
.Select(it => new UserPullDownDto .Select(it => new UserPullDownDto
{ {
label = it.UserName, label = it.UserName,