parent
504744da7d
commit
48523274e2
|
@ -6,8 +6,8 @@
|
|||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
<AssemblyVersion>0.1.4.0</AssemblyVersion>
|
||||
<FileVersion>0.1.4.0</FileVersion>
|
||||
<AssemblyVersion>0.2.1.0</AssemblyVersion>
|
||||
<FileVersion>0.2.1.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,26 +1,12 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<!--<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>10</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MD.PersianDateTime.Standard" Version="2.5.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<LangVersion>10</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MD.PersianDateTime.Standard" Version="2.5.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
|
@ -28,6 +14,20 @@
|
|||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.0.3" />
|
||||
</ItemGroup>-->
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<LangVersion>10</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MD.PersianDateTime.Standard" Version="2.5.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="MD.PersianDateTime.Standard" />
|
||||
<Using Include="System.ComponentModel.DataAnnotations" />
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<!--<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
@ -13,10 +13,10 @@
|
|||
<PackageReference Include="MediatR" Version="12.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="8.0.0" />
|
||||
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" />
|
||||
</ItemGroup>
|
||||
</ItemGroup>-->
|
||||
|
||||
|
||||
<!--<PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<LangVersion>10</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@ -32,15 +32,15 @@
|
|||
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
|
||||
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" />
|
||||
</ItemGroup>-->
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Target Name="Mapster">
|
||||
<Exec WorkingDirectory="$(ProjectDir)" Command="dotnet build -p:CopyLocalLockFileAssemblies=true" />
|
||||
<Exec WorkingDirectory="$(ProjectDir)" Command="dotnet tool restore" />
|
||||
<Exec WorkingDirectory="$(ProjectDir)" Command="dotnet mapster extension -a "$(TargetDir)$(ProjectName).dll" -n Brizco.Domain.Mappers -o Mappers" />
|
||||
<Exec WorkingDirectory="$(ProjectDir)" Command="dotnet mapster mapper -a "$(TargetDir)$(ProjectName).dll" -n Brizco.Domain.Mappers -o Mappers" />
|
||||
</Target>
|
||||
<Target Name="Mapster">
|
||||
<Exec WorkingDirectory="$(ProjectDir)" Command="dotnet build -p:CopyLocalLockFileAssemblies=true" />
|
||||
<Exec WorkingDirectory="$(ProjectDir)" Command="dotnet tool restore" />
|
||||
<Exec WorkingDirectory="$(ProjectDir)" Command="dotnet mapster extension -a "$(TargetDir)$(ProjectName).dll" -n Brizco.Domain.Mappers -o Mappers" />
|
||||
<Exec WorkingDirectory="$(ProjectDir)" Command="dotnet mapster mapper -a "$(TargetDir)$(ProjectName).dll" -n Brizco.Domain.Mappers -o Mappers" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Brizco.Common\Brizco.Common.csproj" />
|
||||
|
@ -73,7 +73,6 @@
|
|||
|
||||
<ItemGroup>
|
||||
<Folder Include="Dtos\PageDto\" />
|
||||
<Folder Include="Models\Settings\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -15,6 +15,7 @@ public class ActivitySDto : BaseDto<ActivitySDto , Activity>
|
|||
public ActivityStatus Status { get; internal set; }
|
||||
public DateTime DoneAt { get; internal set; }
|
||||
public bool IsDone { get; set; }
|
||||
public string ShiftTitle { get; set; } = string.Empty;
|
||||
public string PerformanceDescription { get; internal set; } = string.Empty;
|
||||
public string UserFirstName { get; set; } = string.Empty;
|
||||
public string UserLastName { get; set; } = string.Empty;
|
||||
|
|
|
@ -8,6 +8,8 @@ public class ShiftSDto : BaseDto<ShiftSDto,Shift>
|
|||
public int UndoneActivitiesCount { get; set; }
|
||||
public int DoneActivitiesCount { get; set; }
|
||||
public int TotalActivitiesCount { get; set; }
|
||||
public Guid CurrentShiftPlanId { get; set; }
|
||||
public bool HasCurrentShiftPlan { get; set; }
|
||||
public bool IsCompleted { get; set; }
|
||||
public TimeSpan StartAt { get; set; }
|
||||
public TimeSpan EndAt { get; set; }
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
namespace Brizco.Domain.Entities.Complex;
|
||||
|
||||
[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
||||
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
||||
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)]
|
||||
[AdaptTo("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)]
|
||||
[GenerateMapper]
|
||||
public partial class Complex : ApiEntity
|
||||
{
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
namespace Brizco.Domain.Entities.Complex;
|
||||
|
||||
[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
||||
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
||||
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)]
|
||||
[AdaptTo("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)]
|
||||
[GenerateMapper]
|
||||
public partial class Position : ApiEntity
|
||||
{
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
namespace Brizco.Domain.Entities.Complex;
|
||||
|
||||
[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
||||
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
||||
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)]
|
||||
[AdaptTo("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)]
|
||||
[GenerateMapper]
|
||||
public partial class Section : ApiEntity
|
||||
{
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
namespace Brizco.Domain.Entities.Shift;
|
||||
|
||||
[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
||||
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
||||
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)]
|
||||
[AdaptTo("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)]
|
||||
[GenerateMapper]
|
||||
public partial class Shift : ApiEntity
|
||||
{
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
namespace Brizco.Domain.Entities.Shift;
|
||||
|
||||
[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
||||
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
||||
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)]
|
||||
[AdaptTo("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)]
|
||||
[GenerateMapper]
|
||||
public partial class ShiftPlan : ApiEntity
|
||||
{
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
namespace Brizco.Domain.Entities.Task;
|
||||
[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
||||
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
||||
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget )]
|
||||
[AdaptTo("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)]
|
||||
[GenerateMapper]
|
||||
public partial class Task : ApiEntity
|
||||
{
|
||||
|
|
|
@ -26,7 +26,11 @@ namespace Brizco.Domain.Mappers
|
|||
LastName = p1.UserLastName
|
||||
},
|
||||
ShiftId = p1.ShiftId,
|
||||
Shift = new Shift() {Id = p1.ShiftId},
|
||||
Shift = new Shift()
|
||||
{
|
||||
Title = p1.ShiftTitle,
|
||||
Id = p1.ShiftId
|
||||
},
|
||||
Type = p1.Type,
|
||||
Title = p1.Title,
|
||||
Description = p1.Description,
|
||||
|
@ -81,7 +85,11 @@ namespace Brizco.Domain.Mappers
|
|||
LastName = p8.UserLastName
|
||||
},
|
||||
ShiftId = p8.ShiftId,
|
||||
Shift = new Shift() {Id = p8.ShiftId},
|
||||
Shift = new Shift()
|
||||
{
|
||||
Title = p8.ShiftTitle,
|
||||
Id = p8.ShiftId
|
||||
},
|
||||
Type = p8.Type,
|
||||
Title = p8.Title,
|
||||
Description = p8.Description,
|
||||
|
@ -108,6 +116,7 @@ namespace Brizco.Domain.Mappers
|
|||
Status = p9.Status,
|
||||
DoneAt = p9.DoneAt,
|
||||
IsDone = p9.IsDone,
|
||||
ShiftTitle = p9.Shift != null ? p9.Shift.Title : string.Empty,
|
||||
PerformanceDescription = p9.PerformanceDescription,
|
||||
UserFirstName = p9.User != null ? p9.User.FirstName : string.Empty,
|
||||
UserLastName = p9.User != null ? p9.User.LastName : string.Empty,
|
||||
|
@ -136,6 +145,7 @@ namespace Brizco.Domain.Mappers
|
|||
result.Status = p10.Status;
|
||||
result.DoneAt = p10.DoneAt;
|
||||
result.IsDone = p10.IsDone;
|
||||
result.ShiftTitle = p10.Shift != null ? p10.Shift.Title : string.Empty;
|
||||
result.PerformanceDescription = p10.PerformanceDescription;
|
||||
result.UserFirstName = p10.User != null ? p10.User.FirstName : string.Empty;
|
||||
result.UserLastName = p10.User != null ? p10.User.LastName : string.Empty;
|
||||
|
@ -159,6 +169,7 @@ namespace Brizco.Domain.Mappers
|
|||
Status = p12.Status,
|
||||
DoneAt = p12.DoneAt,
|
||||
IsDone = p12.IsDone,
|
||||
ShiftTitle = p12.Shift != null ? p12.Shift.Title : string.Empty,
|
||||
PerformanceDescription = p12.PerformanceDescription,
|
||||
UserFirstName = p12.User != null ? p12.User.FirstName : string.Empty,
|
||||
UserLastName = p12.User != null ? p12.User.LastName : string.Empty,
|
||||
|
@ -210,80 +221,64 @@ namespace Brizco.Domain.Mappers
|
|||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<ActivityLDto, Activity>> ProjectLDtoToActivity => p16 => new Activity()
|
||||
public static ActivityLDto AdaptToLDto(this Activity p16)
|
||||
{
|
||||
Status = p16.Status,
|
||||
DoneAt = p16.DoneAt,
|
||||
IsDone = p16.IsDone,
|
||||
PerformanceDescription = p16.PerformanceDescription,
|
||||
Type = p16.Type,
|
||||
Title = p16.Title,
|
||||
Description = p16.Description,
|
||||
IsDisposable = p16.IsDisposable,
|
||||
SetFor = p16.SetFor,
|
||||
HasDisposed = p16.HasDisposed,
|
||||
Amount = p16.Amount,
|
||||
AmountType = p16.AmountType,
|
||||
Id = p16.Id
|
||||
};
|
||||
public static ActivityLDto AdaptToLDto(this Activity p17)
|
||||
{
|
||||
return p17 == null ? null : new ActivityLDto()
|
||||
return p16 == null ? null : new ActivityLDto()
|
||||
{
|
||||
Type = p17.Type,
|
||||
Title = p17.Title,
|
||||
Description = p17.Description,
|
||||
IsDisposable = p17.IsDisposable,
|
||||
SetFor = p17.SetFor,
|
||||
HasDisposed = p17.HasDisposed,
|
||||
Status = p17.Status,
|
||||
DoneAt = p17.DoneAt,
|
||||
IsDone = p17.IsDone,
|
||||
PerformanceDescription = p17.PerformanceDescription,
|
||||
Amount = p17.Amount,
|
||||
AmountType = p17.AmountType,
|
||||
Id = p17.Id
|
||||
Type = p16.Type,
|
||||
Title = p16.Title,
|
||||
Description = p16.Description,
|
||||
IsDisposable = p16.IsDisposable,
|
||||
SetFor = p16.SetFor,
|
||||
HasDisposed = p16.HasDisposed,
|
||||
Status = p16.Status,
|
||||
DoneAt = p16.DoneAt,
|
||||
IsDone = p16.IsDone,
|
||||
PerformanceDescription = p16.PerformanceDescription,
|
||||
Amount = p16.Amount,
|
||||
AmountType = p16.AmountType,
|
||||
Id = p16.Id
|
||||
};
|
||||
}
|
||||
public static ActivityLDto AdaptTo(this Activity p18, ActivityLDto p19)
|
||||
public static ActivityLDto AdaptTo(this Activity p17, ActivityLDto p18)
|
||||
{
|
||||
if (p18 == null)
|
||||
if (p17 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
ActivityLDto result = p19 ?? new ActivityLDto();
|
||||
ActivityLDto result = p18 ?? new ActivityLDto();
|
||||
|
||||
result.Type = p18.Type;
|
||||
result.Title = p18.Title;
|
||||
result.Description = p18.Description;
|
||||
result.IsDisposable = p18.IsDisposable;
|
||||
result.SetFor = p18.SetFor;
|
||||
result.HasDisposed = p18.HasDisposed;
|
||||
result.Status = p18.Status;
|
||||
result.DoneAt = p18.DoneAt;
|
||||
result.IsDone = p18.IsDone;
|
||||
result.PerformanceDescription = p18.PerformanceDescription;
|
||||
result.Amount = p18.Amount;
|
||||
result.AmountType = p18.AmountType;
|
||||
result.Id = p18.Id;
|
||||
result.Type = p17.Type;
|
||||
result.Title = p17.Title;
|
||||
result.Description = p17.Description;
|
||||
result.IsDisposable = p17.IsDisposable;
|
||||
result.SetFor = p17.SetFor;
|
||||
result.HasDisposed = p17.HasDisposed;
|
||||
result.Status = p17.Status;
|
||||
result.DoneAt = p17.DoneAt;
|
||||
result.IsDone = p17.IsDone;
|
||||
result.PerformanceDescription = p17.PerformanceDescription;
|
||||
result.Amount = p17.Amount;
|
||||
result.AmountType = p17.AmountType;
|
||||
result.Id = p17.Id;
|
||||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<Activity, ActivityLDto>> ProjectToLDto => p20 => new ActivityLDto()
|
||||
public static Expression<Func<Activity, ActivityLDto>> ProjectToLDto => p19 => new ActivityLDto()
|
||||
{
|
||||
Type = p20.Type,
|
||||
Title = p20.Title,
|
||||
Description = p20.Description,
|
||||
IsDisposable = p20.IsDisposable,
|
||||
SetFor = p20.SetFor,
|
||||
HasDisposed = p20.HasDisposed,
|
||||
Status = p20.Status,
|
||||
DoneAt = p20.DoneAt,
|
||||
IsDone = p20.IsDone,
|
||||
PerformanceDescription = p20.PerformanceDescription,
|
||||
Amount = p20.Amount,
|
||||
AmountType = p20.AmountType,
|
||||
Id = p20.Id
|
||||
Type = p19.Type,
|
||||
Title = p19.Title,
|
||||
Description = p19.Description,
|
||||
IsDisposable = p19.IsDisposable,
|
||||
SetFor = p19.SetFor,
|
||||
HasDisposed = p19.HasDisposed,
|
||||
Status = p19.Status,
|
||||
DoneAt = p19.DoneAt,
|
||||
IsDone = p19.IsDone,
|
||||
PerformanceDescription = p19.PerformanceDescription,
|
||||
Amount = p19.Amount,
|
||||
AmountType = p19.AmountType,
|
||||
Id = p19.Id
|
||||
};
|
||||
|
||||
private static ApplicationUser funcMain1(Never p4, ApplicationUser p5, ActivitySDto p2)
|
||||
|
@ -300,6 +295,7 @@ namespace Brizco.Domain.Mappers
|
|||
{
|
||||
Shift result = p7 ?? new Shift();
|
||||
|
||||
result.Title = p2.ShiftTitle;
|
||||
result.Id = p2.ShiftId;
|
||||
return result;
|
||||
|
||||
|
|
|
@ -102,68 +102,49 @@ namespace Brizco.Domain.Mappers
|
|||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<ComplexLDto, Complex>> ProjectLDtoToComplex => p15 => new Complex()
|
||||
public static ComplexLDto AdaptToLDto(this Complex p15)
|
||||
{
|
||||
Name = p15.Name,
|
||||
Address = p15.Address,
|
||||
SupportPhone = p15.SupportPhone,
|
||||
Users = p15.Users.Select<ComplexUserSDto, ComplexUser>(p16 => new ComplexUser()
|
||||
return p15 == null ? null : new ComplexLDto()
|
||||
{
|
||||
UserId = p16.UserId,
|
||||
ComplexId = p16.ComplexId,
|
||||
User = new ApplicationUser() {Id = p16.UserId},
|
||||
Complex = new Complex()
|
||||
{
|
||||
Name = p16.ComplexName,
|
||||
Id = p16.ComplexId
|
||||
},
|
||||
Id = p16.Id
|
||||
}).ToList<ComplexUser>(),
|
||||
Id = p15.Id
|
||||
};
|
||||
public static ComplexLDto AdaptToLDto(this Complex p17)
|
||||
{
|
||||
return p17 == null ? null : new ComplexLDto()
|
||||
{
|
||||
Name = p17.Name,
|
||||
Address = p17.Address,
|
||||
SupportPhone = p17.SupportPhone,
|
||||
Users = funcMain3(p17.Users),
|
||||
Id = p17.Id
|
||||
Name = p15.Name,
|
||||
Address = p15.Address,
|
||||
SupportPhone = p15.SupportPhone,
|
||||
Users = funcMain3(p15.Users),
|
||||
Id = p15.Id
|
||||
};
|
||||
}
|
||||
public static ComplexLDto AdaptTo(this Complex p19, ComplexLDto p20)
|
||||
public static ComplexLDto AdaptTo(this Complex p17, ComplexLDto p18)
|
||||
{
|
||||
if (p19 == null)
|
||||
if (p17 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
ComplexLDto result = p20 ?? new ComplexLDto();
|
||||
ComplexLDto result = p18 ?? new ComplexLDto();
|
||||
|
||||
result.Name = p19.Name;
|
||||
result.Address = p19.Address;
|
||||
result.SupportPhone = p19.SupportPhone;
|
||||
result.Users = funcMain4(p19.Users, result.Users);
|
||||
result.Id = p19.Id;
|
||||
result.Name = p17.Name;
|
||||
result.Address = p17.Address;
|
||||
result.SupportPhone = p17.SupportPhone;
|
||||
result.Users = funcMain4(p17.Users, result.Users);
|
||||
result.Id = p17.Id;
|
||||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<Complex, ComplexLDto>> ProjectToLDto => p23 => new ComplexLDto()
|
||||
public static Expression<Func<Complex, ComplexLDto>> ProjectToLDto => p21 => new ComplexLDto()
|
||||
{
|
||||
Name = p23.Name,
|
||||
Address = p23.Address,
|
||||
SupportPhone = p23.SupportPhone,
|
||||
Users = p23.Users.Select<ComplexUser, ComplexUserSDto>(p24 => new ComplexUserSDto()
|
||||
Name = p21.Name,
|
||||
Address = p21.Address,
|
||||
SupportPhone = p21.SupportPhone,
|
||||
Users = p21.Users.Select<ComplexUser, ComplexUserSDto>(p22 => new ComplexUserSDto()
|
||||
{
|
||||
FirstName = p24.User != null ? p24.User.FirstName : string.Empty,
|
||||
LastName = p24.User != null ? p24.User.LastName : string.Empty,
|
||||
NationalId = p24.User != null ? p24.User.NationalId : string.Empty,
|
||||
ComplexName = p24.Complex != null ? p24.Complex.Name : string.Empty,
|
||||
UserId = p24.UserId,
|
||||
ComplexId = p24.ComplexId,
|
||||
Id = p24.Id
|
||||
FirstName = p22.User != null ? p22.User.FirstName : string.Empty,
|
||||
LastName = p22.User != null ? p22.User.LastName : string.Empty,
|
||||
NationalId = p22.User != null ? p22.User.NationalId : string.Empty,
|
||||
ComplexName = p22.Complex != null ? p22.Complex.Name : string.Empty,
|
||||
UserId = p22.UserId,
|
||||
ComplexId = p22.ComplexId,
|
||||
Id = p22.Id
|
||||
}).ToList<ComplexUserSDto>(),
|
||||
Id = p23.Id
|
||||
Id = p21.Id
|
||||
};
|
||||
|
||||
private static List<ComplexUser> funcMain1(List<ComplexUserSDto> p10)
|
||||
|
@ -230,20 +211,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<ComplexUserSDto> funcMain3(List<ComplexUser> p18)
|
||||
private static List<ComplexUserSDto> funcMain3(List<ComplexUser> p16)
|
||||
{
|
||||
if (p18 == null)
|
||||
if (p16 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<ComplexUserSDto> result = new List<ComplexUserSDto>(p18.Count);
|
||||
List<ComplexUserSDto> result = new List<ComplexUserSDto>(p16.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p18.Count;
|
||||
int len = p16.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
ComplexUser item = p18[i];
|
||||
ComplexUser item = p16[i];
|
||||
result.Add(item == null ? null : new ComplexUserSDto()
|
||||
{
|
||||
FirstName = item.User != null ? item.User.FirstName : string.Empty,
|
||||
|
@ -260,20 +241,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<ComplexUserSDto> funcMain4(List<ComplexUser> p21, List<ComplexUserSDto> p22)
|
||||
private static List<ComplexUserSDto> funcMain4(List<ComplexUser> p19, List<ComplexUserSDto> p20)
|
||||
{
|
||||
if (p21 == null)
|
||||
if (p19 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<ComplexUserSDto> result = new List<ComplexUserSDto>(p21.Count);
|
||||
List<ComplexUserSDto> result = new List<ComplexUserSDto>(p19.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p21.Count;
|
||||
int len = p19.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
ComplexUser item = p21[i];
|
||||
ComplexUser item = p19[i];
|
||||
result.Add(item == null ? null : new ComplexUserSDto()
|
||||
{
|
||||
FirstName = item.User != null ? item.User.FirstName : string.Empty,
|
||||
|
|
|
@ -114,57 +114,43 @@ namespace Brizco.Domain.Mappers
|
|||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<PositionLDto, Position>> ProjectLDtoToPosition => p16 => new Position()
|
||||
public static PositionLDto AdaptToLDto(this Position p16)
|
||||
{
|
||||
Name = p16.Name,
|
||||
Description = p16.Description,
|
||||
ComplexId = p16.ComplexId,
|
||||
Complex = new Complex() {Id = p16.ComplexId},
|
||||
SectionId = p16.SectionId,
|
||||
Section = new Section()
|
||||
return p16 == null ? null : new PositionLDto()
|
||||
{
|
||||
Name = p16.SectionName,
|
||||
Id = p16.SectionId
|
||||
},
|
||||
Id = p16.Id
|
||||
};
|
||||
public static PositionLDto AdaptToLDto(this Position p17)
|
||||
{
|
||||
return p17 == null ? null : new PositionLDto()
|
||||
{
|
||||
Name = p17.Name,
|
||||
Description = p17.Description,
|
||||
ComplexId = p17.ComplexId,
|
||||
SectionId = p17.SectionId,
|
||||
SectionName = p17.Section != null ? p17.Section.Name : string.Empty,
|
||||
Id = p17.Id
|
||||
Name = p16.Name,
|
||||
Description = p16.Description,
|
||||
ComplexId = p16.ComplexId,
|
||||
SectionId = p16.SectionId,
|
||||
SectionName = p16.Section != null ? p16.Section.Name : string.Empty,
|
||||
Id = p16.Id
|
||||
};
|
||||
}
|
||||
public static PositionLDto AdaptTo(this Position p18, PositionLDto p19)
|
||||
public static PositionLDto AdaptTo(this Position p17, PositionLDto p18)
|
||||
{
|
||||
if (p18 == null)
|
||||
if (p17 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
PositionLDto result = p19 ?? new PositionLDto();
|
||||
PositionLDto result = p18 ?? new PositionLDto();
|
||||
|
||||
result.Name = p18.Name;
|
||||
result.Description = p18.Description;
|
||||
result.ComplexId = p18.ComplexId;
|
||||
result.SectionId = p18.SectionId;
|
||||
result.SectionName = p18.Section != null ? p18.Section.Name : string.Empty;
|
||||
result.Id = p18.Id;
|
||||
result.Name = p17.Name;
|
||||
result.Description = p17.Description;
|
||||
result.ComplexId = p17.ComplexId;
|
||||
result.SectionId = p17.SectionId;
|
||||
result.SectionName = p17.Section != null ? p17.Section.Name : string.Empty;
|
||||
result.Id = p17.Id;
|
||||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<Position, PositionLDto>> ProjectToLDto => p20 => new PositionLDto()
|
||||
public static Expression<Func<Position, PositionLDto>> ProjectToLDto => p19 => new PositionLDto()
|
||||
{
|
||||
Name = p20.Name,
|
||||
Description = p20.Description,
|
||||
ComplexId = p20.ComplexId,
|
||||
SectionId = p20.SectionId,
|
||||
SectionName = p20.Section != null ? p20.Section.Name : string.Empty,
|
||||
Id = p20.Id
|
||||
Name = p19.Name,
|
||||
Description = p19.Description,
|
||||
ComplexId = p19.ComplexId,
|
||||
SectionId = p19.SectionId,
|
||||
SectionName = p19.Section != null ? p19.Section.Name : string.Empty,
|
||||
Id = p19.Id
|
||||
};
|
||||
|
||||
private static Complex funcMain1(Never p12, Complex p13, PositionLDto p10)
|
||||
|
|
|
@ -101,62 +101,47 @@ namespace Brizco.Domain.Mappers
|
|||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<SectionLDto, Section>> ProjectLDtoToSection => p15 => new Section()
|
||||
public static SectionLDto AdaptToLDto(this Section p15)
|
||||
{
|
||||
Name = p15.Name,
|
||||
Description = p15.Description,
|
||||
ComplexId = p15.ComplexId,
|
||||
Positions = p15.Positions.Select<PositionSDto, Position>(p16 => new Position()
|
||||
return p15 == null ? null : new SectionLDto()
|
||||
{
|
||||
Name = p16.Name,
|
||||
Description = p16.Description,
|
||||
ComplexId = p16.ComplexId,
|
||||
SectionId = p16.SectionId,
|
||||
Id = p16.Id
|
||||
}).ToList<Position>(),
|
||||
Id = p15.Id
|
||||
};
|
||||
public static SectionLDto AdaptToLDto(this Section p17)
|
||||
{
|
||||
return p17 == null ? null : new SectionLDto()
|
||||
{
|
||||
Name = p17.Name,
|
||||
Description = p17.Description,
|
||||
ComplexId = p17.ComplexId,
|
||||
Positions = funcMain3(p17.Positions),
|
||||
Id = p17.Id
|
||||
Name = p15.Name,
|
||||
Description = p15.Description,
|
||||
ComplexId = p15.ComplexId,
|
||||
Positions = funcMain3(p15.Positions),
|
||||
Id = p15.Id
|
||||
};
|
||||
}
|
||||
public static SectionLDto AdaptTo(this Section p19, SectionLDto p20)
|
||||
public static SectionLDto AdaptTo(this Section p17, SectionLDto p18)
|
||||
{
|
||||
if (p19 == null)
|
||||
if (p17 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
SectionLDto result = p20 ?? new SectionLDto();
|
||||
SectionLDto result = p18 ?? new SectionLDto();
|
||||
|
||||
result.Name = p19.Name;
|
||||
result.Description = p19.Description;
|
||||
result.ComplexId = p19.ComplexId;
|
||||
result.Positions = funcMain4(p19.Positions, result.Positions);
|
||||
result.Id = p19.Id;
|
||||
result.Name = p17.Name;
|
||||
result.Description = p17.Description;
|
||||
result.ComplexId = p17.ComplexId;
|
||||
result.Positions = funcMain4(p17.Positions, result.Positions);
|
||||
result.Id = p17.Id;
|
||||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<Section, SectionLDto>> ProjectToLDto => p23 => new SectionLDto()
|
||||
public static Expression<Func<Section, SectionLDto>> ProjectToLDto => p21 => new SectionLDto()
|
||||
{
|
||||
Name = p23.Name,
|
||||
Description = p23.Description,
|
||||
ComplexId = p23.ComplexId,
|
||||
Positions = p23.Positions.Select<Position, PositionSDto>(p24 => new PositionSDto()
|
||||
Name = p21.Name,
|
||||
Description = p21.Description,
|
||||
ComplexId = p21.ComplexId,
|
||||
Positions = p21.Positions.Select<Position, PositionSDto>(p22 => new PositionSDto()
|
||||
{
|
||||
Name = p24.Name,
|
||||
Description = p24.Description,
|
||||
ComplexId = p24.ComplexId,
|
||||
SectionId = p24.SectionId,
|
||||
Id = p24.Id
|
||||
Name = p22.Name,
|
||||
Description = p22.Description,
|
||||
ComplexId = p22.ComplexId,
|
||||
SectionId = p22.SectionId,
|
||||
Id = p22.Id
|
||||
}).ToList<PositionSDto>(),
|
||||
Id = p23.Id
|
||||
Id = p21.Id
|
||||
};
|
||||
|
||||
private static List<Position> funcMain1(List<PositionSDto> p10)
|
||||
|
@ -215,20 +200,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<PositionSDto> funcMain3(List<Position> p18)
|
||||
private static List<PositionSDto> funcMain3(List<Position> p16)
|
||||
{
|
||||
if (p18 == null)
|
||||
if (p16 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<PositionSDto> result = new List<PositionSDto>(p18.Count);
|
||||
List<PositionSDto> result = new List<PositionSDto>(p16.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p18.Count;
|
||||
int len = p16.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
Position item = p18[i];
|
||||
Position item = p16[i];
|
||||
result.Add(item == null ? null : new PositionSDto()
|
||||
{
|
||||
Name = item.Name,
|
||||
|
@ -243,20 +228,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<PositionSDto> funcMain4(List<Position> p21, List<PositionSDto> p22)
|
||||
private static List<PositionSDto> funcMain4(List<Position> p19, List<PositionSDto> p20)
|
||||
{
|
||||
if (p21 == null)
|
||||
if (p19 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<PositionSDto> result = new List<PositionSDto>(p21.Count);
|
||||
List<PositionSDto> result = new List<PositionSDto>(p19.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p21.Count;
|
||||
int len = p19.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
Position item = p21[i];
|
||||
Position item = p19[i];
|
||||
result.Add(item == null ? null : new PositionSDto()
|
||||
{
|
||||
Name = item.Name,
|
||||
|
|
|
@ -132,71 +132,54 @@ namespace Brizco.Domain.Mappers
|
|||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<ShiftLDto, Shift>> ProjectLDtoToShift => p29 => new Shift()
|
||||
public static ShiftLDto AdaptToLDto(this Shift p29)
|
||||
{
|
||||
Title = p29.Title,
|
||||
StartAt = p29.StartAt,
|
||||
EndAt = p29.EndAt,
|
||||
Description = p29.Description,
|
||||
ComplexId = p29.ComplexId,
|
||||
Complex = new Complex() {Id = p29.ComplexId},
|
||||
Days = p29.Days.Select<DayOfWeek, ShiftDay>(p30 => new ShiftDay() {}).ToList<ShiftDay>(),
|
||||
Routines = p29.Routines.Select<ShiftRoutineSDto, ShiftRoutine>(p31 => new ShiftRoutine()
|
||||
return p29 == null ? null : new ShiftLDto()
|
||||
{
|
||||
RoutineId = p31.RoutineId,
|
||||
ShiftId = p31.ShiftId,
|
||||
Id = p31.Id
|
||||
}).ToList<ShiftRoutine>(),
|
||||
Id = p29.Id
|
||||
};
|
||||
public static ShiftLDto AdaptToLDto(this Shift p32)
|
||||
{
|
||||
return p32 == null ? null : new ShiftLDto()
|
||||
{
|
||||
Title = p32.Title,
|
||||
Description = p32.Description,
|
||||
StartAt = p32.StartAt,
|
||||
EndAt = p32.EndAt,
|
||||
ComplexId = p32.ComplexId,
|
||||
Days = funcMain12(p32.Days.Select<ShiftDay, DayOfWeek>(funcMain13).ToList<DayOfWeek>()),
|
||||
Routines = funcMain14(p32.Routines),
|
||||
Id = p32.Id
|
||||
Title = p29.Title,
|
||||
Description = p29.Description,
|
||||
StartAt = p29.StartAt,
|
||||
EndAt = p29.EndAt,
|
||||
ComplexId = p29.ComplexId,
|
||||
Days = funcMain12(p29.Days.Select<ShiftDay, DayOfWeek>(funcMain13).ToList<DayOfWeek>()),
|
||||
Routines = funcMain14(p29.Routines),
|
||||
Id = p29.Id
|
||||
};
|
||||
}
|
||||
public static ShiftLDto AdaptTo(this Shift p35, ShiftLDto p36)
|
||||
public static ShiftLDto AdaptTo(this Shift p32, ShiftLDto p33)
|
||||
{
|
||||
if (p35 == null)
|
||||
if (p32 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
ShiftLDto result = p36 ?? new ShiftLDto();
|
||||
ShiftLDto result = p33 ?? new ShiftLDto();
|
||||
|
||||
result.Title = p35.Title;
|
||||
result.Description = p35.Description;
|
||||
result.StartAt = p35.StartAt;
|
||||
result.EndAt = p35.EndAt;
|
||||
result.ComplexId = p35.ComplexId;
|
||||
result.Days = funcMain15(p35.Days.Select<ShiftDay, DayOfWeek>(funcMain13).ToList<DayOfWeek>(), result.Days);
|
||||
result.Routines = funcMain16(p35.Routines, result.Routines);
|
||||
result.Id = p35.Id;
|
||||
result.Title = p32.Title;
|
||||
result.Description = p32.Description;
|
||||
result.StartAt = p32.StartAt;
|
||||
result.EndAt = p32.EndAt;
|
||||
result.ComplexId = p32.ComplexId;
|
||||
result.Days = funcMain15(p32.Days.Select<ShiftDay, DayOfWeek>(funcMain13).ToList<DayOfWeek>(), result.Days);
|
||||
result.Routines = funcMain16(p32.Routines, result.Routines);
|
||||
result.Id = p32.Id;
|
||||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<Shift, ShiftLDto>> ProjectToLDto => p41 => new ShiftLDto()
|
||||
public static Expression<Func<Shift, ShiftLDto>> ProjectToLDto => p38 => new ShiftLDto()
|
||||
{
|
||||
Title = p41.Title,
|
||||
Description = p41.Description,
|
||||
StartAt = p41.StartAt,
|
||||
EndAt = p41.EndAt,
|
||||
ComplexId = p41.ComplexId,
|
||||
Days = p41.Days.Select<ShiftDay, DayOfWeek>(d => d.DayOfWeek).ToList<DayOfWeek>(),
|
||||
Routines = p41.Routines.Select<ShiftRoutine, ShiftRoutineSDto>(p42 => new ShiftRoutineSDto()
|
||||
Title = p38.Title,
|
||||
Description = p38.Description,
|
||||
StartAt = p38.StartAt,
|
||||
EndAt = p38.EndAt,
|
||||
ComplexId = p38.ComplexId,
|
||||
Days = p38.Days.Select<ShiftDay, DayOfWeek>(d => d.DayOfWeek).ToList<DayOfWeek>(),
|
||||
Routines = p38.Routines.Select<ShiftRoutine, ShiftRoutineSDto>(p39 => new ShiftRoutineSDto()
|
||||
{
|
||||
RoutineId = p42.RoutineId,
|
||||
ShiftId = p42.ShiftId,
|
||||
Id = p42.Id
|
||||
RoutineId = p39.RoutineId,
|
||||
ShiftId = p39.ShiftId,
|
||||
Id = p39.Id
|
||||
}).ToList<ShiftRoutineSDto>(),
|
||||
Id = p41.Id
|
||||
Id = p38.Id
|
||||
};
|
||||
|
||||
private static List<ShiftDay> funcMain1(List<DayOfWeek> p2)
|
||||
|
@ -400,20 +383,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<DayOfWeek> funcMain12(List<DayOfWeek> p33)
|
||||
private static List<DayOfWeek> funcMain12(List<DayOfWeek> p30)
|
||||
{
|
||||
if (p33 == null)
|
||||
if (p30 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<DayOfWeek> result = new List<DayOfWeek>(p33.Count);
|
||||
List<DayOfWeek> result = new List<DayOfWeek>(p30.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p33.Count;
|
||||
int len = p30.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
DayOfWeek item = p33[i];
|
||||
DayOfWeek item = p30[i];
|
||||
result.Add(item);
|
||||
i++;
|
||||
}
|
||||
|
@ -426,20 +409,20 @@ namespace Brizco.Domain.Mappers
|
|||
return d.DayOfWeek;
|
||||
}
|
||||
|
||||
private static List<ShiftRoutineSDto> funcMain14(List<ShiftRoutine> p34)
|
||||
private static List<ShiftRoutineSDto> funcMain14(List<ShiftRoutine> p31)
|
||||
{
|
||||
if (p34 == null)
|
||||
if (p31 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<ShiftRoutineSDto> result = new List<ShiftRoutineSDto>(p34.Count);
|
||||
List<ShiftRoutineSDto> result = new List<ShiftRoutineSDto>(p31.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p34.Count;
|
||||
int len = p31.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
ShiftRoutine item = p34[i];
|
||||
ShiftRoutine item = p31[i];
|
||||
result.Add(item == null ? null : new ShiftRoutineSDto()
|
||||
{
|
||||
RoutineId = item.RoutineId,
|
||||
|
@ -452,20 +435,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<DayOfWeek> funcMain15(List<DayOfWeek> p37, List<DayOfWeek> p38)
|
||||
private static List<DayOfWeek> funcMain15(List<DayOfWeek> p34, List<DayOfWeek> p35)
|
||||
{
|
||||
if (p37 == null)
|
||||
if (p34 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<DayOfWeek> result = new List<DayOfWeek>(p37.Count);
|
||||
List<DayOfWeek> result = new List<DayOfWeek>(p34.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p37.Count;
|
||||
int len = p34.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
DayOfWeek item = p37[i];
|
||||
DayOfWeek item = p34[i];
|
||||
result.Add(item);
|
||||
i++;
|
||||
}
|
||||
|
@ -473,20 +456,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<ShiftRoutineSDto> funcMain16(List<ShiftRoutine> p39, List<ShiftRoutineSDto> p40)
|
||||
private static List<ShiftRoutineSDto> funcMain16(List<ShiftRoutine> p36, List<ShiftRoutineSDto> p37)
|
||||
{
|
||||
if (p39 == null)
|
||||
if (p36 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<ShiftRoutineSDto> result = new List<ShiftRoutineSDto>(p39.Count);
|
||||
List<ShiftRoutineSDto> result = new List<ShiftRoutineSDto>(p36.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p39.Count;
|
||||
int len = p36.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
ShiftRoutine item = p39[i];
|
||||
ShiftRoutine item = p36[i];
|
||||
result.Add(item == null ? null : new ShiftRoutineSDto()
|
||||
{
|
||||
RoutineId = item.RoutineId,
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace Brizco.Domain.Mappers
|
|||
{
|
||||
return p1 == null ? null : new ShiftPlan()
|
||||
{
|
||||
PlanFor = p1.PlanFor,
|
||||
IsCompleted = p1.IsCompleted,
|
||||
CompletePercent = p1.CompletePercent,
|
||||
CompleteDescription = p1.CompleteDescription,
|
||||
|
@ -29,6 +30,7 @@ namespace Brizco.Domain.Mappers
|
|||
}
|
||||
ShiftPlan result = p3 ?? new ShiftPlan();
|
||||
|
||||
result.PlanFor = p2.PlanFor;
|
||||
result.IsCompleted = p2.IsCompleted;
|
||||
result.CompletePercent = p2.CompletePercent;
|
||||
result.CompleteDescription = p2.CompleteDescription;
|
||||
|
@ -39,6 +41,7 @@ namespace Brizco.Domain.Mappers
|
|||
}
|
||||
public static Expression<Func<ShiftPlanSDto, ShiftPlan>> ProjectToShiftPlan => p4 => new ShiftPlan()
|
||||
{
|
||||
PlanFor = p4.PlanFor,
|
||||
IsCompleted = p4.IsCompleted,
|
||||
CompletePercent = p4.CompletePercent,
|
||||
CompleteDescription = p4.CompleteDescription,
|
||||
|
@ -49,6 +52,7 @@ namespace Brizco.Domain.Mappers
|
|||
{
|
||||
return p5 == null ? null : new ShiftPlanSDto()
|
||||
{
|
||||
PlanFor = p5.PlanFor,
|
||||
IsCompleted = p5.IsCompleted,
|
||||
CompletePercent = p5.CompletePercent,
|
||||
CompleteDescription = p5.CompleteDescription,
|
||||
|
@ -65,6 +69,7 @@ namespace Brizco.Domain.Mappers
|
|||
}
|
||||
ShiftPlanSDto result = p7 ?? new ShiftPlanSDto();
|
||||
|
||||
result.PlanFor = p6.PlanFor;
|
||||
result.IsCompleted = p6.IsCompleted;
|
||||
result.CompletePercent = p6.CompletePercent;
|
||||
result.CompleteDescription = p6.CompleteDescription;
|
||||
|
@ -76,6 +81,7 @@ namespace Brizco.Domain.Mappers
|
|||
}
|
||||
public static Expression<Func<ShiftPlan, ShiftPlanSDto>> ProjectToSDto => p8 => new ShiftPlanSDto()
|
||||
{
|
||||
PlanFor = p8.PlanFor,
|
||||
IsCompleted = p8.IsCompleted,
|
||||
CompletePercent = p8.CompletePercent,
|
||||
CompleteDescription = p8.CompleteDescription,
|
||||
|
@ -116,72 +122,55 @@ namespace Brizco.Domain.Mappers
|
|||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<ShiftPlanLDto, ShiftPlan>> ProjectLDtoToShiftPlan => p15 => new ShiftPlan()
|
||||
public static ShiftPlanLDto AdaptToLDto(this ShiftPlan p15)
|
||||
{
|
||||
PlanFor = p15.PlanFor,
|
||||
IsCompleted = p15.IsCompleted,
|
||||
CompletePercent = p15.CompletePercent,
|
||||
CompleteDescription = p15.CompleteDescription,
|
||||
ShiftId = p15.ShiftId,
|
||||
RoutineId = p15.RoutineId,
|
||||
Users = p15.Users.Select<ShiftPlanUserSDto, ShiftPlanUser>(p16 => new ShiftPlanUser()
|
||||
return p15 == null ? null : new ShiftPlanLDto()
|
||||
{
|
||||
ShiftPlanId = p16.ShiftPlanId,
|
||||
PositionId = p16.PositionId,
|
||||
UserId = p16.UserId,
|
||||
Id = p16.Id
|
||||
}).ToList<ShiftPlanUser>(),
|
||||
Id = p15.Id
|
||||
};
|
||||
public static ShiftPlanLDto AdaptToLDto(this ShiftPlan p17)
|
||||
{
|
||||
return p17 == null ? null : new ShiftPlanLDto()
|
||||
{
|
||||
PlanFor = p17.PlanFor,
|
||||
RoutineId = p17.RoutineId,
|
||||
IsCompleted = p17.IsCompleted,
|
||||
CompletePercent = p17.CompletePercent,
|
||||
CompleteDescription = p17.CompleteDescription,
|
||||
ShiftId = p17.ShiftId,
|
||||
Users = funcMain3(p17.Users),
|
||||
Id = p17.Id
|
||||
PlanFor = p15.PlanFor,
|
||||
RoutineId = p15.RoutineId,
|
||||
IsCompleted = p15.IsCompleted,
|
||||
CompletePercent = p15.CompletePercent,
|
||||
CompleteDescription = p15.CompleteDescription,
|
||||
ShiftId = p15.ShiftId,
|
||||
Users = funcMain3(p15.Users),
|
||||
Id = p15.Id
|
||||
};
|
||||
}
|
||||
public static ShiftPlanLDto AdaptTo(this ShiftPlan p19, ShiftPlanLDto p20)
|
||||
public static ShiftPlanLDto AdaptTo(this ShiftPlan p17, ShiftPlanLDto p18)
|
||||
{
|
||||
if (p19 == null)
|
||||
if (p17 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
ShiftPlanLDto result = p20 ?? new ShiftPlanLDto();
|
||||
ShiftPlanLDto result = p18 ?? new ShiftPlanLDto();
|
||||
|
||||
result.PlanFor = p19.PlanFor;
|
||||
result.RoutineId = p19.RoutineId;
|
||||
result.IsCompleted = p19.IsCompleted;
|
||||
result.CompletePercent = p19.CompletePercent;
|
||||
result.CompleteDescription = p19.CompleteDescription;
|
||||
result.ShiftId = p19.ShiftId;
|
||||
result.Users = funcMain4(p19.Users, result.Users);
|
||||
result.Id = p19.Id;
|
||||
result.PlanFor = p17.PlanFor;
|
||||
result.RoutineId = p17.RoutineId;
|
||||
result.IsCompleted = p17.IsCompleted;
|
||||
result.CompletePercent = p17.CompletePercent;
|
||||
result.CompleteDescription = p17.CompleteDescription;
|
||||
result.ShiftId = p17.ShiftId;
|
||||
result.Users = funcMain4(p17.Users, result.Users);
|
||||
result.Id = p17.Id;
|
||||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<ShiftPlan, ShiftPlanLDto>> ProjectToLDto => p23 => new ShiftPlanLDto()
|
||||
public static Expression<Func<ShiftPlan, ShiftPlanLDto>> ProjectToLDto => p21 => new ShiftPlanLDto()
|
||||
{
|
||||
PlanFor = p23.PlanFor,
|
||||
RoutineId = p23.RoutineId,
|
||||
IsCompleted = p23.IsCompleted,
|
||||
CompletePercent = p23.CompletePercent,
|
||||
CompleteDescription = p23.CompleteDescription,
|
||||
ShiftId = p23.ShiftId,
|
||||
Users = p23.Users.Select<ShiftPlanUser, ShiftPlanUserSDto>(p24 => new ShiftPlanUserSDto()
|
||||
PlanFor = p21.PlanFor,
|
||||
RoutineId = p21.RoutineId,
|
||||
IsCompleted = p21.IsCompleted,
|
||||
CompletePercent = p21.CompletePercent,
|
||||
CompleteDescription = p21.CompleteDescription,
|
||||
ShiftId = p21.ShiftId,
|
||||
Users = p21.Users.Select<ShiftPlanUser, ShiftPlanUserSDto>(p22 => new ShiftPlanUserSDto()
|
||||
{
|
||||
ShiftPlanId = p24.ShiftPlanId,
|
||||
UserId = p24.UserId,
|
||||
PositionId = p24.PositionId,
|
||||
Id = p24.Id
|
||||
ShiftPlanId = p22.ShiftPlanId,
|
||||
UserId = p22.UserId,
|
||||
PositionId = p22.PositionId,
|
||||
Id = p22.Id
|
||||
}).ToList<ShiftPlanUserSDto>(),
|
||||
Id = p23.Id
|
||||
Id = p21.Id
|
||||
};
|
||||
|
||||
private static List<ShiftPlanUser> funcMain1(List<ShiftPlanUserSDto> p10)
|
||||
|
@ -238,20 +227,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<ShiftPlanUserSDto> funcMain3(List<ShiftPlanUser> p18)
|
||||
private static List<ShiftPlanUserSDto> funcMain3(List<ShiftPlanUser> p16)
|
||||
{
|
||||
if (p18 == null)
|
||||
if (p16 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<ShiftPlanUserSDto> result = new List<ShiftPlanUserSDto>(p18.Count);
|
||||
List<ShiftPlanUserSDto> result = new List<ShiftPlanUserSDto>(p16.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p18.Count;
|
||||
int len = p16.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
ShiftPlanUser item = p18[i];
|
||||
ShiftPlanUser item = p16[i];
|
||||
result.Add(item == null ? null : new ShiftPlanUserSDto()
|
||||
{
|
||||
ShiftPlanId = item.ShiftPlanId,
|
||||
|
@ -265,20 +254,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<ShiftPlanUserSDto> funcMain4(List<ShiftPlanUser> p21, List<ShiftPlanUserSDto> p22)
|
||||
private static List<ShiftPlanUserSDto> funcMain4(List<ShiftPlanUser> p19, List<ShiftPlanUserSDto> p20)
|
||||
{
|
||||
if (p21 == null)
|
||||
if (p19 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<ShiftPlanUserSDto> result = new List<ShiftPlanUserSDto>(p21.Count);
|
||||
List<ShiftPlanUserSDto> result = new List<ShiftPlanUserSDto>(p19.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p21.Count;
|
||||
int len = p19.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
ShiftPlanUser item = p21[i];
|
||||
ShiftPlanUser item = p19[i];
|
||||
result.Add(item == null ? null : new ShiftPlanUserSDto()
|
||||
{
|
||||
ShiftPlanId = item.ShiftPlanId,
|
||||
|
|
|
@ -186,122 +186,86 @@ namespace Brizco.Domain.Mappers
|
|||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<TaskLDto, Task>> ProjectLDtoToTask => p47 => new Task()
|
||||
public static TaskLDto AdaptToLDto(this Task p47)
|
||||
{
|
||||
Type = p47.Type,
|
||||
Title = p47.Title,
|
||||
Description = p47.Description,
|
||||
IsDisposable = p47.IsDisposable,
|
||||
SetFor = Convert.ToDateTime(p47.SetFor),
|
||||
HasDisposed = p47.HasDisposed,
|
||||
ScheduleType = p47.ScheduleType,
|
||||
Amount = p47.Amount,
|
||||
AmountType = p47.AmountType,
|
||||
Shifts = p47.Shifts.Select<TaskShiftSDto, TaskShift>(p48 => new TaskShift()
|
||||
return p47 == null ? null : new TaskLDto()
|
||||
{
|
||||
TaskId = p48.TaskId,
|
||||
ShiftId = p48.ShiftId
|
||||
}).ToList<TaskShift>(),
|
||||
Days = p47.Days.Select<TaskDaySDto, TaskDay>(p49 => new TaskDay()
|
||||
{
|
||||
DayOfWeek = p49.DayOfWeek,
|
||||
TaskId = p49.TaskId,
|
||||
Id = p49.Id
|
||||
}).ToList<TaskDay>(),
|
||||
Routines = p47.Routines.Select<TaskRoutineSDto, TaskRoutine>(p50 => new TaskRoutine()
|
||||
{
|
||||
TaskId = p50.TaskId,
|
||||
RoutineId = p50.RoutineId,
|
||||
Id = p50.Id
|
||||
}).ToList<TaskRoutine>(),
|
||||
Positions = p47.Positions.Select<TaskPositionSDto, TaskPosition>(p51 => new TaskPosition()
|
||||
{
|
||||
PositionId = p51.PositionId,
|
||||
TaskId = p51.TaskId,
|
||||
Id = p51.Id
|
||||
}).ToList<TaskPosition>(),
|
||||
Id = p47.Id
|
||||
};
|
||||
public static TaskLDto AdaptToLDto(this Task p52)
|
||||
{
|
||||
return p52 == null ? null : new TaskLDto()
|
||||
{
|
||||
Type = p52.Type,
|
||||
Title = p52.Title,
|
||||
Description = p52.Description,
|
||||
IsDisposable = p52.IsDisposable,
|
||||
SetFor = DateTimeExtensions.DateTimeToUnixTimeStamp(p52.SetFor),
|
||||
HasDisposed = p52.HasDisposed,
|
||||
ScheduleType = p52.ScheduleType,
|
||||
Amount = p52.Amount,
|
||||
AmountType = p52.AmountType,
|
||||
Shifts = funcMain25(p52.Shifts),
|
||||
Positions = funcMain26(p52.Positions),
|
||||
Days = funcMain27(p52.Days),
|
||||
Routines = funcMain28(p52.Routines),
|
||||
Id = p52.Id
|
||||
Type = p47.Type,
|
||||
Title = p47.Title,
|
||||
Description = p47.Description,
|
||||
IsDisposable = p47.IsDisposable,
|
||||
SetFor = DateTimeExtensions.DateTimeToUnixTimeStamp(p47.SetFor),
|
||||
HasDisposed = p47.HasDisposed,
|
||||
ScheduleType = p47.ScheduleType,
|
||||
Amount = p47.Amount,
|
||||
AmountType = p47.AmountType,
|
||||
Shifts = funcMain25(p47.Shifts),
|
||||
Positions = funcMain26(p47.Positions),
|
||||
Days = funcMain27(p47.Days),
|
||||
Routines = funcMain28(p47.Routines),
|
||||
Id = p47.Id
|
||||
};
|
||||
}
|
||||
public static TaskLDto AdaptTo(this Task p57, TaskLDto p58)
|
||||
public static TaskLDto AdaptTo(this Task p52, TaskLDto p53)
|
||||
{
|
||||
if (p57 == null)
|
||||
if (p52 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
TaskLDto result = p58 ?? new TaskLDto();
|
||||
TaskLDto result = p53 ?? new TaskLDto();
|
||||
|
||||
result.Type = p57.Type;
|
||||
result.Title = p57.Title;
|
||||
result.Description = p57.Description;
|
||||
result.IsDisposable = p57.IsDisposable;
|
||||
result.SetFor = DateTimeExtensions.DateTimeToUnixTimeStamp(p57.SetFor);
|
||||
result.HasDisposed = p57.HasDisposed;
|
||||
result.ScheduleType = p57.ScheduleType;
|
||||
result.Amount = p57.Amount;
|
||||
result.AmountType = p57.AmountType;
|
||||
result.Shifts = funcMain29(p57.Shifts, result.Shifts);
|
||||
result.Positions = funcMain30(p57.Positions, result.Positions);
|
||||
result.Days = funcMain31(p57.Days, result.Days);
|
||||
result.Routines = funcMain32(p57.Routines, result.Routines);
|
||||
result.Id = p57.Id;
|
||||
result.Type = p52.Type;
|
||||
result.Title = p52.Title;
|
||||
result.Description = p52.Description;
|
||||
result.IsDisposable = p52.IsDisposable;
|
||||
result.SetFor = DateTimeExtensions.DateTimeToUnixTimeStamp(p52.SetFor);
|
||||
result.HasDisposed = p52.HasDisposed;
|
||||
result.ScheduleType = p52.ScheduleType;
|
||||
result.Amount = p52.Amount;
|
||||
result.AmountType = p52.AmountType;
|
||||
result.Shifts = funcMain29(p52.Shifts, result.Shifts);
|
||||
result.Positions = funcMain30(p52.Positions, result.Positions);
|
||||
result.Days = funcMain31(p52.Days, result.Days);
|
||||
result.Routines = funcMain32(p52.Routines, result.Routines);
|
||||
result.Id = p52.Id;
|
||||
return result;
|
||||
|
||||
}
|
||||
public static Expression<Func<Task, TaskLDto>> ProjectToLDto => p67 => new TaskLDto()
|
||||
public static Expression<Func<Task, TaskLDto>> ProjectToLDto => p62 => new TaskLDto()
|
||||
{
|
||||
Type = p67.Type,
|
||||
Title = p67.Title,
|
||||
Description = p67.Description,
|
||||
IsDisposable = p67.IsDisposable,
|
||||
SetFor = DateTimeExtensions.DateTimeToUnixTimeStamp(p67.SetFor),
|
||||
HasDisposed = p67.HasDisposed,
|
||||
ScheduleType = p67.ScheduleType,
|
||||
Amount = p67.Amount,
|
||||
AmountType = p67.AmountType,
|
||||
Shifts = p67.Shifts.Select<TaskShift, TaskShiftSDto>(p68 => new TaskShiftSDto()
|
||||
Type = p62.Type,
|
||||
Title = p62.Title,
|
||||
Description = p62.Description,
|
||||
IsDisposable = p62.IsDisposable,
|
||||
SetFor = DateTimeExtensions.DateTimeToUnixTimeStamp(p62.SetFor),
|
||||
HasDisposed = p62.HasDisposed,
|
||||
ScheduleType = p62.ScheduleType,
|
||||
Amount = p62.Amount,
|
||||
AmountType = p62.AmountType,
|
||||
Shifts = p62.Shifts.Select<TaskShift, TaskShiftSDto>(p63 => new TaskShiftSDto()
|
||||
{
|
||||
ShiftId = p68.ShiftId,
|
||||
TaskId = p68.TaskId
|
||||
ShiftId = p63.ShiftId,
|
||||
TaskId = p63.TaskId
|
||||
}).ToList<TaskShiftSDto>(),
|
||||
Positions = p67.Positions.Select<TaskPosition, TaskPositionSDto>(p69 => new TaskPositionSDto()
|
||||
Positions = p62.Positions.Select<TaskPosition, TaskPositionSDto>(p64 => new TaskPositionSDto()
|
||||
{
|
||||
PositionId = p69.PositionId,
|
||||
TaskId = p69.TaskId,
|
||||
Id = p69.Id
|
||||
PositionId = p64.PositionId,
|
||||
TaskId = p64.TaskId,
|
||||
Id = p64.Id
|
||||
}).ToList<TaskPositionSDto>(),
|
||||
Days = p67.Days.Select<TaskDay, TaskDaySDto>(p70 => new TaskDaySDto()
|
||||
Days = p62.Days.Select<TaskDay, TaskDaySDto>(p65 => new TaskDaySDto()
|
||||
{
|
||||
DayOfWeek = p70.DayOfWeek,
|
||||
TaskId = p70.TaskId,
|
||||
Id = p70.Id
|
||||
DayOfWeek = p65.DayOfWeek,
|
||||
TaskId = p65.TaskId,
|
||||
Id = p65.Id
|
||||
}).ToList<TaskDaySDto>(),
|
||||
Routines = p67.Routines.Select<TaskRoutine, TaskRoutineSDto>(p71 => new TaskRoutineSDto()
|
||||
Routines = p62.Routines.Select<TaskRoutine, TaskRoutineSDto>(p66 => new TaskRoutineSDto()
|
||||
{
|
||||
TaskId = p71.TaskId,
|
||||
RoutineId = p71.RoutineId,
|
||||
Id = p71.Id
|
||||
TaskId = p66.TaskId,
|
||||
RoutineId = p66.RoutineId,
|
||||
Id = p66.Id
|
||||
}).ToList<TaskRoutineSDto>(),
|
||||
Id = p67.Id
|
||||
Id = p62.Id
|
||||
};
|
||||
|
||||
private static List<TaskShift> funcMain1(List<string> p2)
|
||||
|
@ -774,20 +738,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<TaskShiftSDto> funcMain25(List<TaskShift> p53)
|
||||
private static List<TaskShiftSDto> funcMain25(List<TaskShift> p48)
|
||||
{
|
||||
if (p53 == null)
|
||||
if (p48 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<TaskShiftSDto> result = new List<TaskShiftSDto>(p53.Count);
|
||||
List<TaskShiftSDto> result = new List<TaskShiftSDto>(p48.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p53.Count;
|
||||
int len = p48.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
TaskShift item = p53[i];
|
||||
TaskShift item = p48[i];
|
||||
result.Add(item == null ? null : new TaskShiftSDto()
|
||||
{
|
||||
ShiftId = item.ShiftId,
|
||||
|
@ -799,20 +763,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<TaskPositionSDto> funcMain26(List<TaskPosition> p54)
|
||||
private static List<TaskPositionSDto> funcMain26(List<TaskPosition> p49)
|
||||
{
|
||||
if (p54 == null)
|
||||
if (p49 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<TaskPositionSDto> result = new List<TaskPositionSDto>(p54.Count);
|
||||
List<TaskPositionSDto> result = new List<TaskPositionSDto>(p49.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p54.Count;
|
||||
int len = p49.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
TaskPosition item = p54[i];
|
||||
TaskPosition item = p49[i];
|
||||
result.Add(item == null ? null : new TaskPositionSDto()
|
||||
{
|
||||
PositionId = item.PositionId,
|
||||
|
@ -825,20 +789,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<TaskDaySDto> funcMain27(List<TaskDay> p55)
|
||||
private static List<TaskDaySDto> funcMain27(List<TaskDay> p50)
|
||||
{
|
||||
if (p55 == null)
|
||||
if (p50 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<TaskDaySDto> result = new List<TaskDaySDto>(p55.Count);
|
||||
List<TaskDaySDto> result = new List<TaskDaySDto>(p50.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p55.Count;
|
||||
int len = p50.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
TaskDay item = p55[i];
|
||||
TaskDay item = p50[i];
|
||||
result.Add(item == null ? null : new TaskDaySDto()
|
||||
{
|
||||
DayOfWeek = item.DayOfWeek,
|
||||
|
@ -851,20 +815,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<TaskRoutineSDto> funcMain28(List<TaskRoutine> p56)
|
||||
private static List<TaskRoutineSDto> funcMain28(List<TaskRoutine> p51)
|
||||
{
|
||||
if (p56 == null)
|
||||
if (p51 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<TaskRoutineSDto> result = new List<TaskRoutineSDto>(p56.Count);
|
||||
List<TaskRoutineSDto> result = new List<TaskRoutineSDto>(p51.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p56.Count;
|
||||
int len = p51.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
TaskRoutine item = p56[i];
|
||||
TaskRoutine item = p51[i];
|
||||
result.Add(item == null ? null : new TaskRoutineSDto()
|
||||
{
|
||||
TaskId = item.TaskId,
|
||||
|
@ -877,20 +841,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<TaskShiftSDto> funcMain29(List<TaskShift> p59, List<TaskShiftSDto> p60)
|
||||
private static List<TaskShiftSDto> funcMain29(List<TaskShift> p54, List<TaskShiftSDto> p55)
|
||||
{
|
||||
if (p59 == null)
|
||||
if (p54 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<TaskShiftSDto> result = new List<TaskShiftSDto>(p59.Count);
|
||||
List<TaskShiftSDto> result = new List<TaskShiftSDto>(p54.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p59.Count;
|
||||
int len = p54.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
TaskShift item = p59[i];
|
||||
TaskShift item = p54[i];
|
||||
result.Add(item == null ? null : new TaskShiftSDto()
|
||||
{
|
||||
ShiftId = item.ShiftId,
|
||||
|
@ -902,20 +866,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<TaskPositionSDto> funcMain30(List<TaskPosition> p61, List<TaskPositionSDto> p62)
|
||||
private static List<TaskPositionSDto> funcMain30(List<TaskPosition> p56, List<TaskPositionSDto> p57)
|
||||
{
|
||||
if (p61 == null)
|
||||
if (p56 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<TaskPositionSDto> result = new List<TaskPositionSDto>(p61.Count);
|
||||
List<TaskPositionSDto> result = new List<TaskPositionSDto>(p56.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p61.Count;
|
||||
int len = p56.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
TaskPosition item = p61[i];
|
||||
TaskPosition item = p56[i];
|
||||
result.Add(item == null ? null : new TaskPositionSDto()
|
||||
{
|
||||
PositionId = item.PositionId,
|
||||
|
@ -928,20 +892,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<TaskDaySDto> funcMain31(List<TaskDay> p63, List<TaskDaySDto> p64)
|
||||
private static List<TaskDaySDto> funcMain31(List<TaskDay> p58, List<TaskDaySDto> p59)
|
||||
{
|
||||
if (p63 == null)
|
||||
if (p58 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<TaskDaySDto> result = new List<TaskDaySDto>(p63.Count);
|
||||
List<TaskDaySDto> result = new List<TaskDaySDto>(p58.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p63.Count;
|
||||
int len = p58.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
TaskDay item = p63[i];
|
||||
TaskDay item = p58[i];
|
||||
result.Add(item == null ? null : new TaskDaySDto()
|
||||
{
|
||||
DayOfWeek = item.DayOfWeek,
|
||||
|
@ -954,20 +918,20 @@ namespace Brizco.Domain.Mappers
|
|||
|
||||
}
|
||||
|
||||
private static List<TaskRoutineSDto> funcMain32(List<TaskRoutine> p65, List<TaskRoutineSDto> p66)
|
||||
private static List<TaskRoutineSDto> funcMain32(List<TaskRoutine> p60, List<TaskRoutineSDto> p61)
|
||||
{
|
||||
if (p65 == null)
|
||||
if (p60 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<TaskRoutineSDto> result = new List<TaskRoutineSDto>(p65.Count);
|
||||
List<TaskRoutineSDto> result = new List<TaskRoutineSDto>(p60.Count);
|
||||
|
||||
int i = 0;
|
||||
int len = p65.Count;
|
||||
int len = p60.Count;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
TaskRoutine item = p65[i];
|
||||
TaskRoutine item = p60[i];
|
||||
result.Add(item == null ? null : new TaskRoutineSDto()
|
||||
{
|
||||
TaskId = item.TaskId,
|
||||
|
|
|
@ -16,6 +16,7 @@ public class MapsterRegister : IRegister
|
|||
config.NewConfig<Activity, ActivitySDto>()
|
||||
.Map("UserFirstName", o => o.User !=null ? o.User.FirstName : string.Empty)
|
||||
.Map("UserLastName", o => o.User != null ? o.User.LastName : string.Empty)
|
||||
.Map("ShiftTitle",o=>o.Shift != null ? o.Shift.Title : string.Empty)
|
||||
.TwoWays();
|
||||
|
||||
config.NewConfig<Task, TaskLDto>()
|
||||
|
|
|
@ -47,7 +47,9 @@ public class GetShiftPlansQueryHandler : IRequestHandler<GetShiftsQuery, List<Sh
|
|||
var existedShiftPlan = await _repositoryWrapper.SetRepository<Domain.Entities.Shift.ShiftPlan>()
|
||||
.TableNoTracking
|
||||
.FirstOrDefaultAsync(s => s.ShiftId == shift.Id && s.PlanFor.Date == selectedDate.Date, cancellationToken);
|
||||
shift.IsCompleted = existedShiftPlan is { IsCompleted : true };
|
||||
shift.IsCompleted = existedShiftPlan?.IsCompleted ?? false;
|
||||
shift.CurrentShiftPlanId = existedShiftPlan?.Id ?? default;
|
||||
shift.HasCurrentShiftPlan = existedShiftPlan != null;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue