1.增加测试用例

2.注释无用代码
This commit is contained in:
chenweilong 2022-12-12 19:08:17 +08:00
parent 30d011c74f
commit 3eb89a9433
2 changed files with 231 additions and 50 deletions

View File

@ -56,58 +56,58 @@
<!-- IF(profitCenter02Cmp, ProfitCenter02SoutCmp, sout);-->
<!-- </chain>-->
<nodes>
<node id="s3" name="sectionClassification" type="script">
<![CDATA[
def globalSectionClassificationList = ["汇差","手续费","成本科目"]
globalSectionClassification.setGlobalSectionClassificationList(globalSectionClassificationList)
]]>
</node>
<node id="s4" name="globalBusinessType" type="script">
<![CDATA[
def globalBusinessTypeList = ["货代","报关","船代","散杂货"]
globalBusinessType.setGlobalBusinessTypeList(globalBusinessTypeList)
]]>
</node>
<node id="s5" name="salesman" type="script">
<![CDATA[
def globalSalesmanList = ["仓干配物流部(物流)"]
salesman.setGlobalSalesmanList(globalSalesmanList)
]]>
</node>
<node id="s6" name="businessCategory" type="script">
<![CDATA[
def globalBusinessCategoryList = ["全货船业务","进出岛仓干配"]
businessCategory.setGlobalBusinessCategoryList(globalBusinessCategoryList)
]]>
</node>
<node id="s7" name="costCenter01" type="script">
<![CDATA[
def costCenter01Code = "P350401028"
costCenterContext.setCode(costCenter01Code)
<!-- <nodes>-->
<!-- <node id="s3" name="sectionClassification" type="script">-->
<!-- <![CDATA[-->
<!-- def globalSectionClassificationList = ["汇差","手续费","成本科目"]-->
<!-- globalSectionClassification.setGlobalSectionClassificationList(globalSectionClassificationList)-->
<!-- ]]>-->
<!-- </node>-->
<!-- <node id="s4" name="globalBusinessType" type="script">-->
<!-- <![CDATA[-->
<!-- def globalBusinessTypeList = ["货代","报关","船代","散杂货"]-->
<!-- globalBusinessType.setGlobalBusinessTypeList(globalBusinessTypeList)-->
<!-- ]]>-->
<!-- </node>-->
<!-- <node id="s5" name="salesman" type="script">-->
<!-- <![CDATA[-->
<!-- def globalSalesmanList = ["仓干配物流部(物流)"]-->
<!-- salesman.setGlobalSalesmanList(globalSalesmanList)-->
<!-- ]]>-->
<!-- </node>-->
<!-- <node id="s6" name="businessCategory" type="script">-->
<!-- <![CDATA[-->
<!-- def globalBusinessCategoryList = ["全货船业务","进出岛仓干配"]-->
<!-- businessCategory.setGlobalBusinessCategoryList(globalBusinessCategoryList)-->
<!-- ]]>-->
<!-- </node>-->
<!-- <node id="s7" name="costCenter01" type="script">-->
<!-- <![CDATA[-->
<!-- def costCenter01Code = "P350401028"-->
<!-- costCenterContext.setCode(costCenter01Code)-->
def costCenter01Name = "仓干配物流部利润中心"
costCenterContext.setName(costCenter01Name)
<!-- def costCenter01Name = "仓干配物流部利润中心"-->
<!-- costCenterContext.setName(costCenter01Name)-->
costCenterContext.setGenerateCode(costCenter01Code + costCenter01Name)
]]>
</node>
<node id="s8" name="costCenter02" type="script">
<![CDATA[
def costCenter02Code = "P350401026"
costCenterContext.setCode(costCenter02Code)
<!-- costCenterContext.setGenerateCode(costCenter01Code + costCenter01Name)-->
<!-- ]]>-->
<!-- </node>-->
<!-- <node id="s8" name="costCenter02" type="script">-->
<!-- <![CDATA[-->
<!-- def costCenter02Code = "P350401026"-->
<!-- costCenterContext.setCode(costCenter02Code)-->
def costCenter02Name = "商品车物流部利润中心"
costCenterContext.setName(costCenter02Name)
<!-- def costCenter02Name = "商品车物流部利润中心"-->
<!-- costCenterContext.setName(costCenter02Name)-->
costCenterContext.setGenerateCode(costCenter02Code + costCenter02Name)
]]>
</node>
<node id="s9" name="sout" type="script">
<![CDATA[
def defaultName = "无匹配项"
costCenterContext.setGenerateCode(defaultName)
]]>
</node>
</nodes>
<!-- costCenterContext.setGenerateCode(costCenter02Code + costCenter02Name)-->
<!-- ]]>-->
<!-- </node>-->
<!-- <node id="s9" name="sout" type="script">-->
<!-- <![CDATA[-->
<!-- def defaultName = "无匹配项"-->
<!-- costCenterContext.setGenerateCode(defaultName)-->
<!-- ]]>-->
<!-- </node>-->
<!-- </nodes>-->
</flow>

