报警联系人下拉列表
This commit is contained in:
parent
59d54b20a5
commit
2a983aaa97
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user