From 1cd4e66b490e4b6cc3368771cdff164990e152e7 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期一, 22 十二月 2025 17:35:57 +0800
Subject: [PATCH] 接口增加单位换算,dab增加两个字段
---
MES.Service/service/WomcaaManager.cs | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/MES.Service/service/WomcaaManager.cs b/MES.Service/service/WomcaaManager.cs
index 062a5f3..f0369f4 100644
--- a/MES.Service/service/WomcaaManager.cs
+++ b/MES.Service/service/WomcaaManager.cs
@@ -54,10 +54,10 @@
private bool SaveOrUpdateData(SqlSugarScope db, Womcaa mesWomcaa,
List<Womcab> mesWomcabs, string type)
{
- if(type == "3")
+ if(type == "3" || (mesWomcaa.DocumentStatus != null && mesWomcaa.DocumentStatus != "C"))
{
mesWomcaa.Typea = "3"; // 鏂板瀛楁璧嬪��
- mesWomcaa.Caa001 = mesWomcaa.Caa001 + "F";
+ mesWomcaa.Caa001 = mesWomcaa.Caa001 + "F" + mesWomcaa.Erpid.ToString();
}
@@ -84,6 +84,10 @@
if (orUpdate && baOrUpdate)
{
+ db.Ado.ExecuteCommand("exec [dbo].[prc_unit_check] @billno, @ModuleType",
+ new { billno = mesWomcaa.Caa001, ModuleType = "鐢熶骇宸ュ崟" });
+
+
// 璋冪敤瀛樺偍杩囩▼鏇存柊鐢ㄦ枡娓呭崟
db.Ado.ExecuteCommand("exec [dbo].[prc_update_womdab] @outMsg output,@outSum output,@inEdtUserGuid,@inCaaGuid",
new {
@@ -232,7 +236,8 @@
UseRate = Convert.ToDecimal(dto.FUseRate),
MaterialType = dto.FMaterialType,
MustQty = Convert.ToDecimal(dto.FMustQty),
- Typeb = dto.TypeB
+ Typeb = dto.TypeB,
+ F_UNW_QTY_YFSL = dto.F_UNW_QTY_YFSL,
// Fsaleorderno = dto.FSALEORDERNO, /// 閿�鍞鍗�
//
// CustomerItemNumber = dto.F_XIFG_Text_re5, /// 瀹㈡埛璐у彿
@@ -245,7 +250,12 @@
var entity = Db.Queryable<Womcab>()
.Where(s => s.Eid == womcab.Eid).Single();
- if (entity != null) womcab.Guid = entity.Guid;
+ if (entity != null) {
+ womcab.Guid = entity.Guid;
+ womcab.IS_LOCK = entity.IS_LOCK;
+ womcab.IS_LOCK_DATE = entity.IS_LOCK_DATE;
+
+ }
womcabList.Add(womcab);
}
--
Gitblit v1.9.3