zoukankan      html  css  js  c++  java
  • [转]服务端直接调用BOTP

    public static void generateDestBill(Context ctx, String srcBosType,
                String destBosType, CoreBillBaseCollection srcBillCollection,
                IObjectPK botpPK) throws Exception {
            IBOTMapping botMapping = BOTMappingFactory.getLocalInstance(ctx);
            CoreBillBaseInfo billInfo = srcBillCollection.get(0);
            BOTMappingInfo botMappingInfo = botMapping.getMapping(billInfo, destBosType, DefineSysEnum.BTP);
            if (botMappingInfo == null) {
                throw new FMException(FMException.NODESTBILL);
            }
            IBTPManager iBTPManager = BTPManagerFactory.getLocalInstance(ctx);
            BTPTransformResult btpResult = null;
            /*String[] ids = new String[srcBillCollection.size()];
            for (int i = 0; i < srcBillCollection.size(); ++i) {
                CoreBaseInfo info = srcBillCollection.get(i);
                ids[i] = info.getId().toString();
            }*/
            btpResult = iBTPManager.transformForBotp(srcBillCollection,destBosType, botpPK);
            IObjectCollection destBillCols = btpResult.getBills();
            BOTRelationCollection botRelationCols = btpResult.getBOTRelationCollection();
            for (int i = 0; i < destBillCols.size(); i++) {
                CoreBillBaseInfo destBillInfo = (CoreBillBaseInfo) destBillCols.getObject(i);
                iBTPManager.submitRelations(destBillInfo, botRelationCols);
            }
        }

    参数说明:

    1、ctx :服务端上下文

    2、srcBosType:源单据的BosType

    3、destBosType:目标单据的BosType

    4、srcBillCollection:源单据集合,可以批量转换

    5、botpPK:要使用的BOTP的PK。

    可以通过表T_BOT_Mapping查找到id,将id转换成PK。

    select t.fid from T_BOT_Mapping t where t.fname='***',***是botp的名称。

  • 相关阅读:
    监听键盘弹出 隐藏
    状态栏 设置白色字体
    UITextField 属性详解
    支付宝集成SDK 报错
    UIWebView
    app上传 需要的icon
    百度云推送 pem
    百度地图
    info.plist 属性讲解
    静态库 动态库
  • 原文地址:https://www.cnblogs.com/oktell/p/4601542.html
Copyright © 2011-2022 走看看