备料计划转出库申请的数量限制提示优化
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.InvocationInfoProxy;
|
||||||
import nc.bs.framework.common.NCLocator;
|
import nc.bs.framework.common.NCLocator;
|
||||||
import nc.impl.pubapp.pattern.data.vo.VOQuery;
|
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.scmpub.reference.uap.pf.PfServiceScmUtil;
|
||||||
import nc.itf.uap.pf.IPfExchangeService;
|
import nc.itf.uap.pf.IPfExchangeService;
|
||||||
import nc.vo.ic.general.deal.TransBillBaseProcess;
|
import nc.vo.ic.general.deal.TransBillBaseProcess;
|
||||||
|
@ -96,9 +97,23 @@ public class OutboundTransferVoServiceImpl1 implements IOutboundTransferVoServic
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
VOQuery<PickmHeadVO> query = new VOQuery(PickmHeadVO.class);
|
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);
|
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];
|
AggPickmVO[] volist = new AggPickmVO[hvos.length];
|
||||||
|
|
||||||
for (int i = 0; i < hvos.length; ++i) {
|
for (int i = 0; i < hvos.length; ++i) {
|
||||||
|
@ -174,8 +189,8 @@ public class OutboundTransferVoServiceImpl1 implements IOutboundTransferVoServic
|
||||||
long time = InvocationInfoProxy.getInstance().getBizDateTime();
|
long time = InvocationInfoProxy.getInstance().getBizDateTime();
|
||||||
UFDate date = new UFDate(time);
|
UFDate date = new UFDate(time);
|
||||||
|
|
||||||
for(AggregatedValueObject retvo : retvos) {
|
for (AggregatedValueObject retvo : retvos) {
|
||||||
ICBillVO billvo = (ICBillVO)retvo;
|
ICBillVO billvo = (ICBillVO) retvo;
|
||||||
billvo.getHead().setDbilldate(date);
|
billvo.getHead().setDbilldate(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,11 +203,11 @@ public class OutboundTransferVoServiceImpl1 implements IOutboundTransferVoServic
|
||||||
long time = InvocationInfoProxy.getInstance().getBizDateTime();
|
long time = InvocationInfoProxy.getInstance().getBizDateTime();
|
||||||
UFDate date = new UFDate(time);
|
UFDate date = new UFDate(time);
|
||||||
|
|
||||||
for(AggregatedValueObject bill : retvos) {
|
for (AggregatedValueObject bill : retvos) {
|
||||||
CircularlyAccessibleValueObject[] bodys = bill.getChildrenVO();
|
CircularlyAccessibleValueObject[] bodys = bill.getChildrenVO();
|
||||||
if (!ValueCheckUtil.isNullORZeroLength(bodys)) {
|
if (!ValueCheckUtil.isNullORZeroLength(bodys)) {
|
||||||
for(CircularlyAccessibleValueObject body : bodys) {
|
for (CircularlyAccessibleValueObject body : bodys) {
|
||||||
body.setAttributeValue("crowno", (Object)null);
|
body.setAttributeValue("crowno", (Object) null);
|
||||||
if (body.getAttributeValue("nnum") != null && body.getAttributeValue("dbizdate") == null) {
|
if (body.getAttributeValue("nnum") != null && body.getAttributeValue("dbizdate") == null) {
|
||||||
body.setAttributeValue("dbizdate", date);
|
body.setAttributeValue("dbizdate", date);
|
||||||
}
|
}
|
||||||
|
@ -212,10 +227,10 @@ public class OutboundTransferVoServiceImpl1 implements IOutboundTransferVoServic
|
||||||
String pk_group = InvocationInfoProxy.getInstance().getGroupId();
|
String pk_group = InvocationInfoProxy.getInstance().getGroupId();
|
||||||
String arriveCode = SOBillType.Delivery.getCode();
|
String arriveCode = SOBillType.Delivery.getCode();
|
||||||
|
|
||||||
for(String biztype : cbiztypes) {
|
for (String biztype : cbiztypes) {
|
||||||
BillbusinessVO[] businessVOs = PfServiceScmUtil.findBillbusinessVOs(biztype, pk_group);
|
BillbusinessVO[] businessVOs = PfServiceScmUtil.findBillbusinessVOs(biztype, pk_group);
|
||||||
if (!ValueCheckUtil.isNullORZeroLength(businessVOs)) {
|
if (!ValueCheckUtil.isNullORZeroLength(businessVOs)) {
|
||||||
for(BillbusinessVO vo : businessVOs) {
|
for (BillbusinessVO vo : businessVOs) {
|
||||||
if (StringUtil.isStringEqual(vo.getPk_billtype(), arriveCode)) {
|
if (StringUtil.isStringEqual(vo.getPk_billtype(), arriveCode)) {
|
||||||
ExceptionUtils.wrappBusinessException(NCLangRes4VoTransl.getNCLangRes().getStrByID("4008003_0", "04008003-0251"));
|
ExceptionUtils.wrappBusinessException(NCLangRes4VoTransl.getNCLangRes().getStrByID("4008003_0", "04008003-0251"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue