This commit is contained in:
2024-12-18 15:50:21 +08:00
parent 684973e6b7
commit b2c54119ea
214 changed files with 65908 additions and 8461 deletions

View File

@@ -0,0 +1,20 @@
using AutoMapper;
using CapMachine.Model;
using CapMachine.Model.CANLIN;
using CapMachine.Wpf.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.MapperProfile
{
public class CANConfigExdProfile:Profile
{
public CANConfigExdProfile()
{
CreateMap<CANConfigExd, CANConfigExdDto>().ReverseMap();
}
}
}

View File

@@ -0,0 +1,20 @@
using AutoMapper;
using CapMachine.Model;
using CapMachine.Model.CANLIN;
using CapMachine.Wpf.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.MapperProfile
{
public class CanLinRWConfigProfile : Profile
{
public CanLinRWConfigProfile()
{
CreateMap<CanLinRWConfig, CanLinRWConfigDto>().ReverseMap();
}
}
}

View File

@@ -16,7 +16,17 @@ namespace CapMachine.Wpf.MapperProfile
{
public ChartSelectProfile()
{
CreateMap<ConfigChartSelect, ChartSelectDto>()
CreateMap<ConfigChart, ChartSelectDto>()
.ForMember(dest => dest.Index, opt => opt.MapFrom(src => src.Index))
.ForMember(dest => dest.Name, opt => opt.MapFrom(src => src.Name))
//.ForMember(dest => dest.Id, opt => opt.Ignore())//忽略目标类中的属性
//.ForMember(dest => dest.OrderDate, opt => opt.UserValue<DateTime>(DateTime.Now)); //固定值匹配
//.ForMember(dest => dest.TotalAmount, opt => opt.MapFrom(src => src.TotalAmount ?? 0)) //复杂的匹配
//.ForMember(dest => dest.EventDate, opt => opt.MapFrom(src => src.WorkEvent.Date)) //属性匹配匹配源类中WorkEvent.Date到EventDate
.ForMember(dest => dest.YAxis, opt => opt.MapFrom(src => src.ConfigChartYAxis))//
.ReverseMap();
CreateMap<HistoryConfigChart, ChartSelectDto>()
.ForMember(dest => dest.Index, opt => opt.MapFrom(src => src.Index))
.ForMember(dest => dest.Name, opt => opt.MapFrom(src => src.Name))
//.ForMember(dest => dest.Id, opt => opt.Ignore())//忽略目标类中的属性

View File

@@ -0,0 +1,15 @@
using AutoMapper;
using CapMachine.Model;
using CapMachine.Wpf.Dtos;
namespace CapMachine.Wpf.MapperProfile
{
public class ChartTabGroupProFile : Profile
{
public ChartTabGroupProFile()
{
CreateMap<ChartTabGroupDto, ChartTabGroup>().ReverseMap();
CreateMap<ChartTabGroupDto, HistoryChartTabGroup>().ReverseMap();
}
}
}

View File

@@ -1,11 +1,6 @@
using AutoMapper;
using CapMachine.Model;
using CapMachine.Wpf.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.MapperProfile
{

View File

@@ -0,0 +1,19 @@
using AutoMapper;
using CapMachine.Model;
using CapMachine.Wpf.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.MapperProfile
{
public class ConfigLimitProfile:Profile
{
public ConfigLimitProfile()
{
CreateMap<ConfigLimit, ConfigLimitDto>().ReverseMap();
}
}
}

View File

@@ -0,0 +1,19 @@
using AutoMapper;
using CapMachine.Model;
using CapMachine.Wpf.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.MapperProfile
{
public class ConfigPIDProfile:Profile
{
public ConfigPIDProfile()
{
CreateMap<ConfigPID, ConfigPIDDto>().ReverseMap();
}
}
}

View File

@@ -0,0 +1,20 @@
using AutoMapper;
using CapMachine.Model;
using CapMachine.Wpf.Dtos;
using NPOI.SS.Formula.PTG;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.MapperProfile
{
public class ExpInfoProfile : Profile
{
public ExpInfoProfile()
{
CreateMap<ExpInfoDto, HistoryExp>().ReverseMap();
}
}
}

View File

@@ -0,0 +1,23 @@
using AutoMapper;
using CapMachine.Model;
using CapMachine.Wpf.Dtos;
using CapMachine.Wpf.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.MapperProfile
{
/// <summary>
/// 用户 的配置
/// </summary>
public class UserProfile:Profile
{
public UserProfile()
{
CreateMap<UserDto, User>().ReverseMap();
}
}
}