📜  可以流口水调用方法 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:11.380000             🧑  作者: Mango

代码示例1
package droolsexample

// list any import classes here.
import com.sample.ItemCity;
import java.math.BigDecimal;

// declare any global variables here
dialect "java"
rule "Pune Medicine Item"

   when
      $item : ItemCity (purchaseCity == ItemCity.City.PUNE,
                       typeofItem == ItemCity.Type.MEDICINES)

   then
      BigDecimal tax = new BigDecimal(0.0);
      $item.setLocalTax(tax.multiply($item.getSellPrice()));
end