//分配动作
String[] pks = {pk_customer.toString()};//pk
String[] funcPermissionOrgIDs = {"GLOBLE00000000000000","00013910000000000N4S"};//集团id
InvocationInfoProxy.getInstance().setGroupId("00013910000000000N4S"); //集团id 很重要 有问题就设置此字段
/*
用后台 的service 分配不成功也不报错
@SuppressWarnings("restriction")
nc.itf.bd.cust.assign.ICustAssignService service = new nc.impl.bd.cust.assign.CustAssignServiceImpl();
ErrLogReturnValue assignCustomerByPks = service.assignCustomerByPks(pks, targets, funcPermissionOrgIDs);
System.out.println(assignCustomerByPks);*/
//用前端对象实例化可以正常分配
nc.itf.bd.cust.assign.ICustAssignService cs = NCLocator.getInstance().lookup(nc.itf.bd.cust.assign.ICustAssignService.class);
ErrLogReturnValue assignCustomerByPks = cs.assignCustomerByPks(pks, targets,funcPermissionOrgIDs);
分配客户 String[] pks= { cuVO.getPk_customer() }; nc.itf.bd.cust.assign.ICustAssignService cs = NCLocator.getInstance().lookup( ICustAssignService.class); cs.assignCustomerByPks(pks, targets, new String[] { "GLOBLE00000000000000", "00013910000000000N4S" });
分配供应商
nc.itf.bd.supplier.assign.ISupplierAssignService cs = NCLocator.getInstance().lookup( ISupplierAssignService.class); cs.assignSupplierByPks(supplier_pk, orgs, new String[] { "GLOBLE00000000000000", "00013910000000000N4S" });
-----------------------------------------------------------------------------------------------------------------------------
//物料分配动作
String[] pks = {pk};//物料pk
String[] funcPermissionOrgIDs = {"00013910000000000N4S"};//集团id
InvocationInfoProxy.getInstance().setGroupId("00013910000000000N4S"); //集团id 很重要 有问题就设置此字段
@SuppressWarnings("restriction")
nc.itf.bd.material.assign.IMaterialAssignService service = new nc.impl.bd.material.assign.MaterialAssignServiceImpl();
service.assignMaterialByPks(pks,targets,funcPermissionOrgIDs);