diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PADPackageTaskPageOutput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PADPackageTaskPageOutput.cs index aaa52ab4..93b18d85 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PADPackageTaskPageOutput.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PADPackageTaskPageOutput.cs @@ -85,5 +85,11 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage public string process_name { get; set; } public string mbom_process_id { get; set; } + public string equip_id { get; set; } + public string equip_code { get; set; } + public string equip_name { get; set; } + public string mold_id { get; set; } + public string mold_code { get; set; } + public string mold_name { get; set; } } } \ No newline at end of file diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs index 1ee4f9d0..6ed5f27f 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs @@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Mvc; using SqlSugar; using Tnb.BasicData; using Tnb.BasicData.Entities; +using Tnb.EquipMgr.Entities; using Tnb.ProductionMgr.Entities; using Tnb.ProductionMgr.Entities.Dto.PrdManage; using Tnb.ProductionMgr.Interfaces; @@ -253,11 +254,12 @@ namespace Tnb.ProductionMgr var result = await _db.Queryable() .LeftJoin((a, b) => a.material_id == b.id) .LeftJoin((a, b, c) => a.process_id == c.id) - .LeftJoin((a, b, c, d) => a.workline_id == d.Id) - .LeftJoin((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode) + .LeftJoin((a, b, c, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode) + .LeftJoin((a,b,c,e,f)=>a.eqp_id==f.id) + .LeftJoin((a,b,c,e,f,g)=>a.mold_id==g.id) .Where((a, b) => a.workstation_id == input.stationId && a.mo_task_status != DictConst.ToBeScheduledEncode && a.schedule_type==1) .OrderByDescending((a, b) => a.create_time) - .Select((a, b, c, d, e) => new PADPackageTaskPageOutput + .Select((a, b, c, e,f,g) => new PADPackageTaskPageOutput { id = a.id, mo_task_code = a.mo_task_code, @@ -266,7 +268,7 @@ namespace Tnb.ProductionMgr material_code = b.code, material_name = b.name, workline_id = a.workline_id, - workline_name = d.FullName, + // workline_name = d.FullName, bom_id = a.bom_id, mo_task_status = e.FullName, complete_qty = SqlFunc.IsNull(a.reported_work_qty,0) + SqlFunc.IsNull(a.scrap_qty,0), @@ -279,6 +281,12 @@ namespace Tnb.ProductionMgr process_id = a.process_id, process_name = c.process_name, mbom_process_id = a.mbom_process_id, + equip_id = a.eqp_id, + equip_code = f.code, + equip_name = f.name, + mold_id = a.mold_id, + mold_code = g.mold_code, + mold_name = g.mold_name, }).ToPagedListAsync(input.currentPage, input.pageSize); return PageResult.SqlSugarPageResult(result);