diff --git a/ProductionMgr/Tnb.ProductionMgr/BiService.cs b/ProductionMgr/Tnb.ProductionMgr/BiService.cs index 5dcfae91..1ddec306 100644 --- a/ProductionMgr/Tnb.ProductionMgr/BiService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/BiService.cs @@ -81,12 +81,14 @@ namespace Tnb.ProductionMgr .LeftJoin((a,b,c)=>a.material_id==c.id) .LeftJoin((a,b,c,d)=>a.create_id==d.Id) .LeftJoin((a,b,c,d,e)=>b.workline_id==e.Id) + .LeftJoin((a,b,c,d,e,f)=>b.eqp_id==f.id) .Where((a,b,c)=>(b.mo_task_status==DictConst.MoStatusPauseCode || b.mo_task_status==DictConst.InProgressEnCode) && c.category_id.Contains("ZSJ")) - .Select((a,b,c,d,e)=>new ReportRecordOutput + .Select((a,b,c,d,e,f)=>new ReportRecordOutput { mo_task_code = b.mo_task_code, material_name = c.name, - workline_name = e.FullName, + // workline_name = e.FullName, + workline_name = f.name, report_type = "合格", qty = a.reported_qty.Value, repoter_name = d.RealName, @@ -100,12 +102,14 @@ namespace Tnb.ProductionMgr .LeftJoin((a,b,c)=>a.material_id==c.id) .LeftJoin((a,b,c,d)=>a.create_id==d.Id) .LeftJoin((a,b,c,d,e)=>b.workline_id==e.Id) + .LeftJoin((a,b,c,d,e,f)=>b.eqp_id==f.id) .Where((a,b,c)=>(b.mo_task_status==DictConst.MoStatusPauseCode || b.mo_task_status==DictConst.InProgressEnCode) && c.category_id.Contains("ZSJ")) - .Select((a,b,c,d,e)=>new ReportRecordOutput + .Select((a,b,c,d,e,f)=>new ReportRecordOutput { mo_task_code = b.mo_task_code, material_name = c.name, - workline_name = e.FullName, + // workline_name = e.FullName, + workline_name = f.name, report_type = "不合格", qty = a.scrap_qty, repoter_name = d.RealName, diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs index 230e56cf..0994360f 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs @@ -565,7 +565,7 @@ namespace Tnb.ProductionMgr }else if (item.schedule_type==1) { BasStandardTime basStandardTime = await _db.Queryable().Where(x=>x.process_id==item.process_id && x.enabled==1).FirstAsync(); - item.standard_time = basStandardTime.standard_time; + item.standard_time = basStandardTime?.standard_time ?? ""; } } }