using CMS.Plugin.HIAWms.Application.Contracts.Dtos.BindInstockDto;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using Volo.Abp;
|
|
namespace CMS.Plugin.HIAWms.Application.Implements
|
{
|
/// <summary>
|
/// 组盘入库
|
/// </summary>
|
public class WmsBindInStockAssService : CMSPluginAppService
|
{
|
public async Task BindMaterialContaienrAsync(BindMaterialInput input)
|
{
|
if (string.IsNullOrEmpty(input.MaterialModel)) { throw new UserFriendlyException("请选择库位编号"); }
|
if (string.IsNullOrEmpty(input.MaterialBatch)) { throw new UserFriendlyException("请输入批次号"); }
|
if (input.MaterialStockNumber<=0) { throw new UserFriendlyException("入库数量必须大于0"); }
|
|
|
}
|
|
public async Task BindInStockAsync(BindInstockInput input)
|
{
|
if(string.IsNullOrEmpty(input.PlaceNo)) { throw new UserFriendlyException("请选择库位编号"); }
|
|
var bindInput = ObjectMapper.Map<BindInstockInput, BindMaterialInput>(input);
|
await BindMaterialContaienrAsync(bindInput);
|
}
|
}
|
}
|