实际独立需求销售订单推送生产订单统一批次号
This commit is contained in:
parent
f01ae8b502
commit
d221f57fcf
|
@ -21,11 +21,13 @@ import nc.bs.mmpac.pmo.pac0002.bp.query.PMOHeadVOQueryBP;
|
|||
import nc.bs.mmpac.pmo.pac0002.bp.query.PMOItemVOQueryBP;
|
||||
import nc.bs.mmpac.pmo.pac0002.bp.service.PMOBPService;
|
||||
import nc.bs.pubapp.AppBsContext;
|
||||
import nc.bs.trade.business.HYPubBO;
|
||||
import nc.impl.pubapp.bd.userdef.UserDefSaveRule;
|
||||
import nc.itf.uap.rbac.IUserManageQuery_C;
|
||||
import nc.jdbc.framework.generator.SequenceGenerator;
|
||||
import nc.jdbc.framework.processor.ColumnListProcessor;
|
||||
import nc.mmbd.utils.factoryparam.OTDimensionSetUtil;
|
||||
import nc.pub.billcode.itf.IBillcodeManage;
|
||||
import nc.pubitf.initgroup.InitGroupQuery;
|
||||
import nc.pubitf.sn.doc.param.ISnPkandCodeParam;
|
||||
import nc.pubitf.sn.doc.param.SnDocParam;
|
||||
|
@ -844,6 +846,43 @@ public class PMOBPUtil {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!MMArrayUtil.isEmpty(aggvos)){
|
||||
|
||||
List<PMOItemVO> xbitemList = new ArrayList();
|
||||
HYPubBO hybo = new HYPubBO();
|
||||
String org = hybo.findColValue("org_adminorg", "pk_adminorg", " code = 'C030' ") + "";
|
||||
|
||||
for (PMOAggVO vo : aggvos) {
|
||||
for(PMOItemVO itemVO : vo.getChildrenVO()) {
|
||||
if(itemVO.getPk_org().equals(org)) {
|
||||
xbitemList.add(itemVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(xbitemList.size() > 0) {
|
||||
PMOItemVO[] vos = (PMOItemVO[])xbitemList.toArray(new PMOItemVO[xbitemList.size()]);
|
||||
IBillcodeManage billcodeManage = (IBillcodeManage)NCLocator.getInstance().lookup(IBillcodeManage.class);
|
||||
String[] billcodes = null;
|
||||
try {
|
||||
billcodes = billcodeManage.getBatchBillCodes_RequiresNew("55A2-2", vos[0].getPk_group(), vos[0].getPk_org(), vos[0],1);
|
||||
} catch (BusinessException ex) {
|
||||
ExceptionUtils.wrappException(ex);
|
||||
}
|
||||
for (PMOItemVO vo : vos) {
|
||||
vo.setVbatchcode(billcodes[0]);
|
||||
}
|
||||
for (PMOAggVO vo : aggvos) {
|
||||
for(PMOItemVO itemVO : vo.getChildrenVO()) {
|
||||
for (PMOItemVO xb : vos) {
|
||||
if(itemVO.getCmoid().equals(xb.getCmoid())) {
|
||||
itemVO.setVbatchcode(billcodes[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return aggvos;
|
||||
} catch (BusinessException e) {
|
||||
|
|
Loading…
Reference in New Issue