|
|
|
@ -0,0 +1,144 @@
|
|
|
|
|
using DS.WMS.Core.Op.Dtos;
|
|
|
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
|
|
using Mapster;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Op.Dtos.Mapper
|
|
|
|
|
{
|
|
|
|
|
public static class OpMapsterSetup
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 添加映射规则
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static void AddOpPlatMapsterSetup(this IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
TypeAdapterConfig<ServiceProjectBaseDto, ServiceProjectBaseInfo>.NewConfig()
|
|
|
|
|
.Map(dest => dest.PK_ID, src => src.PKId)
|
|
|
|
|
.Map(dest => dest.SERVICE_PROJECT_CODE, src => src.ServiceProjectCode)
|
|
|
|
|
.Map(dest => dest.SERVICE_PROJECT_NAME, src => src.ServiceProjectName)
|
|
|
|
|
.Map(dest => dest.SORT_NO, src => src.SortNo)
|
|
|
|
|
.Map(dest => dest.SERVICE_PROJECT_NOTE, src => src.ServiceProjectNote);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
TypeAdapterConfig<ServiceProjectBaseInfo, ServiceProjectBaseDto>.NewConfig()
|
|
|
|
|
.Map(dest => dest.PKId, src => src.PK_ID)
|
|
|
|
|
.Map(dest => dest.ServiceProjectCode, src => src.SERVICE_PROJECT_CODE)
|
|
|
|
|
.Map(dest => dest.ServiceProjectName, src => src.SERVICE_PROJECT_NAME)
|
|
|
|
|
.Map(dest => dest.SortNo, src => src.SORT_NO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
TypeAdapterConfig<StatusSkuBaseDto, StatusSkuBaseInfo>.NewConfig()
|
|
|
|
|
.Map(dest => dest.PK_ID, src => src.PKId)
|
|
|
|
|
.Map(dest => dest.STATUS_SKU_CODE, src => src.StatusSKUCode)
|
|
|
|
|
.Map(dest => dest.STATUS_SKU_NAME, src => src.StatusSKUName)
|
|
|
|
|
.Map(dest => dest.SORT_NO, src => src.SortNo)
|
|
|
|
|
.Map(dest => dest.STATUS_SKU_NOTE, src => src.StatusSKUNote)
|
|
|
|
|
.Map(dest => dest.BACKGROUND_COLOR, src => src.BackgroundColor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
TypeAdapterConfig<StatusSkuBaseInfo, StatusSkuBaseDto>.NewConfig()
|
|
|
|
|
.Map(dest => dest.PKId, src => src.PK_ID)
|
|
|
|
|
.Map(dest => dest.StatusSKUCode, src => src.STATUS_SKU_CODE)
|
|
|
|
|
.Map(dest => dest.StatusSKUName, src => src.STATUS_SKU_NAME)
|
|
|
|
|
.Map(dest => dest.SortNo, src => src.SORT_NO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
TypeAdapterConfig<StatusSkuBaseInfo, ServiceProjectStatusDto>.NewConfig()
|
|
|
|
|
.Map(dest => dest.SkuPKId, src => src.PK_ID)
|
|
|
|
|
.Map(dest => dest.StatusSKUCode, src => src.STATUS_SKU_CODE)
|
|
|
|
|
.Map(dest => dest.StatusSKUName, src => src.STATUS_SKU_NAME)
|
|
|
|
|
.Map(dest => dest.SortNo, src => src.SORT_NO)
|
|
|
|
|
.Map(dest => dest.BackgroundColor, src => src.BACKGROUND_COLOR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
TypeAdapterConfig<StatusSkuBaseInfo, StatusSkuBaseShowDto>.NewConfig()
|
|
|
|
|
.Map(dest => dest.PKId, src => src.PK_ID)
|
|
|
|
|
.Map(dest => dest.StatusSKUCode, src => src.STATUS_SKU_CODE)
|
|
|
|
|
.Map(dest => dest.StatusSKUName, src => src.STATUS_SKU_NAME)
|
|
|
|
|
.Map(dest => dest.SortNo, src => src.SORT_NO)
|
|
|
|
|
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
|
|
|
|
|
.Map(dest => dest.CreatedTime, src => src.CreateTime)
|
|
|
|
|
.Map(dest => dest.UpdatedTime, src => src.UpdateTime)
|
|
|
|
|
.Map(dest => dest.CreatedUserId, src => src.CreateBy)
|
|
|
|
|
.Map(dest => dest.CreatedUserName, src => src.CreateUserName)
|
|
|
|
|
.Map(dest => dest.UpdatedUserId, src => src.UpdateBy)
|
|
|
|
|
.Map(dest => dest.UpdatedUserName, src => src.UpdateUserName)
|
|
|
|
|
.Map(dest => dest.StatusSKUNote, src => src.STATUS_SKU_NOTE)
|
|
|
|
|
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
|
|
|
|
|
.Map(dest => dest.BackgroundColor, src => src.BACKGROUND_COLOR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
TypeAdapterConfig<StatusSkuBaseInfo, StatusSkuBasePageDto>.NewConfig()
|
|
|
|
|
.Map(dest => dest.PKId, src => src.PK_ID)
|
|
|
|
|
.Map(dest => dest.StatusSKUCode, src => src.STATUS_SKU_CODE)
|
|
|
|
|
.Map(dest => dest.StatusSKUName, src => src.STATUS_SKU_NAME)
|
|
|
|
|
.Map(dest => dest.SortNo, src => src.SORT_NO)
|
|
|
|
|
.Map(dest => dest.CreatedTime, src => src.CreateTime)
|
|
|
|
|
.Map(dest => dest.UpdatedTime, src => src.UpdateTime)
|
|
|
|
|
.Map(dest => dest.CreatedUserId, src => src.CreateBy)
|
|
|
|
|
.Map(dest => dest.CreatedUserName, src => src.CreateUserName)
|
|
|
|
|
.Map(dest => dest.UpdatedUserId, src => src.UpdateBy)
|
|
|
|
|
.Map(dest => dest.UpdatedUserName, src => src.UpdateUserName)
|
|
|
|
|
.Map(dest => dest.StatusSKUNote, src => src.STATUS_SKU_NOTE)
|
|
|
|
|
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
|
|
|
|
|
.Map(dest => dest.BackgroundColor, src => src.BACKGROUND_COLOR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
TypeAdapterConfig<ServiceProjectBaseDto, ServiceProjectBaseInfo>.NewConfig()
|
|
|
|
|
.Map(dest => dest.PK_ID, src => src.PKId)
|
|
|
|
|
.Map(dest => dest.SERVICE_PROJECT_CODE, src => src.ServiceProjectCode)
|
|
|
|
|
.Map(dest => dest.SERVICE_PROJECT_NAME, src => src.ServiceProjectName)
|
|
|
|
|
.Map(dest => dest.SORT_NO, src => src.SortNo)
|
|
|
|
|
.Map(dest => dest.SERVICE_PROJECT_NOTE, src => src.ServiceProjectNote);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
TypeAdapterConfig<ServiceProjectBaseInfo, ServiceProjectBaseDto>.NewConfig()
|
|
|
|
|
.Map(dest => dest.PKId, src => src.PK_ID)
|
|
|
|
|
.Map(dest => dest.ServiceProjectCode, src => src.SERVICE_PROJECT_CODE)
|
|
|
|
|
.Map(dest => dest.ServiceProjectName, src => src.SERVICE_PROJECT_NAME)
|
|
|
|
|
.Map(dest => dest.SortNo, src => src.SORT_NO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
TypeAdapterConfig<ServiceProjectBaseInfo, ServiceProjectBaseShowDto>.NewConfig()
|
|
|
|
|
.Map(dest => dest.PKId, src => src.PK_ID)
|
|
|
|
|
.Map(dest => dest.ServiceProjectCode, src => src.SERVICE_PROJECT_CODE)
|
|
|
|
|
.Map(dest => dest.ServiceProjectName, src => src.SERVICE_PROJECT_NAME)
|
|
|
|
|
.Map(dest => dest.SortNo, src => src.SORT_NO)
|
|
|
|
|
.Map(dest => dest.CreatedTime, src => src.CreateTime)
|
|
|
|
|
.Map(dest => dest.UpdatedTime, src => src.UpdateTime)
|
|
|
|
|
.Map(dest => dest.CreatedUserId, src => src.CreateBy)
|
|
|
|
|
.Map(dest => dest.CreatedUserName, src => src.CreateUserName)
|
|
|
|
|
.Map(dest => dest.UpdatedUserId, src => src.UpdateBy)
|
|
|
|
|
.Map(dest => dest.UpdatedUserName, src => src.UpdateUserName)
|
|
|
|
|
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
|
|
|
|
|
.Map(dest => dest.ServiceProjectNote, src => src.SERVICE_PROJECT_NOTE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
TypeAdapterConfig<ServiceProjectBaseInfo, ServiceProjectBasePageDto>.NewConfig()
|
|
|
|
|
.Map(dest => dest.PKId, src => src.PK_ID)
|
|
|
|
|
.Map(dest => dest.ServiceProjectCode, src => src.SERVICE_PROJECT_CODE)
|
|
|
|
|
.Map(dest => dest.ServiceProjectName, src => src.SERVICE_PROJECT_NAME)
|
|
|
|
|
.Map(dest => dest.SortNo, src => src.SORT_NO)
|
|
|
|
|
.Map(dest => dest.CreatedTime, src => src.CreateTime)
|
|
|
|
|
.Map(dest => dest.UpdatedTime, src => src.UpdateTime)
|
|
|
|
|
.Map(dest => dest.CreatedUserId, src => src.CreateBy)
|
|
|
|
|
.Map(dest => dest.CreatedUserName, src => src.CreateUserName)
|
|
|
|
|
.Map(dest => dest.UpdatedUserId, src => src.UpdateBy)
|
|
|
|
|
.Map(dest => dest.UpdatedUserName, src => src.UpdateUserName)
|
|
|
|
|
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
|
|
|
|
|
.Map(dest => dest.ServiceProjectNote, src => src.SERVICE_PROJECT_NOTE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|