chengsc
2025-06-04 32cfcc52c647b5dab8db7c5ca7b54ab3041e9d36
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using AutoMapper;
using Model.ModelDto;
using Model.ModelDto.LogDto;
using Model.ModelDto.SysDto;
using Model.ModelVm.SysVm;
using WMS.Entity.SysEntity;
 
namespace Wms.AutoMapperServer
{
    /// <summary>
    /// 配置AutoMapper映射规则
    /// </summary>
    public class AutoMapperProfile : Profile
    {
        public AutoMapperProfile()
        {
            //ReverseMap双向映射
            CreateMap<WMS.Entity.SysEntity.SysUserInfor, UserInfoDto>().ReverseMap(); //用户(实体与Dto)
            CreateMap<WMS.Entity.SysEntity.SysFunctionMenu, FunctionMenuVm>().ReverseMap(); //菜单实体与菜单Vmo
            CreateMap<WMS.Entity.SysEntity.SysFunctionMenu, FunctionMenuDto>().ReverseMap(); //菜单实体与菜单dto
            CreateMap<WMS.Entity.SysEntity.SysDepartment, DepartmentDto>().ReverseMap();//部门(实体与Dto)
            CreateMap<WMS.Entity.SysEntity.SysDictionary, DictionaryDto>().ReverseMap();//字典(实体与Dto)
            CreateMap<WMS.Entity.SysEntity.SysFunSetting, FunSettingDto>().ReverseMap();//功能(实体与Dto)
            CreateMap<WMS.Entity.SysEntity.SysRoles, RoleDto>().ReverseMap();//角色(实体与Dto)
            CreateMap<WMS.Entity.SysEntity.SysMaterials, MaterialsDto>().ReverseMap();//物料(实体与Dto)
            CreateMap<WMS.Entity.SysEntity.SysERPTest, ERPTestDto>().ReverseMap();//erp测试(实体与Dto)
            
            CreateMap<WMS.Entity.SysEntity.SysPackag, AddEditPackagVm>().ReverseMap();//包装(实体与视图模型)
 
 
            CreateMap<WMS.Entity.LogEntity.LogOperationSys, OperationDto>().ReverseMap();//系统操作日志(实体与Dto)
            CreateMap<WMS.Entity.SysEntity.SysException, ExceptionDto>().ReverseMap();//异常处理(实体与Dto)
 
            CreateMap<WMS.Entity.SysEntity.SysInterface, InterfaceVm>().ReverseMap();
            CreateMap<WMS.Entity.SysEntity.SysInterfaceDetail, InterfaceDetailVm>().ReverseMap();
        }
    }
}