Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -1076,6 +1076,18 @@ namespace Tnb.ProductionMgr
|
||||
#endregion
|
||||
prdTaskList.ForEach(x => x.mo_task_status = status);
|
||||
row = await db.Updateable(prdTaskList).ExecuteCommandAsync();
|
||||
foreach (var item in prdTaskList)
|
||||
{
|
||||
if (string.IsNullOrEmpty(item.parent_id)) continue;
|
||||
//子任务所有状态相同才修改父任务状态
|
||||
int count1 = await db.Queryable<PrdMoTask>().CountAsync(y => y.parent_id == item.parent_id);
|
||||
int count2 = await db.Queryable<PrdMoTask>().CountAsync(y => y.parent_id == item.parent_id && y.mo_task_status==status);
|
||||
if (count1 == count2)
|
||||
{
|
||||
await db.Updateable<PrdMoTask>().SetColumns(x => x.mo_task_status == status)
|
||||
.Where(x => x.id == item.parent_id).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
if (row > 0)
|
||||
{
|
||||
taskReportLogs.AddRange(prdTaskList);
|
||||
|
||||
Reference in New Issue
Block a user