lvzb 2 years ago
parent
commit
eaf4fbec4d
  1. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CountNotes/Inputs/CountNoteImportInput.cs
  2. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs
  3. 18
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CountNotes/Inputs/CountNoteImportInput.cs

@ -37,7 +37,6 @@ public class CountNoteImportInput : SfsStoreImportInputBase
/// 箱码 /// 箱码
/// </summary> /// </summary>
[Display(Name = "箱码")] [Display(Name = "箱码")]
[Required(ErrorMessage = "{0}是必填项", AllowEmptyStrings = true)]
public string PackingCode { get; set; } public string PackingCode { get; set; }
/// <summary> /// <summary>
@ -57,7 +56,6 @@ public class CountNoteImportInput : SfsStoreImportInputBase
/// 批次 /// 批次
/// </summary> /// </summary>
[Display(Name = "批次")] [Display(Name = "批次")]
[Required(ErrorMessage = "{0}是必填项", AllowEmptyStrings = true)]
public string Lot { get; set; } public string Lot { get; set; }
/// <summary> /// <summary>

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs

@ -115,7 +115,7 @@ public class CountNoteAppService :
{ {
if (itemcBasicDto == null) if (itemcBasicDto == null)
{ {
throw new UserFriendlyException($"物品代码为【{detail.LocationCode}】不存在"); throw new UserFriendlyException($"物品代码为【{detail.ItemCode}】不存在");
} }
} }

18
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs

@ -51,15 +51,23 @@ public class PutawayNoteAppService :
{ {
foreach (var detail in input.Details) foreach (var detail in input.Details)
{ {
var purchasereDetail =await _purchaseReceiptNoteAppService.GetDetailByItemAndPackingAsync(detail.ItemCode, detail.ToPackingCode).ConfigureAwait(false); try
if (purchasereDetail != null)
{ {
var inspectJobDto =await _inspectJobAppService.GetInspectNoteDetailByPackingCodeAsync(detail.ToPackingCode).ConfigureAwait(false); var purchasereDetail = await _purchaseReceiptNoteAppService
if (inspectJobDto.JobStatus != EnumJobStatus.Done) .GetDetailByItemAndPackingAsync(detail.ItemCode, detail.ToPackingCode).ConfigureAwait(false);
if (purchasereDetail != null)
{ {
throw new UserFriendlyException($"包含【{detail.ToPackingCode}】箱码的报检单,尚未完成质检"); var inspectJobDto = await _inspectJobAppService
.GetInspectNoteDetailByPackingCodeAsync(detail.ToPackingCode).ConfigureAwait(false);
if (inspectJobDto.JobStatus != EnumJobStatus.Done)
{
throw new UserFriendlyException($"包含【{detail.ToPackingCode}】箱码的报检单,尚未完成质检");
}
} }
} }
catch (Exception ex)
{
}
} }
var entity = ObjectMapper.Map<PutawayNoteEditInput, PutawayNote>(input); var entity = ObjectMapper.Map<PutawayNoteEditInput, PutawayNote>(input);

Loading…
Cancel
Save