This commit is contained in:
2023-09-22 16:58:41 +08:00
parent 0afd486af2
commit 11c2262fe6
2 changed files with 4 additions and 4 deletions

View File

@@ -388,8 +388,8 @@ namespace Tnb.ProductionMgr
reported_work_qty = a.reported_work_qty,
complete_rate = a.reported_work_qty==null?0:SqlFunc.ToDecimal(a.reported_work_qty*100)/SqlFunc.ToDecimal(a.plan_qty),
children = SqlFunc.Subqueryable<PrdMoTask>()
.LeftJoin<DictionaryDataEntity>((x,y)=>x.mo_task_code==y.EnCode && y.DictionaryTypeId==DictConst.PrdTaskStatusTypeId)
.Where(x=>x.mo_id==a.id)
.LeftJoin<DictionaryDataEntity>((x,y)=>x.mo_task_status==y.EnCode && y.DictionaryTypeId==DictConst.PrdTaskStatusTypeId)
.Where(x=>x.mo_id==a.id && !SqlFunc.IsNullOrEmpty(x.parent_id))
.OrderByDesc((x,y)=>x.create_time)
.ToList((x,y)=>new PrdMoStatisticsDetailOutput()
{