zoukankan      html  css  js  c++  java
  • BOS中工作流BOTP调用方法

    下面是一段代码,主要是BOTP调用方法的使用,希望读者能看明白。

      public void actionCreateTo_actionPerformed(ActionEvent e)
        throws Exception
      {
        setCanVoucher(false);
    
        checkSelected();
        ArrayList idList = new ArrayList();
        List entriesKey = new ArrayList();
        getBillIdList(idList, entriesKey);
        String[] idArray = new String[idList.size()];
        idList.toArray(idArray);
        if (this.isDAPTrans)
        {
          entriesKey.clear();
        }
        this.billList.createTo(idArray, new String[] { getEntriesName() }, entriesKey, getBizType().toString(), getBOTPSelectors());
      }

    public void getBillIdList(List idList, List entriesList)
       {
         int mode = 0;
         List blockList = this.tblMain.getSelectManager().getBlocks();
     
         if ((blockList != null) && (blockList.size() == 1))
         {
           mode = ((IBlock)this.tblMain.getSelectManager().getBlocks().get(0)).getMode();
         }
         if (mode == 8) {
           List selectIdList = getQueryPkList();
           if (selectIdList != null) {
             Iterator lt = selectIdList.iterator();
             while (lt.hasNext())
             {
               Object[] idObj = (Object[])lt.next();
               if (idObj == null)
                 continue;
               if (!(idList.contains(idObj[0].toString()))) {
                 idList.add(idObj[0].toString());
               }
     
               if ((idObj.length == 2) && (idObj[1] != null))
                 entriesList.add(idObj[1]);
             }
           }
         }
         else
         {
           ArrayList blocks = this.tblMain.getSelectManager().getBlocks();
           Iterator iter = blocks.iterator();
     
           while (iter.hasNext())
           {
             KDTSelectBlock block = (KDTSelectBlock)iter.next();
             int top = block.getTop();
             int bottom = block.getBottom();
     
             for (int rowIndex = top; rowIndex <= bottom; ++rowIndex)
             {
               ICell cell = this.tblMain.getRow(rowIndex).getCell(getKeyFieldName());
     
               if ((this.tblMain.getRow(rowIndex).getCell(getEntriesPKName()) != null) && (this.tblMain.getRow(rowIndex).getCell(getEntriesPKName()).getValue() != null))
               {
                 entriesList.add(this.tblMain.getRow(rowIndex).getCell(getEntriesPKName()).getValue().toString());
               }
     
               if (!(idList.contains(cell.getValue())))
                 idList.add(cell.getValue());
             }
           }
         }
       }

    public void createTo(String[] idList, String[] entryNames, List entriesKey, String srcBillType, SelectorItemCollection botpSelectors)
        throws Exception
      {
        if ((idList == null) || (idList.length == 0))
        {
          MsgBox.showWarning(this.billListUI, EASResource.getString("com.kingdee.eas.framework.FrameWorkResource.Msg_NoneSelect_Bill"));
    
          return;
        }
    
        Map uiContext = new HashMap();
        uiContext.put("Owner", this.billListUI);
    
        uiContext.put("idList", idList);
        uiContext.put("entryNames", entryNames);
        uiContext.put("entriesKey", entriesKey);
        uiContext.put("srcBillType", srcBillType);
        uiContext.put("botpSelectors", null);
    
        uiContext.put("SRCBILLLIST", this.billListUI);
    
        IUIFactory uiFactory = UIFactory.createUIFactory(UIFactoryName.MODEL);
    
        IUIWindow window = uiFactory.create("com.kingdee.eas.base.btp.client.BTPMakeBillUIWithoutGrp", uiContext, null);
    
        CtrlSwingUtilities.centerWindow((UIModelDialog)window);
    
        BTPMakeBillUIWithoutGrp uiWindow = (BTPMakeBillUIWithoutGrp)window.getUIObject();
        uiWindow.setBTPImplCaller(this);
    
        window.show();
        Logger.info("createTo finished!");
      }



  • 相关阅读:
    基于 Laravel 完整开源项目大全
    微信分享 php jssdk
    点点客投票post抓包
    php一些 get就能提交的漏洞
    彩票网的数据接口 分析
    PHP一些实际常用的代码
    ThinkCMF常用代码
    php解压zip 待优化
    Python调用pywin32模块 发送QQ消息,打印窗口标题,切换窗口等句柄
    浅谈数列分块问题
  • 原文地址:https://www.cnblogs.com/fyq891014/p/3294818.html
Copyright © 2011-2022 走看看