|
|
using AutoMapper;using Microsoft.Extensions.Configuration.UserSecrets;using NPOI.SS.Formula.Functions;using Shentun.Peis.MaritalStatuss;using Shentun.WebPeis.AppointPatientRegisters;using Shentun.WebPeis.AppointRegisterAsbitems;using Shentun.WebPeis.AppointScheduleTemplates;using Shentun.WebPeis.DiseaseRiskLevels;using Shentun.WebPeis.DiseaseRisks;using Shentun.WebPeis.Kinships;using Shentun.WebPeis.MaritalStatuss;using Shentun.WebPeis.MedicalPackages;using Shentun.WebPeis.Models;using Shentun.WebPeis.Nations;using Shentun.WebPeis.OrganizationUnits;using Shentun.WebPeis.Persons;using Shentun.WebPeis.QuestionAnswers;using Shentun.WebPeis.Questions;using Shentun.WebPeis.QuestionTypes;using Shentun.WebPeis.Sexs;using Shentun.WebPeis.ThirdInterfaces;using Volo.Abp.Identity;
namespace Shentun.WebPeis;
public class WebPeisApplicationAutoMapperProfile : Profile{ public WebPeisApplicationAutoMapperProfile() { /* You can configure your AutoMapper mapping configuration here. * Alternatively, you can split your mapping configurations * into multiple profile classes for a better organization. */
CreateMap<OrganizationUnitsCreateDto, OrganizationUnit>();
CreateMap<OrganizationUnit, OrganizationUnitsCreateDto>();
CreateMap<OrganizationUnitsDto, OrganizationUnit>();
CreateMap<OrganizationUnit, OrganizationUnitsDto>(); CreateMap<AppOrganizationUnit, OrganizationUnitsDto>();
CreateMap<OrganizationUnitsUpdateDto, OrganizationUnit>();
CreateMap<OrganizationUnit, OrganizationUnitsUpdateDto>();
CreateMap<Person, PersonDto>();
CreateMap<CreatePersonDto, Person>(); CreateMap<CreatePersonKinshipDto, Person>();
CreateMap<CreateNationDto, Nation>(); CreateMap<UpdateNationDto, Nation>(); CreateMap<Nation, NationDto>();
CreateMap<UpdateMaritalStatusDto, MaritalStatus>(); CreateMap<MaritalStatus, MaritalStatusDto>();
CreateMap<UpdateSexDto, Sex>(); CreateMap<Sex, SexDto>();
CreateMap<MedicalPackage, MedicalPackageDto>();
CreateMap<UpdateKinshipDto, Kinship>(); CreateMap<Kinship, KinshipDto>();
CreateMap<CreateAppointPatientRegisterDto, AppointPatientRegister>(); CreateMap<AppointPatientRegister, AppointPatientRegisterDto>();
CreateMap<CreateAppointRegisterAsbitemDto, AppointRegisterAsbitem>();
CreateMap<AppointScheduleTemplate, AppointScheduleTemplateDto>(); //CreateMap<CreateAppointScheduleTemplateDto, AppointScheduleTemplate>()
// .ForMember(d => d.AmStartTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.AmStartTime)))
// .ForMember(d => d.AmStopTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.AmStopTime)))
// .ForMember(d => d.PmStartTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.PmStartTime)))
// .ForMember(d => d.PmStopTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.PmStopTime)));
//CreateMap<UpdateAppointScheduleTemplateDto, AppointScheduleTemplate>()
// .ForMember(d => d.AmStartTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.AmStartTime)))
// .ForMember(d => d.AmStopTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.AmStopTime)))
// .ForMember(d => d.PmStartTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.PmStartTime)))
// .ForMember(d => d.PmStopTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.PmStopTime)));
CreateMap<ThirdInterface, ThirdInterfaceDto>(); CreateMap<CreateThirdInterfaceDto, ThirdInterface>(); CreateMap<UpdateThirdInterfaceDto, ThirdInterface>();
CreateMap<QuestionType, QuestionTypeDto>(); CreateMap<CreateQuestionTypeDto, QuestionType>(); CreateMap<UpdateQuestionTypeDto, QuestionType>();
CreateMap<Question, QuestionDto>(); CreateMap<CreateQuestionDto, Question>(); CreateMap<UpdateQuestionDto, Question>();
CreateMap<QuestionAnswer, QuestionAnswerDto>(); CreateMap<CreateQuestionAnswerDto, QuestionAnswer>(); CreateMap<UpdateQuestionAnswerDto, QuestionAnswer>();
CreateMap<DiseaseRisk, DiseaseRiskDto>(); CreateMap<CreateDiseaseRiskDto, DiseaseRisk>(); CreateMap<UpdateDiseaseRiskDto, DiseaseRisk>();
CreateMap<DiseaseRiskLevel, DiseaseRiskLevelDto>(); CreateMap<CreateDiseaseRiskLevelDto, DiseaseRiskLevel>(); CreateMap<UpdateDiseaseRiskLevelDto, DiseaseRiskLevel>(); }}
|