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/BasicData/MesRohInManager.cs | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/MES.Service/service/BasicData/MesRohInManager.cs b/MES.Service/service/BasicData/MesRohInManager.cs
index a9de51d..574ab09 100644
--- a/MES.Service/service/BasicData/MesRohInManager.cs
+++ b/MES.Service/service/BasicData/MesRohInManager.cs
@@ -24,11 +24,11 @@
return rohInErpRohIn.Type switch
{
"2" or "4" or "5" => SaveOrUpdateData(db, mesRohIn,
- mesRohInDatas)
+ mesRohInDatas, rohInErpRohIn.Type)
? 1
: 0,
"3" => SaveOrUpdateData(db, mesRohIn,
- mesRohInDatas)
+ mesRohInDatas, rohInErpRohIn.Type)
? 1
: 0, //UpdateData(db, mesRohIn, mesRohInDatas) ? 1 : 0,//鍙嶅鏍镐笉鍒犻櫎锛屽仛update銆�
_ => throw new NotImplementedException(
@@ -59,8 +59,14 @@
// 鎻掑叆鎴栨洿鏂版暟鎹殑鏂规硶
private bool SaveOrUpdateData(SqlSugarScope db, MesRohIn mesRohIn,
- List<MesRohInData> mesRohInDatas)
+ List<MesRohInData> mesRohInDatas, string type)
{
+
+ if (type == "3" || (mesRohIn.DocumentStatus != null && mesRohIn.DocumentStatus != "C"))
+ {
+ mesRohIn.BillNo = mesRohIn.BillNo + "F" + mesRohIn.EbelnK3id.ToString();
+ }
+
if (mesRohIn.Guid != null)
db.Deleteable<MesRohIn>().Where(s => s.Guid == mesRohIn.Guid)
.ExecuteCommand();
@@ -77,7 +83,14 @@
.IgnoreColumnsNull()
.ExecuteCommand() > 0;
- if (orUpdate && baOrUpdate) return true;
+ if (orUpdate && baOrUpdate)
+ {
+ if (!string.IsNullOrEmpty(mesRohIn.BillNo))
+ {
+ db.Ado.ExecuteCommand("exec [dbo].[prc_unit_check] @BillNo, '閲囪喘'", new { BillNo = mesRohIn.BillNo });
+ }
+ return true;
+ }
throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�");
}
--
Gitblit v1.9.3