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;
|
: deviceGroups.First(p => p.Code == x.OriginalCodes.First()).Name;
|
||||||
|
|
||||||
var currentAssignValue = x.AssignValue;
|
var currentAssignValue = x.AssignValue;
|
||||||
if (x.AssignType == AssignTypeEnumType.Department)
|
|
||||||
|
currentAssignValue = x.AssignType switch
|
||||||
{
|
{
|
||||||
currentAssignValue = departments.First(p => p.No == x.AssignValue.Split(":")[1]).Name;
|
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 => "自己",
|
||||||
if (x.AssignType == AssignTypeEnumType.Group)
|
_ => currentAssignValue
|
||||||
{
|
};
|
||||||
currentAssignValue = userGroups.First(p => p.Code == Guid.Parse(currentAssignValue)).Name;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (x.AssignType == AssignTypeEnumType.User)
|
|
||||||
{
|
|
||||||
currentAssignValue = "自己";
|
|
||||||
}
|
|
||||||
|
|
||||||
var r = new DevicePermissionSourceTypeDto
|
var r = new DevicePermissionSourceTypeDto
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user