数据库行中的公式-Java

数据库行中的公式-Java,java,parsing,dsl,formula,Java,Parsing,Dsl,Formula,要么这个要求很奇怪,要么我应该把自己弄糊涂了 我有一个30列的规则表。根据提要的类型,将提要文件中的每一行与某些或所有条件进行比较。域是银行业,应用程序用于贷款报告(例如,报告担保贷款和无担保贷款总额) 这是我的问题: If the (total of collateral amount)> loan principal amount, then consider the principal amount for consolidation Else if the (total of c

要么这个要求很奇怪,要么我应该把自己弄糊涂了 我有一个30列的规则表。根据提要的类型,将提要文件中的每一行与某些或所有条件进行比较。域是银行业,应用程序用于贷款报告(例如,报告担保贷款和无担保贷款总额)

这是我的问题:

If the (total of collateral amount)> loan principal amount, then consider the principal amount for consolidation

Else if the (total of collateral amount)<loan principal amount, then consider only the amount covered by collateral
<代码>如果(抵押品总额)>贷款本金金额,则考虑合并的本金金额。
否则,如果(抵押品总额),您可以使用业务规则引擎来实现,而不是实现您自己的解析逻辑或编写DSL

有关详细信息,请参阅。大多数规则引擎都允许您用简单的英语创建语法来定义这些规则。我们用它来定义这些规则。还有其他几种商业和开源规则引擎可用。一个流行的开源软件是