From 3592d78fb5cb045e8a04422c51a169bc75d882c7 Mon Sep 17 00:00:00 2001 From: zhoukeda <1315948824@qq.com> Date: Tue, 19 Sep 2023 18:17:13 +0800 Subject: [PATCH] =?UTF-8?q?pad=E6=B3=A8=E5=A1=91=E6=8C=A4=E5=87=BA?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/PrdPackReportService.cs | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs index 4e6f5fb3..86b5f0a3 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs @@ -240,6 +240,56 @@ namespace Tnb.ProductionMgr } } } + + /// + /// pda端根据工位获取注塑挤出列表 + /// + /// + [HttpPost] + public async Task GetInjectionMoldingList(PrdPackReportQueryInput input) + { + if (string.IsNullOrEmpty(input.stationId)) + { + return new + { + pagination = new PageResult(), + list = Array.Empty() + }; + } + + 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) + .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 + { + id = a.id, + mo_task_code = a.mo_task_code, + mo_id = a.mo_id, + material_id = a.material_id, + material_code = b.code, + material_name = b.name, + workline_id = a.workline_id, + 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), + scrap_qty = a.scrap_qty, + scheduled_qty = a.scheduled_qty, + reported_work_qty = a.reported_work_qty, + estimated_start_date = a.estimated_start_date==null ? "" : a.estimated_start_date.Value.ToString("yyyy-MM-dd HH:mm:ss"), + estimated_end_date = a.estimated_end_date==null ? "" : a.estimated_end_date.Value.ToString("yyyy-MM-dd HH:mm:ss"), + parent_id = a.parent_id, + process_id = a.process_id, + process_name = c.process_name, + mbom_process_id = a.mbom_process_id, + }).ToPagedListAsync(input.currentPage, input.pageSize); + + return PageResult.SqlSugarPageResult(result); + } /// /// pda端根据工位获取组装包装列表