|
|
@@ -19,9 +19,11 @@ namespace TVShoppingCallCenter_ZLJ.Controllers
|
|
19
|
19
|
public class UserAccountController : BaseController
|
|
20
|
20
|
{
|
|
21
|
21
|
private readonly ISys_UserAccountRepository _sys_useraccountRepository;
|
|
22
|
|
- public UserAccountController(ISys_UserAccountRepository sys_useraccountRepository)
|
|
|
22
|
+ private readonly ISys_RoleInfoRepository _sys_role_infoRepository;
|
|
|
23
|
+ public UserAccountController(ISys_UserAccountRepository sys_useraccountRepository, ISys_RoleInfoRepository sys_role_infoRepository)
|
|
23
|
24
|
{
|
|
24
|
25
|
_sys_useraccountRepository = sys_useraccountRepository;
|
|
|
26
|
+ _sys_role_infoRepository = sys_role_infoRepository;
|
|
25
|
27
|
}
|
|
26
|
28
|
|
|
27
|
29
|
/// <summary>
|
|
|
@@ -57,6 +59,37 @@ namespace TVShoppingCallCenter_ZLJ.Controllers
|
|
57
|
59
|
return Success("获取成功", list);
|
|
58
|
60
|
}
|
|
59
|
61
|
|
|
|
62
|
+ [HttpGet("getlistdrop")]
|
|
|
63
|
+ public async Task<IActionResult> GetListDropAsync(string deptid, string roleid,string rolecode)
|
|
|
64
|
+ {
|
|
|
65
|
+ List<IConditionalModel> conModels = new List<IConditionalModel>();
|
|
|
66
|
+ #region 筛选
|
|
|
67
|
+ conModels.Add(new ConditionalModel() { FieldName = "F_DeleteFlag", ConditionalType = ConditionalType.Equal, FieldValue = ((int)EnumUserCountState.Enabled).ToString() });
|
|
|
68
|
+ if (!string.IsNullOrEmpty(deptid))
|
|
|
69
|
+ conModels.Add(new ConditionalModel() { FieldName = "F_DeptId", ConditionalType = ConditionalType.Equal, FieldValue = deptid });
|
|
|
70
|
+ if (!string.IsNullOrEmpty(roleid))
|
|
|
71
|
+ conModels.Add(new ConditionalModel() { FieldName = "F_RoleId", ConditionalType = ConditionalType.Equal, FieldValue = roleid });
|
|
|
72
|
+ if(!string.IsNullOrEmpty(rolecode))
|
|
|
73
|
+ {
|
|
|
74
|
+ var rolemodel=await _sys_role_infoRepository.GetSingle(x => x.F_RoleCode == rolecode && x.F_State == (int)EnumDelState.Enabled);
|
|
|
75
|
+ if (rolemodel != null)
|
|
|
76
|
+ conModels.Add(new ConditionalModel() { FieldName = "F_RoleId", ConditionalType = ConditionalType.Equal, FieldValue = rolemodel.F_RoleId.ToString() });
|
|
|
77
|
+ else
|
|
|
78
|
+ conModels.Add(new ConditionalModel() { FieldName = "F_RoleId", ConditionalType = ConditionalType.Equal, FieldValue = "-1" });
|
|
|
79
|
+ }
|
|
|
80
|
+ #endregion
|
|
|
81
|
+ var list = await _sys_useraccountRepository.GetListALL(conModels, "F_CreateOn desc");
|
|
|
82
|
+ var result = list.Select(x => new {
|
|
|
83
|
+ x.F_UserCode,
|
|
|
84
|
+ x.F_UserName,
|
|
|
85
|
+ x.F_DeptId,
|
|
|
86
|
+ x.F_RoleId,
|
|
|
87
|
+ x.F_UserId
|
|
|
88
|
+ });
|
|
|
89
|
+
|
|
|
90
|
+ return Success("获取成功", result);
|
|
|
91
|
+ }
|
|
|
92
|
+
|
|
60
|
93
|
/// <summary>
|
|
61
|
94
|
/// 获取用户详情 by id
|
|
62
|
95
|
/// </summary>
|
|
|
@@ -150,7 +183,6 @@ namespace TVShoppingCallCenter_ZLJ.Controllers
|
|
150
|
183
|
return Error("获取信息失败");
|
|
151
|
184
|
model.F_UserCode = input.usercode;
|
|
152
|
185
|
model.F_UserName = input.username;
|
|
153
|
|
- model.F_Password = input.password;
|
|
154
|
186
|
model.F_SexFlag = input.sexflag;
|
|
155
|
187
|
model.F_DeptId = input.deptid;
|
|
156
|
188
|
model.F_ExtensionNumber = input.extensionnumber;
|