From 731b5b8b9d5826c5e7343d0a7b5254731a522273 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期三, 22 十月 2025 15:37:15 +0800
Subject: [PATCH] 逻辑优化
---
Services/MesInvItemBarcodesManager.cs | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Services/MesInvItemBarcodesManager.cs b/Services/MesInvItemBarcodesManager.cs
index 18bd80f..66f895b 100644
--- a/Services/MesInvItemBarcodesManager.cs
+++ b/Services/MesInvItemBarcodesManager.cs
@@ -290,6 +290,8 @@
if (womdaa == null) throw new Exception("宸ュ崟鍗曞彿涓嶅瓨鍦�");
+ if (womdaa.Daa018 != "寮�宸�") throw new Exception("宸ュ崟鏈紑宸�");
+
var okQty = query.currentCjNum - query.initCjNum - query.bf;//鑹搧鏁伴噺
// 鍒涘缓鎶ュ伐璁板綍
@@ -311,9 +313,10 @@
BgPerson = query.staffNo // 鏂板锛氭姤宸ヤ汉缂栧彿
};
- // 鏇存柊宸ュ崟Daa011涓哄師鍊煎姞涓婃湰娆¤壇鍝佹暟閲�
+ // 鏇存柊宸ュ崟Daa011涓哄師鍊煎姞涓婃湰娆¤壇鍝佹暟閲忥紝Daa012涓哄師鍊煎姞涓婃湰娆′笉鑹搧鏁伴噺
Db.Updateable<Womdaa>()
.SetColumns(x => x.Daa011 == (womdaa.Daa011 ?? 0) + (okQty ?? 0))
+ .SetColumns(x => x.Daa012 == (womdaa.Daa012 ?? 0) + (query.bf ?? 0))
.Where(x => x.Daa001 == womdaa.Daa001)
.ExecuteCommand();
--
Gitblit v1.9.3