From 87336b96ba0a03cb461a5f5cbd13f4d6dfdae876 Mon Sep 17 00:00:00 2001
From: wbc <2597324127@qq.com>
Date: 星期一, 08 十二月 2025 15:32:46 +0800
Subject: [PATCH] 焕美平板增加通用功能页面,可以使用朋乐的部分pda页面功能(pda存储过程更改,平板同步更新)
---
StandardInterface/MES.Service/service/ZZCXDManager.cs | 26 +++++++++++++++++++++-----
1 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/StandardInterface/MES.Service/service/ZZCXDManager.cs b/StandardInterface/MES.Service/service/ZZCXDManager.cs
index 733be1c..4449457 100644
--- a/StandardInterface/MES.Service/service/ZZCXDManager.cs
+++ b/StandardInterface/MES.Service/service/ZZCXDManager.cs
@@ -12,8 +12,20 @@
{
public bool SaveList(List<ERPZZCXD> list)
{
- var result = list.Select(Save).ToList();
- return result.All(b => b);
+ /*var result = list.Select(Save).ToList();
+ return result.All(b => b);*/
+ foreach (var item in list)
+ {
+ try
+ {
+ Save(item);
+ }
+ catch (Exception ex)
+ {
+ throw new Exception($"鍗曟嵁 {item.Main.bill_no} 鍑洪敊: {ex.Message}", ex);
+ }
+ }
+ return true;
}
public bool Save(ERPZZCXD data)
@@ -126,7 +138,7 @@
Memo = subDto.memo
};
- var existingSub = Db.Queryable<ZZCXB>().Where(s => s.Eid == subEntity.Eid).Single();
+ var existingSub = Db.Queryable<ZZCXB>().Where(s => s.Erpid == subEntity.Erpid).Single();
if (existingSub != null) subEntity.Id = existingSub.Id;
item.SubItems ??= new List<ZZCXB>();
@@ -152,9 +164,13 @@
if (head.Id != null)
base.DeleteById(head.Id);
+
+ // 鍒犻櫎瀛欒〃
+ db.Deleteable<ZZCXB>().Where(d => d.YdId == head.Erpid).ExecuteCommand();
+ // 鍒犻櫎瀛愯〃锛堜娇鐢� yd_id 浣滀负鍏宠仈锛�
db.Deleteable<ZZCXA>().Where(d => d.YdId == head.Erpid).ExecuteCommand();
- db.Deleteable<ZZCXB>().Where(d => d.Erpid == head.Erpid).ExecuteCommand();
-
+ // 鍒犻櫎涓昏〃
+ db.Deleteable<ZZCX>().Where(d => d.Erpid == head.Erpid).ExecuteCommand();
var insertedHead = db.Insertable(head)
.IgnoreColumns(true)
.ExecuteReturnIdentity();
--
Gitblit v1.9.3