Administrator
2024-07-12 78151cd9506cf730fee6f6d92b641774f0440c36
Wms/WMS.BLL/BllSoServer/ExportNoticeDetailServer.cs
@@ -3,8 +3,10 @@
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Dm;
using Model.ModelDto.BllSoDto;
using Model.ModelVm.BllSoVm;
using SqlSugar;
using WMS.BLL.LogServer;
using WMS.DAL;
@@ -22,21 +24,21 @@
        public ExportNoticeDetailServer():base(Db)
        {
        }
        public List<ExportNoticeDetailDto> GetExportNoticeDetailList(string soNo, int page, int limit, out int count)
        public async Task<List<ExportNoticeDetailDto>> GetExportNoticeDetailList(GetExportNoticeDetailVm model, RefAsync<int> count)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(soNo))
                if (string.IsNullOrWhiteSpace(model.SoNo))
                {
                    throw new Exception("出库单号为空");
                }
                var notice = DataContext.Db.Queryable<BllExportNotice>().Where(m => m.IsDel == "0" && m.SONo == soNo).ToList().FirstOrDefault();
                var notice = DataContext.Db.Queryable<BllExportNotice>().Where(m => m.IsDel == "0" && m.SONo == model.SoNo).ToList().FirstOrDefault();
                if (notice == null)
                {
                    throw new Exception("出库单号为空");
                }
                var total = 0;
                var data = GetAllWhereAsync(a=>a.SONo == soNo)
                var data = await GetAllWhereAsync(a=>a.SONo == model.SoNo)
                    .LeftJoin<SysPackag>((a,b)=> a.PackagNo == b.PackagNo)
                    .LeftJoin<SysUserInfor>((a,b,c)=> a.CreateUser == c.Id)
                    .LeftJoin<SysUserInfor>((a,b,c,d)=> a.UpdateUser == d.Id)
@@ -69,9 +71,8 @@
                        UpdateUserName = d.RealName,
                        CreateTime = a.CreateTime,
                        UpdateTime = a.UpdateTime
                    }).ToOffsetPage(page,limit,ref total);
                count = total;
                    }).ToPageListAsync(model.Page, model.Limit, count);
                return data;
            }
            catch (Exception e)