Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
White Collar
BAPIDE
Commits
d49da95c
Commit
d49da95c
authored
Mar 26, 2025
by
王业明
Browse files
初始化 BAPIDE 1.5.0
parent
646dac8e
Changes
706
Hide whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
706 of 706+
files are displayed.
Plain diff
Email patch
cn.com.bankit.ide.bap.checkresource/src/cn/com/bankit/ide/bap/checkresource/Activator.java
0 → 100644
View file @
d49da95c
package
cn.com.bankit.ide.bap.checkresource
;
import
org.eclipse.core.internal.localstore.FileSystemResourceManager
;
import
org.eclipse.core.internal.resources.Workspace
;
import
org.eclipse.core.resources.IResource
;
import
org.eclipse.core.resources.IResourceVisitor
;
import
org.eclipse.core.resources.IWorkspaceDescription
;
import
org.eclipse.core.resources.IWorkspaceRoot
;
import
org.eclipse.core.resources.ResourcesPlugin
;
import
org.eclipse.core.resources.WorkspaceJob
;
import
org.eclipse.core.runtime.CoreException
;
import
org.eclipse.core.runtime.IProgressMonitor
;
import
org.eclipse.core.runtime.IStatus
;
import
org.eclipse.core.runtime.Status
;
import
org.eclipse.ui.IWindowListener
;
import
org.eclipse.ui.IWorkbenchWindow
;
import
org.eclipse.ui.PlatformUI
;
import
org.osgi.framework.BundleActivator
;
import
org.osgi.framework.BundleContext
;
import
org.osgi.framework.BundleEvent
;
import
org.osgi.framework.BundleListener
;
import
org.osgi.framework.FrameworkEvent
;
import
org.osgi.framework.FrameworkListener
;
public
class
Activator
implements
BundleActivator
{
private
static
BundleContext
context
;
static
BundleContext
getContext
()
{
return
context
;
}
/*
* (non-Javadoc)
* @see
* org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext
* )
*/
public
void
start
(
BundleContext
bundleContext
)
throws
Exception
{
Activator
.
context
=
bundleContext
;
context
.
addBundleListener
(
new
BundleListener
()
{
@Override
public
void
bundleChanged
(
BundleEvent
event
)
{
if
(
event
.
getType
()
==
BundleEvent
.
STARTED
)
{
if
(
event
.
getBundle
().
getSymbolicName
()
.
equals
(
"org.eclipse.core.resources"
))
{
WorkspaceJob
job
=
new
WorkspaceJob
(
"checking unsynchronized resource......"
)
{
@Override
public
IStatus
runInWorkspace
(
final
IProgressMonitor
monitor
)
throws
CoreException
{
IWorkspaceRoot
root
=
ResourcesPlugin
.
getWorkspace
().
getRoot
();
//取消auto build
IWorkspaceDescription
des
=
root
.
getWorkspace
().
getDescription
();
des
.
setAutoBuilding
(
false
);
root
.
getWorkspace
().
setDescription
(
des
);
root
.
accept
(
new
IResourceVisitor
()
{
FileSystemResourceManager
manager
=
new
FileSystemResourceManager
(
(
Workspace
)
ResourcesPlugin
.
getWorkspace
());
@Override
public
boolean
visit
(
IResource
resource
)
throws
CoreException
{
if
(!
manager
.
isSynchronized
(
resource
,
IResource
.
DEPTH_INFINITE
))
{
resource
.
refreshLocal
(
IResource
.
DEPTH_INFINITE
,
monitor
);
}
return
true
;
}
});
return
Status
.
OK_STATUS
;
}
};
job
.
run
(
null
);
}
}
}
});
// context.addFrameworkListener(new FrameworkListener()
// {
//
// @Override
// public void frameworkEvent(FrameworkEvent event)
// {
// // TODO Auto-generated method stub
// System.out.println(event.getType());
// }
// });
}
/*
* (non-Javadoc)
* @see
* org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public
void
stop
(
BundleContext
bundleContext
)
throws
Exception
{
Activator
.
context
=
null
;
}
}
cn.com.bankit.ide.bap.compile/.classpath
0 → 100644
View file @
d49da95c
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.pde.core.requiredPlugins"
/>
<classpathentry
kind=
"src"
path=
"src"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
</classpath>
cn.com.bankit.ide.bap.compile/.project
0 → 100644
View file @
d49da95c
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
cn.com.bankit.ide.bap.compile
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.eclipse.pde.ManifestBuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.eclipse.pde.SchemaBuilder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.pde.PluginNature
</nature>
<nature>
org.eclipse.jdt.core.javanature
</nature>
</natures>
</projectDescription>
cn.com.bankit.ide.bap.compile/.settings/org.eclipse.core.resources.prefs
0 → 100644
View file @
d49da95c
eclipse.preferences.version=1
encoding/<project>=UTF-8
cn.com.bankit.ide.bap.compile/.settings/org.eclipse.jdt.core.prefs
0 → 100644
View file @
d49da95c
#Wed Jan 11 14:34:55 CST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
cn.com.bankit.ide.bap.compile/META-INF/MANIFEST.MF
0 → 100644
View file @
d49da95c
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bap Compile
Bundle-SymbolicName: cn.com.bankit.ide.bap.compile
Bundle-Version: 1.0.0
Bundle-Activator: cn.com.bankit.ide.bap.compile.BapCompileActivator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
cn.com.bankit.ide.bap.constants;bundle-version="1.0.0",
cn.com.bankit.ide.common.lib;bundle-version="1.0.0",
cn.com.bankit.common.castor.model;bundle-version="1.0.0",
org.eclipse.core.resources;bundle-version="3.7.100",
cn.com.bankit.ide.bap.util;bundle-version="1.0.0",
cn.com.bankit.ide.bap.preferences;bundle-version="1.0.0",
cn.com.bankit.ide.bap.navigator.model;bundle-version="1.0.0",
cn.com.bankit.ide.bap.configure;bundle-version="1.0.0",
cn.com.bankit.ide.bap.libs;bundle-version="1.0.0",
cn.com.bankit.ide.toolkit;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .
Export-Package: cn.com.bankit.ide.bap.compile,
cn.com.bankit.ide.bap.compile.bamc,
cn.com.bankit.ide.bap.compile.bamc.xml,
cn.com.bankit.ide.bap.compile.cgc,
cn.com.bankit.ide.bap.compile.cgc.gen,
cn.com.bankit.ide.bap.compile.cgc.template
Bundle-Vendor: BankIt
cn.com.bankit.ide.bap.compile/bin/cgc_v1/BizpkgEntry.ftl
0 → 100644
View file @
d49da95c
'''
交易名称:${tadeCode}
说 明:${desc}
'''
def ${tadeCode}(__REQ__,__RSP__,__SND__,__RCV__):
try:
CGC_Debug("开始业务组件 ${tadeCode}:${desc}")
BAPC_Builtin_SetDefaultExceptNode(None)
_Result_ = False
_Method_ = ${firstMothod}
while(type(_Method_) is FunctionType):
_Result_ = _Method_(__REQ__,__RSP__,__SND__,__RCV__)
_Method_ = _Result_
CGC_Debug("结束业务组件 ${tadeCode}:${desc}")
return (_Method_ == True)
except Exception,PyExcp:
BAPC_Builtin_SetGlobalError("E","BAPC0E001",str(PyExcp))
CGC_Debug(str(PyExcp))
return False
cn.com.bankit.ide.bap.compile/bin/cgc_v1/InnerFunc.ftl
0 → 100644
View file @
d49da95c
'''
索 引:INDEX_S${sindex}_N${nindex}
功 能:${desc}
节 点:步骤${sindex}节点${nindex}
交 易:${trade}
'''
def __BAP_${trade}_S${sid}_N${nid}(__REQ__,__RSP__,__SND__,__RCV__):
CGC_Debug("调用节点 STEP[${sindex}]-NODE[${nindex}]:${desc}")
${body}<#rt/>
cn.com.bankit.ide.bap.compile/bin/cgc_v1/NodeFunc.ftl
0 → 100644
View file @
d49da95c
'''
索 引:INDEX_S${sindex}_N${nindex}
功 能:${desc}
节 点:步骤${sindex}节点${nindex}
交 易:${trade}
'''
def __BAP_${trade}_S${sid}_N${nid}(__REQ__,__RSP__,__SND__,__RCV__):
CGC_Debug("调用节点 STEP[${sindex}]-NODE[${nindex}]:${desc}")
try:
${SetDefaultExceptNode}<#rt/>
${inArgText}<#rt/>
${functionBody}<#rt/>
if( not (type(_Result_) is list)):
BAPC_Builtin_SetGlobalError("E","BAPC0002","组件状态返回必须是[List]类型")
return BAPC_Builtin_GetDefaultExceptNode(${errFunc})
elif(len(_Result_) < 3):
BAPC_Builtin_SetGlobalError("E","BAPC0003","组件状态返回的[Item]个数必须有3个以上")
return BAPC_Builtin_GetDefaultExceptNode(${errFunc})
${outArgText}<#rt/>
BAPLoggerTrace("逻辑返回值="+str(_Result_[0]))
${logicText}<#rt/>
except Exception,PyExcp:
BAPC_Builtin_SetGlobalError("E","BAPC0E001",str(PyExcp))
CGC_Debug(str(PyExcp))
return BAPC_Builtin_GetDefaultExceptNode(${errFunc})
cn.com.bankit.ide.bap.compile/bin/cgc_v1/NodeFuncOutArgs.ftl
0 → 100644
View file @
d49da95c
if((_Result_[1] == None) and (_Result_[2] == None)):
if(len(_Result_) != 4):
BAPC_Builtin_SetGlobalError("E","BAPC0004","必须有返回值的组件无数据返回")
return BAPC_Builtin_GetDefaultExceptNode(${errFuncName})
_RTVAL_ = _Result_[3]
if(_RTVAL_ != None):
if( not (type(_RTVAL_) is list)):
BAPC_Builtin_SetGlobalError("E","BAPC0005","组件据据返回必须是[list]类型")
return BAPC_Builtin_GetDefaultExceptNode(${errFuncName})
elif(len(_RTVAL_) < 1):
BAPC_Builtin_SetGlobalError("E","BAPC0006","组件数据返回的[Item]个数必须和出参配置(1)一致")
return BAPC_Builtin_GetDefaultExceptNode(${errFuncName})
${outArgsText}<#rt/>
else:
CGC_Trace("组件返回的出参无效,编译器判定为失败模式")
else:
BAPC_Builtin_SetGlobalError("D",str(_Result_[1]),str(_Result_[2]))
\ No newline at end of file
cn.com.bankit.ide.bap.compile/bin/cgc_v1/NodeRefFunc.ftl
0 → 100644
View file @
d49da95c
'''
索 引:INDEX_S${sindex}_N${nindex}
功 能:${desc}
节 点:步骤${sindex}节点${nindex}
交 易:${trade}
'''
def __BAP_${trade}_S${sid}_N${nid}(__REQ__,__RSP__,__SND__,__RCV__):
CGC_Debug("调用节点 STEP[${sindex}]-NODE[${nindex}]:${desc}")
try:
${functionBody}<#rt/>
if(_Result_ == True):
CGC_Debug("业务组件返回状态:成功")
return ${trueRet}
else:
CGC_Debug("业务组件返回状态:失败")
return ${falseRet}
except Exception,PyExcp:
BAPC_Builtin_SetGlobalError("E","BAPC0E001",str(PyExcp))
CGC_Debug(str(PyExcp))
return BAPC_Builtin_GetDefaultExceptNode(${errRet})
cn.com.bankit.ide.bap.compile/bin/cgc_v1/StepFunction.ftl
0 → 100644
View file @
d49da95c
'''
索 引:INDEX_S${sindex}
功 能:${desc}
节 点:步骤${sindex}
交 易:${trade}
'''
def __BAP_${trade}_S${sid}_IMPL(__REQ__,__RSP__,__SND__,__RCV__):
CGC_Debug("调用步骤 STEP[${sindex}]:[${desc}]")
try:
BAPC_Builtin_SetDefaultExceptNode(None)
_Result_ = None
_Method_ = ${startFunc}
while(type(_Method_) is FunctionType):
_Result_ = _Method_(__REQ__,__RSP__,__SND__,__RCV__)
_Method_ = _Result_
${logicText}
except Exception,PyExcp:
BAPC_Builtin_SetGlobalError("E","BAPC0E001",str(PyExcp))
CGC_Debug(str(PyExcp))
return None
cn.com.bankit.ide.bap.compile/bin/cgc_v1/TradeEntry.ftl
0 → 100644
View file @
d49da95c
'''
交易名称:${tadeCode}
说 明:${desc}
'''
def M${tadeCode}_ENTRY(__REQ__,__RSP__):
CGC_Debug("开始交易 [${tadeCode}]:${desc}")
__SND__ = {}
__RCV__ = {}
BAPC_Builtin_TradeInitialize(__REQ__,__RSP__)
_Result_ = BAPC_Builtin_CheckRequest(__REQ__,__RSP__)
if(_Result_ != True):
return True
_Result_ = None
_Method_ = ${firstMothod}
while(type(_Method_) is FunctionType):
_Result_ = _Method_(__REQ__,__RSP__,__SND__,__RCV__)
_Method_ = _Result_
__SND__.clear()
__RCV__.clear()
del __SND__
del __RCV__
BAPC_Builtin_CheckResponse(__REQ__,__RSP__)
CGC_Debug("结束交易 ${tadeCode}")
return True
\ No newline at end of file
cn.com.bankit.ide.bap.compile/bin/cgc_v1/python.ftl
0 → 100644
View file @
d49da95c
# -*- coding: gbk -*-
'''
-------------------------------------------------------------------------------
×× 以下代码是宇信班克CGC编译器自动生成的代码,请勿直接修改代码。 ××
-------------------------------------------------------------------------------
'''
'''
应用代码:${app}
交易代码:${trade}
描述信息:${desc}
作 者:宇信班克
创建日期:${crttime}
修改日期:${mdftime}
生成日期:${curdate}
编译版本:CGC ${version}
'''
from types import FunctionType
${importStr}
'''
全局对象:
'''
__EXCP__ = None
__ECD__ = "UNDEF"
__MSG__ = ""
__RST__ = "N"
'''
功 能:记录Python对象日志
'''
def BAPC_Builtin_LoggerTraceVar(argVarName,argVarObject):
try:
CGC_Trace("%s = %s" % (argVarName,argVarObject))
return True
except:
return False
'''
功 能:构造设置全局错误
'''
def BAPC_Builtin_SetGlobalError(argMsgType,argMsgCode,argMsgText):
global __RST__
global __ECD__
global __MSG__
__RST__ = str(argMsgType)
__ECD__ = str(argMsgCode)
__MSG__ = str(argMsgText)
CGC_Trace("__RST__ = "+str(__RST__))
CGC_Trace("__ECD__ = "+str(__ECD__))
CGC_Trace("__MSG__ = "+str(__MSG__))
'''
功 能:检测 __MC__ 和 __TC__
'''
def BAPC_Builtin_CheckRequest(__REQ__,__RSP__):
CGC_Trace("调用内建函数 BAPC_Builtin_CheckRequest")
if( not __REQ__.has_key("__MC__")):
BAPC_Builtin_SetGlobalError("E","NO__MC__","__REQ__中必须包含键值__MC__")
return False
if( not __REQ__.has_key("__TC__")):
BAPC_Builtin_SetGlobalError("E","NO__TC__","__REQ__中必须包含键值__TC__")
return False
if( not __REQ__.has_key("__RCVPCK__")):
__RSP__["__MSG__"]="__REQ__中必须包含键值__MSG__"
BAPC_Builtin_SetGlobalError("E","NORCVPCK","__REQ__中必须包含键值__MSG__")
return False
if( not __REQ__.has_key("__VER__")):
__RSP__["__MSG__"]="__REQ__中必须包含键值__VER__"
BAPC_Builtin_SetGlobalError("E","NORCVPCK","__REQ__中必须包含键值__VER__")
return False
return True
'''
功 能:检查 __SNDPCK__ 放置 __ECD__ 、__RST__ 到返回字典中
'''
def BAPC_Builtin_CheckResponse(__REQ__,__RSP__):
CGC_Trace("调用内建函数 BAPC_Builtin_CheckResponse")
global __RST__
global __ECD__
global __MSG__
if( not __RSP__.has_key("__SNDPCK__")):
__RSP__["__RST__"]="E"
__RSP__["__ECD__"]="RTM0E103"
__RSP__["__MSG__"]="没有返回包变量"
__RSP__["__SNDPCK__"]=""
else:
__RSP__["__RST__"]=__RST__
__RSP__["__ECD__"]=__ECD__
__RSP__["__MSG__"]=__MSG__
'''
功 能:获取全局异常委托函数
'''
def BAPC_Builtin_GetDefaultExceptNode(argDefault):
global __EXCP__
if(__EXCP__ == None):
return argDefault
else:
return __EXCP__
'''
功 能:设置全局异常委托函数
'''
def BAPC_Builtin_SetDefaultExceptNode(argMethod):
global __EXCP__
__EXCP__ = argMethod
'''
功 能: 交易入口初始化函数
'''
def BAPC_Builtin_TradeInitialize(__REQ__,__RSP__):
if(__RSP__.has_key("__ASYNC__")):
del __RSP__["__ASYNC__"]
if(__RSP__.has_key("__AMC__")):
del __RSP__["__AMC__"]
if(__RSP__.has_key("__ATC__")):
del __RSP__["__ATC__"]
__REQ__["__VER__"]="2.31"
'''
功 能:布尔判断框架(虚拟组件)返回 0或1
'''
def BAPC_Builtin_BoolFrame(argBOOL):
CGC_Trace("调用虚拟组件 BAPC_Builtin_BoolFrame")
CGC_Trace(("argBOOL="+str(argBOOL) ))
if(type(argBOOL) is bool):
if(argBOOL is True):
return [1,None,None]
else:
return [0,None,None]
elif(type(argBOOL) is int):
if(argBOOL > 0):
return [1,None,None]
else:
return [0,None,None]
else:
return [0,None,None]
'''
功 能: 默认出口挂载(虚拟组件)返回 1
'''
def BAPC_Builtin_DefaultErrorHolder():
CGC_Trace("调用 BAPC_Builtin_DefaultErrorHolder")
return [1,None,None]
'''
功 能: 字符串SWITCH匹配(虚拟组件)返回 0或1~7
'''
def BAPC_Builtin_SwitchCaseFrame(argSrc,arg1,arg2,arg3,arg4,arg5,arg6,arg7):
CGC_Trace("调用虚拟组件 BAPC_Builtin_SwitchCaseFrame")
CGC_Trace(("argSrc="+str(argSrc)))
if(argSrc == arg1):
return [1,None,None]
elif(argSrc == arg2):
return [2,None,None]
elif(argSrc == arg3):
return [3,None,None]
elif(argSrc == arg4):
return [4,None,None]
elif(argSrc == arg5):
return [5,None,None]
elif(argSrc == arg6):
return [6,None,None]
elif(argSrc == arg7):
return [7,None,None]
else:
return [0,None,None]
'''
功 能: 设置全局错误(虚拟组件) 返回 1
'''
def BAPC_Builtin_SetErrorToGlobal(argMsgType,argMsgCode,argMsgText):
CGC_Trace("调用虚拟组件 BAPC_Builtin_SetErrorToGlobal")
BAPC_Builtin_SetGlobalError(argMsgType,argMsgCode,argMsgText)
return [1,None,None]
'''
功 能:取全局错误到容器(虚拟组件)返回 1
'''
def BAPC_Builtin_GetGlobalErrorToDict(argDict,argMsgTypeName,argMsgCodeName,argMsgTextName):
CGC_Trace("调用虚拟组件 BAPC_Builtin_GetGlobalErrorToDict")
global __RST__
global __ECD__
global __MSG__
if(not type(argDict) is dict):
return [0,"BAPC0E900","容器字段必须是字典"]
elif(not type(argMsgTypeName) is str):
return [0,"BAPC0E901","MsgType的KEY必须是STRING"]
elif(not type(argMsgCodeName) is str):
return [0,"BAPC0E901","MsgCode的KEY必须是STRING"]
elif(not type(argMsgTextName) is str):
return [0,"BAPC0E901","MsgText的KEY必须是STRING"]
argDict[argMsgTypeName]=__RST__
argDict[argMsgCodeName]=__ECD__
argDict[argMsgTextName]=__MSG__
return [1,None,None]
'''
功 能: 切换为后执行模式(虚拟组件) 返回 1
'''
def BAPC_Builtin_SwitchToAsyncMode(argDict,argTemplateCode,argTransCode):
CGC_Trace("调用虚拟组件 BAPC_Builtin_SwitchToAsyncMode")
if(not type(argDict) is dict):
return [0,"BAPC0E900","容器字段必须是字典"]
elif(not type(argTemplateCode) is str):
return [0,"BAPC0E901","应用代码必须是STRING"]
elif(not type(argTransCode) is str):
return [0,"BAPC0E901","交易代码必须是STRING"]
argDict["__ASYNC__"] = True
argDict["__AMC__"] = argTemplateCode
argDict["__ATC__"] = argTransCode
return [1,None,None]
'''
功 能: 切换为后执行模式(虚拟组件) 返回 1
'''
def BAPC_Builtin_Def_Err_End_Node(__REQ__,__RSP__,__SND__,__RCV__):
CGC_Trace("调用虚拟组件 BAPC_Builtin_Def_Err_End_Node")
return False
'''
-------------------------------------------------------------------------------
## 交易步骤代码 ##
-------------------------------------------------------------------------------
'''
${body}
'''
-------------------------------------------------------------------------------
## 交易函数入口 ##
-------------------------------------------------------------------------------
'''
${entry}
cn.com.bankit.ide.bap.compile/bin/cgc_v2/BizpkgEntry.ftl
0 → 100644
View file @
d49da95c
'''
交易名称:${tadeCode}
说 明:${desc}
'''
def COMP_${tadeCode}_ENTRY(__REQ__,__RSP__,__SND__,__RCV__):
try:
CGC_Debug("开始业务组件 ${tadeCode}:${desc}")
CGC_SET_DEF_EXCP_NODE(None)
objResult = False
objMethod = ${firstMothod}
while(type(objMethod) is FunctionType):
objResult = objMethod(__REQ__,__RSP__,__SND__,__RCV__)
objMethod = objResult
CGC_Debug("结束业务组件 ${tadeCode}:${desc}")
return (objMethod == True)
except Exception,PyExcp:
CGC_SET_GLB_ERROR("E","BAPC0E001",str(PyExcp))
CGC_Debug(str(PyExcp))
return False
cn.com.bankit.ide.bap.compile/bin/cgc_v2/InnerFunc.ftl
0 → 100644
View file @
d49da95c
'''
索 引:INDEX_S${sindex}_N${nindex}
功 能:${desc}
节 点:步骤${sindex}节点${nindex}
交 易:${trade}
'''
def __BAP_${trade}_S${sid}_N${nid}(__REQ__,__RSP__,__SND__,__RCV__):
CGC_Debug("调用节点 STEP[${sindex}]-NODE[${nindex}]:${desc}")
${body}<#rt/>
cn.com.bankit.ide.bap.compile/bin/cgc_v2/NodeFunc.ftl
0 → 100644
View file @
d49da95c
'''
索 引:INDEX_S${sindex}_N${nindex}
功 能:${desc}
节 点:步骤${sindex}节点${nindex}
交 易:${trade}
'''
def __BAP_${trade}_S${sid}_N${nid}(__REQ__,__RSP__,__SND__,__RCV__):
CGC_Debug("调用节点 STEP[${sindex}]-NODE[${nindex}]:${desc}")
try:
${SetDefaultExceptNode}<#rt/>
${inArgText}<#rt/>
${functionBody}<#rt/>
if( not (type(listResult) is list)):
CGC_SET_GLB_ERROR("E","BT910001","组件状态返回值必须是list类型")
return CGC_GET_DEF_EXCP_NODE(${errFunc})
elif(len(listResult) < 3):
CGC_SET_GLB_ERROR("E","BT910002","组件状态返回值(list)的个数必须有3个以上")
return CGC_GET_DEF_EXCP_NODE(${errFunc})
${outArgText}<#rt/>
CGC_Trace("出口分支="+str(listResult[0]))
${logicText}<#rt/>
except Exception,PyExcp:
CGC_SET_GLB_ERROR("E","BT910006",str(PyExcp))
CGC_Debug(str(PyExcp))
return CGC_GET_DEF_EXCP_NODE(${errFunc})
cn.com.bankit.ide.bap.compile/bin/cgc_v2/NodeFuncOutArgs.ftl
0 → 100644
View file @
d49da95c
if((listResult[1] == None) and (listResult[2] == None)):
if(len(listResult) != 4):
CGC_SET_GLB_ERROR("E","BT910003","必须有返回值的组件无数据返回")
return CGC_GET_DEF_EXCP_NODE(${errFuncName})
listRes = listResult[3]
if(listRes != None):
if( not (type(listRes) is list)):
CGC_SET_GLB_ERROR("E","BT910004","组件据据返回值必须是list类型")
return CGC_GET_DEF_EXCP_NODE(${errFuncName})
elif(len(listRes) < 1):
CGC_SET_GLB_ERROR("E","BT910005","组件数据返回值的个数必须和组件出参配置一致")
return CGC_GET_DEF_EXCP_NODE(${errFuncName})
${outArgsText}<#rt/>
else:
CGC_Trace("组件返回值为无出参模式")
else:
CGC_SET_GLB_ERROR("D",str(listResult[1]),str(listResult[2]))
\ No newline at end of file
cn.com.bankit.ide.bap.compile/bin/cgc_v2/NodeRefFunc.ftl
0 → 100644
View file @
d49da95c
'''
索 引:INDEX_S${sindex}_N${nindex}
功 能:${desc}
节 点:步骤${sindex}节点${nindex}
交 易:${trade}
'''
def __BAP_${trade}_S${sid}_N${nid}(__REQ__,__RSP__,__SND__,__RCV__):
CGC_Debug("调用节点 STEP[${sindex}]-NODE[${nindex}]:${desc}")
try:
${functionBody}<#rt/>
if(objResult == True):
CGC_Debug("业务组件返回状态:成功")
return ${trueRet}
else:
CGC_Debug("业务组件返回状态:失败")
return ${falseRet}
except Exception,PyExcp:
CGC_SET_GLB_ERROR("E","BT900001",str(PyExcp))
CGC_Debug(str(PyExcp))
return CGC_GET_DEF_EXCP_NODE(${errFunc})
cn.com.bankit.ide.bap.compile/bin/cgc_v2/StepFunction.ftl
0 → 100644
View file @
d49da95c
'''
索 引:INDEX_S${sindex}
功 能:${desc}
节 点:步骤${sindex}
交 易:${trade}
'''
def __BAP_${trade}_S${sid}_IMPL(__REQ__,__RSP__,__SND__,__RCV__):
CGC_Debug("调用步骤 STEP[${sindex}]:[${desc}]")
try:
CGC_SET_DEF_EXCP_NODE(None)
objResult = None
objMethod = ${startFunc}
while(type(objMethod) is FunctionType):
objResult = objMethod(__REQ__,__RSP__,__SND__,__RCV__)
objMethod = objResult
${logicText}
except Exception,PyExcp:
CGC_SET_GLB_ERROR("E","BT990001",str(PyExcp))
CGC_Debug(str(PyExcp))
return None
Prev
1
…
20
21
22
23
24
25
26
27
28
…
36
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment