using Castle.Components.DictionaryAdapter.Xml;
|
|
namespace WIDESEA_StorageBasicService;
|
|
public class BoxingInfoDetailService : ServiceBase<DtBoxingInfoDetail, IBoxingInfoDetailRepository>, IBoxingInfoDetailService
|
{
|
private readonly IBoxingInfoRepository boxingInfoRepository;
|
public BoxingInfoDetailService(IBoxingInfoDetailRepository BaseDal, IBoxingInfoRepository boxingInfoRepository) : base(BaseDal)
|
{
|
this.boxingInfoRepository = boxingInfoRepository;
|
}
|
|
/// <summary>
|
/// 查询组盘信息
|
/// </summary>
|
/// <param name="palletCode"></param>
|
/// <returns></returns>
|
public object GetBarcodeDetial(string palletCode)
|
{
|
List<DtBoxingInfoDetail> list = null;
|
try
|
{
|
var headId = boxingInfoRepository.QueryFirst(x => x.PalletCode == palletCode);
|
if (headId != null)
|
{
|
list = BaseDal.QueryData(x => x.BoxingInfoId == headId.Id);
|
return new
|
{
|
status = 1,
|
count = list.Count(),
|
data = list
|
};
|
}
|
|
return new
|
{
|
status = 0,
|
data = new List<DtBoxingInfoDetail>()
|
};
|
|
}
|
catch (Exception)
|
{
|
return new
|
{
|
status = 0,
|
data = new List<DtBoxingInfoDetail>()
|
};
|
};
|
}
|
}
|