备料计划转出库申请的数量限制提示优化
This commit is contained in:
		
							parent
							
								
									75bf4ee76b
								
							
						
					
					
						commit
						7a0ff47696
					
				|  | @ -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<PickmHeadVO> 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<PickmItemVO> 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")); | ||||
|                         } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue