xj qian
2024-07-18 3a3137b405af9728f9a7e4d7ee725498d0e8ecb7
jrj/project/business/SystemSettings/Flow3.cpp
@@ -4,6 +4,7 @@
#include <wobject/xdouble.hpp>
#include <xcontrol/xlayersheet.hpp>
#include <xcontrol/xdatetimepick.hpp>
#include <xcontrol/xflowchart.hpp>
#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
@@ -61,18 +62,18 @@
         if(typ==L"fieldrole") return dw_datafieldright;
         return 0;
      }
      xdwgrid GetSheetDbmap(int index)
      xstring GetSheetDbmap(int index)
      {
         xstring typ = GetSheetType(index);
         if(typ==L"flowitem") return "flow.dbmap";
         if(typ==L"actionrole") return "workflow.actionrole.dbmap";
         if(typ==L"state") return "state.dbmap";
         if(typ==L"button") return "button.dbmap";
         if(typ==L"role") return "role.dbmap";
         if(typ==L"bill") return "bill.dbmap";
         if(typ==L"scene") return "scene.dbmap";
         if(typ==L"fieldrole") return "workflow.datarole.dbmap";
         return 0;
         if(typ==L"flowitem") return L"flow.dbmap";
         if(typ==L"actionrole") return L"workflow.actionrole.dbmap";
         if(typ==L"state") return L"state.dbmap";
         if(typ==L"button") return L"button.dbmap";
         if(typ==L"role") return L"role.dbmap";
         if(typ==L"bill") return L"bill.dbmap";
         if(typ==L"scene") return L"scene.dbmap";
         if(typ==L"fieldrole") return L"workflow.datarole.dbmap";
         return L"";
      }
      
      xstring GetDwname(xstring typ)
@@ -130,12 +131,12 @@
            {
               e = ls.item(k).selectSingleNode(L"flowID");
               e.setAttribute(L"update.modify",L"1");
               e.text() = flowid;
               e.settext(flowid);
            }else
            {
               e = x.createElement(L"flowID");
               e.setAttribute(L"update.modify",L"1");
               e.text() = flowid;
               e.settext(flowid);
               ls.item(k).appendChild(e);
            }
         }
@@ -270,8 +271,8 @@
         {
            data = arg.GetArgString(L"data");
            display = arg.GetArgString(L"display");
            dw_list.SetItemDisplayString(row,colname,display);
            dw_list.SetItemString(row,colname,data);
            dw_list.SetItemDisplayString(row,colname.c_str(), display);
            dw_list.SetItemString(row,colname.c_str(), data);
            dw_list.Redraw();
         }   
@@ -288,8 +289,7 @@
         arg.SetArg(L"stype",GetSheetType(i),L"xstring");
         arg.SetArg(L"sdata",L"ddd",L"xstring");
         arg.SetArg(L"flowID",flowid,L"xstring");
         int obj = cast(dw_list as int);
         arg.SetArg(L"dwobj",obj.toString(),L"xstring");
         arg.SetParam(L"dwobj",&dw_list);
         arg.SetArg(L"dwname",GetDwname(GetSheetType(i)),L"xstring");
         OpenWindow(L"dev:xpage[FlowTermImport.vx]",arg);
@@ -359,14 +359,14 @@
      
         if(flowUrl != L"")
         {
            if(xaserver::FetchXml(flowUrl,L"",f)==1)
            if(xaserver::FetchXml(GetServerUrl(),flowUrl,L"",f)==1)
            {
               flowchart.LoadEx(f.documentElement());
               flowchart.Load(f.documentElement());
            }
         }else
         {
            f.loadXML(L"<sheet/>");
            flowchart.LoadEx(f.documentElement());
            flowchart.Load(f.documentElement());
         }
         return 1;
      }
@@ -420,14 +420,14 @@
         {
            KXMLDOMNodeList nlist = x.selectNodes(L"//item"); 
            int len = nlist.length();
            int hItem = 0;
            HTREEITEM hItem = 0;
            for (int i = 0; i < len; i++)
            {   
               KXMLDOMElement e = nlist.item(i);
               xstring name = e.getAttribute(L"flowName");
               xstring no = e.getAttribute(L"flowNo");
               xstring label = name;//no.trim() + L" " + name;
               int h= tv_folder.InsertChildItem(hItem,label, trust(e as int),22);
               HTREEITEM h= tv_folder.InsertChildItem(hItem,label, e,22);
               //tv_folder.SetItemChild(h,1);
            }
         }