刘磊
2025-06-09 dabbcafc629ef87d11ba55ef8cc1cdc776c047d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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>()
            };
        };
    }
}