From 979959d07fec295af341c966c4ff533ceca3e1c2 Mon Sep 17 00:00:00 2001 From: lihao Date: Thu, 20 Nov 2025 10:58:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E6=8A=A5=E5=91=8A=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=A7=BB=E4=BA=A4=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nc/bs/mmpac/wr/flowbiz/HandOverRule.java | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/mmpac/src/private/nc/bs/mmpac/wr/flowbiz/HandOverRule.java b/mmpac/src/private/nc/bs/mmpac/wr/flowbiz/HandOverRule.java index 2e7ad397..aa198d72 100644 --- a/mmpac/src/private/nc/bs/mmpac/wr/flowbiz/HandOverRule.java +++ b/mmpac/src/private/nc/bs/mmpac/wr/flowbiz/HandOverRule.java @@ -78,8 +78,8 @@ public class HandOverRule implements IRule { continue; } if(queryService.isAuditToProdInBPTransType(new String[]{vo.getParentVO().getVtrantypeid()}).get(vo.getParentVO().getVtrantypeid())){ - throw new BusinessException("交易类型不能是审批即入库"); - + // throw new BusinessException("交易类型不能是审批即入库"); + continue; } WrItemVO[] itemVOS= vo.getChildrenVO(); List itemlist = new ArrayList(); @@ -88,13 +88,12 @@ public class HandOverRule implements IRule { Map map = serv.queryMaterialProduceInfoByPks(new String[]{itemVO.getCbmaterialvid()},pkOrg ,new String[]{"wghxcl","iscreatesonprodorder"}); if(map.isEmpty()) { - throw new BusinessException("请检查工位半产品是否维护配套子件和完工后续处理生产页签参数"); - // continue; + // throw new BusinessException("请检查工位半产品是否维护配套子件和完工后续处理生产页签参数"); }else{ MaterialProdVO materialProdVO=map.get(itemVO.getCbmaterialvid()); if(materialProdVO == null) { - throw new BusinessException("请检查工位半产品是否维护配套子件和完工后续处理生产页签参数"); - // continue; + // throw new BusinessException("请检查工位半产品是否维护配套子件和完工后续处理生产页签参数"); + continue; } if(materialProdVO.getWghxcl().equals(1)&& materialProdVO.getIscreatesonprodorder().booleanValue()) { AggWrVO vo1 = new AggWrVO(); @@ -102,12 +101,15 @@ public class HandOverRule implements IRule { vo1.setChildrenVO(new WrItemVO[]{itemVO}); list.add(vo1); }else{ - throw new BusinessException("请检查工位半产品是否维护配套子件和完工后续处理生产页签参数"); + // throw new BusinessException("请检查工位半产品是否维护配套子件和完工后续处理生产页签参数"); } } } } List aggHandTakeVOS= new ArrayList<>(); + if(list.isEmpty()) { + return; + } for (AggWrVO vo : list) { try { this.loadWrQualityVO(vo); @@ -144,10 +146,12 @@ public class HandOverRule implements IRule { for (HandTakeBVO handTakeBVO:(HandTakeBVO[])takeVO.getChildrenVO()){ if(handTakeBVO.getVrcvmocode().isEmpty() || handTakeBVO.getVrcvpickmcode().isEmpty()){ - throw new BusinessException("没有接受备料计划单号和接受生产订单号,请检查工位半产品是否维护配套子件和完工后续处理生产页签参数"); + continue; + // throw new BusinessException("没有接受备料计划单号和接受生产订单号,请检查工位半产品是否维护配套子件和完工后续处理生产页签参数"); } if(takeVO.getParentVO().getNhandoverastnum().compareTo(UFDouble.ZERO_DBL) ==0){ - throw new BusinessException("完工数量不能为0"); + continue; + // throw new BusinessException("完工数量不能为0"); } @@ -175,17 +179,18 @@ public class HandOverRule implements IRule { } aggHandTakeVOS.add(takeVO); } - - // handTakeMaintainService.insert(aggHandTakeVOS.toArray(new AggHandTakeVO[aggHandTakeVOS.size()])); - try { - this.validate(aggHandTakeVOS.get(0)); - } catch (ValidationException e) { - ExceptionUtils.wrappException(e); - } - try { - this.process(aggHandTakeVOS.get(0)); - } catch (BusinessException e) { - ExceptionUtils.wrappException(e); + if(!aggHandTakeVOS.isEmpty()){ + // handTakeMaintainService.insert(aggHandTakeVOS.toArray(new AggHandTakeVO[aggHandTakeVOS.size()])); + try { + this.validate(aggHandTakeVOS.get(0)); + } catch (ValidationException e) { + ExceptionUtils.wrappException(e); + } + try { + this.process(aggHandTakeVOS.get(0)); + } catch (BusinessException e) { + ExceptionUtils.wrappException(e); + } } } catch (BusinessException e) { throw new RuntimeException(e);