公式计算bug修复
This commit is contained in:
@@ -9,6 +9,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import com.alibaba.qlexpress4.Express4Runner;
|
||||
import com.alibaba.qlexpress4.QLOptions;
|
||||
import com.alibaba.qlexpress4.QLResult;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -87,8 +88,8 @@ public class AllowanceCalculatorComponent {
|
||||
|
||||
try {
|
||||
// Object result = expressRunner.execute(formula, context, null, true, false);
|
||||
Object result = express4Runner.execute(formula, context, QLOptions.builder().precise(true).build());
|
||||
|
||||
QLResult execute = express4Runner.execute(formula, context, QLOptions.builder().precise(true).build());
|
||||
Object result = execute.getResult();
|
||||
if (result == null) {
|
||||
throw new RuntimeException("Express 公式返回结果为 null");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user