From a619299816f2f632c7c6ba3a1bb869e2c212797d Mon Sep 17 00:00:00 2001
From: fcx <2246384483@qq.com>
Date: 星期五, 19 十二月 2025 14:12:33 +0800
Subject: [PATCH] 对添加巡检单物料编码进行去重
---
StandardPda/MES.Service/service/WomcaaManager.cs | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/StandardPda/MES.Service/service/WomcaaManager.cs b/StandardPda/MES.Service/service/WomcaaManager.cs
index 8dbec7d..29f7dd7 100644
--- a/StandardPda/MES.Service/service/WomcaaManager.cs
+++ b/StandardPda/MES.Service/service/WomcaaManager.cs
@@ -158,7 +158,9 @@
Reasonforrework = dto.FReasonForRework,
Isforcewholeset = dto.FIsForceWholeSet,
PREVMO = dto.FPrevMO,
- Typea = dto.TypeA
+ TsDate = DateTime.Now,
+ Typea = dto.TypeA,
+ ISCANCEL = dto.FIsCancel
};
@@ -276,13 +278,19 @@
&& x.OrgId == "1002011210000095"
&& x.TableType == "MES_ITEMS").First();
+ var mesLinkU9_TDL = Db.Queryable<MesLinkU9>()
+ .Where(x => x.U9Id == Convert.ToString(dto.FSubstitutedItem)
+ && x.OrgId == "1002011210000095"
+ && x.TableType == "MES_ITEMS").First();
+
var mesLinkU9_xm = Db.Queryable<MesLinkU9>()
.Where(x => x.U9Id == Convert.ToString(dto.FProject)
&& x.OrgId == "1002011210000095"
&& x.TableType == "MES_PROJECT").First();
if (mesLinkU9 != null) womcab.Cab003 = mesLinkU9.MesId;
- if (mesLinkU9_xm != null) entity.Project = mesLinkU9_xm.MesId;
+ if (mesLinkU9_TDL != null) womcab.Substituteditem = Convert.ToInt64(mesLinkU9_TDL.MesId);
+ if (mesLinkU9_xm != null) womcab.Project = mesLinkU9_xm.MesId;
womcabList.Add(womcab);
}
--
Gitblit v1.9.3