View File

@ -0,0 +1,181 @@
/dynamicScript/createCostCenterIfNode
{
"scriptId": "a3",
"scriptName": "costCenter01Cmp",
"roles": [
{
"logicOperators": "$or",
"children": [
{
"logicOperators": "$and",
"matches": [
{
"conditionalOperators": "$contains",
"matchingValue": "sectionClassification",
"matchingContent": "sectionClassificationList"
},
{
"conditionalOperators": "$contains",
"matchingValue": "businessType",
"matchingContent": "businessTypeList"
},
{
"conditionalOperators": "$contains",
"matchingValue": "salesman",
"matchingContent": "salesmanList"
},
{
"conditionalOperators": "$contains",
"matchingValue": "businessCategory",
"matchingContent": "businessCategoryList"
}
]
}
]
}
]
}
/dynamicScript/createCostCenterNode
{
"scriptId": "a4",
"scriptName": "costCenter02Cmp",
"roles": [
{
"logicOperators": "$or",
"children": [
{
"logicOperators": "$or",
"children": [
{
"logicOperators": "$and",
"matches": [
{
"conditionalOperators": "$contains",
"matchingValue": "sectionClassification",
"matchingContent": "sectionClassificationList"
},
{
"conditionalOperators": "$contains",
"matchingValue": "salesman",
"matchingContent": "salesmanList"
}
]
}
]
}
]
},
{
"logicOperators": "$or",
"matches": [
{
"conditionalOperators": "$contains",
"matchingValue": "businessType",
"matchingContent": "businessTypeList"
}
]
}
]
}
/dynamicScript/createProfitCenterIfNode
{
"scriptId": "a1",
"scriptName": "profitCenter01Cmp",
"roles": [
{
"logicOperators": "$or",
"children": [
{
"logicOperators": "$and",
"matches": [
{
"conditionalOperators": "$contains",
"matchingValue": "businessType",
"matchingContent": "businessTypeList"
},
{
"conditionalOperators": "$contains",
"matchingValue": "salesman",
"matchingContent": "salesmanList"
},
{
"conditionalOperators": "$contains",
"matchingValue": "businessCategory",
"matchingContent": "businessCategoryList"
}
]
}
]
},
{
"logicOperators": "$or",
"children": [
{
"logicOperators": "$and",
"matches": [
{
"conditionalOperators": "$contains",
"matchingValue": "sectionClassification",
"matchingContent": "sectionClassificationList"
},
{
"conditionalOperators": "$contains",
"matchingValue": "businessType",
"matchingContent": "businessTypeList"
}
]
}
]
}
]
}
/dynamicScript/createProfitCenterIfNode
{
"scriptId": "a2",
"scriptName": "profitCenter02Cmp",
"roles": [
{
"logicOperators": "$or",
"children": [
{
"logicOperators": "$and",
"matches": [
{
"conditionalOperators": "$contains",
"matchingValue": "businessType",
"matchingContent": "businessTypeList"
},
{
"conditionalOperators": "$contains",
"matchingValue": "salesman",
"matchingContent": "salesmanList"
}
]
}
]
},
{
"logicOperators": "$or",
"children": [
{
"logicOperators": "$and",
"matches": [
{
"conditionalOperators": "$contains",
"matchingValue": "sectionClassification",
"matchingContent": "sectionClassificationList"
},
{
"conditionalOperators": "$contains",
"matchingValue": "businessType",
"matchingContent": "businessTypeList"
}
]
}
]
}
]
}