보조지표 직접입력 오류 수정

This commit is contained in:
Macbook
2026-06-17 23:28:17 +09:00
parent 5236a6cd46
commit 3130de113b
5 changed files with 68 additions and 23 deletions
@@ -20,12 +20,18 @@ public final class IndicatorHlineResolver {
if (field == null || field.isBlank()) return null;
// K_ 직접입력 — targetValue 가 있으면 thresholdOverride 플래그와 무관하게 우선
if (field.startsWith("K_") && cond != null && cond.has("targetValue") && !cond.path("targetValue").isNull()) {
return cond.path("targetValue").asDouble();
boolean override = cond != null && cond.path("thresholdOverride").asBoolean(false);
// K_ 직접입력 — targetValue·override 시 필드명/스냅샷 숫자 우선
if (field.startsWith("K_")) {
if (cond != null && cond.has("targetValue") && !cond.path("targetValue").isNull()) {
return cond.path("targetValue").asDouble();
}
if (override) {
try { return Double.parseDouble(field.substring(2)); } catch (NumberFormatException ignored) {}
}
}
boolean override = cond != null && cond.path("thresholdOverride").asBoolean(false);
if (override) {
if (cond.has("targetValue") && !cond.path("targetValue").isNull()) {
return cond.path("targetValue").asDouble();