From 7a0ff4769674e6ed1246623c6caa883a4288f28e Mon Sep 17 00:00:00 2001 From: mzr Date: Tue, 6 May 2025 16:33:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E6=96=99=E8=AE=A1=E5=88=92=E8=BD=AC?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E7=94=B3=E8=AF=B7=E7=9A=84=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E9=99=90=E5=88=B6=E6=8F=90=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OutboundTransferVoServiceImpl1.java | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/ic/src/private/nccloud/pubimpl/ic/outbound/service/OutboundTransferVoServiceImpl1.java b/ic/src/private/nccloud/pubimpl/ic/outbound/service/OutboundTransferVoServiceImpl1.java index 2a40f41..086a2c2 100644 --- a/ic/src/private/nccloud/pubimpl/ic/outbound/service/OutboundTransferVoServiceImpl1.java +++ b/ic/src/private/nccloud/pubimpl/ic/outbound/service/OutboundTransferVoServiceImpl1.java @@ -8,6 +8,7 @@ package nccloud.pubimpl.ic.outbound.service; import nc.bs.framework.common.InvocationInfoProxy; import nc.bs.framework.common.NCLocator; import nc.impl.pubapp.pattern.data.vo.VOQuery; +import nc.impl.pubapp.pattern.database.IDQueryBuilder; import nc.itf.scmpub.reference.uap.pf.PfServiceScmUtil; import nc.itf.uap.pf.IPfExchangeService; import nc.vo.ic.general.deal.TransBillBaseProcess; @@ -96,9 +97,23 @@ public class OutboundTransferVoServiceImpl1 implements IOutboundTransferVoServic return null; } else { VOQuery query = new VOQuery(PickmHeadVO.class); - PickmHeadVO[] hvos = (PickmHeadVO[]) query.query(info.getInfo()[0].getHids()); + String[] hids = info.getInfo()[0].getHids(); + PickmHeadVO[] hvos = (PickmHeadVO[]) query.query(hids); VOQuery queryb = new VOQuery(PickmItemVO.class); - PickmItemVO[] bvos = (PickmItemVO[]) queryb.query(info.getInfo()[0].getBids()); + String[] bids = info.getInfo()[0].getBids(); + PickmItemVO[] bvos = (PickmItemVO[]) queryb.query(bids); + /** + * 查询数量的限制来自于 nc.impl.pubapp.pattern.data.table.TableIDQueryCondition#TableIDQueryCondition(String[] ids) + */ + if ((hvos == null || hvos.length == 0) && hids.length > IDQueryBuilder.getMaxInCount()) { + ExceptionUtils.wrappBusinessException("选择的备料计划数量不能大于最大限制" + IDQueryBuilder.getMaxInCount()); + return null; + } + if ((bvos == null || bvos.length == 0) && bids.length > IDQueryBuilder.getMaxInCount()) { + ExceptionUtils.wrappBusinessException("选择的子表数量不能大于最大限制" + IDQueryBuilder.getMaxInCount()); + return null; + } + AggPickmVO[] volist = new AggPickmVO[hvos.length]; for (int i = 0; i < hvos.length; ++i) { @@ -174,8 +189,8 @@ public class OutboundTransferVoServiceImpl1 implements IOutboundTransferVoServic long time = InvocationInfoProxy.getInstance().getBizDateTime(); UFDate date = new UFDate(time); - for(AggregatedValueObject retvo : retvos) { - ICBillVO billvo = (ICBillVO)retvo; + for (AggregatedValueObject retvo : retvos) { + ICBillVO billvo = (ICBillVO) retvo; billvo.getHead().setDbilldate(date); } @@ -188,11 +203,11 @@ public class OutboundTransferVoServiceImpl1 implements IOutboundTransferVoServic long time = InvocationInfoProxy.getInstance().getBizDateTime(); UFDate date = new UFDate(time); - for(AggregatedValueObject bill : retvos) { + for (AggregatedValueObject bill : retvos) { CircularlyAccessibleValueObject[] bodys = bill.getChildrenVO(); if (!ValueCheckUtil.isNullORZeroLength(bodys)) { - for(CircularlyAccessibleValueObject body : bodys) { - body.setAttributeValue("crowno", (Object)null); + for (CircularlyAccessibleValueObject body : bodys) { + body.setAttributeValue("crowno", (Object) null); if (body.getAttributeValue("nnum") != null && body.getAttributeValue("dbizdate") == null) { body.setAttributeValue("dbizdate", date); } @@ -212,10 +227,10 @@ public class OutboundTransferVoServiceImpl1 implements IOutboundTransferVoServic String pk_group = InvocationInfoProxy.getInstance().getGroupId(); String arriveCode = SOBillType.Delivery.getCode(); - for(String biztype : cbiztypes) { + for (String biztype : cbiztypes) { BillbusinessVO[] businessVOs = PfServiceScmUtil.findBillbusinessVOs(biztype, pk_group); if (!ValueCheckUtil.isNullORZeroLength(businessVOs)) { - for(BillbusinessVO vo : businessVOs) { + for (BillbusinessVO vo : businessVOs) { if (StringUtil.isStringEqual(vo.getPk_billtype(), arriveCode)) { ExceptionUtils.wrappBusinessException(NCLangRes4VoTransl.getNCLangRes().getStrByID("4008003_0", "04008003-0251")); }