优化
This commit is contained in:
@@ -388,8 +388,8 @@ namespace Tnb.ProductionMgr
|
|||||||
reported_work_qty = a.reported_work_qty,
|
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),
|
complete_rate = a.reported_work_qty==null?0:SqlFunc.ToDecimal(a.reported_work_qty*100)/SqlFunc.ToDecimal(a.plan_qty),
|
||||||
children = SqlFunc.Subqueryable<PrdMoTask>()
|
children = SqlFunc.Subqueryable<PrdMoTask>()
|
||||||
.LeftJoin<DictionaryDataEntity>((x,y)=>x.mo_task_code==y.EnCode && y.DictionaryTypeId==DictConst.PrdTaskStatusTypeId)
|
.LeftJoin<DictionaryDataEntity>((x,y)=>x.mo_task_status==y.EnCode && y.DictionaryTypeId==DictConst.PrdTaskStatusTypeId)
|
||||||
.Where(x=>x.mo_id==a.id)
|
.Where(x=>x.mo_id==a.id && !SqlFunc.IsNullOrEmpty(x.parent_id))
|
||||||
.OrderByDesc((x,y)=>x.create_time)
|
.OrderByDesc((x,y)=>x.create_time)
|
||||||
.ToList((x,y)=>new PrdMoStatisticsDetailOutput()
|
.ToList((x,y)=>new PrdMoStatisticsDetailOutput()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ namespace Tnb.ProductionMgr
|
|||||||
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode)
|
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode)
|
||||||
.LeftJoin<EqpEquipment>((a,b,c,d,e,f)=>a.eqp_id==f.id)
|
.LeftJoin<EqpEquipment>((a,b,c,d,e,f)=>a.eqp_id==f.id)
|
||||||
.LeftJoin<ToolMolds>((a,b,c,d,e,f,g)=>a.mold_id==g.id)
|
.LeftJoin<ToolMolds>((a,b,c,d,e,f,g)=>a.mold_id==g.id)
|
||||||
.Where((a, b) => a.workstation_id == input.stationId && a.mo_task_status != DictConst.ToBeScheduledEncode )
|
.Where((a, b) => a.workstation_id == input.stationId && (a.mo_task_status == DictConst.ToBeStartedEnCode || a.mo_task_status == DictConst.MoStatusPauseCode || a.mo_task_status == DictConst.ComplatedEnCode || a.mo_task_status == DictConst.InProgressEnCode) )
|
||||||
.Select((a, b, c, d, e,f,g) => new PADPackageTaskPageOutput
|
.Select((a, b, c, d, e,f,g) => new PADPackageTaskPageOutput
|
||||||
{
|
{
|
||||||
id = a.id,
|
id = a.id,
|
||||||
@@ -399,7 +399,7 @@ namespace Tnb.ProductionMgr
|
|||||||
})
|
})
|
||||||
.MergeTable()
|
.MergeTable()
|
||||||
.OrderByDescending((a) => a.create_time)
|
.OrderByDescending((a) => a.create_time)
|
||||||
.ToPagedListAsync(input.currentPage, input.pageSize);
|
.ToPagedListAsync(input.currentPage, int.MaxValue);
|
||||||
|
|
||||||
return PageResult<PADPackageTaskPageOutput>.SqlSugarPageResult(result);
|
return PageResult<PADPackageTaskPageOutput>.SqlSugarPageResult(result);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user