From 40bca59440c5b34298914f8a5408aa1c62060854 Mon Sep 17 00:00:00 2001 From: "DEVICE8\\12494" Date: Fri, 5 May 2023 18:20:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=A8=A1=E5=85=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=96=B0=E5=A2=9E=E6=A8=A1=E5=85=B7Id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dto/PrdManage/MoldListOutput.cs | 1 + ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr.Entitys/Dto/PrdManage/MoldListOutput.cs b/ProductionMgr/Tnb.ProductionMgr.Entitys/Dto/PrdManage/MoldListOutput.cs index 0a5a1440..bbf68e2c 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entitys/Dto/PrdManage/MoldListOutput.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entitys/Dto/PrdManage/MoldListOutput.cs @@ -16,5 +16,6 @@ namespace Tnb.ProductionMgr.Entities.Dto /// 产品 名称 /// public string item_name { get; set; } + public string mold_id { get; set;} } } diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs index d0fc4e9f..fe68257f 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs @@ -82,7 +82,7 @@ namespace Tnb.ProductionMgr .Where((a, b) => a.item_id == itemId) .Select((a, b) => new MoldListOutput { - id = a.id, + mold_id = a.id, mold_code = a.mold_code, mold_name = a.mold_name, item_name = b.product_name, @@ -390,7 +390,7 @@ namespace Tnb.ProductionMgr var combineScheduledQty = icmoEntities?.Sum(x => x.scheduled_qty); //合并后的已排产数量 if (combineScheduledQty < combinePlanQty) { - icmoEntities.ForEach(x => + icmoEntities!.ForEach(x => { var item = moList.Find(xx => xx.id == x.mo_id); if (item != null) @@ -405,7 +405,7 @@ namespace Tnb.ProductionMgr //如果已排产数量大于计划数量,修改工单状态为,待开工 if (combineScheduledQty >= combinePlanQty) { - icmoEntities.ForEach(x => + icmoEntities!.ForEach(x => { var item = moList.Find(xx => xx.id == x.mo_id); if (item != null) @@ -486,6 +486,8 @@ namespace Tnb.ProductionMgr { var row = -1; var db = _repository.AsSugarClient(); + if(input.icmo_id.IsNullOrWhiteSpace()) + throw new ArgumentNullException(nameof(input.icmo_id)); var icmoItem = await db.Queryable().FirstAsync(it => it.id == input.icmo_id); switch (input.category) { @@ -513,10 +515,6 @@ namespace Tnb.ProductionMgr #endregion - //public async Task GetList(VisualDevModelListQueryInput input) - //{ - // return null; - //} /// /// 删除