排产加模具状态 工单加物料清单版本

This commit is contained in:
2024-05-15 11:26:17 +08:00
parent 2d1c362bf6
commit 977f138445
5 changed files with 28 additions and 1 deletions

View File

@@ -108,8 +108,9 @@ namespace Tnb.ProductionMgr
result = await _db.Queryable<ToolMoldsMaterial>()
.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)
.Where((a, b, c) => a.material_id == materialId)
.Select((a, b, c) => new Tnb.ProductionMgr.Entities.Dto.MoldListOutput
.Select((a, b, c,d) => new Tnb.ProductionMgr.Entities.Dto.MoldListOutput
{
mold_id = b.id,
mold_code = b.mold_code,
@@ -117,6 +118,7 @@ namespace Tnb.ProductionMgr
mold_type_code = b.mold_type_code,
material_name = c.name,
material_code = c.code,
mold_status = d.FullName,
available_stations = SqlFunc.Subqueryable<EqpEquipment>().Where(it => it.mold_id == a.id).Count(),
}).ToListAsync();
return result;