bug
This commit is contained in:
@@ -320,8 +320,9 @@ namespace Tnb.ProductionMgr
|
|||||||
result = await _db.Queryable<PrdMoTask>().LeftJoin<PrdMo>((a, b) => a.mo_id == b.id)
|
result = await _db.Queryable<PrdMoTask>().LeftJoin<PrdMo>((a, b) => a.mo_id == b.id)
|
||||||
.LeftJoin<BasMaterial>((a, b, c) => a.material_id == c.id)
|
.LeftJoin<BasMaterial>((a, b, c) => a.material_id == c.id)
|
||||||
.LeftJoin<OrganizeEntity>((a, b, c, d) => a.workline_id == d.Id)
|
.LeftJoin<OrganizeEntity>((a, b, c, d) => a.workline_id == d.Id)
|
||||||
|
.LeftJoin<BasProcess>((a,b,c,d,e)=>a.process_id==e.id)
|
||||||
.Where((a, b, c, d) => b.id == moId || b.parent_id == moId)
|
.Where((a, b, c, d) => b.id == moId || b.parent_id == moId)
|
||||||
.Select((a, b, c, d) => new PrdMoTaskOutput
|
.Select((a, b, c, d,e) => new PrdMoTaskOutput
|
||||||
{
|
{
|
||||||
mo_task_code = a.mo_task_code,
|
mo_task_code = a.mo_task_code,
|
||||||
mo_task_status = a.mo_task_status,
|
mo_task_status = a.mo_task_status,
|
||||||
@@ -329,10 +330,12 @@ namespace Tnb.ProductionMgr
|
|||||||
workline_name = d.FullName,
|
workline_name = d.FullName,
|
||||||
material_code = c.code,
|
material_code = c.code,
|
||||||
material_name = c.name,
|
material_name = c.name,
|
||||||
|
process_code = e.process_code,
|
||||||
|
process_name = e.process_name,
|
||||||
mo_task_qty = SqlFunc.Subqueryable<PrdMoTask>().Where(a => a.mo_id == moId).Count(),
|
mo_task_qty = SqlFunc.Subqueryable<PrdMoTask>().Where(a => a.mo_id == moId).Count(),
|
||||||
estimated_start_date = a.estimated_start_date.Value.ToString("yyyy-MM-dd HH"),
|
estimated_start_date = a.estimated_start_date.Value.ToString("yyyy-MM-dd HH"),
|
||||||
estimated_end_date = a.estimated_end_date.Value.ToString("yyyy-MM-dd HH"),
|
estimated_end_date = a.estimated_end_date.Value.ToString("yyyy-MM-dd HH"),
|
||||||
plan_qty = b.scheduled_qty,
|
plan_qty = a.scheduled_qty,
|
||||||
complete_qty = a.complete_qty,
|
complete_qty = a.complete_qty,
|
||||||
})
|
})
|
||||||
.Mapper(it =>
|
.Mapper(it =>
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ namespace Tnb.ProductionMgr
|
|||||||
node.workline_id = $"{workLine.Item1}/{workLine.Item2}";
|
node.workline_id = $"{workLine.Item1}/{workLine.Item2}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
node.plan_start_date = item.estimated_start_date.HasValue ? item.estimated_start_date.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
|
node.plan_start_date = item.plan_start_date.HasValue ? item.plan_start_date.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
|
||||||
node.plan_end_date = item.estimated_end_date.HasValue ? item.estimated_end_date.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
|
node.plan_end_date = item.plan_end_date.HasValue ? item.plan_end_date.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
|
||||||
await GetChild(item.id, trees, dic);
|
await GetChild(item.id, trees, dic);
|
||||||
trees.Add(node);
|
trees.Add(node);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user