From 11ff341677f3320e7cad7124f03894e98eddc0d4 Mon Sep 17 00:00:00 2001 From: philip <244793088@qq.com> Date: Thu, 26 Aug 2021 20:14:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=86=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../foreverwin/mesnac/production/dto/SplitSfcDto.java | 9 +++++++++ .../production/service/impl/SplitSfcServiceImpl.java | 6 +++--- production/src/main/resources/mapper/SplitSfcMapper.xml | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/production/src/main/java/com/foreverwin/mesnac/production/dto/SplitSfcDto.java b/production/src/main/java/com/foreverwin/mesnac/production/dto/SplitSfcDto.java index 404e152e..94c0a090 100644 --- a/production/src/main/java/com/foreverwin/mesnac/production/dto/SplitSfcDto.java +++ b/production/src/main/java/com/foreverwin/mesnac/production/dto/SplitSfcDto.java @@ -7,6 +7,15 @@ public class SplitSfcDto extends SplitSfc { private String routerBo; private String ncQty; private String abnormalNo; + private String abnormalMethod; + + public String getAbnormalMethod() { + return abnormalMethod; + } + + public void setAbnormalMethod(String abnormalMethod) { + this.abnormalMethod = abnormalMethod; + } public String getAbnormalNo() { return abnormalNo; diff --git a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SplitSfcServiceImpl.java b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SplitSfcServiceImpl.java index b052b6ce..890b58ec 100644 --- a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SplitSfcServiceImpl.java +++ b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SplitSfcServiceImpl.java @@ -159,7 +159,7 @@ public class SplitSfcServiceImpl extends ServiceImpl i splitSfc.setCreatedDateTime(LocalDateTime.now()); save(splitSfc); Router routerBySfcBo = routerService.getRouterBySfcBo(HandleEnum.SFC.getHandle(site, sfc)); - sfcDispatchCommonService.saveSplitSfcDispatch(site, CommonMethods.getUser(), "N", sfcData.getShopOrder(), sfc, operation, sfcDto.getStepId(),newSfc, routerBySfcBo.getHandle()); + sfcDispatchCommonService.saveSplitSfcDispatch(site, CommonMethods.getUser(), "N", sfcData.getShopOrder(), sfc, operation, sfcData.getStepId(),newSfc, routerBySfcBo.getHandle()); return splitSfc; } catch (Exception e) { ExceptionUtil.throwException(e); @@ -195,6 +195,7 @@ public class SplitSfcServiceImpl extends ServiceImpl i SplitSfcDto splitSfcDto=splitSfcMapper.getAbnormalQty(site,sfc,operation, abnormalNo); String routerBo = splitSfcDto.getRouterBo(); String ncCode = splitSfcDto.getNcCode(); + String abnormalMethod = splitSfcDto.getAbnormalMethod(); if (StringUtil.isBlank(ncCode)){ throw new BaseException("异常处置未选择不良代码"); } @@ -222,8 +223,7 @@ public class SplitSfcServiceImpl extends ServiceImpl i SplitSfcResponse splitSfcResponse = splitSfcResponses.iterator().next(); String newSfcRef = splitSfcResponse.getNewSfcRef(); String newSfc = StringUtil.trimHandle(newSfcRef); - - if(StringUtil.notBlank(routerBo)){ + if(abnormalMethod.equals("F")&&StringUtil.notBlank(routerBo)){ //记录不合格 CreateNCRequest createNCRequest=new CreateNCRequest(); createNCRequest.setQty(splitQty); diff --git a/production/src/main/resources/mapper/SplitSfcMapper.xml b/production/src/main/resources/mapper/SplitSfcMapper.xml index f41b6117..b2c99526 100644 --- a/production/src/main/resources/mapper/SplitSfcMapper.xml +++ b/production/src/main/resources/mapper/SplitSfcMapper.xml @@ -378,7 +378,7 @@ WHERE S.HANDLE=#{handle}