From f2900f2e7a9fef2e536c34e8d8406ac60c0f06ba Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期四, 17 七月 2025 23:36:32 +0800 Subject: [PATCH] 添加首检的查询条件,添加首检,巡检返回总行数 --- StandardInterface/MES.Service/service/BasicData/Production/ProductionOrderManager.cs | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/StandardInterface/MES.Service/service/BasicData/Production/ProductionOrderManager.cs b/StandardInterface/MES.Service/service/BasicData/Production/ProductionOrderManager.cs index 6291f89..31efed9 100644 --- a/StandardInterface/MES.Service/service/BasicData/Production/ProductionOrderManager.cs +++ b/StandardInterface/MES.Service/service/BasicData/Production/ProductionOrderManager.cs @@ -50,12 +50,25 @@ List<Womcab> mesRohInDatas) { var decimals = mesRohInDatas.Select(s => s.Id).ToArray(); - var update = base.DeleteById(womcaaWW.Id); - var insertOrUpdate = db - .Deleteable<Womcab>().In(decimals) - .ExecuteCommand() > 0; - if (update && insertOrUpdate) return true; + var update = true; + if (womcaaWW != null) + { + if (womcaaWW.Id != null) + { + update = base.DeleteById(womcaaWW.Id); + } + } + var insertOrUpdate = true; + if (decimals != null || decimals.Length > 0) + { + insertOrUpdate = db.Deleteable<Womcab>().In(decimals).ExecuteCommand() > 0; + } + + if (update && insertOrUpdate) + { + return true; + } throw new NotImplementedException("鏇存柊澶辫触"); } -- Gitblit v1.9.3