bug,生产bom工序添加排序和是否最后一道工序字段
This commit is contained in:
@@ -1263,7 +1263,22 @@ namespace Tnb.ProductionMgr
|
||||
.SetColumns(x => x.reported_work_qty == x.reported_work_qty + input.reported_qty)
|
||||
.Where(x => x.id == input.mo_task_id).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
var mbomProcess = await db.Queryable<BasMbomProcess>().SingleAsync(x => x.id == prdMoTask.mbom_process_id);
|
||||
if (mbomProcess.is_last==1 && prdMoTask != null && !string.IsNullOrEmpty(prdMoTask.parent_id))
|
||||
{
|
||||
var parentMoTask = await db.Queryable<PrdMoTask>().SingleAsync(x => x.id == prdMoTask.parent_id);
|
||||
if (parentMoTask?.last_process_complete_qty == null)
|
||||
{
|
||||
await db.Updateable<PrdMoTask>()
|
||||
.SetColumns(x => x.last_process_complete_qty == input.reported_qty)
|
||||
.Where(x => x.id == prdMoTask.parent_id).ExecuteCommandAsync();
|
||||
}else if (parentMoTask?.last_process_complete_qty != null)
|
||||
{
|
||||
await db.Updateable<PrdMoTask>()
|
||||
.SetColumns(x => x.last_process_complete_qty == x.last_process_complete_qty + input.reported_qty)
|
||||
.Where(x => x.id == prdMoTask.parent_id).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
|
||||
var master = await db.Queryable<PrdReportRecord>().FirstAsync(it => it.mo_task_id == input.mo_task_id);
|
||||
if (master != null)
|
||||
|
||||
Reference in New Issue
Block a user