• 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!");
      }



  • 相关阅读:
    Nginx技术研究系列6-配置详解
    IBatis.Net 老技术新研究
    .Net 内存对象分析
    Nginx技术研究系列2-基于Redis实现动态路由
    hexo d 报错‘fatal: could not read Username for 'https://github.com': No error’
    从架构理解价值-我的软件世界观(转载)
    消息队列1:RabbitMQ解析并基于Springboot实战
    PostgreSQL之oracle_fdw安装与使用
    消息队列0:消息队列概述
    Java多线程1:进程和线程的区别
  • 原文地址:https://www.cnblogs.com/fyq891014/p/3294818.html
Copyright © 2020-2023  润新知