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; - //} /// /// 删除