From 953bff2b4ac779b473635b01898ccfb3e488bf4a Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 10 Feb 2026 17:17:09 +0800 Subject: [PATCH] =?UTF-8?q?2026-02-10=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mapper/shopOrder/ProductionReportMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/mapper/shopOrder/ProductionReportMapper.xml b/src/main/resources/mapper/shopOrder/ProductionReportMapper.xml index 2fb576e..7cb53a7 100644 --- a/src/main/resources/mapper/shopOrder/ProductionReportMapper.xml +++ b/src/main/resources/mapper/shopOrder/ProductionReportMapper.xml @@ -380,7 +380,7 @@ ISNULL(R.total_qty, 0) as totalQty, round(isnull(yieldRate, 100), 2) as yieldRate FROM SFDC_Rolls A - LEFT JOIN SFDC_MaterialHist B ON A.Site = B.SITE AND A.OrderNo = B.OrderNo AND A.RollNo = B.StartFromRollNo + LEFT JOIN (SELECT OrderNo,SeqNo,ItemNo,StartDate, ReportDate,Reportedby,HistType,SITE,StartFromRollNo,RollNo ,ROW_NUMBER() OVER (PARTITION BY SITE, OrderNo, StartFromRollNo ORDER BY ReportDate DESC, SeqNo ASC) AS rn FROM SFDC_MaterialHist) B ON A.Site = B.SITE AND A.OrderNo = B.OrderNo AND A.RollNo = B.StartFromRollNo AND B.rn = 1 left join part p on a.site = p.site and a.partNo = p.partNo LEFT JOIN ( select