From 3a6f7cb36dff0ec99edddbb53078947fcf08a47e Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期六, 19 七月 2025 09:32:15 +0800 Subject: [PATCH] 1.用料清单变更 --- MES.Service/service/WomcaaManager.cs | 24 +++++++++++++++++++++--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/MES.Service/service/WomcaaManager.cs b/MES.Service/service/WomcaaManager.cs index aa0e102..cb30102 100644 --- a/MES.Service/service/WomcaaManager.cs +++ b/MES.Service/service/WomcaaManager.cs @@ -68,8 +68,24 @@ .IgnoreColumnsNull() .ExecuteCommand() > 0; - if (orUpdate && baOrUpdate) return true; + // if (orUpdate && baOrUpdate) + // throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�"); + + if (orUpdate && baOrUpdate) + { + // 璋冪敤瀛樺偍杩囩▼鏇存柊鐢ㄦ枡娓呭崟 + db.Ado.ExecuteCommand("exec [dbo].[prc_update_womdab] @outMsg output,@outSum output,@inEdtUserGuid,@inCaaGuid", + new { + outMsg = (string)null, // 杈撳嚭鍙傛暟 + outSum = (int?)null, // 杈撳嚭鍙傛暟 + inEdtUserGuid = new Guid("11111111-1111-1111-1111-111111111111"), + inCaaGuid = new Guid(mesWomcaa.Guid.ToString()) + }); + return true; + } throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�"); + + } private bool UpdateData(SqlSugarScope db, Womcaa mesWomcaa, @@ -107,7 +123,9 @@ PlanId = dto.FPlannerID, /// 璁″垝鍛� Caa010 = dto.FPlanStartDate, /// 棰勮寮�宸ユ椂闂� Caa011 = dto.FPlanFinishDate, /// 棰勮瀹屽伐鏃堕棿 - Caa005 = dto.FConveyDate, /// 寮�鍗曟棩鏈� + Caa005 = DateTime.TryParse(dto.FConveyDate, out var conveyDate) + ? (conveyDate <= new DateTime(1900, 1, 1) ? null : conveyDate.ToString()) + : null, /// 寮�鍗曟棩鏈� StockInlimith = dto.FStockInLimitH, /// 鍏ュ簱涓婇檺 StockInlimitl = dto.FStockInLimitL, /// 鍏ュ簱涓嬮檺 Mtono = dto.FMTONO, /// 璁″垝璺熻釜鍙� @@ -172,7 +190,7 @@ ? Convert.ToDecimal(dto.FNeedQty) : null, /// 闇�棰嗙敤閲� Cab007 = !string.IsNullOrEmpty(dto.FPickedQty) - ? Convert.ToInt32(dto.FPickedQty) + ? Convert.ToDecimal(dto.FPickedQty) : null, /// 宸查鐢ㄩ噺 PositionNo = dto.FPositionNO, /// 浣嶇疆鍙� SupplyOrganization = dto.FChildSupplyOrgId, /// 渚涘簲缁勭粐 -- Gitblit v1.9.3