From b2d25faa69ee7e9f24b6ac98d3b4dcbddada70bc Mon Sep 17 00:00:00 2001
From: yuyou_x <2336760928@qq.com>
Date: 星期四, 14 三月 2024 13:37:15 +0800
Subject: [PATCH] 修改pda托盘绑定同一物料多批次 无法具体选中批次问题。
---
Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs | 42 ++++++++++++++++++++++++------------------
1 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs b/Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs
index 2a91b48..c902df5 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("褰撳墠鐗╂枡鎵规宸茶鍒嗛厤锛屾棤娉曟挙閿�");
}
@@ -195,8 +195,14 @@
var boxInfo = Db.Queryable<BllBoxInfo>().Where(m => m.BindNo == demo.Id).ToList();
foreach (var demo2 in boxInfo)
{
- demo2.ASNNo = null;
- demo2.ASNDetailNo = null;
+ if (demo2.Origin != "WMS")
+ {
+ if (notice.Type != "1" && notice.Type != "4")
+ {
+ demo2.ASNNo = null;
+ demo2.ASNDetailNo = null;
+ }
+ }
demo2.BindNo = null;
demo2.PalletNo = null;
demo2.Status = "0";
@@ -243,7 +249,7 @@
{
Db.Updateable(stock).ExecuteCommand();
}
-
+
}
Db.Deleteable(item).ExecuteCommand();
@@ -401,7 +407,7 @@
if (stockDetail.Qty != null)
{
stock.Qty -= (int)stockDetail.Qty;
-
+
}
if (stock.Qty == 0)
@@ -412,7 +418,7 @@
{
Db.Updateable(stock).ExecuteCommand();
}
-
+
Db.Deleteable(stockDetail).ExecuteCommand();
Db.Deleteable(stockInfo).ExecuteCommand();
if (locate != null)
@@ -432,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