You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
4.6 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. using AutoMapper;
  2. using Microsoft.Extensions.Configuration.UserSecrets;
  3. using NPOI.SS.Formula.Functions;
  4. using Shentun.Peis.MaritalStatuss;
  5. using Shentun.WebPeis.AppointPatientRegisters;
  6. using Shentun.WebPeis.AppointRegisterAsbitems;
  7. using Shentun.WebPeis.AppointScheduleTemplates;
  8. using Shentun.WebPeis.DiseaseRiskLevels;
  9. using Shentun.WebPeis.DiseaseRisks;
  10. using Shentun.WebPeis.Kinships;
  11. using Shentun.WebPeis.MaritalStatuss;
  12. using Shentun.WebPeis.MedicalPackages;
  13. using Shentun.WebPeis.Models;
  14. using Shentun.WebPeis.Nations;
  15. using Shentun.WebPeis.OrganizationUnits;
  16. using Shentun.WebPeis.Persons;
  17. using Shentun.WebPeis.QuestionAnswers;
  18. using Shentun.WebPeis.Questions;
  19. using Shentun.WebPeis.QuestionTypes;
  20. using Shentun.WebPeis.Sexs;
  21. using Shentun.WebPeis.ThirdInterfaces;
  22. using Volo.Abp.Identity;
  23. namespace Shentun.WebPeis;
  24. public class WebPeisApplicationAutoMapperProfile : Profile
  25. {
  26. public WebPeisApplicationAutoMapperProfile()
  27. {
  28. /* You can configure your AutoMapper mapping configuration here.
  29. * Alternatively, you can split your mapping configurations
  30. * into multiple profile classes for a better organization. */
  31. CreateMap<OrganizationUnitsCreateDto, OrganizationUnit>();
  32. CreateMap<OrganizationUnit, OrganizationUnitsCreateDto>();
  33. CreateMap<OrganizationUnitsDto, OrganizationUnit>();
  34. CreateMap<OrganizationUnit, OrganizationUnitsDto>();
  35. CreateMap<AppOrganizationUnit, OrganizationUnitsDto>();
  36. CreateMap<OrganizationUnitsUpdateDto, OrganizationUnit>();
  37. CreateMap<OrganizationUnit, OrganizationUnitsUpdateDto>();
  38. CreateMap<Person, PersonDto>();
  39. CreateMap<CreatePersonDto, Person>();
  40. CreateMap<CreatePersonKinshipDto, Person>();
  41. CreateMap<CreateNationDto, Nation>();
  42. CreateMap<UpdateNationDto, Nation>();
  43. CreateMap<Nation, NationDto>();
  44. CreateMap<UpdateMaritalStatusDto, MaritalStatus>();
  45. CreateMap<MaritalStatus, MaritalStatusDto>();
  46. CreateMap<UpdateSexDto, Sex>();
  47. CreateMap<Sex, SexDto>();
  48. CreateMap<MedicalPackage, MedicalPackageDto>();
  49. CreateMap<UpdateKinshipDto, Kinship>();
  50. CreateMap<Kinship, KinshipDto>();
  51. CreateMap<CreateAppointPatientRegisterDto, AppointPatientRegister>();
  52. CreateMap<AppointPatientRegister, AppointPatientRegisterDto>();
  53. CreateMap<CreateAppointRegisterAsbitemDto, AppointRegisterAsbitem>();
  54. CreateMap<AppointScheduleTemplate, AppointScheduleTemplateDto>();
  55. //CreateMap<CreateAppointScheduleTemplateDto, AppointScheduleTemplate>()
  56. // .ForMember(d => d.AmStartTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.AmStartTime)))
  57. // .ForMember(d => d.AmStopTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.AmStopTime)))
  58. // .ForMember(d => d.PmStartTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.PmStartTime)))
  59. // .ForMember(d => d.PmStopTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.PmStopTime)));
  60. //CreateMap<UpdateAppointScheduleTemplateDto, AppointScheduleTemplate>()
  61. // .ForMember(d => d.AmStartTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.AmStartTime)))
  62. // .ForMember(d => d.AmStopTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.AmStopTime)))
  63. // .ForMember(d => d.PmStartTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.PmStartTime)))
  64. // .ForMember(d => d.PmStopTime, opt => opt.MapFrom(src => DataHelper.ConvertStringToTimeOnly(src.PmStopTime)));
  65. CreateMap<ThirdInterface, ThirdInterfaceDto>();
  66. CreateMap<CreateThirdInterfaceDto, ThirdInterface>();
  67. CreateMap<UpdateThirdInterfaceDto, ThirdInterface>();
  68. CreateMap<QuestionType, QuestionTypeDto>();
  69. CreateMap<CreateQuestionTypeDto, QuestionType>();
  70. CreateMap<UpdateQuestionTypeDto, QuestionType>();
  71. CreateMap<Question, QuestionDto>();
  72. CreateMap<CreateQuestionDto, Question>();
  73. CreateMap<UpdateQuestionDto, Question>();
  74. CreateMap<QuestionAnswer, QuestionAnswerDto>();
  75. CreateMap<CreateQuestionAnswerDto, QuestionAnswer>();
  76. CreateMap<UpdateQuestionAnswerDto, QuestionAnswer>();
  77. CreateMap<DiseaseRisk, DiseaseRiskDto>();
  78. CreateMap<CreateDiseaseRiskDto, DiseaseRisk>();
  79. CreateMap<UpdateDiseaseRiskDto, DiseaseRisk>();
  80. CreateMap<DiseaseRiskLevel, DiseaseRiskLevelDto>();
  81. CreateMap<CreateDiseaseRiskLevelDto, DiseaseRiskLevel>();
  82. CreateMap<UpdateDiseaseRiskLevelDto, DiseaseRiskLevel>();
  83. }
  84. }