From 8ba0722979e389a8a2f5835022a7d305ab215c08 Mon Sep 17 00:00:00 2001
From: xwt <2740516069@qq.com>
Date: 星期四, 24 七月 2025 17:52:26 +0800
Subject: [PATCH] 来料检增加字段
---
StandardInterface/MES.Service/service/WomcaaManager.cs | 35 +++++++++++++++++++++++++++++------
1 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/StandardInterface/MES.Service/service/WomcaaManager.cs b/StandardInterface/MES.Service/service/WomcaaManager.cs
index f8df994..c1584c4 100644
--- a/StandardInterface/MES.Service/service/WomcaaManager.cs
+++ b/StandardInterface/MES.Service/service/WomcaaManager.cs
@@ -72,14 +72,27 @@
List<Womcab> mesWomcabs)
{
var decimals = mesWomcabs.Select(s => s.Id).ToArray();
- var update = base.DeleteById(mesWomcaa.Id);
- var insertOrUpdate = db
- .Deleteable<Womcab>().In(decimals)
- .ExecuteCommand() > 0;
+ var update = true;
+ if (mesWomcaa != null)
+ {
+ if (mesWomcaa.Id != null)
+ {
+ update = base.DeleteById(mesWomcaa.Id);
+ }
+ }
+ var insertOrUpdate = true;
+ if (decimals != null || decimals.Length > 0)
+ {
+ insertOrUpdate = db.Deleteable<Womcab>().In(decimals).ExecuteCommand() > 0;
+ }
- if (update && insertOrUpdate) return true;
+ if (update && insertOrUpdate)
+ {
+ return true;
+ }
throw new NotImplementedException("鏇存柊澶辫触");
+
}
private Womcaa MapErpCAAtoWomcaa(ErpCAA dto)
@@ -202,7 +215,16 @@
RkOrg = dto.RK_ORG, //鍏ュ簱缁勭粐
Rcn=dto.RCN, //鏃ヤ骇鑳�
Cglineid=dto.CG_LINE_ID, //閲囪喘璁㈠崟琛宨d
-
+ Kh=dto.KH,
+ Khjc=dto.KH_JCZL,
+ Scph=dto.SC_PH,
+ Moldno=dto.MOLd_no,
+ Oldmoldno=dto.Old_mold_no,
+ Jt=dto.JT,
+ Xscn=dto.XS_CN,
+ Sjxs=dto.SJ_xs,
+ Nextgx=dto.NEXT_Gx,
+ Rks=dto.RKS,
//娌冨皵鏂板
// WR_F_SCDD_SCTZD = dto.F_SCDD_SCTZD
//WR_F_SCDD_XH = dto.F_SCDD_XH
@@ -272,6 +294,7 @@
// Db.Deleteable<Womcab>().Where(s => s.Erpid == womcab.Erpid).ExecuteCommand();
womcab.Id = entity.Id;
}
+
womcabList.Add(womcab);
}
--
Gitblit v1.9.3