From 0464969366317154fdbb51e106ca778b855bdd08 Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期六, 17 八月 2024 15:45:28 +0800
Subject: [PATCH] Merge branch 'master' into wxw
---
Wms/WMS.BLL/BllSoServer/ExportNoticeDetailServer.cs | 101 ++++++++++++++++++++++++--------------------------
1 files changed, 48 insertions(+), 53 deletions(-)
diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeDetailServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeDetailServer.cs
index 81b648e..3cc19b6 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeDetailServer.cs
+++ b/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,62 +24,55 @@
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(model.SoNo))
{
- if (string.IsNullOrWhiteSpace(soNo))
- {
- throw new Exception("鍑哄簱鍗曞彿涓虹┖");
- }
- var notice = DataContext.Db.Queryable<BllExportNotice>().Where(m => m.IsDel == "0" && m.SONo == soNo).ToList().FirstOrDefault();
- if (notice == null)
- {
- throw new Exception("鍑哄簱鍗曞彿涓虹┖");
- }
- var total = 0;
- var data = GetAllWhereAsync(a=>a.SONo == 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)
- .Select((a, b, c, d) => new ExportNoticeDetailDto()
- {
- Id = a.Id,
- Status = a.Status,
- Origin = notice.Origin,
- SONo = a.SONo,
- SkuNo = a.SkuNo,
- SkuName = a.SkuName,
- Standard = a.Standard,
- LotNo = a.LotNo,
- LotText = a.LotText,
- Qty = a.Qty,
- AllotQty = a.AllotQty,
- FactQty = a.FactQty,
- CompleteQty = a.CompleteQty,
- PackagNo = a.PackagNo,
- PackagName = b.PackagName,
- Price = a.Price,
- Money = a.Money,
- IsBale = a.IsBale,
- IsBelt = a.IsBelt,
- SupplierLot = a.SupplierLot,
- IsWave = a.IsWave,
- WaveNo = a.WaveNo,
+ throw new Exception("鍑哄簱鍗曞彿涓虹┖");
+ }
+ var notice = DataContext.Db.Queryable<BllExportNotice>().Where(m => m.IsDel == "0" && m.SONo == model.SoNo).ToList().FirstOrDefault();
+ if (notice == null)
+ {
+ throw new Exception("鍑哄簱鍗曞彿涓虹┖");
+ }
- CreateUserName = c.RealName,
- UpdateUserName = d.RealName,
- CreateTime = a.CreateTime,
- UpdateTime = a.UpdateTime
- }).ToOffsetPage(page,limit,ref total);
- count = total;
-
- return data;
- }
- catch (Exception e)
- {
- throw new Exception(e.Message);
- }
+ 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)
+ .Select((a, b, c, d) => new ExportNoticeDetailDto()
+ {
+ Id = a.Id,
+ Status = a.Status,
+ Origin = notice.Origin,
+ SONo = a.SONo,
+ SkuNo = a.SkuNo,
+ SkuName = a.SkuName,
+ Standard = a.Standard,
+ LotNo = a.LotNo,
+ LotText = a.LotText,
+ Qty = a.Qty,
+ AllotQty = a.AllotQty,
+ FactQty = a.FactQty,
+ CompleteQty = a.CompleteQty,
+ PackagNo = a.PackagNo,
+ PackagName = b.PackagName,
+ Price = a.Price,
+ Money = a.Money,
+ IsBale = a.IsBale,
+ IsBelt = a.IsBelt,
+ SupplierLot = a.SupplierLot,
+ IsWave = a.IsWave,
+ WaveNo = a.WaveNo,
+ IsMixBox = a.IsMixBox,
+
+ CreateUserName = c.RealName,
+ UpdateUserName = d.RealName,
+ CreateTime = a.CreateTime,
+ UpdateTime = a.UpdateTime
+ }).ToPageListAsync(model.Page, model.Limit, count);
+
+ return data;
}
public bool DelExportNoticeDetail(int id, int userId)
--
Gitblit v1.8.0