From 9e283e4024ba98eebd4a4450e4d2ddccccfd3e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E8=8D=A3=E5=9B=BDHome?= Date: Thu, 3 Mar 2022 10:30:48 +0800 Subject: [PATCH] =?UTF-8?q?[fix]bug=20=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UnplannedReceiptCreateDtoValidator.cs | 1 + .../UnplannedReceipts/UnplannedReceiptDTO.cs | 8 ++++++++ .../ScpV1AutoMapperProfile.cs | 14 +++++++------- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptCreateDtoValidator.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptCreateDtoValidator.cs index b58dd2c..66e40a2 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptCreateDtoValidator.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptCreateDtoValidator.cs @@ -17,6 +17,7 @@ public class UnplannedReceiptCreateDtoValidator : AbstractValidator q.Uom).MaximumLength(8).NotNull(); RuleFor(q => q.Qty).NotNull(); RuleFor(q => q.SoJob).MaximumLength(20); + RuleFor(q => q.Address).MaximumLength(8).NotEmpty(); RuleFor(q => q.Remark).MaximumLength(4096); RuleFor(q => q.Site).MaximumLength(8).NotEmpty(); RuleFor(q => q.Company).MaximumLength(8).NotEmpty(); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptDTO.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptDTO.cs index 9493154..f0498d3 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptDTO.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptDTO.cs @@ -92,6 +92,14 @@ namespace Win_in.Sfs.Scp.WebApi public string SoJob { get; set; } + /// + /// 地址(Address) + /// + [DataMember, XmlElement("address")] + [Display(Name = "地址(Address)")] + + public string Address { get; set; } + /// /// 备注(Remark) diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs index 84ad68d..c2babca 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs @@ -94,7 +94,7 @@ namespace Win_in.Sfs.Scp.WebApi .ForMember(p => p.AsnBillNum, p => p.MapFrom(q => q.AsnNumber)) .ForMember(p => p.VendId, p => p.MapFrom(q => q.SupplierCode)) // .ForMember(p => p.ShipTime, p => p.MapFrom(q => DateTime.MinValue))//默认值 - .ForMember(p => p.State, p => p.MapFrom(q => 1))//默认值 + .ForMember(p => p.State, p => p.MapFrom(q => 0))//0:未处理 .ForMember(p => p.Remark, p => p.MapFrom(q => q.Remark)) .ForMember(p => p.CreateTime, p => p.MapFrom(q => q.ReceiveTime)) .ForMember(p => p.CreateUser, p => p.MapFrom(q => "WebApi"))//固定值 @@ -121,7 +121,7 @@ namespace Win_in.Sfs.Scp.WebApi .ForMember(p => p.Batch, p => p.MapFrom(q => q.Lot)) .ForMember(p => p.Qty, p => p.MapFrom(q => q.ReceiveQty)) .ForMember(p => p.DockCode, p => p.MapFrom(q => q.Dock)) - .ForMember(p => p.State, p => p.MapFrom(q => 1))//默认值 + .ForMember(p => p.State, p => p.MapFrom(q => 0))//0:未处理 .ForMember(p => p.Remark, p => p.MapFrom(q => q.Remark)) .ForMember(p => p.CreateTime, p => p.MapFrom(q => q.ReceiveTime)) .ForMember(p => p.CreateUser, p => p.MapFrom(q => "WebApi")) @@ -233,7 +233,7 @@ namespace Win_in.Sfs.Scp.WebApi .ForMember(p => p.AsnBillNum, p => p.MapFrom(q => q.Order)) .ForMember(p => p.VendId, p => p.MapFrom(q => q.Address))//默认值 // .ForMember(p => p.ShipTime, p => p.MapFrom(q => DateTime.MinValue))//默认值 - .ForMember(p => p.State, p => p.MapFrom(q => 1))//TODO + .ForMember(p => p.State, p => p.MapFrom(q => 0))//0:未处理 .ForMember(p => p.Remark, p => p.MapFrom(q => q.Remark)) .ForMember(p => p.CreateTime, p => p.MapFrom(q => q.EffectiveDate)) .ForMember(p => p.CreateUser, p => p.MapFrom(q => "WebApi")) @@ -258,7 +258,7 @@ namespace Win_in.Sfs.Scp.WebApi .ForMember(p => p.Batch, p => p.MapFrom(q => q.Lot)) .ForMember(p => p.Qty, p => p.MapFrom(q => q.Qty)) .ForMember(p => p.DockCode, p => p.MapFrom(q => q.Location)) - .ForMember(p => p.State, p => p.MapFrom(q => 1))//默认值 + .ForMember(p => p.State, p => p.MapFrom(q => 0))//0:未处理 .ForMember(p => p.Remark, p => p.MapFrom(q => q.Remark)) .ForMember(p => p.CreateTime, p => p.MapFrom(q => q.EffectiveDate)) .ForMember(p => p.CreateUser, p => p.MapFrom(q => "WebApi")) @@ -271,10 +271,10 @@ namespace Win_in.Sfs.Scp.WebApi .ForMember(p => p.PoUnit, p => p.MapFrom(q => q.Uom)) .ForMember(p => p.LocUnit, p => p.MapFrom(q => q.Uom))//TODO 计划外入库单没有LocUnit - // .ForMember(p => p.PurCost, p => p.MapFrom(q => 0))//默认值 - // .ForMember(p => p.StdCost, p => p.MapFrom(q => 0))//默认值 + .ForMember(p => p.PurCost, p => p.MapFrom(q => 0))//默认值 + .ForMember(p => p.StdCost, p => p.MapFrom(q => 0))//默认值 // .ForMember(p => p.Rate, p => p.MapFrom(q => 0))//默认值 - // .ForMember(p => p.CurAmt, p => p.MapFrom(q => 0))//默认值 + .ForMember(p => p.CurAmt, p => p.MapFrom(q => 0))//默认值 // .ForMember(p => p.Tax, p => p.MapFrom(q => 0))//默认值 // .ForMember(p => p.Extend1, p => p.MapFrom(q => ""))//默认值 // .ForMember(p => p.Extend2, p => p.MapFrom(q => ""))//默认值