33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using AutoMapper;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using WMS.Web.Core.Dto.Erp.OutStock;
|
|
using WMS.Web.Core.Dto.OutStock;
|
|
using WMS.Web.Core.Dto.OutStockTask;
|
|
using WMS.Web.Domain.Entitys;
|
|
|
|
namespace WMS.Web.Domain.Mappers
|
|
{
|
|
public class OutStockMapper : Profile
|
|
{
|
|
public OutStockMapper()
|
|
{
|
|
CreateMap<SaveOutStockRequest, OutStockDetails>();
|
|
|
|
CreateMap<OutStockTaskDetails, OutStockDetails>()
|
|
.ForMember(x => x.Id, ops => ops.Ignore())
|
|
.ForMember(x => x.Fid, ops => ops.Ignore())
|
|
.ForMember(x => x.Qty, ops => ops.Ignore());
|
|
|
|
|
|
CreateMap<OutStockTask, GetOutStockTaskByNoResponse>();
|
|
CreateMap<OutStockTaskDetails, GetOutStockTaskByNoDetailsResponse>();
|
|
|
|
CreateMap<ErpDeliveryNoticeOutStockResultDto, OutStockTaskDetails>()
|
|
.ForPath(x => x.SourceBillNos, ops => ops.MapFrom(x =>new List<string>() { x.SourceBillNo }))
|
|
.ForPath(x => x.SaleBillNos, ops => ops.MapFrom(x => new List<string>() { x.SaleBillNo }));
|
|
}
|
|
}
|
|
}
|