刘磊
5 天以前 5eeed44ad21748ed7560a8c688d4e2d2f03555c8
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
52
53
54
55
56
57
58
59
60
using AngleSharp.Dom;
using Mapster;
using Masuit.Tools;
using SqlSugar;
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Linq.Expressions;
using WIDESEA_Core;
using WIDESEA_IStorageBasicService;
using WIDESEA_StorageBasicRepository;
 
namespace WIDESEA_StorageBasicService;
 
public class Dt_PalletStockInfoDetailService : ServiceBase<Dt_PalletStockInfoDetail, IDt_PalletStockInfoDetailRepository>, IDt_PalletStockInfoDetailService
{
 
    private readonly IDt_PalletStockInfoRepository _palletStockInfoRepository;
    public Dt_PalletStockInfoDetailService(IDt_PalletStockInfoDetailRepository BaseDal, IDt_PalletStockInfoRepository palletStockInfoRepository) : base(BaseDal)
    {
        _palletStockInfoRepository = palletStockInfoRepository;
    }
 
    /// <summary>
    /// 查询组盘信息
    /// </summary>
    /// <param name="palletCode"></param>
    /// <returns></returns>
    public object GetBarcodeDetial(string palletCode)
    {
        List<Dt_PalletStockInfoDetail> list = null;
        try
        {
            var headId = _palletStockInfoRepository.QueryFirst(x => x.PalletCode == palletCode);
            if (headId != null)
            {
                list = BaseDal.QueryData(x => x.StockId == headId.Id);
                return new
                {
                    status = 1,
                    count = list.Count(),
                    data = list
                };
            }
            return new
            {
                status = 0,
                data = new List<Dt_PalletStockInfoDetail>()
            };
 
        }
        catch (Exception)
        {
            return new
            {
                status = 0,
                data = new List<Dt_PalletStockInfoDetail>()
            };
        };
    }
}