wxw
2025-05-12 c7c2f7aa20427204944ba80a2704232b2f281582
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
61
62
63
64
65
66
67
68
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model.ModelDto.BllSoDto;
using SqlSugar;
using WMS.DAL;
using WMS.Entity.BllSoEntity;
using WMS.Entity.Context;
using WMS.Entity.SysEntity;
using WMS.IBLL.IBllSoServer;
 
namespace WMS.BLL.BllSoServer
{
    public class CompleteDetailServer : DbHelper<BllCompleteDetail>, ICompleteDetailServer
    {
        private static readonly SqlSugarScope Db = DataContext.Db;
        public CompleteDetailServer() : base(Db)
        {
        }
 
        //查询拣货明细信息
        public List<CompleteDetailDto> GetCompleteDetailList(int id, int page, int limit, out int count)
        {
            try
            {
                var total = 0;
                var data = GetAllWhereAsync(m => m.ExportAllotId == id)
                    .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id)
                    .LeftJoin<SysUserInfor>((a, b, c) => a.CreateUser == c.Id)
                    .Select((a, b, c) => new CompleteDetailDto()
                    {
                        Id = a.Id,
                        SONo = a.SONo,
                        SODetailNo = a.SODetailNo,
                        StockId = a.StockId,
                        ExportAllotId = a.ExportAllotId,
 
                        BoxNo = a.BoxNo,
                        BoxNo2 = a.BoxNo2,
                        BoxNo3 = a.BoxNo3,
                        LotNo = a.LotNo,
                        LotText = a.LotText,
                        SupplierLot = a.SupplierLot,
                        SkuNo = a.SkuNo,
                        SkuName = a.SkuName,
                        Standard = a.Standard,
                        PalletNo = a.PalletNo,
                        CompleteQty = a.CompleteQty,
                        NowPalletNo = a.NowPalletNo,
 
                        CreateUserName = b.RealName,
                        UpdateUserName = c.RealName,
                        CreateTime = a.CreateTime,
                        UpdateTime = a.UpdateTime
                    })
                    .ToOffsetPage(page, limit, ref total);
                count = total;
                return data;
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
 
    }
}