From 99a7c014a37e487b93123e724c3cfaebf3c4bc28 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Wed, 7 Aug 2024 11:30:05 +0800 Subject: [PATCH] =?UTF-8?q?0412=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/heai/modules/production/dao/DailyPlanMapper.java | 2 ++ .../production/service/impl/DailyPlanServiceImpl.java | 8 ++++++-- src/main/resources/mapper/production/DailyPlanMapper.xml | 6 ++++++ .../resources/mapper/production/SoScheduledListMapper.xml | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/heai/modules/production/dao/DailyPlanMapper.java b/src/main/java/com/heai/modules/production/dao/DailyPlanMapper.java index 3d08b50..f178a26 100644 --- a/src/main/java/com/heai/modules/production/dao/DailyPlanMapper.java +++ b/src/main/java/com/heai/modules/production/dao/DailyPlanMapper.java @@ -1004,4 +1004,6 @@ public interface DailyPlanMapper { List checkFqcInspectForSeqNo(SOScheduledRoutingOutData inData); + + List checkBomHasRcScSP(SOScheduledRoutingOutData inData); } diff --git a/src/main/java/com/heai/modules/production/service/impl/DailyPlanServiceImpl.java b/src/main/java/com/heai/modules/production/service/impl/DailyPlanServiceImpl.java index 15afa58..5e31b2b 100644 --- a/src/main/java/com/heai/modules/production/service/impl/DailyPlanServiceImpl.java +++ b/src/main/java/com/heai/modules/production/service/impl/DailyPlanServiceImpl.java @@ -1290,8 +1290,12 @@ public class DailyPlanServiceImpl implements DailyPlanService { if(!sfdcCheck.get(0).getOrderNo().equals(checkFirstItem.get(0).getOrderNo())||sfdcCheck.get(0).getItemNo().intValue()!=checkFirstItem.get(0).getItemNo().intValue()){ throw new RuntimeException("扫描的上道派工单工序不匹配,或者不是同一个生产订单!"); } - if(getPreviousSOSData.get(0).getPreviousBatchNo()==null){ - throw new RuntimeException("上道派工单没有交接记录!"); + List checkBomHasRcScSP=dailyPlanMapper.checkBomHasRcScSP(getSOScheduledRoutingOutData.get(0)); + //20240805新增 bom里面有RC SC SP主料的才校验交接记录 + if(checkBomHasRcScSP.size()>0){ + if(getPreviousSOSData.get(0).getPreviousBatchNo()==null){ + throw new RuntimeException("上道派工单没有交接记录!"); + } } dailyPlanMapper.updatePreviousSOSData(inData.getSeqNo(),inData.getPreviousSeqNo(),getPreviousSOSData.get(0).getPreviousBatchNo(),getPreviousSOSData.get(0).getMaterSeqNo()); } diff --git a/src/main/resources/mapper/production/DailyPlanMapper.xml b/src/main/resources/mapper/production/DailyPlanMapper.xml index c3879d9..8683672 100644 --- a/src/main/resources/mapper/production/DailyPlanMapper.xml +++ b/src/main/resources/mapper/production/DailyPlanMapper.xml @@ -1386,4 +1386,10 @@ from SOOpsTransferHeader a left join SOOpsTransferDetail b on a.site=b.site and a.TransNo=b.TransNo where a.site=#{site} and b.seqNo=#{seqNo} and a.need_inspect_flag='Y' and inspected_flag='N' and ToTypeFlag_DB='I' + + \ No newline at end of file diff --git a/src/main/resources/mapper/production/SoScheduledListMapper.xml b/src/main/resources/mapper/production/SoScheduledListMapper.xml index af8bbf6..3ea2e2c 100644 --- a/src/main/resources/mapper/production/SoScheduledListMapper.xml +++ b/src/main/resources/mapper/production/SoScheduledListMapper.xml @@ -219,7 +219,7 @@