diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs index 74b6d863..0412945a 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs @@ -412,10 +412,10 @@ namespace Tnb.ProductionMgr { foreach (var item in input.details) { - // if (!inputMaterials.Contains(item["material_id"])) - // { - // throw new Exception("该物料不是生产bom投入物料,不能签收"); - // } + if (!inputMaterials.Contains(item.material_id)) + { + throw new Exception("该物料不是生产bom投入物料,不能签收"); + } PrdMaterialReceiptD? detail = null; if (carry.carrystd_id == WmsWareHouseConst.CARRY_ZYXCSTD_ID || carry.carrystd_id == WmsWareHouseConst.CARRY_ZYLJSTD_ID) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 21b0edbe..526b86c6 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -164,8 +164,8 @@ namespace Tnb.ProductionMgr eqp_type_code = SqlFunc.Subqueryable().Where(iit => iit.id == b.equip_type_id).Select(iit => iit.name), eqp_machine_num = b.eqp_machine_num, tonnage = b.tonnage, - task_list_qty = SqlFunc.Subqueryable().Where(x => x.eqp_id == b.id).Count(), - estimated_end_date = SqlFunc.Subqueryable().Where(x => x.eqp_id == b.id).OrderByDesc(o => o.plan_end_date).Select(x => x.plan_end_date) + task_list_qty = SqlFunc.Subqueryable().Where(x => x.eqp_id == b.id && (x.mo_task_status==DictConst.ToBeStartedEnCode || x.mo_task_status==DictConst.ToBeScheduledEncode)).Count(), + estimated_end_date = SqlFunc.Subqueryable().Where(x => x.eqp_id == b.id && (x.mo_task_status==DictConst.ToBeStartedEnCode || x.mo_task_status==DictConst.ToBeScheduledEncode)).Max(x=>x.create_time) }).Mapper(x => { x.first_date = x.estimated_end_date.HasValue ? x.estimated_end_date.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""; diff --git a/system/Tnb.Systems/System/DataInterfaceService.cs b/system/Tnb.Systems/System/DataInterfaceService.cs index 5b3829fa..211d8266 100644 --- a/system/Tnb.Systems/System/DataInterfaceService.cs +++ b/system/Tnb.Systems/System/DataInterfaceService.cs @@ -623,8 +623,8 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController } catch (Exception e) { - if (e.Message == "TypeError: Method or property not found") - { + // if (e.Message == "TypeError: Method or property not found") + // { try { var result = await PreviewWithOutJs(id, input); @@ -635,11 +635,11 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController { throw Oops.Oh(ErrorCode.COM1020); } - } - else - { - throw Oops.Oh(ErrorCode.COM1020); - } + // } + // else + // { + // throw Oops.Oh(ErrorCode.COM1020); + // } } } #endregion