From 1a29ad0fea9932f3d0bb56c939ccc32c877a34d8 Mon Sep 17 00:00:00 2001 From: yuyou_x <2336760928@qq.com> Date: 星期一, 19 二月 2024 16:08:59 +0800 Subject: [PATCH] 1 --- Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs | 41 ++++++++++++++++++++++------------------- 1 files changed, 22 insertions(+), 19 deletions(-) diff --git a/Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs b/Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs index 26cde9e..0e91896 100644 --- a/Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs +++ b/Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs @@ -15,7 +15,7 @@ namespace WMS.BLL.BllAsnServer { - public class AuditLogServer: DbHelper<BllAuditLog>, IAuditLogServer + public class AuditLogServer : DbHelper<BllAuditLog>, IAuditLogServer { private static readonly SqlSugarScope Db = DataContext.Db; @@ -29,22 +29,22 @@ try { Expression<Func<BllAuditLog, bool>> item = Expressionable.Create<BllAuditLog>() - .AndIF(!string.IsNullOrWhiteSpace(model.AsnNo),it=>it.OrderNo.Contains(model.AsnNo.Trim())) - .AndIF(!string.IsNullOrWhiteSpace(model.Status),it=>it.Status == model.Status) - .AndIF(!string.IsNullOrWhiteSpace(model.StartTime),it=> it.CreateTime >= Convert.ToDateTime(model.StartTime)) - .AndIF(!string.IsNullOrWhiteSpace(model.EndTime),it=> it.CreateTime <= Convert.ToDateTime(model.EndTime).AddDays(1)) - .And(it=>it.IsDel=="0") + .AndIF(!string.IsNullOrWhiteSpace(model.AsnNo), it => it.OrderNo.Contains(model.AsnNo.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(model.Status), it => it.Status == model.Status) + .AndIF(!string.IsNullOrWhiteSpace(model.StartTime), it => it.CreateTime >= Convert.ToDateTime(model.StartTime)) + .AndIF(!string.IsNullOrWhiteSpace(model.EndTime), it => it.CreateTime <= Convert.ToDateTime(model.EndTime).AddDays(1)) + .And(it => it.IsDel == "0") .ToExpression(); var total = 0; var data = GetAllWhereAsync(item) - .LeftJoin<SysUserInfor>((a, b ) => a.CreateUser == b.Id) + .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id) .LeftJoin<SysUserInfor>((a, b, c) => a.AuditUser == c.Id) .Select((a, b, c) => new AuditLogDto() { Id = a.Id, OrderNo = a.OrderNo, PalletNo = a.PalletNo, - + Msg = a.Msg, Status = a.Status, Reason = a.Reason, @@ -68,11 +68,11 @@ } //缂栬緫瀹℃牳 - public void EditAudit(int id, string status,string opinion,int userId) + public void EditAudit(int id, string status, string opinion, int userId) { try { - var log = Db.Queryable<BllAuditLog>().First(m => m.Id == id && m.IsDel =="0"); + var log = Db.Queryable<BllAuditLog>().First(m => m.Id == id && m.IsDel == "0"); if (log == null) { throw new Exception("鏈煡璇㈠埌瀹℃牳淇℃伅锛岃鏍稿疄"); @@ -156,7 +156,7 @@ .First(m => m.IsDel == "0" && m.LocatNo == item.LocatNo); if (item.Qty != null) { - if (item.LockQty>0) + if (item.LockQty > 0) { throw new Exception("褰撳墠鐗╂枡鎵规宸茶鍒嗛厤锛屾棤娉曟挙閿�"); } @@ -197,9 +197,12 @@ { if (demo2.Origin != "WMS") { - demo2.ASNNo = null; - demo2.ASNDetailNo = null; - } + if (notice.Type != "1" || notice.Type != "4") + { + demo2.ASNNo = null; + demo2.ASNDetailNo = null; + } + } demo2.BindNo = null; demo2.PalletNo = null; demo2.Status = "0"; @@ -246,7 +249,7 @@ { Db.Updateable(stock).ExecuteCommand(); } - + } Db.Deleteable(item).ExecuteCommand(); @@ -404,7 +407,7 @@ if (stockDetail.Qty != null) { stock.Qty -= (int)stockDetail.Qty; - + } if (stock.Qty == 0) @@ -415,7 +418,7 @@ { Db.Updateable(stock).ExecuteCommand(); } - + Db.Deleteable(stockDetail).ExecuteCommand(); Db.Deleteable(stockInfo).ExecuteCommand(); if (locate != null) @@ -435,14 +438,14 @@ bind.TaskNo = ""; bind.CompleteTime = null; Db.Updateable(bind).ExecuteCommand(); - + } else { throw new Exception("璁板綍鐨勫姛鑳界紪鍙峰紓甯�"); } } - + log.Status = status; log.Opinion = opinion; log.AuditTime = DateTime.Now; -- Gitblit v1.8.0