fix SequenceContainsNoMatchingElement-1
This commit is contained in:
@@ -115,20 +115,14 @@ public class GainfoPermissionService : IGainfoPermissionService
|
||||
: deviceGroups.First(p => p.Code == x.OriginalCodes.First()).Name;
|
||||
|
||||
var currentAssignValue = x.AssignValue;
|
||||
if (x.AssignType == AssignTypeEnumType.Department)
|
||||
|
||||
currentAssignValue = x.AssignType switch
|
||||
{
|
||||
currentAssignValue = departments.First(p => p.No == x.AssignValue.Split(":")[1]).Name;
|
||||
}
|
||||
|
||||
if (x.AssignType == AssignTypeEnumType.Group)
|
||||
{
|
||||
currentAssignValue = userGroups.First(p => p.Code == Guid.Parse(currentAssignValue)).Name;
|
||||
}
|
||||
|
||||
if (x.AssignType == AssignTypeEnumType.User)
|
||||
{
|
||||
currentAssignValue = "自己";
|
||||
}
|
||||
AssignTypeEnumType.Department => departments.FirstOrDefault(p => p.No == x.AssignValue.Split(":")[1])?.Name,
|
||||
AssignTypeEnumType.Group => userGroups.FirstOrDefault(p => p.Code == Guid.Parse(currentAssignValue))?.Name,
|
||||
AssignTypeEnumType.User => "自己",
|
||||
_ => currentAssignValue
|
||||
};
|
||||
|
||||
var r = new DevicePermissionSourceTypeDto
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user