点巡检 设备模具保养执行修改
This commit is contained in:
@@ -138,8 +138,11 @@ namespace Tnb.ProductionMgr
|
||||
.InnerJoin<ToolMolds>((a, b) => a.mold_id == b.id)
|
||||
.InnerJoin<BasMaterial>((a, b, c) => a.material_id == c.id)
|
||||
.LeftJoin<DictionaryDataEntity>((a,b,c,d)=>d.Id==b.mold_status)
|
||||
.LeftJoin(_db.SqlQueryable<ToolMoldRequisition>("select * from tool_mold_requisition where id in (select max(id) from tool_mold_requisition group by mold_id)"),(a,b,c,d,e)=>b.id==e.mold_id)
|
||||
.LeftJoin<EqpEquipment>((a,b,c,d,e,f)=>e.equip_id==f.id)
|
||||
.LeftJoin<PrdMoTask>((a,b,c,d,e,f,g)=>e.mo_task_id==g.id)
|
||||
.Where((a, b, c) => a.material_id == materialId)
|
||||
.Select((a, b, c,d) => new Tnb.ProductionMgr.Entities.Dto.MoldListOutput
|
||||
.Select((a, b, c,d,e,f,g) => new Tnb.ProductionMgr.Entities.Dto.MoldListOutput
|
||||
{
|
||||
mold_id = b.id,
|
||||
mold_code = b.mold_code,
|
||||
@@ -149,6 +152,9 @@ namespace Tnb.ProductionMgr
|
||||
material_code = c.code,
|
||||
mold_status = d.FullName,
|
||||
available_stations = SqlFunc.Subqueryable<EqpEquipment>().Where(it => it.mold_id == a.id).Count(),
|
||||
equip_name = f.name,
|
||||
complete_qty = SqlFunc.IsNull(g.reported_work_qty, 0) + SqlFunc.IsNull(g.scrap_qty, 0),
|
||||
scheduled_qty = SqlFunc.IsNull(g.scheduled_qty, 0)
|
||||
}).ToListAsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user