Browse Source

[fix]bug 修复

master
贾荣国Home 3 years ago
parent
commit
9e283e4024
  1. 1
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptCreateDtoValidator.cs
  2. 8
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptDTO.cs
  3. 14
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ScpV1AutoMapperProfile.cs

1
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptCreateDtoValidator.cs

@ -17,6 +17,7 @@ public class UnplannedReceiptCreateDtoValidator : AbstractValidator<UnplannedRec
RuleFor(q => 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();

8
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; }
/// <summary>
/// 地址(Address)
/// </summary>
[DataMember, XmlElement("address")]
[Display(Name = "地址(Address)")]
public string Address { get; set; }
/// <summary>
/// 备注(Remark)

14
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 => ""))//默认值

Loading…
Cancel
Save