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
d6727218
Commit
d6727218
authored
Jun 24, 2025
by
王业明
Browse files
Fix:优化编译文件格式,去除行尾空格等
parent
d3824844
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
External Plug-in Libraries/.classpath
0 → 100644
View file @
d6727218
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.pde.core.externalJavaSearch"
/>
<classpathentry
kind=
"output"
path=
""
/>
</classpath>
External Plug-in Libraries/.project
0 → 100644
View file @
d6727218
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
External Plug-in Libraries
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.jdt.core.javanature
</nature>
</natures>
</projectDescription>
External Plug-in Libraries/.searchable
0 → 100644
View file @
d6727218
This diff is collapsed.
Click to expand it.
cn.com.bankit.ide.bap.compile/src/cgc_v3/NodeFunc.ftl
View file @
d6727218
def __BAP_${trade}_S${sid}_N${nid}(__REQ__,__RSP__,__BUF__ = None,__EXT__ = None):
def __BAP_${trade}_S${sid}_N${nid}(__REQ__,__RSP__,__BUF__ = None,__EXT__ = None):
'''
'''
索 引:INDEX_S${sindex}_N${nindex}
索 引:INDEX_S${sindex}_N${nindex}
功 能:${desc}
功 能:${desc}
节 点:步骤${sindex}节点${nindex}
节 点:步骤${sindex}节点${nindex}
交 易:${trade}
交 易:${trade}
'''
'''
CGC_Trace("调用节点 ${trade}-STEP[${sindex}]-NODE[${nindex}]:${desc}")
CGC_Trace("调用节点 ${trade}-STEP[${sindex}]-NODE[${nindex}]:${desc}")
${inArgText}<#rt/>
${inArgText}<#rt/>
<#if funcName == "END">
<#if funcName == "END">
<#elseif funcName == "CGC_INN_BOOL">
<#elseif funcName == "CGC_INN_BOOL">
CGC_Trace(("布尔判断表达式:"+str(objArg0) ))
CGC_Trace(("布尔判断表达式:"+str(objArg0) ))
<#if reType == "NOT_RETURN">
<#if reType == "NOT_RETURN">
return ${reExVal}
return ${reExVal}
<#else>
<#else>
if(type(objArg0) is bool) and objArg0 is True:
if(type(objArg0) is bool) and objArg0 is True:
<#if reVal1?exists>
<#if reVal1?exists>
CGC_Trace("出口分支=1")
CGC_Trace("出口分支=1")
return ${reVal1}
return ${reVal1}
<#else>
<#else>
return ${reExVal}
return ${reExVal}
</#if>
</#if>
else:
else:
<#if reVal0?exists>
<#if reVal0?exists>
CGC_Trace("出口分支=0")
CGC_Trace("出口分支=0")
return ${reVal0}
return ${reVal0}
<#else>
<#else>
return ${reExVal}
return ${reExVal}
</#if>
</#if>
</#if>
</#if>
<#elseif funcName == "CGC_INN_ASYNC">
<#elseif funcName == "CGC_INN_ASYNC">
if(not type(objArg0) is dict):
if(not type(objArg0) is dict):
raise CGCException("E","${errcode + "01"}","入参0必须是dict类型")
raise CGCException("E","${errcode + "01"}","入参0必须是dict类型")
elif(not type(objArg1) is str):
elif(not type(objArg1) is str):
raise CGCException("E","${errcode + "02"}","入参1必须是str类型")
raise CGCException("E","${errcode + "02"}","入参1必须是str类型")
elif(not type(objArg2) is str):
elif(not type(objArg2) is str):
raise CGCException("E","${errcode + "03"}","入参2必须是str类型")
raise CGCException("E","${errcode + "03"}","入参2必须是str类型")
objArg0["__ASYNC__"] = True
objArg0["__ASYNC__"] = True
objArg0["__AMC__"] = objArg1
objArg0["__AMC__"] = objArg1
objArg0["__ATC__"] = objArg2
objArg0["__ATC__"] = objArg2
<#if reVal?exists>
<#if reVal?exists>
return ${reVal}
return ${reVal}
<#else>
<#else>
return ${reExVal}
return ${reExVal}
</#if>
</#if>
<#elseif funcName == "CGC_INN_GET_GLB_ERROR">
<#elseif funcName == "CGC_INN_GET_GLB_ERROR">
if(not type(objArg0) is dict):
if(not type(objArg0) is dict):
raise CGCException("E","${errcode + "01"}","入参0必须是dict类型")
raise CGCException("E","${errcode + "01"}","入参0必须是dict类型")
elif(not type(objArg1) is str):
elif(not type(objArg1) is str):
raise CGCException("E","${errcode + "02"}","入参1必须是str类型")
raise CGCException("E","${errcode + "02"}","入参1必须是str类型")
elif(not type(objArg2) is str):
elif(not type(objArg2) is str):
raise CGCException("E","${errcode + "03"}","入参2必须是str类型")
raise CGCException("E","${errcode + "03"}","入参2必须是str类型")
elif(not type(objArg3) is str):
elif(not type(objArg3) is str):
raise CGCException("E","${errcode + "04"}","入参3必须是str类型")
raise CGCException("E","${errcode + "04"}","入参3必须是str类型")
objArg0[objArg1] = __REQ__.has_key('__RST__') and __REQ__["__RST__"] or ""
objArg0[objArg1] = __REQ__.has_key('__RST__') and __REQ__["__RST__"] or ""
objArg0[objArg2] = __REQ__.has_key('__ECD__') and __REQ__["__ECD__"] or ""
objArg0[objArg2] = __REQ__.has_key('__ECD__') and __REQ__["__ECD__"] or ""
objArg0[objArg3] = __REQ__.has_key('__MSG__') and __REQ__["__MSG__"] or ""
objArg0[objArg3] = __REQ__.has_key('__MSG__') and __REQ__["__MSG__"] or ""
<#if reVal?exists>
<#if reVal?exists>
return ${reVal}
return ${reVal}
<#else>
<#else>
return ${reExVal}
return ${reExVal}
</#if>
</#if>
<#elseif funcName == "CGC_INN_SWITCH">
<#elseif funcName == "CGC_INN_SWITCH">
<#if reType == "NOT_RETURN">
<#if reType == "NOT_RETURN">
CGC_Trace("出口分支=0")
CGC_Trace("出口分支=0")
return ${defFunc}
return ${defFunc}
<#else>
<#else>
<#if reType == "SIG_RETURN">
<#if reType == "SIG_RETURN">
return ${defFunc}
return ${defFunc}
<#else>
<#else>
<#list reFunc?keys as name>
<#list reFunc?keys as name>
<#if name_index == 0>
<#if name_index == 0>
if(objArg0 == objArg${name}):
if(objArg0 == objArg${name}):
<#else>
<#else>
elif(objArg0 == objArg${name}):
elif(objArg0 == objArg${name}):
</#if>
</#if>
CGC_Trace("出口分支=${name}")
CGC_Trace("出口分支=${name}")
return ${reFunc[name]}
return ${reFunc[name]}
</#list>
</#list>
else:
else:
CGC_Trace("出口分支=0")
CGC_Trace("出口分支=0")
return ${defFunc}
return ${defFunc}
</#if>
</#if>
</#if>
</#if>
<#else>
<#else>
${functionBody}<#rt/>
${functionBody}<#rt/>
if type(listResult) is not list:
if type(listResult) is not list:
raise CGCException("E","${errcode + "01"}","组件状态返回值必须是list类型")
raise CGCException("E","${errcode + "01"}","组件状态返回值必须是list类型")
elif len(listResult) < 3:
elif len(listResult) < 3:
raise CGCException("E","${errcode + "02"}","组件状态返回值(list)的个数必须有3个以上")
raise CGCException("E","${errcode + "02"}","组件状态返回值(list)的个数必须有3个以上")
elif listResult[1] != None or listResult[2] != None:
elif listResult[1] != None or listResult[2] != None:
CGC_SET_DEF_ERROR(__REQ__,"D",str(listResult[1]),str(listResult[2]))
CGC_SET_DEF_ERROR(__REQ__,"D",str(listResult[1]),str(listResult[2]))
<#if outArgFlag == "OUTARGS">
<#if outArgFlag == "OUTARGS">
else:
else:
listRes = None
listRes = None
if len(listResult) >= 4:
if len(listResult) >= 4:
listRes = listResult[3]
listRes = listResult[3]
if(listRes != None):
if(listRes != None):
if type(listRes) is not list:
if type(listRes) is not list:
raise CGCException("E","${errcode + "03"}","组件出参必须是list类型")
raise CGCException("E","${errcode + "03"}","组件出参必须是list类型")
elif len(listRes) == 0:
elif len(listRes) == 0:
raise CGCException("E","${errcode + "04"}","组件出参个数必须大于0")
raise CGCException("E","${errcode + "04"}","组件出参个数必须大于0")
${outArgsText}<#rt/>
${outArgsText}<#rt/>
else:
else:
CGC_Trace("组件返回值为无出参模式")
CGC_Trace("组件返回值为无出参模式")
</#if>
</#if>
CGC_Trace("出口分支="+str(listResult[0]))
CGC_Trace("出口分支="+str(listResult[0]))
${logicText}<#rt/>
${logicText}<#rt/>
</#if>
</#if>
cn.com.bankit.ide.bap.compile/src/cn/com/bankit/ide/bap/compile/cgc/CGC.java
View file @
d6727218
...
@@ -130,7 +130,7 @@ public class CGC extends BapCompile
...
@@ -130,7 +130,7 @@ public class CGC extends BapCompile
*/
*/
private
void
bizCompile
(
IFolder
folder
)
throws
Exception
private
void
bizCompile
(
IFolder
folder
)
throws
Exception
{
{
boolean
isError
=
true
;
boolean
isError
=
true
;
try
try
{
{
CodeGen
<
IFolder
>
codeGen
=
CodeGen
.
getBizInstance
(
0x103
);
CodeGen
<
IFolder
>
codeGen
=
CodeGen
.
getBizInstance
(
0x103
);
...
@@ -138,7 +138,9 @@ public class CGC extends BapCompile
...
@@ -138,7 +138,9 @@ public class CGC extends BapCompile
File
objdir
=
folder
.
getFolder
(
INavigatorConstants
.
NV_NODE_RESCPL
).
getLocation
().
toFile
();
File
objdir
=
folder
.
getFolder
(
INavigatorConstants
.
NV_NODE_RESCPL
).
getLocation
().
toFile
();
File
pyFile
=
new
File
(
objdir
,
folder
.
getName
()
+
".py"
);
File
pyFile
=
new
File
(
objdir
,
folder
.
getName
()
+
".py"
);
FileUtil
.
createFile
(
pyFile
,
content
,
IBapConstants
.
ENCODING_GBK
);
String
cgcVer
=
BapPreActivator
.
getDefault
().
getPreferenceStore
().
getString
(
IBapConstants
.
BAP_PREF_CPL_CGC_VER
);
FileUtil
.
createFile
(
pyFile
,
content
,
IBapConstants
.
BAP_PREF_CPL_CGC_VER_V1_0_0
.
equals
(
cgcVer
)
?
IBapConstants
.
ENCODING_GBK
:
IBapConstants
.
ENCODING_UTF_8
);
isError
=
false
;
isError
=
false
;
}
}
...
...
cn.com.bankit.ide.bap.compile/src/cn/com/bankit/ide/bap/compile/cgc/gen/BizCodeGenV1.java
View file @
d6727218
This diff is collapsed.
Click to expand it.
cn.com.bankit.ide.bap.compile/src/cn/com/bankit/ide/bap/compile/cgc/gen/TrdCodeGenV1.java
View file @
d6727218
This diff is collapsed.
Click to expand it.
cn.com.bankit.ide.bap.compile/src/cn/com/bankit/ide/bap/compile/cgc/template/CodeUtil.java
View file @
d6727218
This diff is collapsed.
Click to expand it.
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