1.组装查询出库
ISaleOutRefQuery query = NCLocator.getInstance().lookup(ISaleOutRefQuery.class);
String sql = "FROM ic_saleout_h ic_saleout_h,ic_saleout_b ic_saleout_b ,ic_saleout_e ic_saleout_e "+
"WHERE ic_saleout_b.cgeneralhid = ic_saleout_h.cgeneralhid AND "+
"ic_saleout_b.cgeneralbid = ic_saleout_e.cgeneralbid AND ";
sql=sql+"ic_saleout_h.vdef17='"+ss.getString("vdef17")+"'"+" and ic_saleout_h.vtrantypecode='4C-Cxx-05' ";
SaleOutVO[] srcBillVO = null;
try {
srcBillVO = query.queryBillsFor32(sql);
} catch (nc.vo.pub.BusinessException e) {
throw new BusinessException(e.getMessage());
}
InvocationInfoProxy.getInstance().setGroupId("0001A6100000000004VL");//设置集团
String groud = InvocationInfoProxy.getInstance().getGroupId();
2. 转单
SaleInvoiceVO[] insertvo = PfServiceScmUtil.exeVOChangeByBizFlow("4C", "32", srcBillVO);
//begin业务处理,按业务需要对发票VO进行操作
//end
3.调用保存节点保存
SaleInvoiceVO[] retvos = (SaleInvoiceVO[]) PfServiceScmUtil.processBatch(“WRITE”, SOBillType.Invoice.getCode(),
insertvo, null, null);