diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdInstockH.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdInstockH.cs index 390c5651..90149625 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdInstockH.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdInstockH.cs @@ -56,7 +56,7 @@ public partial class PrdInstockH : BaseEntity public string? org_id { get; set; } /// - /// 状态 1 申请入库 2 已入库 + /// 状态 0 申请入库 1 已入库 /// public int? status { get; set; } diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 6886f5fd..f6014392 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -685,7 +685,15 @@ namespace Tnb.ProductionMgr { await db.Ado.BeginTranAsync(); row = await db.Insertable(moTask).ExecuteCommandAsync(); - + #region 质检模块 + //质检 + TriggerPlanEntity entity = new TriggerPlanEntity(); + entity.materialid = moTask.material_id; + entity.processid = moTask.process_id; + entity.workid = moTask.workstation_id; + entity.triggerevent = EnumTriggerEvent.首件检新的生产任务; + await _qcCheckPlanService.CreateTask(entity); + #endregion //根据工单号获取当前工单包含的已排产数 var schedQty = db.Queryable().Where(it => it.mo_id == input.mo_id)?.Sum(d => d.scheduled_qty); @@ -802,6 +810,17 @@ namespace Tnb.ProductionMgr // } // } row = await _db.Insertable(moTask).ExecuteCommandAsync(); + #region 质检模块 + //质检 + TriggerPlanEntity entity = new TriggerPlanEntity(); + entity.materialid = moTask.material_id; + entity.processid = moTask.process_id; + entity.workid = moTask.workstation_id; + entity.triggerevent = EnumTriggerEvent.首件检新的生产任务; + await _qcCheckPlanService.CreateTask(entity); + + #endregion + var material_h = await _db.Queryable().FirstAsync(it => it.id == moTask.material_id); //添加生产任务操作记录日志 var taskLog = new PrdTaskLog();