From d7bf5fce0a442c858d02675a2c71a8af49937ae2 Mon Sep 17 00:00:00 2001 From: hao <1836460075@qq.com> Date: 星期三, 04 六月 2025 17:20:54 +0800 Subject: [PATCH] 分布式调拨 --- StandardInterface/MES.Service/service/WomcaaManager.cs | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/StandardInterface/MES.Service/service/WomcaaManager.cs b/StandardInterface/MES.Service/service/WomcaaManager.cs index baacc02..f8df994 100644 --- a/StandardInterface/MES.Service/service/WomcaaManager.cs +++ b/StandardInterface/MES.Service/service/WomcaaManager.cs @@ -60,7 +60,7 @@ .IgnoreColumns(true).ExecuteCommand() > 0; //鎵归噺鎻掑叆蹇界暐绌哄瓧娈� - var baOrUpdate = db.Insertable(mesWomcabs).PageSize(1) + var baOrUpdate = db.Insertable(mesWomcabs).PageSize(10) .IgnoreColumnsNull() .ExecuteCommand() > 0; @@ -76,6 +76,7 @@ var insertOrUpdate = db .Deleteable<Womcab>().In(decimals) .ExecuteCommand() > 0; + if (update && insertOrUpdate) return true; throw new NotImplementedException("鏇存柊澶辫触"); @@ -200,7 +201,7 @@ Typea = dto.TypeA, /// 鍗曟嵁鐘舵�� RkOrg = dto.RK_ORG, //鍏ュ簱缁勭粐 Rcn=dto.RCN, //鏃ヤ骇鑳� - + Cglineid=dto.CG_LINE_ID, //閲囪喘璁㈠崟琛宨d //娌冨皵鏂板 // WR_F_SCDD_SCTZD = dto.F_SCDD_SCTZD @@ -237,6 +238,7 @@ Lot = dto.FLot, //鎵瑰彿 DepotCode = dto.FStockID, //浠撳簱 IssueType = dto.FIssueType, //鍙戞枡鏂瑰紡 + Cab008 = dto.GY, //宸ヨ壓 Cab009 = dto.FUnitID, //鍗曚綅 SupplyType = dto.FSupplyType, //渚涘簲绫诲瀷 Cab012 = Convert.ToDecimal(dto.FStdQty), // 鏍囧噯鐢ㄩ噺 @@ -264,8 +266,12 @@ var entity = Db.Queryable<Womcab>() .Where(s => s.Erpid == womcab.Erpid).Single(); - if (entity != null) womcab.Id = entity.Id; - + if (entity != null) + { + // 鍒犻櫎宸叉湁鐨� Erpid 鐩稿叧鐨� Womcab 鏁版嵁 + // Db.Deleteable<Womcab>().Where(s => s.Erpid == womcab.Erpid).ExecuteCommand(); + womcab.Id = entity.Id; + } womcabList.Add(womcab); } -- Gitblit v1.9.3