using OASystem.Domain.Dtos.CRM;
using OASystem.Domain.Dtos.Groups;
using OASystem.Domain.Dtos.Resource;
using OASystem.Domain.Dtos.System;
using OASystem.Domain.Dtos.UserDto;
using OASystem.Domain.Entities;
using OASystem.Domain.Entities.Customer;
using OASystem.Domain.Entities.Business;
using OASystem.Domain.Entities.Groups;
using OASystem.Domain.Entities.Resource;
using OASystem.Domain.Entities.System;
using OASystem.Domain.ViewModels;
using OASystem.Domain.ViewModels.Business;
using OASystem.Domain.ViewModels.Resource;
using OASystem.Domain.ViewModels.System;
using OASystem.Domain.Dtos.Financial;
using OASystem.Domain.Entities.Financial;
using static OASystem.Domain.Dtos.CRM.NewClientDataQueryDto;
using OASystem.Domain.ViewModels.Groups;
using OASystem.Domain.ViewModels.CRM;
using OASystem.Domain.ViewModels.PersonnelModule;
using OASystem.Domain.Entities.PersonnelModule;
using OASystem.Domain.Dtos.PersonnelModule;

namespace OASystem.Domain.AutoMappers
{
    public class _baseMappingProfile : Profile
    {
        public _baseMappingProfile()
        {
            #region Login
            CreateMap<LoginDto, Sys_Users>();
            #endregion

            #region Systen

            #region 消息

            CreateMap<Sys_Message, DepartmentIView>();
            CreateMap<Sys_MessageReadAuth, DepartmentIView>();
            #endregion

            #region 数据类型板块
            CreateMap<OperationSetDataTypeDto, Sys_SetDataType>();
            CreateMap<OperationSetDataDto, Sys_SetData>();
            CreateMap<Sys_SetData, SetDataInfoView>();
            #endregion

            #region 公司板块
            CreateMap<Sys_Company, CompanyView>();
            CreateMap<AddCompanyDto, Sys_Company>();
            CreateMap<EditCompanyDto, Sys_Company>();
            #endregion

            #region 部门板块
            CreateMap<Sys_Department, DepartmentIView>();
            CreateMap<AddDepartmentDto, Sys_Department>();
            CreateMap<EditDepartmentDto, Sys_Department>();
            #endregion

            #region 岗位板块
            CreateMap<Sys_JobPost, JobPostView>();
            CreateMap<AddJobPostDto, Sys_JobPost>();
            CreateMap<Sys_JobPostI, JobPostView>();
            #endregion

            #region 用户板块
            CreateMap<UserDto, Sys_Users>();
            CreateMap<Sys_Users, UserInfo>();
            CreateMap<UserInfo, UserInfoWebView>();

            #endregion

            #region 功能权限板块
            CreateMap<OperationFunInitDta, Sys_PageFunctionPermission>();
            #endregion

            #endregion

            #region Group

            CreateMap<GroupListDto, Grp_DelegationInfo>();
            CreateMap<Grp_ScheduleDetailUpdDto, Grp_ScheduleDetailInfo>();
            CreateMap<Grp_ScheduleDetailInsertDto, Grp_ScheduleDetailInfo>();
            CreateMap<TaskAssignmenDto, Grp_GroupsTaskAssignment>();

            #region 机票费用录入
            CreateMap<AirTicketResOp, Grp_AirTicketReservations>();
            CreateMap<CardPayment, Grp_CreditCardPayment>();
            CreateMap<Grp_GroupCostParameter,AirGroupCostParameterView>();
            CreateMap<Edit_GrpCreditCardPaymentDto, Grp_CreditCardPayment>();
            #endregion

            #region 团组增减款项
            CreateMap<DecreasePaymentsOpDto, Grp_DecreasePayments>();
            #endregion

            #region 商邀费用
            CreateMap<OpInvitationOfficialActivitiesDto, Grp_InvitationOfficialActivities>();
            CreateMap<OpInvitationOfficialActivitiesDto,Res_InvitationOfficialActivityData>();
            CreateMap<Grp_InvitationOfficialActivities, InvitationOfficialActivitiesByIdView>();
            #endregion

            #region 团组英文资料
            CreateMap<OpDelegationEnDataDto, Grp_DelegationEnData>();
            #endregion

            #region 出入境费用明细

            CreateMap<Grp_EnterExitCost, EnterExitCostInfoView>();
            CreateMap<EnterExitCostOperateDto, Grp_EnterExitCost>();
            CreateMap<DayAndCostAddView, Grp_DayAndCost>();

            #endregion

            #region 出入境国家费用标准

            CreateMap<NationalTravelFeeOperateDto, Grp_NationalTravelFee>();
            #endregion

            #region 签证费用录入
            CreateMap<OpVisaPriceDto, Grp_VisaInfo>();
            CreateMap<OpVisaPriceDto, Grp_CreditCardPayment>();
            #endregion

            #endregion
            #region Resource

            #region 车公司资料
            CreateMap<Res_CarData, CarDataView>();
            CreateMap<AddCarDataDto, Res_CarData>();
            CreateMap<Res_CarData, CarDataSelectView>();
            #endregion
            #region 导游地接资料
            CreateMap<Res_LocalGuideData, LocalGuideDataView>();
            CreateMap<LocalGuideOperationDto, Res_LocalGuideData>();
            #endregion
            #region 机场三字码资料
            CreateMap<Res_ThreeCode, ThreeCodeView>();
            CreateMap<ThreeCodeOperationDto, Res_ThreeCode>();
            #endregion
            #region 代理商合作资料
            CreateMap<OpAirTicketAgentDto, Res_AirTicketAgent>();
            #endregion
            #region 酒店资料数据
            CreateMap<Res_HotelData, HotelDataView>();
            CreateMap<Res_HotelData, QueryHotelDataSelect>();
            CreateMap<OperationHotelDto, Res_HotelData>();
            #endregion
            #region 签证费用资料
            CreateMap<Res_CountryFeeCost, CountryFeeCostView>();
            CreateMap<OperationCountryFeeCostDto, Res_CountryFeeCost>();
            #endregion
            #region 物料供应商
            CreateMap<Edit_ResItemVendorDto, Res_ItemVendor>()
                 .ForMember(dest => dest.Address, opt => opt.MapFrom(src => src.VendorAddress))
                 .ForMember(dest => dest.CreateUserId, opt => opt.MapFrom(src => src.SysUserId))
                 .ForMember(dest => dest.Remark, opt => opt.MapFrom(src => src.Remark))
                 .ForMember(dest => dest.FullName, opt => opt.MapFrom(src => src.VendorFullName))
                 .ForMember(dest => dest.Id, opt => opt.MapFrom(src => src.VendorId))
                 .ForMember(dest => dest.Job, opt => opt.MapFrom(src => src.VendorJob))
                 .ForMember(dest => dest.Linker, opt => opt.MapFrom(src => src.VendorLinker))
                 .ForMember(dest => dest.Mobile, opt => opt.MapFrom(src => src.VendorMobile))
                 .ForMember(dest => dest.ShortName, opt => opt.MapFrom(src => src.VendorShortName))
                 .ForMember(dest => dest.BusRange, opt => opt.MapFrom(src => src.BusRange));


            CreateMap<Edit_ResItemInfoDto, Res_ItemDetailInfo>();
            #endregion
            #region 商邀资料
            CreateMap<OpInvitationOfficialActivityDto, Res_InvitationOfficialActivityData>();
            #endregion

            #region 公务出访
            CreateMap<OpOfficialActivitiesDto, Res_OfficialActivities>();
            #endregion
            #region 请示数据库
            CreateMap<OpAskDataDto, Res_AskData>();
            #endregion

            #region 黑屏代码录入
            CreateMap<OpTicketBlackCodeDto, Air_TicketBlackCode>();
            #endregion
            #endregion

            #region Crm

            #region 客户公司资料板块
            CreateMap<OperationClientCompanyDto, Crm_CustomerCompany>();
            #endregion
            #region 客户资料板块
            CreateMap<DeleClient, Crm_DeleClient>();
            CreateMap<CustomerFamily,Crm_VisaCustomerFamily>();
            CreateMap<CustomerCerts, Crm_CustomerCert>();
            CreateMap<VisaCustomerCompany, Crm_VisaCustomerCompany>();
            CreateMap<VisaCustomerSchool,Crm_VisaCustomerSchool>();
            #endregion
            #region 新客户资料
            CreateMap<NewClientOpDto, Crm_NewClientData>();
            CreateMap<Crm_NewClientData, NewClientDataView>();
            #endregion
            #endregion

            #region Business
            #endregion

            #region Financial
            CreateMap<AddDailyFeePaymentDto, Fin_DailyFeePayment>();
            CreateMap<AddDailyFeePaymentContentDto, Fin_DailyFeePaymentContent>();
            CreateMap<EditDailyFeePaymentDto, Fin_DailyFeePayment>();
            CreateMap<EditDailyFeePaymentContentDto, Fin_DailyFeePaymentContent>();

            #endregion

            #region 人事 模块

            //CreateMap<WageSheetInfoView, Pm_WageSheet>();
            CreateMap<Pm_WageSheet, WageSheetItemInfoView>();
            CreateMap<WageAddOrEditDto, Pm_WageSheet>();
            CreateMap<WageSheetInfos, Pm_WageSheet>();
            CreateMap<SalaryCalculatorSingleDto, Pm_WageSheet>();
            CreateMap<WageSheetInfoView, Pm_WageSheet>();
            CreateMap<Pm_WageSheet, WageSheetInfoView>();

            CreateMap<Pm_WageSheet, WageSheetInfoView>();

            CreateMap<WageSheetMonthWorkdaysAddOrEditDto, Pm_WageIssueWorkingDay>();
            CreateMap<CalendarInfoView, Sys_Calendar>();
            #endregion
        }
    }
}
