using Admin.Core.Common; using Admin.Core.Model; using AutoMapper; using SqlSugar; using static Org.BouncyCastle.Math.EC.ECCurve; namespace Admin.Core.Extensions { /// /// 静态全局 AutoMapper 配置文件 /// public class AutoMapperConfig { public static MapperConfiguration RegisterMappings() { return new MapperConfiguration(cfg => { cfg.AddProfile(new CustomProfile()); // cfg.CreateMap() // .ForMember(dest => dest.LineNo, src => src.MapFrom(d => d.Line_No)). // ForMember(dest => dest.Gongwno, src => src.MapFrom(d => d.Gongwno)). // ForMember(dest => dest.Cpno, src => src.MapFrom(d => d.CpNo)). // ForMember(dest => dest.Cpmodel, src => src.MapFrom(d => d.CpModel)). // ForMember(dest => dest.Factorymodel, src => src.MapFrom(d => d.FactoryModel)). // ForMember(dest => dest.Voltage, src => src.MapFrom(d => d.Voltage)). // ForMember(dest => dest.Point2, src => src.MapFrom(d => d.Point2)). // ForMember(dest => dest.TestTime, src => src.MapFrom(d => d.TestTime)). // ForMember(dest => dest.TestedTime, src => src.MapFrom(d => d.TestedTime)). // ForMember(dest => dest.Etemp, src => src.MapFrom(d => d.Etemp)). // ForMember(dest => dest.BeginDatetime, src => src.MapFrom(d => d.BeginDateTime)). // ForMember(dest => dest.CpResult, src => src.MapFrom(d => d.CpResult)). // ForMember(dest => dest.EndDateTime, src => src.MapFrom(d => d.EndDateTime)). // ForMember(dest => dest.UserName, src => src.MapFrom(d => d.UserName)). // ForMember(dest => dest.Remark, src => src.MapFrom(d => d.Remark)). // ForMember(dest => dest.TestNo, src => src.MapFrom(d => d.TestNo)). // ForMember(dest => dest.Temp_Mes, src => src.MapFrom(d => d.Temp_Mes)). // ForMember(dest => dest.Power_Mes, src => src.MapFrom(d => d.Power_Mes)). // ForMember(dest => dest.Part_Mes, src => src.MapFrom(d => d.Part_Mes)). // ForMember(dest => dest.ErrorCode_Mes, src => src.MapFrom(d => d.ErrorCode_Mes)). // ForMember(dest => dest.T1Name, src => src.MapFrom(d => d.T1Name)). // ForMember(dest => dest.T2Name, src => src.MapFrom(d => d.T2Name)). // ForMember(dest => dest.T3Name, src => src.MapFrom(d => d.T3Name)). // ForMember(dest => dest.T4Name, src => src.MapFrom(d => d.T4Name)). // ForMember(dest => dest.T5Name, src => src.MapFrom(d => d.T5Name)). // ForMember(dest => dest.T6Name, src => src.MapFrom(d => d.T6Name)). // ForMember(dest => dest.IsOrder, src => src.MapFrom(d => d.IsOrder)). // ForMember(dest => dest.LowV_Time, src => src.MapFrom(d => d.LowV_Time)). // ForMember(dest => dest.LowV_PowerMin, src => src.MapFrom(d => d.LowV_PowerMin)). // ForMember(dest => dest.LowV_PowerMax, src => src.MapFrom(d => d.LowV_PowerMax)). // ForMember(dest => dest.LowV_PowerFact, src => src.MapFrom(d => d.LowV_PowerFact)). // ForMember(dest => dest.LowVoltage, src => src.MapFrom(d => d.LowVoltage)); // //ForMember(dest => dest.CreateTime, src => src.MapFrom(d => d.Create_Time)). } ); } } }