From f3744b0b7b90fca4821166b59572694d283c905e Mon Sep 17 00:00:00 2001 From: lihao Date: Fri, 14 Nov 2025 09:21:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=9F=E8=AE=A1=E5=88=92=E5=A4=87=E6=96=99?= =?UTF-8?q?=E9=87=8D=E7=AE=97=E4=BC=98=E5=8C=96=E5=85=B3=E9=97=AD=E6=9C=80?= =?UTF-8?q?=E7=BB=88=E9=9C=80=E6=B1=82=E6=95=B0=E9=87=8F=E4=B8=BA0?= =?UTF-8?q?=E8=AF=B7=E8=B4=AD=E5=8D=95=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AfterPickmRecalUpdateBuyingreqRule.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/mmpac/src/private/nc/bs/mmpac/pmo/pac0002/bp/rule/AfterPickmRecalUpdateBuyingreqRule.java b/mmpac/src/private/nc/bs/mmpac/pmo/pac0002/bp/rule/AfterPickmRecalUpdateBuyingreqRule.java index fa720a0c..e5c9973b 100644 --- a/mmpac/src/private/nc/bs/mmpac/pmo/pac0002/bp/rule/AfterPickmRecalUpdateBuyingreqRule.java +++ b/mmpac/src/private/nc/bs/mmpac/pmo/pac0002/bp/rule/AfterPickmRecalUpdateBuyingreqRule.java @@ -125,7 +125,7 @@ public class AfterPickmRecalUpdateBuyingreqRule implements IRule { } private void buyingreqRowClose(List pmobids, List pmoids) throws BusinessException { - String reason = "负计划"; + String reason = "运算BOM变更失败"; IBuyingReqQueryCardInfoService query = NCLocator.getInstance().lookup(IBuyingReqQueryCardInfoService.class); PraybillVO[] rvo = query.queryVOs(pmoids.toArray(new String[0])); if (null == rvo || rvo.length == 0) { @@ -135,23 +135,26 @@ public class AfterPickmRecalUpdateBuyingreqRule implements IRule { for (PraybillVO vo : rvo) { ClientBillToServer tool = new ClientBillToServer(); PraybillVO[] lightVOs = (PraybillVO[])tool.construct(new PraybillVO[]{vo}, new PraybillVO[]{vo}); - + // 过滤需要关闭的请购单行 for(PraybillVO storeReqAppVO : lightVOs) { PraybillItemVO[] bvos = storeReqAppVO.getBVO(); + List newItemVo = new ArrayList<>(lightVOs.length); if (bvos != null && bvos.length > 0) { - for(PraybillItemVO bvo : bvos) { - bvo.setAttributeValue("vclosereason", reason); + for(int i = 0; i < bvos.length; ++i) { + if (pmobids.contains(bvos[i].getPk_praybill_b()) ) { + bvos[i].setAttributeValue("vclosereason", reason); + newItemVo.add(bvos[i]); + } } } + storeReqAppVO.setBVO(newItemVo.toArray(new PraybillItemVO[0])); } - IPraybillMaintain orderCloseService =NCLocator.getInstance().lookup(IPraybillMaintain.class); - // lightVOs[0].getParent().setAttributeValue("ts", info.getTs()); - // lightVOs[0].getBVO()[0].setAttributeValue("ts", info.getBts()); - PraybillVO[] returnVos = orderCloseService.closeBillRow(lightVOs); + orderCloseService.closeBillRow(lightVOs); } + } /**