You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using SlnMesnac.Model.domain;
namespace SlnMesnac.Repository.service.Impl
{
public class WmsTaskOutServiceImpl:IWmsTaskOutService
{
private readonly Repository<WmsTaskOut> _rep;
public WmsTaskOutServiceImpl(Repository<WmsTaskOut> rep)
{
_rep = rep;
}
/// <summary>
/// 获取WMS出库记录
/// </summary>
/// <returns></returns>
/// <exception cref="ArgumentException"></exception>
public List<WmsTaskOut> GetWmsTaskOutList()
{
try
{
return _rep.GetList();;
}
catch (Exception e)
{
throw new ArgumentException($"获取WMS出库记录异常:{e.Message}");
}
}
/// <summary>
/// 通过标签唯一编码获取出库记录,获取物料信息
/// </summary>
/// <param name="SerialNum"></param>
/// <returns></returns>
/// <exception cref="ArgumentException"></exception>
public WmsTaskOut GetWmsTaskOutBySerialNum(string SerialNum)
{
try
{
return _rep.GetFirst(x=>x.SerialNum == SerialNum);
}
catch (Exception e)
{
throw new ArgumentException($"通过标签唯一编码获取出库记录异常:{e.Message}");
}
}
}
}