This commit is contained in:
alex
2023-07-21 17:35:16 +08:00
2 changed files with 21 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ public partial class PrdInstockH : BaseEntity<string>
public string? org_id { get; set; }
/// <summary>
/// 状态 1 申请入库 2 已入库
/// 状态 0 申请入库 1 已入库
/// </summary>
public int? status { get; set; }

View File

@@ -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<PrdMoTask>().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<BasMaterial>().FirstAsync(it => it.id == moTask.material_id);
//添加生产任务操作记录日志
var taskLog = new PrdTaskLog();