diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdMoTaskIssueListOutput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdMoTaskIssueListOutput.cs index 722ddda9..c648d5f0 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdMoTaskIssueListOutput.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdMoTaskIssueListOutput.cs @@ -6,6 +6,7 @@ namespace Tnb.ProductionMgr.Entities.Dto public string mo_task_code { get; set; } public string material_id { get; set; } public string mold_id { get; set; } + public string eqp_id { get; set; } public string mo_task_status { get; set; } public int? plan_qty { get; set; } public int? scheduled_qty { get; set; } diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskIssueService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskIssueService.cs index 3524721d..9a07fb20 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskIssueService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskIssueService.cs @@ -114,21 +114,22 @@ namespace Tnb.ProductionMgr .LeftJoin((a, b, c, d) => c.Id == d.DictionaryTypeId && a.mo_task_status == d.EnCode) .LeftJoin((a,b,c,d,e)=>a.mold_id==e.id) .LeftJoin((a,b,c,d,e,f)=>a.mo_id==f.id) + .LeftJoin((a,b,c,d,e,f,g)=>g.id==a.eqp_id) .WhereIF(!string.IsNullOrEmpty(moTaskCode), (a, b, c, d) => a.mo_task_code.Contains(moTaskCode)) .WhereIF(!string.IsNullOrEmpty(moTaskStatus), (a, b, c, d) => a.mo_task_status == moTaskStatus) .Where((a,b,c,d,e,f)=>a.schedule_type==1) - .OrderByDescending(a=>a.create_time) - .Select((a, b, c, d,e,f) => new PrdMoTaskIssueListOutput + .Select((a, b, c, d,e,f,g) => new PrdMoTaskIssueListOutput { id = a.id, mo_task_code = a.mo_task_code, material_id = b.code+"/"+b.name, mold_id = e.mold_code+"/"+e.mold_name, + eqp_id = g.code+"/"+g.name, mo_task_status = d.FullName, plan_qty = f.plan_qty, scheduled_qty = a.scheduled_qty, create_time = a.create_time==null ? "" :a.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss"), - }).ToPagedListAsync(input.currentPage, input.pageSize); + }).OrderByDescending(a=>a.create_time).ToPagedListAsync(input.currentPage, input.pageSize); return PageResult.SqlSugarPageResult(result); } }