@@ -503,15 +503,15 @@ namespace HKCardManager.UserPages | |||||
MessageLogNotify.GetInstance.Show("请放入卡片"); | MessageLogNotify.GetInstance.Show("请放入卡片"); | ||||
return; | return; | ||||
} | } | ||||
SqlLogic.AddAmin(CardNo); | |||||
HKLibHelper.AddUserSync(new UserDto | |||||
{ | |||||
Name = "管理员", | |||||
CardNo = CardNo, | |||||
OrgId = sid, | |||||
Num = HKLibHelper.GetUserMaxNumSync() | |||||
}); | |||||
UHFCardHelper.GetInstance().WriteCard(CardNo); | |||||
//SqlLogic.AddAmin(CardNo); | |||||
//HKLibHelper.AddUserSync(new UserDto | |||||
//{ | |||||
// Name = "管理员", | |||||
// CardNo = CardNo, | |||||
// OrgId = sid, | |||||
// Num = HKLibHelper.GetUserMaxNumSync() | |||||
//}); | |||||
var rr= UHFCardHelper.GetInstance().WriteCard(CardNo); | |||||
this.Invoke(() => | this.Invoke(() => | ||||
{ | { | ||||
textBox1.Text = CardNo; | textBox1.Text = CardNo; | ||||
@@ -9,5 +9,5 @@ | |||||
//"MQ": "host=10.2.1.43:15672;username=username;password=pwd" | //"MQ": "host=10.2.1.43:15672;username=username;password=pwd" | ||||
//MQ正式地址 | //MQ正式地址 | ||||
"MQ": "host=47.108.65.220;username=root;password=pwd", | "MQ": "host=47.108.65.220;username=root;password=pwd", | ||||
"Admin": [ 666, 888, 999 ] | |||||
"Admin": [6666666666666666666, 8888888888888888888, 9999999999999999999 ] | |||||
} | } |
@@ -25,7 +25,7 @@ | |||||
//MQ正式地址 | //MQ正式地址 | ||||
"MQ": "host=47.108.65.220;username=root;password=pwd", | "MQ": "host=47.108.65.220;username=root;password=pwd", | ||||
//超级卡 | //超级卡 | ||||
"Admin": [], | |||||
"Admin": [ 6666666666666666666, 8888888888888888888, 9999999999999999999 ], | |||||
//刷卡间隔 | //刷卡间隔 | ||||
"Span": 5 | "Span": 5 | ||||
} | } |
@@ -131,7 +131,7 @@ namespace HKLib.Interfaces | |||||
}).Build().RunStringFirstAsync(); | }).Build().RunStringFirstAsync(); | ||||
if (data.IsNullOrEmpty()) return new List<OrgDto>(); | if (data.IsNullOrEmpty()) return new List<OrgDto>(); | ||||
var model = data.ToModel<JObject>()["data"]["data"].ToJson().ToModel<List<OrgOutDto>>(); | var model = data.ToModel<JObject>()["data"]["data"].ToJson().ToModel<List<OrgOutDto>>(); | ||||
return model.Where(t => !t.Name.IsNullOrEmpty()).Where(t => !t.Name.Contains("管理员")).Select(t => new OrgDto | |||||
return model.Where(t => !t.Name.IsNullOrEmpty()).Select(t => new OrgDto | |||||
{ | { | ||||
Name = t.Name, | Name = t.Name, | ||||
SId = t.Id | SId = t.Id | ||||
@@ -194,7 +194,7 @@ namespace HKLib.Interfaces | |||||
if (string.IsNullOrEmpty(data)) | if (string.IsNullOrEmpty(data)) | ||||
return new List<UserListDto>(); | return new List<UserListDto>(); | ||||
var res = data.ToModel<JObject>()["data"]["data"].ToJson().ToModel<List<UserListDto>>(); | var res = data.ToModel<JObject>()["data"]["data"].ToJson().ToModel<List<UserListDto>>(); | ||||
return res.Where(t=>!string.IsNullOrEmpty(t.Name)).Where(t=>!t.Name.Contains("管理员")).OrderByDescending(t=>t.Num).ToList(); | |||||
return res.Where(t=>!string.IsNullOrEmpty(t.Name)).OrderByDescending(t=>t.Num).ToList(); | |||||
} | } | ||||
public static List<UserListDto> GetUserListSync(string keyword) | public static List<UserListDto> GetUserListSync(string keyword) | ||||